SDS2 Parametric API
 All Classes Namespaces Functions Variables Pages
List of all members
dialog.modelroot.ModelRoot Class Reference

A ModelRoot is an item in the dialog which can have .model assigned to it and will use that list of models, with a controller, to load and save from the dialog items under it. More...

Inheritance diagram for dialog.modelroot.ModelRoot:
dialog.item.Item dialog.dialog.DialogBase dialog.frame.Frame dialog.page.Page dialog.subdialog.Subdialog dialog.table.RowManager dialog.tabset.Tab dialog.dialog.Dialog dialog.dialog.Wizard dialog.pmdialog.PMDialog dialog.frame.Column dialog.frame.LoadableFrame

Methods defined here:

def AddRule
def GetField
def foo
def Revert
def Set
def foo
def __empty_value__
def __get_controller__
def __get_display__
def __get_model__
def __get_root__
def __getitem__
def __init__
def __set_controller__
def __set_model__
def foo
def run_pending
def size_info

Data descriptors defined here:

def controller
def display
def model
def root
 This actually searches up the tree for a model root because this can change as the dialog is being built.
def valid

Data and other attributes defined here:

 Controller = None
 Display = None
 DisplayModelFactory = None
 Model = None
 Root = None
 Setup = False
 Values = None

Methods inherited from dialog.item.Item:

def AddContext
def AddStateFunction
def DisableIf
def EnableIf
def EvaluateValid
def Find
def HasContext
def IsEnabled
def RemoveStateFunction
def SetValid
def Update
def __delitem__
def __get_children__
def __get_dialog__
def __getnopack__
def __getparent__
def __getrules__
def __getvalid__
def __pending__
def __setnopack__
def child_added
def child_removed
def find_type

Data descriptors inherited from dialog.item.Item:

def __dict__
 dictionary for instance variables (if defined)
def __weakref__
 list of weak references to the object (if defined)
def children
def dialog
def item_valid
def no_pack
def parent
def rules
 Returns a list of all of the current rule skeletons.

Data and other attributes inherited from dialog.item.Item:

 Context = None
 CurrentlyEnabled = True
tuple RuleRegistry = ()
 Rules = None
 WatchChild = None
 __Load__ = None
 __Store__ = None

Additional Inherited Members

- Public Member Functions inherited from dialog.item.Item
- Static Public Attributes inherited from dialog.item.Item
 Context = None
 CurrentlyEnabled = True
tuple RuleRegistry = ()
 Rules = None
 WatchChild = None

Detailed Description

A ModelRoot is an item in the dialog which can have .model assigned to it and will use that list of models, with a controller, to load and save from the dialog items under it.

So a single dialog can have multiple model sources using ModelRoot.

Method resolution order

ModelRoot
dialog.item.Item
builtin.object

Constructor & Destructor Documentation

def dialog.modelroot.ModelRoot.__init__ (   args)

Member Function Documentation

def dialog.modelroot.ModelRoot.__delitem__ (   args)
 This function actually destroys the child and all of its children.
 All tk widgets will be destroyed.  All items are removed from the tree
 and destroyed as soon as possible.

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.__dict__ (   args)
def dialog.modelroot.ModelRoot.__empty_value__ (   args)
def dialog.modelroot.ModelRoot.__get_children__ (   args)
def dialog.modelroot.ModelRoot.__get_controller__ (   args)
def dialog.modelroot.ModelRoot.__get_dialog__ (   args)
def dialog.modelroot.ModelRoot.__get_display__ (   args)
def dialog.modelroot.ModelRoot.__get_model__ (   args)
def dialog.modelroot.ModelRoot.__get_root__ (   args)
def dialog.modelroot.ModelRoot.__getitem__ (   args)
def dialog.modelroot.ModelRoot.__getnopack__ (   args)
def dialog.modelroot.ModelRoot.__getparent__ (   args)
def dialog.modelroot.ModelRoot.__getrules__ (   args)
def dialog.modelroot.ModelRoot.__getvalid__ (   args)
def dialog.modelroot.ModelRoot.__pending__ (   args)
def dialog.modelroot.ModelRoot.__set_controller__ (   args)
def dialog.modelroot.ModelRoot.__set_model__ (   args)
def dialog.modelroot.ModelRoot.__setnopack__ (   args)
def dialog.modelroot.ModelRoot.__weakref__ (   args)
def dialog.modelroot.ModelRoot.AddContext (   args)
def dialog.modelroot.ModelRoot.AddRule (   args)
def dialog.modelroot.ModelRoot.AddStateFunction (   args)
 Append a function to the list of functions used to evaluate
 the current state (enabled/disabled) of this widget.
 
 Functions will be passed no arguments and should return True if
 this Item should be enabled.  False if it should be disabled.

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.child_added (   args)
def dialog.modelroot.ModelRoot.child_removed (   args)
def dialog.modelroot.ModelRoot.children (   args)
def dialog.modelroot.ModelRoot.controller (   args)
def dialog.modelroot.ModelRoot.dialog (   args)
def dialog.modelroot.ModelRoot.DisableIf (   args)
 Disable this item if expression is True
 
 @param expression Must be a string representing a python
                   expression which returns True or False.  True
                   indicating that you should disable the item for now.
                   False indicating that you shouldn't.
                   You may use, as variable names, any field name 
                   within the model.
                   Example:
                   dlg = Dialog()
                   e = dlg.entry( 'name', 5 )
                   e2 = dlg.entry( 'other', 6 )
                   e2.DisableIf( 'other < 6 and name > 5', [e, e2] )
 @param depends a list of dialog fields that should trigger this to be re-evaluated.
                Generally, any name you use in your expression should be represented
                by the field object (such as Entry) that corresponds to that name in
                the depends list.  Failing to do so will cause this disabler to be re-evaluated
                less often than it should and it may not appear disabled/enabled at
                all of the appropriate times.

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.display (   args)
def dialog.modelroot.ModelRoot.EnableIf (   args)
def dialog.modelroot.ModelRoot.EvaluateValid (   args)
 override this to do something when your widget becomes invalid
 by proxy via an item under it which is invalid

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.frame.Frame, dialog.dialog.Wizard, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.page.Page, dialog.frame.Column, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, and dialog.tabset.Tab.

