ui::FocusManager Class Reference

Collaboration diagram for ui::FocusManager:

Collaboration graph
[legend]
List of all members.

Detailed Description

Singleton class which manages the Component(s) that are currently focused.


Public Member Functions

void setPermanentFocusOwner (Component *c)
ComponentgetPermanentFocusOwner ()
void setFocusOwner (Component *c)
ComponentgetFocusOwner ()
void keyPressed (int keyCode, int modifier)
void keyReleased (int keyCode, int modifier)
void focusRightComponent ()
void focusLeftComponent ()

Static Public Member Functions

FocusManagergetInstance ()


Member Function Documentation

void ui::FocusManager::setPermanentFocusOwner Component c  ) 
 

Set the given Component as permanent focus owner. Permanent means that this component keeps focus, until setPermanentFocusOwner is called again, even if setFocusOwner is called.

Parameters:
c Component to set permanent focus to.
Note:
When called, this unsets the previous permanent focus owner and sends the appropriate events.

Component * ui::FocusManager::getPermanentFocusOwner  ) 
 

Returns the current permanent focus owner.

void ui::FocusManager::setFocusOwner Component c  ) 
 

Set the given Component as focus owner. The focus owner is usually a child of the permanent focus owner (such as a MenuItem is a child of Menu), and focus is returned to the permanent focus owner, once the focus owner looses its focus.

Parameters:
c Component to set focus to.
See also:
setPermanentFocusOwner

Component * ui::FocusManager::getFocusOwner  ) 
 

Returns the current focus owner.

void ui::FocusManager::keyPressed int  keyCode,
int  modifier
 

Sends keypresses to the currently focused Component.

void ui::FocusManager::keyReleased int  keyCode,
int  modifier
 

Sends keyreleases to the currently focused Component.

void ui::FocusManager::focusRightComponent  ) 
 

Move focus to the right, ie; when someone pressed tab. If there is no current focus owner, nothing happens.

void ui::FocusManager::focusLeftComponent  ) 
 

Focus the component left (in the component tree hierarchy) of the currently focused Component. If there is no currently focused Component, nothing happens.


Generated on Mon Jun 20 19:41:43 2005 for UI by doxygen 1.3.1 using KingsTools