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

Moteur3D::UICButton Class Reference

Basic button that holds clicks. More...

#include <UICButton.h>

Inheritance diagram for Moteur3D::UICButton:

Moteur3D::UIBaseComponent Moteur3D::UICCloseButton List of all members.

Public Member Functions

 UICButton (UIBaseWindow *window)
 Constructor. Needs the window that will embed the instance.
 ~UICButton ()
 Destructor.

Protected Member Functions

bool OnMouseButton (const MouseInformations *mouseInfo, MouseButton button, bool buttonDown)
 This function is called when a mouse button is pressed or released inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component.
bool OnMouseMove (const MouseInformations *mouseInfo)
 This function is called when the mouse moves inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component.
virtual void OnButtonDown ()
 This event is triggered when the button is pressed with left click, but no click is yet triggered. Typically you'll want to change the button's display here.
virtual void OnButtonUp ()
 This event is triggered when the button is released but no click event is generated.
virtual void OnClick ()
 This function is called when the button has been pressed and released, and the click is valid. It does nothing by default.
virtual void OnDisplay ()
 Event called when the component needs to be displayed. Override it if you want custom graphics for your component (and you probably will).

Protected Attributes

bool m_IsDown

Friends

class Window

Detailed Description

Basic button that holds clicks.


Constructor & Destructor Documentation

Moteur3D::UICButton::UICButton UIBaseWindow window  ) 
 

Constructor. Needs the window that will embed the instance.

Moteur3D::UICButton::~UICButton  ) 
 

Destructor.


Member Function Documentation

virtual void Moteur3D::UICButton::OnButtonDown  )  [protected, virtual]
 

This event is triggered when the button is pressed with left click, but no click is yet triggered. Typically you'll want to change the button's display here.

virtual void Moteur3D::UICButton::OnButtonUp  )  [protected, virtual]
 

This event is triggered when the button is released but no click event is generated.

virtual void Moteur3D::UICButton::OnClick  )  [protected, virtual]
 

This function is called when the button has been pressed and released, and the click is valid. It does nothing by default.

Reimplemented in Moteur3D::UICCloseButton.

virtual void Moteur3D::UICButton::OnDisplay  )  [protected, virtual]
 

Event called when the component needs to be displayed. Override it if you want custom graphics for your component (and you probably will).

Implements Moteur3D::UIBaseComponent.

Reimplemented in Moteur3D::UICCloseButton.

bool Moteur3D::UICButton::OnMouseButton const MouseInformations mouseInfo,
MouseButton  button,
bool  buttonDown
[protected, virtual]
 

This function is called when a mouse button is pressed or released inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component.

Parameters:
mouseInfo Mouse informations, such as position, button states etc.
button Mouse button that is concerned.
buttonDown true if the button is being pressed, otherwise false.
Returns:
True if the current window handles the event, false otherwise.

Reimplemented from Moteur3D::UIBaseComponent.

bool Moteur3D::UICButton::OnMouseMove const MouseInformations mouseInfo  )  [protected, virtual]
 

This function is called when the mouse moves inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component.

Parameters:
mouseInfo Mouse informations, such as position, button states etc.
Returns:
True if the current window handles the event, false otherwise.

Reimplemented from Moteur3D::UIBaseComponent.


Friends And Related Function Documentation

friend class Window [friend]
 

Reimplemented in Moteur3D::UICCloseButton.


Member Data Documentation

bool Moteur3D::UICButton::m_IsDown [protected]
 

Is the button currently down ? (i.e. OnButtonDown() already called but neither OnButtonUp() nor OnClick() has been called.


The documentation for this class was generated from the following file:
Generated on Sat Oct 15 15:05:52 2005 for Moteur3D by  doxygen 1.4.4