Module GTKUIEView :: Class UIEView
[hide private]
[frames] | no frames]

Class UIEView

source code

object --+
         |
        UIEView

Reusable viewer for AEUserInterfaces. Shows the name and description of all elements. If constructed with the ordered flag set, allows reordering of elements using raise and lower buttons. If constructed with the activatable flag set, allows for selecting UIEs to load or not load.

Instance Methods [hide private]
 
__init__(self, chooser, ordered=True, activatable=True, wrap=450)
Initializes the view by constructing the list view and populating it with data.
source code
boolean
isDirty(self)
Gets if the order or load/unload status has been changed by the user.
source code
 
setData(self, loaded, unloaded)
Sets the AEUserInterface data to be shown by the list view.
source code
integer
_getLoadedCount(self)
Returns: Count of the number of AccessEngine.AEScripts set to load
source code
gtk.Widget
getWidget(self)
Gets the root widget for the view, either the box when the view supports UIE ordering or the tree view when it does not.
source code
list of string
getAllUIEs(self)
Returns the list of all AEUserInterfaces.
source code
2-tuple of list, list
getCurrentUIEs(self)
Returns the new loaded/unloaded AEUserInterface configuration.
source code
 
_onToggleLoad(self, cell, path, model, column)
Sets a AEUserInterface to load or unload.
source code
 
_onRaise(self, widget)
Handles 'raise' button 'clicked' events.
source code
 
_onLower(self, widget)
Handles 'lower' button 'clicked' events.
source code
 
_onCursorChanged(self, tv)
Determines whether or not raise/lower button should be enabled (in Gtk terms, whether or not the 'sensitive' flag is set to True).
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]
boolean changed
Has the view been maniuplated in any way?
weakref.proxy for AccessEngine.AEChooser chooser
Chooser that is showing this view
list of 3-tuple of string loaded
Class names, names, and descriptions of all loaded AccessEngine.AEUserInterfaces
gtk.Button lower_button
button to lower priority of AccessEngine.AEScripts
gtk.Button raise_button
button to raise priority of AccessEngine.AEScripts
gtk.TreeView uie_tv
List view of all AccessEngine.AEUserInterfaces
list of 3-tuple of string unloaded
Class names, names, and descriptions of all AEUserInterfaces
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, chooser, ordered=True, activatable=True, wrap=450)
(Constructor)

source code 
Initializes the view by constructing the list view and populating it with data.
Parameters:
  • chooser (AccessEngine.AEChooser) - Chooser that is showing this view
  • ordered (boolean) - Can loaded items be reordered?
  • activatable (boolean) - Can items be set to load/unload?
  • wrap (integer) - Width in pixels at which to wrap description text
Overrides: object.__init__

isDirty(self)

source code 
Gets if the order or load/unload status has been changed by the user.
Returns: boolean
Has the view been manipulated in any way?

setData(self, loaded, unloaded)

source code 
Sets the AEUserInterface data to be shown by the list view. Puts the cursor on the first item if it exists.
Parameters:
  • loaded (list of 3-tuple of string) - Class names, names, and descriptions of all loaded AEUserInterfaces
  • unloaded (list of 3-tuple of string) - Class names, names, and descriptions of all AEUserInterfaces

_getLoadedCount(self)

source code 
Returns: integer
Count of the number of AccessEngine.AEScripts set to load

getWidget(self)

source code 
Gets the root widget for the view, either the box when the view supports UIE ordering or the tree view when it does not.
Returns: gtk.Widget
Root widget of the view for integration in another UI

getAllUIEs(self)

source code 
Returns the list of all AEUserInterfaces.
Returns: list of string
All AEUserInterface class names

getCurrentUIEs(self)

source code 
Returns the new loaded/unloaded AEUserInterface configuration.
Returns: 2-tuple of list, list
2-tuple of loaded, unloaded AEUserInterface class names

_onToggleLoad(self, cell, path, model, column)

source code 
Sets a AEUserInterface to load or unload. Moves the UIE to the top of the load order if it is now set to load or to the bottom of the entire list if it is set to unload.
Parameters:
  • cell (gtk.TreeViewCell) - Cell toggled
  • path (tuple) - Path to the row toggled
  • model (gtk.ListStore) - Model for the gtk.TreeView
  • column (integer) - Column in the model that the toggle should affect

_onRaise(self, widget)

source code 
Handles 'raise' button 'clicked' events. Determines the current selected item in 'loaded' list, raises its index (loaded priority) so it displays at a higher position.
Parameters:
  • widget (gtk.Widget) - Source of GUI event

_onLower(self, widget)

source code 
Handles 'lower' button 'clicked' events. Determines the current selected item in 'loaded' list, lower its index (loaded priority) so it displays at a lower position.
Parameters:
  • widget (gtk.Widget) - Source of GUI event

_onCursorChanged(self, tv)

source code 

Determines whether or not raise/lower button should be enabled (in Gtk terms, whether or not the 'sensitive' flag is set to True). If current selection is at top, disable 'raise' button; if selection is at bottom, disable 'lower' button. This only affects usability, not functionality; that is, gtk doesn't dim the buttons automatically, the onRaise/onLower methods discard requests to move a table item beyond its proper scope.

Does nothing if the widget is not ordered.
Parameters: