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

A table is a tk table widget on screen. More...

Inheritance diagram for dialog.table.Table:
dialog.item.Item dialog.widget.Widget

Methods defined here:

def __assert_rows__
def __column_added__
def __display__
def __get_column__
def __init__
def __pending__
def append_row
def copy_row
def cut_row
def delete_row
def paste_row
def paste_valid
def rebuild

Data descriptors defined here:

def table

Methods inherited from dialog.item.Item:

def AddContext
def AddRule
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 __get_root__
def __getnopack__
def __getparent__
def __getrules__
def __getvalid__
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 root
 This actually searches up the tree for a model root because this can change as the dialog is being built.
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

Methods inherited from dialog.widget.Widget:

def Destroy
def DoState
def GetWidget
def Grid
def Pack
def PackForget
def PackInfo
def PackSlaves
def SetEnabled
def SetWidget
def WatchState
def WidgetExists
def __get_widget__
def __set_widget__
def list_widgets

Data descriptors inherited from dialog.widget.Widget:

def default_color
def widget
 The main Tkinter widget for this item.

Data and other attributes inherited from dialog.widget.Widget:

 Enabled = True
 Extras = None

Additional Inherited Members

- Public Member Functions inherited from dialog.item.Item
- Public Member Functions inherited from dialog.widget.Widget
- Static Public Attributes inherited from dialog.item.Item
 Context = None
 CurrentlyEnabled = True
tuple RuleRegistry = ()
 Rules = None
 WatchChild = None
- Static Public Attributes inherited from dialog.widget.Widget
 Enabled = True
 Extras = None
tuple RuleRegistry = ((<function <lambda>>, <function <lambda>>),)

Detailed Description

A table is a tk table widget on screen.

The model is represented by a set of names: One field name for each column in the table. Each column should be represented by a list. All lists should generally be of equal length.

You'll want to immediately add columns to your table using TableColumn.

Parameters
parentThe parent item of this table within the dialog.
heightThis is the initially allocated height of the table in rows.

Method resolution order

Table
dialog.item.Item
dialog.widget.Widget
builtin.object

Constructor & Destructor Documentation

def dialog.table.Table.__init__ (   args)
 __init__(args)

Reimplemented from dialog.item.Item.

Member Function Documentation

def dialog.table.Table.__assert_rows__ (   args)
 __assert_rows__(args)
def dialog.table.Table.__column_added__ (   args)
 __column_added__(args)
def dialog.table.Table.__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.

def dialog.table.Table.__dict__ (   args)

dictionary for instance variables (if defined)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__display__ (   args)
 __display__(args)
def dialog.table.Table.__get_children__ (   args)
 __get_children__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__get_column__ (   args)
 __get_column__(args)
def dialog.table.Table.__get_dialog__ (   args)
 __get_dialog__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__get_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.

