AaronCameron.net
Not Left, nor right. Just correct.
Not a Member? - Login or Create an Account
Thursday the 24th of May 2012 @ 04:05am
Front Page Journal Projects Your Profile About
[]

LibN2L-4 Library Code Reference

Classes
Compounds
Files
Members
Method Index
Full Reference

n2l::cGuiButton Class Reference

A simple textured push button which supports different visualizations for different states, and a textured text label. More...

#include <cGuiButton.h>

Inheritance diagram for n2l::cGuiButton:

Inheritance graph
[legend]
Collaboration diagram for n2l::cGuiButton:

Collaboration graph
[legend]
List of all members.

Public Types

Public Member Functions

Protected Member Functions

Protected Attributes

Friends


Detailed Description

A simple textured push button which supports different visualizations for different states, and a textured text label.

Definition at line 46 of file cGuiButton.h.


Member Enumeration Documentation

enum n2l::cGuiButton::tButtonState
 

Enumerator:
Button_Normal 
Button_Over 
Button_Down 
Button_NormalDisabled 
Button_OverDisabled 
Button_DownDisabled 
Button_NumStates 

Definition at line 49 of file cGuiButton.h.

enum n2l::cGuiButton::tProp
 

Enumerator:
Prop_Background 
Prop_NumProps 

Definition at line 61 of file cGuiButton.h.

enum n2l::cGuiButton::tType
 

Enumerator:
Type_Push 
Type_Toggle 
Type_NumTypes 

Definition at line 67 of file cGuiButton.h.


Constructor & Destructor Documentation

n2l::cGuiButton::cGuiButton  ) 
 

Definition at line 45 of file cGuiButton.cpp.

n2l::cGuiButton::cGuiButton const cVfsNodeInterface iNode  ) 
 

Definition at line 51 of file cGuiButton.cpp.

References load().

n2l::cGuiButton::cGuiButton const cDynVar iDefinition  ) 
 

Definition at line 58 of file cGuiButton.cpp.

References load().

n2l::cGuiButton::~cGuiButton  )  [virtual]
 

Definition at line 65 of file cGuiButton.cpp.


Member Function Documentation

void n2l::cGuiButton::addExtraClickedData tActionData oData  )  [protected, virtual]
 

Reimplemented from n2l::cGuiInteractive.

Definition at line 449 of file cGuiButton.cpp.

References n2l::cGuiInteractive::addExtraClickedData(), n2l::cDynVar::insert(), mEnabled, mToggledOn, mType, and Type_Toggle.

void n2l::cGuiButton::addExtraOutData tActionData oData  )  [protected, virtual]
 

Reimplemented from n2l::cGuiInteractive.

Definition at line 470 of file cGuiButton.cpp.

References n2l::cGuiInteractive::addExtraOutData(), n2l::cDynVar::insert(), and mEnabled.

void n2l::cGuiButton::addExtraOverData tActionData oData  )  [protected, virtual]
 

Methods to add data to action data arrays.

These methods may be overridden by children to add extra information to the data structure sent along with an action.

Note:
Good behaviour here is to call your parents version of this method before adding your own data.

Reimplemented from n2l::cGuiInteractive.

Definition at line 462 of file cGuiButton.cpp.

References n2l::cGuiInteractive::addExtraOverData(), n2l::cDynVar::insert(), and mEnabled.

void n2l::cGuiButton::audio const tButtonState  iState,
const cAutoPtr< const cAudioChunk > &  i_ioSound
[virtual]
 

Definition at line 254 of file cGuiButton.cpp.

References mSounds.

Referenced by load().

void n2l::cGuiButton::clearAccel  )  [virtual]
 

Definition at line 307 of file cGuiButton.cpp.

References mUseAccel.

const cAutoPtr< cGuiElement > n2l::cGuiButton::clone  )  const [virtual]
 

Return a new element using this element as a template for its construction.

Reimplemented from n2l::cGuiInteractive.

Definition at line 313 of file cGuiButton.cpp.

References cloneInto().

Referenced by n2l::cGuiButtonSelectBox::addButton().

void n2l::cGuiButton::cloneInto const cAutoPtr< cGuiButton > &  i_ioElement  )  const [protected, virtual]
 

Definition at line 321 of file cGuiButton.cpp.

References Button_Normal, Button_NumStates, n2l::cGuiInteractive::cloneInto(), enabled(), mFills, mKey, mKeyMod, mLabel, mLabelStyle, mSounds, mUseAccel, n2l::cGuiElement::prop(), Prop_Background, Prop_NumProps, toggledOn(), and type().

Referenced by clone().

void n2l::cGuiButton::draw  )  const [virtual]
 

Draw ourselves on the screen.

Note:
This method does not set the projection matrix.

Reimplemented from n2l::cGuiElement.

Definition at line 156 of file cGuiButton.cpp.

References Button_Down, Button_DownDisabled, Button_Normal, Button_NormalDisabled, Button_Over, Button_OverDisabled, n2l::cGuiTextStyle::draw(), n2l::cGuiFill::draw(), n2l::cString::empty(), n2l::cGuiElement::innerPos(), n2l::cGuiElement::innerSize(), n2l::cGuiInteractive::isDown(), n2l::cGuiInteractive::isOver(), mEnabled, mFills, mLabel, mLabelStyle, mToggledOn, mType, n2l::cGuiElement::outerPos(), n2l::cGuiElement::outerSize(), Prop_Background, Type_Push, and Type_Toggle.

