]> Dogcows Code - chaz/openbox/blob - DESIGN/menu-thoughts.txt
i always forget this bit
[chaz/openbox] / DESIGN / menu-thoughts.txt
1 Okay Soldiers, here's the plan:
2 menu.c contains functions for handling a menu list. This may have to
3 be turned into an array.
4 The invalid bit denotes whether the menu must be rerendered. Normally,
5 it is auto-managed by the menu.c functions.
6
7 Each menu has a set of controller functions that handle behaviour:
8 show() - place a menu on screen
9 also, may rerender the menu if the invalid bit is set
10 hide() - hide a menu
11 mouseover() - called when the mouse moves over a new entry
12 may highlight new entry and display submenu
13 selected() - called when an item is clicked on
14 may execute, change config options?, perform action, or
15 display submenu
16 update() - re-render the menu
17
18 When a menu is rerendered, the engine can place any information like
19 (x,y) coordinates, appearances &c in the renderdata.
20
21 To customize the behaviour of a menu, set the controller function
22 pointers. Some ideas:
23 - we can have plugins for PipeMenus, FIFOMenus, ConfigMenus, Toolbar,
24 &c.
25 - a TimedUpdate menu (say for mp3 lists) could call update()
26 periodically.
27 - window lists/workspace menus need to be optimized somehow since
28 these change often, and modifying the list that often will be
29 crap. needs profiling.
This page took 0.039089 seconds and 4 git commands to generate.