Skip to content

The Menu

saiftynet edited this page Feb 16, 2018 · 7 revisions

Much of the concepts of the menus is learnt from Robert Alamaos tutorial on this topic. Menus are (as in therest of the desin process) generated by converting a textual representation of the menu tree. There is a menu, associated with this multiple manu tabs, and from each menu tab comes multiple menu items and ocasionally separators. These menu items (not separators of course) trigger functions when clicked. They may also feature check or radio buttons. Submenus will be developed in the future.

The design.

The design process is simple. The GUI defining text string is parsed. The "Menu" keyword at the beginning of a line indicates the start of a menu definition. Each subsequent line (until a blank line) is processed. Menu tabs are indicated with a single "-", Menu items with "--", Submenus with "---" (implemented soon), Separators with "----". Additionally menu items may be followed by "check" or "radio" after a semi colon. ##Example

Menu
-File
--Save
--Open
--New
--Quit
-Edit
--Undo
--Cut
--Paste
-Options
--red;check
--blue;check
--green;check
Clone this wiki locally