Changeset 1310 for gaphor/trunk/doc

Show
Ignore:
Timestamp:
05/23/07 22:44:28 (1 year ago)
Author:
arj..@yirdis.nl
Message:
  • Added item_at(x, y) method to diagram items.
  • updated class editor to use item_at()
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/trunk/doc/actions.txt

    r1252 r1310  
    2727 
    2828 * 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) 
    3029 * 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 
    3731   visible depends on the state in the action. Hence we require the update() 
    3832   method. 
    3933 
    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) 
    4935 
    5036 
    5137Solution for simple actions 
    52 =========================== 
     38--------------------------- 
    5339 
    5440For an action to actually be useful a piece of menu xml is needed. 
     
    5945        menu_xml = interface.Attribute("The menu XML") 
    6046        action_group = interface.Attribute("The accompanying ActionGroup") 
    61         def update(self)? 
    6247 
    6348Support for actions can be arranged by decorating actions with an @action 
     
    8065 
    8166Solution for context sensitive menus 
    82 ==================================== 
     67------------------------------------ 
    8368 
    8469Context sensitive menus, such as popup menus, should be generated and switched 
     
    9378like that for text around association ends). 
    9479 
     80Scheme: 
     811. User selects an item and presses the rigth mouse button: a popup menu 
     82   should be displayed. 
     832. 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). 
     862. Find a IActionProvider adapters for the selected (focused) item. 
     873. update the popup menu context (actions) for the selected item. 
     88