Search |
||
Ribbon and smart resizingPosted by kirillcool on October 7, 2005 at 2:42 AM PDT
One of my previous entries was written fresh on the heels of unveiling of the Office 12 UI. A lot of stuff was left unfinished, some of it due to lack of time, and most of it due to lack of information on how this UI really works. So, after reading plethora of information on Jensen's blog, the Java implementation of Ribbon has moved to the second gear.
The following points were missing in the initial implementation (see Jensen's blog for more details):
Every button that has a downward-pointing double arrow is a gallery button. In Office 12, clicking on such button will show a drop-down gallery of styles / choices / etc (like a combobox). Buttons with no arrows are simple buttons. In "Quick Styles" band, you can see an in-ribbon gallery. The UI designers may decide that some galleries are much more important than others. Such galleries can be put directly in the ribbon, with scroll buttons that scroll through the gallery icons, and downward-pointing arrow that shows the entire gallery as popup. In addition, note that gallery buttons come in three flavours:
The implementation of smart resizing is quite simple (although with a lot of technical details). First, there is a concept of collapse. Collapse is a request for some ribbon band to layout its components (gallery buttons, in-ribbon galleries and regular components) based on degree of collapsing. There are seven collapse degrees:
There are two kinds of layout managers, one for the ribbon and one for each ribbon band. When the layoutContainer() function of ribbon layout manager is called, it does the following:
As we start making the window smaller, the band with low priority buttons gets less space. Note that they go to MEDIUM state and not LOW:
Making the window smaller, the bands with medium (and low) priority buttons get less space. Note that both medium and low priority buttons go to MEDIUM state and not LOW (since there's enough space left):
Making the window smaller, the band with low priority buttons gets even less space. Note that now they go to LOW state:
Making the window smaller, the bands with medium and low priority buttons get less space, making all these buttons go to LOW state:
Making the window smaller, there isn't enough space for the high priority buttons. However, note that after requesting these buttons to go to MEDIUM state, there's enough space left to distribute between the bands to allow the leftmost band to show its buttons in MEDIUM state (as opposed to LOW state before):
Making the window smaller, there isn't enough space for the high or medium priority buttons:
Eventually the window gets so small that all buttons go to LOW state:
Note that here there's need for dynamically-resizing icons as the buttons change their icons on the fly. In the next installment i'll talk about drop-down galleries and various layouts. In the meantime, you are welcome to Flamingo homepage to see the code and download the binaries. »
Comments
Comments are listed in date ascending order (oldest first)
|
||
|