newspeoplefor developersdocumentationdownloads

nGuiButton Class Reference
[Graphical User Interface]

#include <nguibutton.h>

Inheritance diagram for nGuiButton:

nGuiWidget nRoot nObject nNode nReferenced nSignalEmitter List of all members.

Detailed Description

A GUI button class.

(C) 2001 RadonLabs GmbH

Definition at line 14 of file nguibutton.h.


Public Member Functions

 nGuiButton ()
 constructor
virtual ~nGuiButton ()
 destructor
virtual bool Render ()
 Rendering.
virtual bool OnButtonDown (const vector2 &mousePos)
 handle button down event
virtual bool OnButtonUp (const vector2 &mousePos)
 handle button up event
virtual void OnFrame ()
 called per frame when parent widget is visible

Protected Attributes

bool focus
bool pressed

Constructor & Destructor Documentation

nGuiButton::nGuiButton  ) 
 

constructor

Definition at line 14 of file nguibutton_main.cc.

nGuiButton::~nGuiButton  )  [virtual]
 

destructor

Definition at line 24 of file nguibutton_main.cc.


Member Function Documentation

bool nGuiButton::Render  )  [virtual]
 

Rendering.

Reimplemented from nGuiWidget.

Definition at line 114 of file nguibutton_main.cc.

bool nGuiButton::OnButtonDown const vector2 mousePos  )  [virtual]
 

handle button down event

If button has focus, set the pressed flag.

Reimplemented from nGuiWidget.

Definition at line 80 of file nguibutton_main.cc.

bool nGuiButton::OnButtonUp const vector2 mousePos  )  [virtual]
 

handle button up event

If pressed flag is set, execute the associated command.

Reimplemented from nGuiWidget.

Definition at line 98 of file nguibutton_main.cc.

void nGuiButton::OnFrame  )  [virtual]
 

called per frame when parent widget is visible

If mouse is over sensitive area, set the focus flag. Clear focus and pressed flag otherwise.

Reimplemented from nGuiWidget.

Definition at line 35 of file nguibutton_main.cc.


Member Data Documentation

bool nGuiButton::focus [protected]
 

Definition at line 31 of file nguibutton.h.

bool nGuiButton::pressed [protected]
 

Definition at line 32 of file nguibutton.h.


The documentation for this class was generated from the following files:

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.