Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::gui::Control Class Reference

Inheritance diagram for ONE::gui::Control:

Inheritance graph
[legend]
List of all members.

Detailed Description

interface for objects that permit some sort of user interaction.

Controls may be disabled, which stops them from reacting to user input.

Author:
Daniel Seibert


Public Member Functions

virtual bool hasFocus () const =0
 checks if this object has the keyboard focus
virtual bool isEnabled () const =0
 checks if this widget is enabled
virtual bool isUnder (const Point &pt) const =0
 checks if this widget is positioned under the given point.
virtual void processKeyEvent (KeyEvent &evt)=0
 notifies the widget of a key event
virtual void processMouseMotion (MouseEvent &evt)=0
 notifies the widget of a mouse motion
virtual void processMousePress (MouseEvent &evt)=0
 notifies the widget of a pressed mouse button
virtual void processMouseRelease (MouseEvent &evt)=0
 notifies the widget of a released mouse button
virtual void releaseFocus () const =0
 drops the input focus
virtual bool requestFocus ()=0
 attempts to get the input focus for this object
virtual void setEnabled (bool e)=0
 enables or disables this widget
virtual ~Control ()


Constructor & Destructor Documentation

virtual ONE::gui::Control::~Control  )  [inline, virtual]
 


Member Function Documentation

virtual bool ONE::gui::Control::hasFocus  )  const [pure virtual]
 

checks if this object has the keyboard focus

Returns:
true if this object has the input focus, false otherwise

Implemented in ONE::gui::Component, and ONE::gui::TopLevel.

virtual bool ONE::gui::Control::isEnabled  )  const [pure virtual]
 

checks if this widget is enabled

Returns:
true if is enabled, false otherwise

Implemented in ONE::gui::Widget.

virtual bool ONE::gui::Control::isUnder const Point pt  )  const [pure virtual]
 

checks if this widget is positioned under the given point.

Parameters:
pt a point
Returns:
true if the widget's clickable area contains pt

Implemented in ONE::gui::Picture, and ONE::gui::Widget.

virtual void ONE::gui::Control::processKeyEvent KeyEvent evt  )  [pure virtual]
 

notifies the widget of a key event

If this is not a top level container and the widget processes the event, it must call the events consume function. Otherwise evt will also be passed to this object's top level parent.

Implemented in ONE::gui::AbstractButton, ONE::gui::CommandField, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window.

virtual void ONE::gui::Control::processMouseMotion MouseEvent evt  )  [pure virtual]
 

notifies the widget of a mouse motion

This event may occur both inside and outside of this object's bounds.

Implemented in ONE::gui::AbstractButton, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window.

virtual void ONE::gui::Control::processMousePress MouseEvent evt  )  [pure virtual]
 

notifies the widget of a pressed mouse button

Implementations may assume that the mouse position is on this widget (i.e. isUnder returned true).

Implemented in ONE::gui::AbstractButton, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window.

virtual void ONE::gui::Control::processMouseRelease MouseEvent evt  )  [pure virtual]
 

notifies the widget of a released mouse button

This event may occur both inside and outside of this object's bounds.

Implemented in ONE::gui::AbstractButton, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window.

virtual void ONE::gui::Control::releaseFocus  )  const [pure virtual]
 

drops the input focus

Implemented in ONE::gui::Component, and ONE::gui::TopLevel.

virtual bool ONE::gui::Control::requestFocus  )  [pure virtual]
 

attempts to get the input focus for this object

The function may not succeed in acquiring the focus in some situations. For example, calling this function on a top level container while a modal Frame is visible will fail.

Returns:
if the request was granted

Implemented in ONE::gui::Component, and ONE::gui::TopLevel.

virtual void ONE::gui::Control::setEnabled bool  e  )  [pure virtual]
 

enables or disables this widget

Disabled widgets will no longer react to user input.

Parameters:
e true to enable the widget, false to disable it.

Implemented in ONE::gui::Button, ONE::gui::Console, ONE::gui::Frame, ONE::gui::TitleBar, and ONE::gui::Widget.


Generated on Wed Sep 7 19:03:16 2005 for ONEngine by  doxygen 1.4.3