Show
Ignore:
Timestamp:
09/06/07 05:12:04 (1 year ago)
Author:
arj..@yirdis.nl
Message:

updated readme file (typos and some additions)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphas/trunk/README.txt

    r1855 r2094  
    2121.. contents:: 
    2222 
     23 
    2324How it Works 
    2425============ 
     
    54553. Solve constraints. 
    55564. Normalize items by setting the coordinates of the first handle to (0, 0). 
    56 5. Updating Canavs-to-Item matrices for items that have been changed by 
    57    normalizarion, just to be on the save side. 
     575. Updating Canvas-to-Item matrices for items that have been changed by 
     58   normalization, just to be on the save side. 
    58596. Item.post_update(context) for each item marked for update, including items 
    5960   that have been marked during constraint solving. 
     
    7576A word about the constraint solver seems in place. It is one of the big 
    7677features of this library after all. The Solver is able to solve constraints. 
    77 Constraints can be applied to items (e.g. the Element item uses constraints to 
    78 maintain it's recangular shape) and constraints can be created *between* items 
    79 (for example a line that connects to a box). 
    80  
    81 Constaints that apply to one item are pretty straight forward, as all variables 
     78Constraints can be applied to items (Variables owned by the item actually). 
     79Element items, for example, uses constraints to maintain their recangular 
     80shape. Constraints can be created *between* items (for example a line that 
     81connects to a box). 
     82 
     83Constraints that apply to one item are pretty straight forward, as all variables 
    8284live in the same coordinate system (of the item). The variables (in most cases 
    8385a Handle's x and y coordinate) can simply be put in a constraint. 
     
    9799Canvas (first root item, then it's children; second root item, etc.) 
    98100 
    99 There used to be a draw_children() method in the view context. This method 
    100 has been rendered obsolete (mainly to speed up drawing). 
    101101The view context passed to the Items draw() method has the following properties: 
    102102 
     
    123123Tools 
    124124----- 
    125 Behavior is added to the canvas(-view) by tools. 
    126  
    127 Tools can be chained together in order to provide more complex behavior. 
     125Behaviour is added to the canvas(-view) by tools. 
     126 
     127Tools can be chained together in order to provide more complex behaviour. 
    128128 
    129129To make it easy a DefaultTool has been defined: a ToolChain instance with the 
     
    144144HandleTool 
    145145    The HandleTool is used to deal with handles. Handles can be dragged around. 
    146     Clicking on a handle automatically makes the underlaying item the focused 
     146    Clicking on a handle automatically makes the underlying item the focused 
    147147    item. 
    148148 
     
    151151 
    152152TextEditTool 
    153     This is a demo-tool, featuring a text-edit popup. 
     153    This is a demo-tool, featuring a text-edit pop-up. 
    154154 
    155155RubberbandTool 
    156     The last toolin line is the rubberband tool. It's invoked when the mouse 
     156    The last tool in line is the rubber band tool. It's invoked when the mouse 
    157157    button is pressed on a section of the view where no items or handles are 
    158158    present. It allows the user to select items using a selection box 
    159     (rubberband). 
     159    (rubber band). 
    160160 
    161161 
     
    166166see that especially the way items connect with each other is not the way 
    167167you want it. That's okay. HandleTool provides some hooks (connect, disconnect 
    168 and glue) to implement custom connection behavior (in fact, the default 
     168and glue) to implement custom connection behaviour (in fact, the default 
    169169implementation doesn't do any connecting at all!). 
    170170 
     
    195195 
    196196tree.py: 
    197     Central tree structure (no more CanvasGroupable) 
     197    Central tree structure 
    198198solver.py: 
    199199    A constraint solver (infinite domain, based on diacanvas2's solver) 
     
    221221    Simple example classes. 
    222222 
     223 
    223224Guidelines 
    224225========== 
     226 
     227Documentation should be in UK English. 
     228 
    225229Following the `Python coding guidelines`_ indentation should be 4 spaces 
    226230(no tabs), function and method names should be ``lowercase_with_underscore()``, 
     
    249253 
    250254.. _Python coding guidelines: http://www.python.org/dev/peps/pep-0008/ 
     255