def dialog.table.Table.__get_widget__ (   args)
 __get_widget__(args)

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.__getnopack__ (   args)
 __getnopack__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__getparent__ (   args)
 __getparent__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__getrules__ (   args)
 __getrules__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__getvalid__ (   args)
 __getvalid__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__pending__ (   args)
 __pending__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__set_widget__ (   args)
 __set_widget__(args)

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.__setnopack__ (   args)
 __setnopack__(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.__weakref__ (   args)

list of weak references to the object (if defined)

Reimplemented from dialog.item.Item.

def dialog.table.Table.AddContext (   args)
 AddContext(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.AddRule (   args)
 AddRule(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.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.

def dialog.table.Table.append_row (   args)
 Appends a new row using the "default" parameter on each TableColumn,
 or the default value of each kind (int=0, str='', float=0., etc)
def dialog.table.Table.child_added (   args)
 child_added(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.child_removed (   args)
 child_removed(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.children (   args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.copy_row (   args)
 Copies to the clipboard the row at "at"
def dialog.table.Table.cut_row (   args)
 Copies the row at index "at" and deletes that same row.
def dialog.table.Table.default_color (   args)

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.delete_row (   args)
 Deletes the row at index "at"
def dialog.table.Table.Destroy (   args)
 Destroy(args)

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.dialog (   args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.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.

def dialog.table.Table.DoState (   args)
 DoState(args)

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.EnableIf (   args)
 Same as DisableIf, except that the result is reversed.

Reimplemented from dialog.item.Item.

def dialog.table.Table.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.

def dialog.table.Table.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.

def dialog.table.Table.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.

def dialog.table.Table.GetWidget (   args)
 Use this function to retrive tk widgets created by
 this object with the name 'name'.
 Use `list_widgets` to get a list of names for
 this object.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.Grid (   args)
 Grid(args)

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.HasContext (   args)
 HasContext(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.IsEnabled (   args)
 @return True if this Item is currently enabled.

Reimplemented from dialog.item.Item.

def dialog.table.Table.item_valid (   args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.list_widgets (   args)
 For debugging, this function gives you a list
 of names to pass to GetWidget.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.no_pack (   args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.Pack (   args)
 The same as ".widget.pack( ... )"
 Prefer using this function as it's compatibility with the no_pack
 option avoids breaking others use of grid with your widget.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.PackForget (   args)
 The same as ".widget.pack_forget()"
 Prefer using this function as it's compatibility wi th the no_pack
 option avoids breaking others use of grid with your widget.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.PackInfo (   args)
 The same as ".widget.pack_info()"
 Prefer using this function as it's compatibility wi th the no_pack
 option avoids breaking others use of grid with your widget.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.PackSlaves (   args)
 The same as ".widget.pack_slaves()"
 Prefer using this function as it's compatibility wi th the no_pack
 option avoids breaking others use of grid with your widget.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.parent (   args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.paste_row (   args)
 Takes the contents of the clipboard and pastes into row at index "at"
def dialog.table.Table.paste_valid (   args)
 If this returns false, a subsequent paste_row call will fail.
 @return True if the contents of contents of the clipboard are currently
              valid to paste into this table.
def dialog.table.Table.rebuild (   args)
 Call this to get rid of all existing rows to rebuild them.
 Any new row rules will be added in...
def dialog.table.Table.RemoveStateFunction (   args)
 Remove a function (by python reference) from the current list.

Reimplemented from dialog.item.Item.

def dialog.table.Table.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.

def dialog.table.Table.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.

def dialog.table.Table.SetEnabled (   args)
 Used to enable/disable these widgets.  This is for internal use.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.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.

def dialog.table.Table.SetWidget (   args)
 This is really an internal function, but,
 if you're careful not to use already existing
 names you can use it to store widgets you've
 added to this object to customize it.
 
 Beware that future changes to SDS/2 could
 use the same name you've chosen.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.table (   args)
def dialog.table.Table.Update (   args)
 Update(args)

Reimplemented from dialog.item.Item.

def dialog.table.Table.WatchState (   args)
 Have this function called when this widget is enabled/disabled.
 @param foo This is a function which takes one argument, 'enabled'

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.widget (   args)

The main Tkinter widget for this item.

Reimplemented from dialog.widget.Widget.

def dialog.table.Table.WidgetExists (   args)
 This is useful if you're having problems with accessing widgets
 that have been deleted.  It's for debugging purposes.
 
 @return True if the widget (.widget) does exist in the interpreter.

Reimplemented from dialog.widget.Widget.

Member Data Documentation

dialog.table.Table.__Load__ = None
staticprivate
dialog.table.Table.__Store__ = None
staticprivate
dialog.table.Table.Context = None
static
dialog.table.Table.CurrentlyEnabled = True
static
dialog.table.Table.Enabled = True
static
dialog.table.Table.Extras = None
static
tuple dialog.table.Table.RuleRegistry = ()
static
dialog.table.Table.Rules = None
static
dialog.table.Table.WatchChild = None
static