def dialog.modelroot.ModelRoot.Find (   args)
 This recursively searches the tree, from here down
 for things which match query.
 @param query A function which returns True or False
              It is passed on argument, which is an Item
 @note Example use is find_type

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.find_type (   args)
 This recursively searches the tree, from here down, for a type t.
 Example, to find all Fields:
 item.find_type( Field )

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.foo (   args)
def dialog.modelroot.ModelRoot.foo (   args)
def dialog.modelroot.ModelRoot.foo (   args)
def dialog.modelroot.ModelRoot.GetField (   args)
def dialog.modelroot.ModelRoot.HasContext (   args)
def dialog.modelroot.ModelRoot.IsEnabled (   args)
def dialog.modelroot.ModelRoot.item_valid (   args)
def dialog.modelroot.ModelRoot.model (   args)
def dialog.modelroot.ModelRoot.no_pack (   args)
def dialog.modelroot.ModelRoot.parent (   args)
def dialog.modelroot.ModelRoot.RemoveStateFunction (   args)
def dialog.modelroot.ModelRoot.Revert (   args)
def dialog.modelroot.ModelRoot.root (   args)

This actually searches up the tree for a model root because this can change as the dialog is being built.

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.rules (   args)

Returns a list of all of the current rule skeletons.

These will be tuples of types and arguments intended for constructing each type. Generally intended for internal use.

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.table.RowManager, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.run_pending (   args)
def dialog.modelroot.ModelRoot.Set (   args)
def dialog.modelroot.ModelRoot.SetValid (   args)
 Call this to set invalid or valid this Item.  It will keep
 count of valid=True and valid=False.  So, if you call this
 3 times with valid=False and 1 time with valid=True it will
 still be invalid.
 
 It is up to the caller to make sure they even those calls out.
 Consider your default state to be valid=True.  Calling valid=True,
 then valid=False will yield valid.
 
 @param valid True or False "True" meaning that we are currently
              in a valid state.  "False" meaning invalid.
 
 @warning This is intended for class implementors.  There are
          Modified and Validate rules for dialog creators.

Reimplemented from dialog.item.Item.

Reimplemented in dialog.frame.LoadableFrame, dialog.dialog.Wizard, dialog.frame.Frame, dialog.dialog.DialogBase, dialog.pmdialog.PMDialog, dialog.dialog.Dialog, dialog.subdialog.Subdialog, dialog.tabset.Tab, dialog.page.Page, dialog.table.RowManager, and dialog.frame.Column.

def dialog.modelroot.ModelRoot.size_info (   args)
def dialog.modelroot.ModelRoot.Update (   args)
def dialog.modelroot.ModelRoot.valid (   args)

Member Data Documentation

dialog.modelroot.ModelRoot.__Load__ = None
staticprivate
dialog.modelroot.ModelRoot.__Store__ = None
staticprivate
dialog.modelroot.ModelRoot.Context = None
static
dialog.modelroot.ModelRoot.Controller = None
static
dialog.modelroot.ModelRoot.CurrentlyEnabled = True
static
dialog.modelroot.ModelRoot.Display = None
static
dialog.modelroot.ModelRoot.DisplayModelFactory = None
static
dialog.modelroot.ModelRoot.Model = None
static
dialog.modelroot.ModelRoot.Root = None
static
tuple dialog.modelroot.ModelRoot.RuleRegistry = ()
static
dialog.modelroot.ModelRoot.Rules = None
static
dialog.modelroot.ModelRoot.Setup = False
static
dialog.modelroot.ModelRoot.Values = None
static
dialog.modelroot.ModelRoot.WatchChild = None
static