| 13 | | * Where it should lead: |
|---|
| 14 | | * Actions should be coded closer to the object their working on |
|---|
| 15 | | - main actions - not dependent on GUI components (load/save/new/quit) |
|---|
| 16 | | - main actions dependent on GUI component (sub-windows, console) |
|---|
| 17 | | - Item actions, act either on a diagram, the selected or focused item |
|---|
| 18 | | or no item. |
|---|
| 19 | | - diagram actions (zoom, grid) work on active diagram (tab) |
|---|
| 20 | | - menus and actions for diagram items through adapters |
|---|
| | 12 | The do_activate signal is emitted when an action is activated. |
|---|
| 22 | | * Each window has it's own action group / every item with a menu! |
|---|
| 23 | | * One action group for the application/gui_manager |
|---|
| 24 | | * One toplevel UIManager per window or one per application/gui_manager? |
|---|
| 25 | | ? Actions should inherit from gtk.Action |
|---|
| 26 | | ? Actions should be modeled as functions (methods) with action as |
|---|
| 27 | | first (sec) parameter. |
|---|
| 28 | | * filename should not be part of the main window |
|---|
| | 14 | Where it should lead: |
|---|
| | 15 | * Actions should be coded closer to the object their working on |
|---|
| | 16 | - main actions - not dependent on GUI components (load/save/new/quit) |
|---|
| | 17 | - main actions dependent on GUI component (sub-windows, console) |
|---|
| | 18 | - Item actions, act either on a diagram, the selected or focused item |
|---|
| | 19 | or no item. |
|---|
| | 20 | - diagram actions (zoom, grid) work on active diagram (tab) |
|---|
| | 21 | - menus and actions for diagram items through adapters |
|---|
| | 22 | |
|---|
| | 23 | * Actions should behave more like adapters. E.g. when a popup menu is created |
|---|
| | 24 | for an Association item, the menu actions should present themselves in the |
|---|
| | 25 | context of that menu item (with toggles set right) |
|---|
| | 26 | - Could be registered as adapters with a name. |
|---|
| | 27 | |
|---|
| | 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 | * 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 |
|---|
| | 37 | visible depends on the state in the action. Hence we require the update() |
|---|
| | 38 | method. |
|---|
| | 39 | |
|---|
| 30 | | - RecentFiles will manage up to 10 recent files entries. |
|---|
| 31 | | - same for stereotypes: should be managed by one "ObjectAction". |
|---|
| 32 | | - can Placeholders play a role here? |
|---|
| 33 | | |
|---|
| | 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. |
|---|