Module eagle :: Class Selection
[show private | hide private]
[frames | no frames]

Type Selection

object --+                
         |                
 _EGObject --+            
             |            
     _EGWidget --+        
                 |        
     _EGDataWidget --+    
                     |    
      _EGWidLabelEntry --+
                         |
                        Selection


Selection box (aka Combo box).

Selection or combo box is an element that allow you to select one of various pre-defined values.
Method Summary
  __init__(self, id, label, options, active, callback, persistent)
Selection constructor.
  __contains__(self, value)
  __iadd__(self, value)
Same as append
  __isub__(self, value)
Same as remove
  __len__(self)
  __setup_connections__(self)
  __setup_gui__(self)
  append(self, value, set_active)
Append new value to available options.
  get_value(self)
Get data from this widget.
  insert(self, position, value)
Insert new option at position.
  items(self)
Returns every item/option in this selection.
  options(self)
Returns every item/option in this selection.
  prepend(self, value)
Prepend new value to available options.
  remove(self, value)
Remove given value from available options.
  set_value(self, value)
Set data to this widget.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Property Summary
  active

Method Details

__init__(self, id, label='', options=None, active=None, callback=None, persistent=False)
(Constructor)

Selection constructor.
Parameters:
id - unique identifier.
label - what to show on a label on the left side of the widget.
options - list of possible values.
active - selected element.
callback - function (or list of functions) that will be called when this widget have its data changed. Function will receive as parameters:
  • App reference
  • Widget reference
  • new value
persistent - if this widget should save its data between sessions.
Overrides:
eagle._EGWidLabelEntry.__init__

__iadd__(self, value)

Same as append

__isub__(self, value)

Same as remove

append(self, value, set_active=False)

Append new value to available options.
Parameters:
value - string that is not already an option.

get_value(self)

Get data from this widget.
Overrides:
eagle._EGWidLabelEntry.get_value (inherited documentation)

insert(self, position, value)

Insert new option at position.
Parameters:
value - string that is not already an option.

items(self)

Returns every item/option in this selection.

options(self)

Returns every item/option in this selection.

prepend(self, value)

Prepend new value to available options.
Parameters:
value - string that is not already an option.

remove(self, value)

Remove given value from available options.
Parameters:
value - string that is an option.
Raises:
ValueError - if value is not already an option.

set_value(self, value)

Set data to this widget.
Overrides:
eagle._EGWidLabelEntry.set_value (inherited documentation)

Generated by Epydoc 2.1 on Thu Apr 27 16:28:55 2006 http://epydoc.sf.net