Laxkit
0.0.7.1
|
Classes | |
class | Laxkit::FileMenuItem |
Sub class of MenuItem to read in directories only when needed. More... | |
class | Laxkit::MenuItem |
Node type for MenuInfo. More... | |
class | Laxkit::MenuInfo |
General container for menu types of lists. More... | |
class | Laxkit::MenuSelector |
General list and menu controller. Base class for PopupMenu. More... | |
class | Laxkit::PopupMenu |
Class for, of all things, popup menus. More... | |
class | Laxkit::SliderPopup |
Basically an extended IconSlider to include a popup MenuSelector. More... | |
class | Laxkit::TreeSelector |
Collapsible tree view. More... |
Typedefs | |
typedef int(* | Laxkit::CompareFunc )(const char *s1, const char *s2) |
These are classes related to building and accessing menus in various forms. The main menu structure is MenuInfo, which contains a stack of MenuItem instances, which in turn can contain a submenu. One can derive classes from MenuItem to add special fields.
This MenuInfo/MenuItem system is basically a tree that can be traversed only downward. This makes building of composite menus fairly easy, such as for context sensitve popup menus. Also, the whole tree does not have to be created beforehand. Each item can be tagged with MENU_HAS_SUBMENU to indicate that a submenu is available if necessary.
The Laxkit window classes that use this structure are MenuSelector , PopupMenu, and Laxkit::StrSliderPopup.
*** fltk has neat add like
add("File")
add("File/1st file itme")
add("File/2nd...")
menu.Add("blah1",id=1,grayed) menu.Add("blah2",2) menu.SubMenu([title]) menu.Add("a") menu.Add("b") menu.SubMenu([title],position==last added) menu.Add("1") menu.Add("2") menu.EndSubmenu() menu.EndSubmenu() menu.Add("blah4"); menu.AddSep(); menu.Add("blah5");