const tBool n2l::cGuiButton::enabled  )  const [virtual]
 

Definition at line 293 of file cGuiButton.cpp.

References mEnabled.

Referenced by cloneInto(), and load().

void n2l::cGuiButton::enabled const tBool  iEnabled  )  [virtual]
 

Definition at line 287 of file cGuiButton.cpp.

References mEnabled.

const cGuiFill & n2l::cGuiButton::fill const tButtonState  iState,
const tProp  iProp
const [virtual]
 

Definition at line 201 of file cGuiButton.cpp.

References mFills.

void n2l::cGuiButton::fill const tButtonState  iState,
const tProp  iProp,
const cGuiFill iFill
[virtual]
 

Definition at line 192 of file cGuiButton.cpp.

References mFills.

Referenced by load().

const tString & n2l::cGuiButton::label  )  const [virtual]
 

Definition at line 216 of file cGuiButton.cpp.

References mLabel.

Referenced by load().

void n2l::cGuiButton::label const tString iLabel  )  [virtual]
 

Definition at line 210 of file cGuiButton.cpp.

References mLabel.

void n2l::cGuiButton::labelStyle const tButtonState  iState,
const cGuiTextStyle iStyle
[virtual]
 

Definition at line 222 of file cGuiButton.cpp.

References mLabelStyle.

Referenced by load().

void n2l::cGuiButton::load const cDynVar iDefinition  )  [virtual]
 

Load this elements properties from the provided definition.

Reimplemented from n2l::cGuiInteractive.

Definition at line 78 of file cGuiButton.cpp.

References audio(), Button_Normal, Button_NumStates, enabled(), fill(), n2l::Key_Unknown, n2l::KMod_Alt, n2l::KMod_Ctrl, n2l::KMod_Meta, n2l::KMod_None, n2l::KMod_Shift, label(), labelStyle(), n2l::cGuiInteractive::load(), n2l::cEventTypeLookups::lookupTypeByName(), Prop_Background, setAccel(), toggledOn(), and type().

void n2l::cGuiButton::load const cVfsNodeInterface iNode  )  [virtual]
 

Load this elements properties from the provided VFS Node.

Reimplemented from n2l::cGuiElement.

Definition at line 70 of file cGuiButton.cpp.

References n2l::cGuiElement::validateAndDecode().

Referenced by cGuiButton().

void n2l::cGuiButton::setAccel const tKey iKey,
const tKeyMods iMods
[virtual]
 

Definition at line 299 of file cGuiButton.cpp.

References mKey, mKeyMod, and mUseAccel.

Referenced by load().

const tBool n2l::cGuiButton::toggledOn  )  const [virtual]
 

Definition at line 281 of file cGuiButton.cpp.

References mToggledOn.

Referenced by cloneInto(), and load().

void n2l::cGuiButton::toggledOn const tBool  iToggled  )  [virtual]
 

Definition at line 275 of file cGuiButton.cpp.

References mToggledOn.

const cGuiButton::tType n2l::cGuiButton::type  )  const [virtual]
 

Definition at line 269 of file cGuiButton.cpp.

References mType.

Referenced by cloneInto(), and load().

void n2l::cGuiButton::type const tType  iType  )  [virtual]
 

Definition at line 262 of file cGuiButton.cpp.

References mType.


Friends And Related Function Documentation

friend class cGuiButtonSelectBox [friend]
 

Definition at line 114 of file cGuiButton.h.


Member Data Documentation

tBool n2l::cGuiButton::mEnabled [protected]
 

Definition at line 125 of file cGuiButton.h.

Referenced by addExtraClickedData(), addExtraOutData(), addExtraOverData(), draw(), and enabled().

cGuiFill n2l::cGuiButton::mFills[Button_NumStates][Prop_NumProps] [protected]
 

Definition at line 120 of file cGuiButton.h.

Referenced by cloneInto(), draw(), and fill().

tKey n2l::cGuiButton::mKey [protected]
 

Definition at line 130 of file cGuiButton.h.

Referenced by cloneInto(), and setAccel().

tKeyMods n2l::cGuiButton::mKeyMod [protected]
 

Definition at line 131 of file cGuiButton.h.

Referenced by cloneInto(), and setAccel().

tString n2l::cGuiButton::mLabel [protected]
 

Definition at line 117 of file cGuiButton.h.

Referenced by cloneInto(), draw(), and label().

cGuiTextStyle n2l::cGuiButton::mLabelStyle[Button_NumStates] [protected]
 

Definition at line 119 of file cGuiButton.h.

Referenced by cloneInto(), draw(), and labelStyle().

cAutoPtr<const cAudioChunk> n2l::cGuiButton::mSounds[Button_NumStates] [protected]
 

Definition at line 121 of file cGuiButton.h.

Referenced by audio(), and cloneInto().

tBool n2l::cGuiButton::mToggledOn [protected]
 

Definition at line 124 of file cGuiButton.h.

Referenced by addExtraClickedData(), draw(), and toggledOn().

tType n2l::cGuiButton::mType [protected]
 

Definition at line 123 of file cGuiButton.h.

Referenced by addExtraClickedData(), draw(), and type().

tBool n2l::cGuiButton::mUseAccel [protected]
 

Description for the keyboard accelerator for this button.

Definition at line 129 of file cGuiButton.h.

Referenced by clearAccel(), cloneInto(), and setAccel().


The documentation for this class was generated from the following files:
©2012 Aaron Cameron