Package gnue :: Package forms :: Package GFObjects :: Module GFTabStop :: Class GFTabStop
[show private | hide private]

Type GFTabStop

 GTriggerCore --+        
                |        
   object --+   |        
            |   |        
    ParserObj --+        
                |        
             GObj --+    
                    |    
GTriggerExtension --+    
                    |    
                GFObj --+
                        |
                       GFTabStop

Known Subclasses:
GFButton

A base class for all GFObjects that can receive focus on the UI.
Method Summary
  __init__(self, parent, object_type)
  _is_navigable_(self, mode)
In general an object is navigable if it is not hidden and it's navigable xml-attribute is set.
  _phase_1_init_(self)
On phase 1 initialization find the owning GFPage-instance.
  focus_in(self)
Notify the object that it has received the focus.
  focus_out(self)
Notify the object that it is going to lose the focus.
  recalculate_visible(self, adjustment, cur_record, rec_count, refresh)
Process a record pointer movement or a result set change for this entry.
  rows_changed(self, new_rows)
Notify the widget that the number of visible rows has changed.
  set_focus(self, index)
Move the UI and GF focus to this object.
  ui_focus_in(self)
Notify the UI widget that is is going to receive the focus.
  ui_focus_out(self)
Notify the UI widget that it has lost the focus.
  ui_set_focus(self)
Set the focus to this widget on the UI layer.
  update_editable(self)
Update the editable state of this entry.
  validate(self)
Validate the object to decide whether the focus can be moved away from it.
    Inherited from GFObj
  get_block(self)
Return the objects' block from the block mapping.
  get_field(self)
Returns the objects' field from the blocks' field mapping
  get_option(self, name)
Return the value of a given option of the object or None if no such option is present.
  is_navigable(self, mode)
Return wether the object is currently navigable or not.
  phase_1_init(self)
Phase 1 initialization called after all objects of the XML tree were created.
    Inherited from GObj
  __getitem__(self, key)
  __setitem__(self, key, value)
  _dumpXML_(self, lookupDict, treeDump, gap, xmlnamespaces, textEncoding, stripPrefixes, escape)
Dumps an XML representation of the object
  buildAndInitObject(self, **params)
This is a convenience function for applications NOT using GParser to load an object tree.
  buildObject(self, **params)
A convenience function for applications NOT using GParser to load an object tree.
string getXmlTag(self, stripPrefixes)
Returns the xml tag to be used to represent the object.
  iterator(self, test, types, includeSelf)
Return a python iterator of child objects.
  maxInits(self)
maxInits returns the maximum size of all the _inits list from this object or it's children
  phaseInit(self, iterations)
Starts GNUe's phased initialization system from this object down.
  showTree(self, indent)
A recusive function to print an indented text representation of the GObj tree from this object down.
  walk(self, function, *args, **parms)
Function that recursively walks down through a tree of ParserObj instances and applies a function to them.
    Inherited from GTriggerCore
  __repr__(self)
  create_namespace_object(self, global_namespace, namespace_name)
Construct a namespace object tree from an XML (definitions.GObjects.GObj) object tree.
  get_namespace_object(self)
Return the namespace object that mirrors this object in the action/trigger namespace.
    Inherited from ParserObj
  _diffActionWalker_(self, obj, action)
Set the action attribute of a given object to the specified action.
  _getAsContents_(self)
Get the contents of this object.
  _id_(self, maxIdLength)
Return a compareable and identifying id of an object within a tree.
  _set_initial_attributes_(self, attributes)
Set attributes loaded by GParser.
  addChild(self, child)
Add an object to the list of children
  assign(self, source, recursive)
Assign all attributes from a given object to this one.
  diff(self, goal, maxIdLength)
Build an object tree representing the difference between two object trees.
  dumpXML(self, lookupDict, treeDump, gap, xmlnamespaces, textEncoding, stripPrefixes, escape)
Return a XML representation of the object.
  findChildNamed(self, name, childType)
Moves downward though the children of an object till it finds the child with the specified name.
  findChildOfType(self, childType, includeSelf, allowAllChildren)
Moves downward through the children of an object till it finds the child of the specified type.
  findChildrenOfType(self, childType, includeSelf, allowAllChildren)
Find all children of a specific type.
  findParentOfType(self, parentType, includeSelf)
Moves upward though the parents of an object till it finds the parent of the specified type.
  getChildrenAsContent(self)
