Changeset 1310 for gaphor/trunk/doc
- Timestamp:
- 05/23/07 22:44:28 (1 year ago)
- Files:
-
- gaphor/trunk/doc/actions.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/doc/actions.txt
r1252 r1310 27 27 28 28 * Each window has it's own action group (every item with a menu?) 29 * One action group for the application/gui_manager (new/load/save/quit)30 29 * One toplevel UIManager per window or one per application/gui_manager? 31 ? Actions should inherit from gtk.Action. 32 Depends on the structure. Preferbly not, since it ties actions to GTK+ 33 (which is not a good thing for testing) 34 ? Actions should be modeled as functions (methods) with action as 35 first (sec) parameter. 36 Normal actions can be modeled as functions. If an action is sensitive or 30 * Normal actions can be modeled as functions. If an action is sensitive or 37 31 visible depends on the state in the action. Hence we require the update() 38 32 method. 39 33 40 * some sort of factory mechanism (MultiAction?). 41 - contains an ActionGroup and menu-XML. 42 - RecentFiles will manage up to 10 recent files entries. 43 - same for stereotypes: should be managed by one "ObjectAction". 44 - can Placeholders play a role here? Yes, they can be used to identify the 45 section where the actions should be put. 46 - In some cases multiple menu items may refer to the same action: 47 radio actions may (but this is not always the case) and the Recent files 48 functionality. 34 * create services for for "dynamic" menus (e.g. recent files/stereotypes) 49 35 50 36 51 37 Solution for simple actions 52 =========================== 38 --------------------------- 53 39 54 40 For an action to actually be useful a piece of menu xml is needed. … … 59 45 menu_xml = interface.Attribute("The menu XML") 60 46 action_group = interface.Attribute("The accompanying ActionGroup") 61 def update(self)?62 47 63 48 Support for actions can be arranged by decorating actions with an @action … … 80 65 81 66 Solution for context sensitive menus 82 ==================================== 67 ------------------------------------ 83 68 84 69 Context sensitive menus, such as popup menus, should be generated and switched … … 93 78 like that for text around association ends). 94 79 80 Scheme: 81 1. User selects an item and presses the rigth mouse button: a popup menu 82 should be displayed. 83 2. find the actual item (this may be a composite item of the element drawn). 84 Use an IItemPicker adapter for that (if no such interface is available, 85 use the item itself). 86 2. Find a IActionProvider adapters for the selected (focused) item. 87 3. update the popup menu context (actions) for the selected item. 88
