pdk.Gui.Widgets.AggregatedWidgets ($Date: 2002/12/04 10:16:47 $)
index
pdk/Gui/Widgets/AggregatedWidgets.py

Aggregated widget classes.

"Aggregated Widgets" are similar to the "MegaWidgets" for Tk; they are "leaf" widgets (i.e., widgets without children) wrapping several configurable components.

FOG 04.2000

 
Classes
            
Component
pdk.Gui.Widgets.CoreWidgets.pdkWidget(pdk.Gui.WidgetStateManagers.StatefulWidget, pdk.Base.OptionHandler)
AggregationWidget(wxPython.windows.wxPanel, pdk.Gui.Widgets.CoreWidgets.pdkWidget)
AggExitButtonBox
AggTextCtrl
AggFloatTextCtrl
AggIntegerTextCtrl
_AggSingleChoiceWidget
AggChoice
AggClientDataChoice
AggClientDataComboBox
AggClientDataListBox
AggComboBox
AggListBox
_AggSpinCtrl
AggFloatSpinCtrl
AggIntegerSpinCtrl
wxPython.windows.wxPanel(wxPython.windows.wxPanelPtr)
AggregationWidget(wxPython.windows.wxPanel, pdk.Gui.Widgets.CoreWidgets.pdkWidget)
AggExitButtonBox
AggTextCtrl
AggFloatTextCtrl
AggIntegerTextCtrl
_AggSingleChoiceWidget
AggChoice
AggClientDataChoice
AggClientDataComboBox
AggClientDataListBox
AggComboBox
AggListBox
_AggSpinCtrl
AggFloatSpinCtrl
AggIntegerSpinCtrl
 
class AggChoice(_AggSingleChoiceWidget)
     
Purpose:a pdk.Gui.Widgets.pdkChoice with a label

 
  
Method resolution order:
AggChoice
_AggSingleChoiceWidget
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler
 
class AggClientDataChoice(_AggSingleChoiceWidget)
     
Purpose:a pdk.Gui.Widgets.ClientDataChoice with a label

 
  
Method resolution order:
AggClientDataChoice
_AggSingleChoiceWidget
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggClientDataComboBox(_AggSingleChoiceWidget)
     
Purpose:a pdk.Gui.Widgets.ClientDataComboBox with a label

 
  
Method resolution order:
AggClientDataComboBox
_AggSingleChoiceWidget
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggClientDataListBox(_AggSingleChoiceWidget)
     
Purpose:a pdk.Gui.Widgets.ClientDataListBox with a label

 
  
Method resolution order:
AggClientDataListBox
_AggSingleChoiceWidget
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggComboBox(_AggSingleChoiceWidget)
     
Purpose:a pdk.Gui.Widgets.pdkComboBox with a label

 
  
Method resolution order:
AggComboBox
_AggSingleChoiceWidget
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggExitButtonBox(AggregationWidget)
     
Purpose:a standard button box with "Ok" and "Cancel" buttons

 
  
Method resolution order:
AggExitButtonBox
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Methods defined here:
onInstantiate(self)

Data and non-method functions defined here:
ADDOPTIONS = (('ok', (1, 2304, 5)), ('cancel', (1, 2304, 5)))
COMPONENTS = {'cancel': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>, 'ok': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggFloatSpinCtrl(_AggSpinCtrl)
     
Purpose:a wxSpinButton with an AggTextCtrl that accepts only floats

 
  
Method resolution order:
AggFloatSpinCtrl
_AggSpinCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggFloatTextCtrl(AggTextCtrl)
       
  
Method resolution order:
AggFloatTextCtrl
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggIntegerSpinCtrl(_AggSpinCtrl)
     
Purpose:a wxSpinButton with an AggTextCtrl that accepts only integers

 
  
Method resolution order:
AggIntegerSpinCtrl
_AggSpinCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler
 
class AggIntegerTextCtrl(AggTextCtrl)
       
  
Method resolution order:
AggIntegerTextCtrl
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggListBox(_AggSingleChoiceWidget)
     
Purpose:a pdk.Gui.Widgets.pdkListBox with a label

 
  
Method resolution order:
AggListBox
_AggSingleChoiceWidget
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggTextCtrl(AggregationWidget)
     
Purpose:a wxTextCtrl with one or two labels

 
  
Method resolution order:
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Methods defined here:
onInstantiate(self, **addD)

Data and non-method functions defined here:
ADDOPTIONS = (('text', (1, 18976, 5)), ('main', (1, 33, 5)), ('secondtext', (0, 18720, 5)))
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>, 'secondtext': <pdk.Gui.Widgets.AggregatedWidgets.LabelComponent instance>, 'text': <pdk.Gui.Widgets.AggregatedWidgets.LabelComponent instance>}
WIDGETOPTIONS = {'textWidth': None}
 
