Ok, here is what I am doing right now. The container widget SfNavMenu extends QxVerticalBoxLayout(Sf is my namespace, will change it to Qx when and if this widget is useful in qooxdoo) has a property maxHeight, which ultimatelly governs how many items could be displayed fully. In the constructor for SfNavMenu i am adding icon box as the last element. I override .add method from QxWidget so that add adds items to the position next to last (last item is the iconbox). SfNavMenu also has QxRadioManager for managing item selection. The handler for _modifyMaxHeight, figures out how many items can be displayed fully with labels and larger icons and either moves items from icon box at the bottom to self or the other way arround. The menu will fire selection change event so that listeners can be attached.
Each item is SfNavMenuButton extends QxAtom. SfNavMenuButtons can find which QxNavMenu they belong to, by traversing parent hierarchy to find SfNavMenu.prototype.isPrototypeOf(curParent). This way there is no hard linking between items and menu that contains it. The handler _modifyParent will take care of registering/unregistering items with the manager from the parent menu. It is sort of lame that moving item from iconbox to the menu will trigger unregister/register, but that's ok i guess. SfNavMenuButton will also have methods for converting them between showing both icon and text and showing smaller icon. These methods will be called from inside _modifyParent handler. It also overrides _modifyFont method to only change font on the label part of QxAtom. One difference from 0.1.4 release that I find to be somewhat annoying is that in 0.1.4 changes in widget state where also reflected in its cssClassName, which allowed me to do skinning of the widget through my stylesheet that referenced images from my images directory via relative path for backgrounds and such. Without this functionality doing css custom skinning is impossible, and i am currently forced to hardcode image paths inside the widget code. What is the thinking with regards to this? I think that ability to skin widgets through a custom stylesheet is a killer feature, especially in the new world of gradient backgrounds. We should at least provide an api for adding css class name modifiers like addCssClassName/removeCssClassName from 0.1.4. thanks, andrey. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