Returns the content of any GContent objects that are children of this object.
  getDescription(self)
Return a useful description of the object.
any getParent(self)
Returns the immediate parent of an object instance in a GObj tree.
  merge(self, other, maxIdLength, overwrite)
Merge another object tree into this tree.
  setParent(self, newParent)
Set the immediate parent of an object instance in a GObj tree
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return 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
  __str__(x)
Return str(x)...
    Inherited from GTriggerExtension
  associateTrigger(self, key, function)
Associate a trigger with this object.
  processTrigger(self, key, ignoreAbort)
Fire the requested trigger if a trigger of that type has been associated with this object.

Property Summary
    Inherited from GFObj
  has_label

Class Variable Summary
bool _navigableInQuery_: If True the object can recieve the keyboard focus in query mode, otherwise not
NoneType navigable = None                                                                  

Method Details

__init__(self, parent, object_type)
(Constructor)

Overrides:
gnue.forms.GFObjects.GFObj.GFObj.__init__

_is_navigable_(self, mode)

In general an object is navigable if it is not hidden and it's navigable xml-attribute is set. If mode is 'query' it additionally depends wether an object is 'queryable' or not. If mode is 'edit' or 'new' only objects are navigable which are not 'readonly'.
Overrides:
gnue.forms.GFObjects.GFObj.GFObj._is_navigable_

_phase_1_init_(self)

On phase 1 initialization find the owning GFPage-instance. This instance is then available through self._page.
Overrides:
gnue.forms.GFObjects.GFObj.GFObj._phase_1_init_

focus_in(self)

Notify the object that it has received the focus.

focus_out(self)

Notify the object that it is going to lose the focus.

The focus change is already decided at this moment, there is no way to stop the focus from changing now.

recalculate_visible(self, adjustment, cur_record, rec_count, refresh)

Process a record pointer movement or a result set change for this entry.

This function sets the _visibleIndex property of this entry. It also takes care of disabling rows of this entry that are outside the actual number of available records, and it redisplays the contents of the entry as needed.
Parameters:
adjustment - value to change the visible index, e.g. 1 or -1
cur_record - the currently active record, or -1 if there is no record active currently.
rec_count - the number of records available at all
refresh - 'none' if no records have to be redisplayed (i.e. only the cursor position has changed), 'current' if all records starting with the current record have to be redisplayed (i.e. a new record has been inserted), or 'all' if all records have to be redisplayed (i.e. the complete resultset has changed); if the records scroll within this entry, everything is redisplayed anyway

rows_changed(self, new_rows)

Notify the widget that the number of visible rows has changed.

This can happen if this widget is part of a grid that has been resized.

This function takes care about filling the new rows with data.

set_focus(self, index)

Move the UI and GF focus to this object.

ui_focus_in(self)

Notify the UI widget that is is going to receive the focus.

This function is always called, no matter whether the user requested the focus change via mouse click, keypress, or trigger function.

The purpose of this function is to allow the UI widget to do things that always must be done when it gets the focus, like changing the color of the current widget, or activating the current entry in the grid.

ui_focus_out(self)

Notify the UI widget that it has lost the focus.

This function is always called, no matter whether the user requested the focus change via mouse click, keypress, or trigger function.

The purpose of this function is to allow the UI widget to do things that always must be done when it loses the focus, like changing the color of the formerly current widget back to normal, or deactivating the no-longer-current entry in the grid.

This function works better than the KILL-FOCUS event of the UI, because KILL-FOCUS runs too often, for example also when the dropdown is opened (and the focus moves from the dropdown entry to the dropdown list).

ui_set_focus(self)

Set the focus to this widget on the UI layer.

This function is only called when the focus is set from the GF layer. If the user changes the focus with a mouse click, this function is not called because the UI focus already is on the target widget.

So the purpose of this function is to make the UI focus follow the GF focus.

update_editable(self)

Update the editable state of this entry.

This function is called by the field if the editable state of the field is changed by a trigger.

validate(self)

Validate the object to decide whether the focus can be moved away from it.

This function can raise an exception, in which case the focus change will be prevented.

Class Variable Details

_navigableInQuery_

If True the object can recieve the keyboard focus in query mode, otherwise not
Type:
bool
Value:
True                                                                   

navigable

Type:
NoneType
Value:
None                                                                  


GNUe Home

Public API

Developer's Corner