pdk.Gui.Layout ($Date: 2002/12/04 10:16:26 $)
index
pdk/Gui/Layout.py

The pdk widget layout class.

FOG 04.2001

 
Classes
            
WidgetLayouter
_LayoutStyleRegistry
 
class WidgetLayouter
     
Purpose:class used for layout of widgets in a grid
Detail:

this class only provides methods for creating widget layout constraints. The following layout options are recognized:

  • "row": row position in parent widget. Defaults to 0.
  • "column": column position in parent widget. Defaults to 0.
  • "rowspan": number of rows spanned. Defaults to 1.
  • "columnspan": number of columns spanned. Defaults to 1.
  • "pad", "padx", "pady", "padtop", "padbottom", "padleft","padright" : padding to frame of parent widget; all default to 0.
  • "padinner", "padinnerx", "padinnery", "padinnertop","padinnerbottom", "padinnerleft","padinnerright": padding to child widgets; all default to 0;
  • "fit" : if set to any combination of the chars "n","s","w","e" (capital letters also okay), the widget is stretched to the corresponding edge(s);
  • "align" : like "fit", but the widget`s size is not changed and it is moved from the default center position to the corresponding edge/corner instead. The "fit" and "align" options are mutually exclusive; also, setting "align" to "ns" or "ew" is bogus (and prohibited...)

 
   Methods defined here:
layout(self, widgetInfo, runtimeLayoutStyle=None, layoutOptions=None)
 
class _LayoutStyleRegistry
     
Purpose:dynamic registry of layout style : build classes mappings
Detail:

this is a

<widget base class> : <layout style> mapping.

Layout styles are given in a tuple (<widget layout style>,<children layout style>) as arbitrary combinations of the layout styles described above. New styles for other base classes can be added at runtime.


 
   Methods defined here:
addStyle(self, baseClass, styleOptionT)
getStyle(self, pyClass)
 
Functions
            
get_layoutstyle = getStyle(self, pyClass) method of _LayoutStyleRegistry instance
add_layoutstyle = addStyle(self, baseClass, styleOptionT) method of _LayoutStyleRegistry instance
 
Data
             LAYOUT_NONE = 0
LAYOUT_SELF = 1
LAYOUT_CHILDREN = 2
LAYOUT_AUTOLAYOUT = 4
LAYOUT_FORCE = 8
 
Author
            
$Author: gathmann $