class Component
     
Purpose:base class of all Aggregated Widget components
Detail:serves as a wrapper facilitating component specification; _class is the class of the widget to use as a component, defaultArgT are its positional and defaultOptionD its keyword arguments.

 
   Methods defined here:
__call__(self, parent, wxId, *argT, **optionD)
__init__(self, _class, *defaultArgT, **defaultOptionD)
 
class _AggSingleChoiceWidget(AggTextCtrl)
     
Purpose:base class for aggregated dropdown menus

 
  
Method resolution order:
_AggSingleChoiceWidget
AggTextCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Data and non-method functions defined here:
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
 
class AggregationWidget(wxPython.windows.wxPanel, pdk.Gui.Widgets.CoreWidgets.pdkWidget)
     
Purpose:base class for all Aggregated Widget classes
Detail:

provides the functionality needed

  1. for configuring/referencing component options with the

         "<agg_widget_instance>_<component_option>"
         
    notation
    
  2. for component layout by calling their onInstantiate method

The basic orientation of the sizer is determined by the constructor keyword argument "orientation".

By convention, a component of name "foo" is stored as an attribute "_foo" and can be referenced with .foo (although the .getComponent method is preferable for this purpose).

Components are declared in the class name space of the aggregated widget class as a dictionary "COMPONENTS", which is of the form

{ <component name> : <component instance> }

where <component instance> is an instance of a (subclass of) Component, a simple wrapper that allows static definition of widgets to be instantiated later. Optionally, a tuple "ADDOPTIONS" of the form

( (<component name>, <sizer arguments>), ... )

where <sizer arguments> is a tuple of arguments to be passed to the Add method of the sizer for the component specified by <component name> to specify the layout of the components. If it is defined, it needs to supply layout options for each of the components declared in the "COMPONENTS" dictionary.


 
  
Method resolution order:
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Methods defined here:
Enable(self, flag)
adds recursive calls to .Enable of components. Fails silently if any component fails to declare an .Enable method.
__getattr__(self, attr)
Delegate attribute references: 1) try returning a component; 2) try returning an attribute of the main component.
__init__(self, parent, wxId, *argT, **optionD)
connectStateSignal(self, callBackF)
disconnectStateSignal(self)
getComponent(self, componentName)
returns the component specified by componentName or raises an AttributeError, if no such component exists. If components are AggregationWidget instances themselves, their components can be accessed with the usual "_" notation (as in "main_component_subcomponent").
getState(self, stateType)
onInstantiate(self, **addD)
setComponentSize(self, componentName, width, height)
sets the size of the component specified by componentName to width width and height height.
setState(self, stateType, value)

Data and non-method functions defined here:
ADDOPTIONS = ()
COMPONENTS = {}
 
class _AggSpinCtrl(AggregationWidget)
     
Purpose:an extended wxPython.wx.wxSpinCtrl
Detail:by using different text control classes as the "main" component subclasses can implement spin controls.

 
  
Method resolution order:
_AggSpinCtrl
AggregationWidget
wxPython.windows.wxPanel
wxPython.windows.wxPanelPtr
wxPython.windows.wxWindowPtr
wxPython.windows.wxEvtHandlerPtr
wxPython.misc.wxObjectPtr
pdk.Gui.Widgets.CoreWidgets.pdkWidget
pdk.Gui.WidgetStateManagers.StatefulWidget
pdk.Base.OptionHandler

Methods defined here:
GetMax(self)
GetMin(self)
GetStepSize(self)
GetValue(self)
OnSpin(self, ev)
OnText(self, ev)
SetRange(self, minValue, maxValue)
SetStepSize(self, stepSize)
SetValue(self, newValue)
__init__(self, parent, wxId, **optionD)

Data and non-method functions defined here:
ADDOPTIONS = (('main', (1, 8224, 5)), ('spinbutton', (0, 1)))
COMPONENTS = {'main': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>, 'spinbutton': <pdk.Gui.Widgets.AggregatedWidgets.Component instance>}
WIDGETOPTIONS = {'initialValue': 0, 'maxValue': 100, 'minValue': 0, 'stepSize': 1}
 
Author
            
$Author: gathmann $