AaronCameron.net
I can't believe how tired I am.
Not a Member? - Login or Create an Account...MC Offline
Saturday the 18th of May 2013 @ 05:07pm
Front Page Journal Projects Your Profile About
[]

LibN2L-4 Library Code Reference

Classes
Compounds
Files
Members
Method Index
Full Reference

n2l::cGuiInteractive Class Reference

A rectangular area which may react to input. More...

#include <cGuiInteractive.h>

Inheritance diagram for n2l::cGuiInteractive:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

A rectangular area which may react to input.

Definition at line 40 of file cGuiInteractive.h.


Constructor & Destructor Documentation

n2l::cGuiInteractive::cGuiInteractive  ) 
 

Definition at line 34 of file cGuiInteractive.cpp.

n2l::cGuiInteractive::cGuiInteractive const cDynVar iDef  ) 
 

Definition at line 41 of file cGuiInteractive.cpp.

References load().

n2l::cGuiInteractive::~cGuiInteractive  )  [virtual]
 

Definition at line 49 of file cGuiInteractive.cpp.


Member Function Documentation

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

Reimplemented in n2l::cGuiButton, and n2l::cGuiSButton.

Definition at line 309 of file cGuiInteractive.cpp.

References n2l::cDynVar::insert(), and n2l::cGuiElement::mName.

Referenced by n2l::cGuiSButton::addExtraClickedData(), n2l::cGuiButton::addExtraClickedData(), and mouseClickAt().

void n2l::cGuiInteractive::addExtraFocusData tActionData oData  )  [protected, virtual]
 

Definition at line 321 of file cGuiInteractive.cpp.

References n2l::cDynVar::insert(), and n2l::cGuiElement::mName.

Referenced by focus().

void n2l::cGuiInteractive::addExtraKeyData tActionData oData  )  [protected, virtual]
 

Definition at line 315 of file cGuiInteractive.cpp.

References n2l::cDynVar::insert(), and n2l::cGuiElement::mName.

Referenced by keystroke().

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

Reimplemented in n2l::cGuiButton, and n2l::cGuiSButton.

Definition at line 291 of file cGuiInteractive.cpp.

References n2l::cDynVar::insert(), and n2l::cGuiElement::mName.

Referenced by n2l::cGuiSButton::addExtraOutData(), n2l::cGuiButton::addExtraOutData(), mouseMove(), and mouseMoveOutside().

void n2l::cGuiInteractive::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 in n2l::cGuiButton, and n2l::cGuiSButton.

Definition at line 285 of file cGuiInteractive.cpp.

References n2l::cDynVar::insert(), and n2l::cGuiElement::mName.

Referenced by n2l::cGuiSButton::addExtraOverData(), n2l::cGuiButton::addExtraOverData(), and mouseMove().

void n2l::cGuiInteractive::addExtraPressedData tActionData oData  )  [protected, virtual]
 

Reimplemented in n2l::cGuiSButton.

Definition at line 297 of file cGuiInteractive.cpp.

References n2l::cDynVar::insert(), and n2l::cGuiElement::mName.

Referenced by n2l::cGuiSButton::addExtraPressedData(), and mouseClickAt().

void n2l::cGuiInteractive::addExtraReleasedData tActionData oData  )  [protected, virtual]
 

Reimplemented in n2l::cGuiSButton.

Definition at line 303 of file cGuiInteractive.cpp.

References n2l::cDynVar::insert(), and n2l::cGuiElement::mName.

Referenced by n2l::cGuiSButton::addExtraReleasedData(), mouseClickAt(), and mouseClickOutside().

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

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

Implements n2l::cGuiElement.

Reimplemented in n2l::cGuiButton, n2l::cGuiButtonSelectBox, n2l::cGuiSButton, n2l::cGuiSButtonSelectBox, n2l::cGuiSlider, n2l::cGuiTextDisplay, and n2l::cGuiTextInput.

Definition at line 258 of file cGuiInteractive.cpp.

References cloneInto().

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

Copy ourselves onto the provided element as a template.

Used only for clone() methods.

Definition at line 266 of file cGuiInteractive.cpp.

References n2l::cGuiElement::cloneInto().

Referenced by clone(), n2l::cGuiTextInput::cloneInto(), n2l::cGuiTextDisplay::cloneInto(), n2l::cGuiSlider::cloneInto(), n2l::cGuiSButtonSelectBox::cloneInto(), n2l::cGuiSButton::cloneInto(), n2l::cGuiButtonSelectBox::cloneInto(), and n2l::cGuiButton::cloneInto().

const tBool n2l::cGuiInteractive::collides const tGuiPos iPos  )  const [protected, virtual]
 

Return if the provided point is inside this widget.

Definition at line 278 of file cGuiInteractive.cpp.

References n2l::cGuiElement::mPos, n2l::cGuiElement::mSize, n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::x(), and n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::y().

Referenced by n2l::cGuiSlider::mouseClickAt(), mouseClickAt(), mouseMove(), n2l::cGuiTextDisplay::systemEvent(), n2l::cGuiSButtonSelectBox::systemEvent(), and n2l::cGuiButtonSelectBox::systemEvent().

void n2l::cGuiInteractive::focus const tBool  iFocus  )  [virtual]
 

Set the current focus status of this element.

Reimplemented from n2l::cGuiElement.

Definition at line 116 of file cGuiInteractive.cpp.

References addExtraFocusData(), n2l::cDynVar::Array, n2l::cGuiElement::broadcastAction(), n2l::cGuiElement::focus(), n2l::GuiActionType_FocusChanged, and n2l::cDynVar::insert().

const tBool n2l::cGuiInteractive::focus  )  const [virtual]
 

Get the wheither or not this element currently has focus.

Reimplemented from n2l::cGuiElement.

Definition at line 110 of file cGuiInteractive.cpp.

References n2l::cGuiElement::focus().

Referenced by n2l::cGuiSButtonSelectBox::systemEvent(), and n2l::cGuiButtonSelectBox::systemEvent().

const tBool n2l::cGuiInteractive::isDown  )  const [inline, protected]
 

Shortcut to allow children to know if the current element has a button pressed and held over it.

Definition at line 69 of file cGuiInteractive.h.

References n2l::MouseButton_Unknown.

Referenced by n2l::cGuiButton::draw().

const tBool n2l::cGuiInteractive::isOver  )  const [inline, protected]
 

Shortcut to allow children to know the 'over/out' status of the element.

Definition at line 64 of file cGuiInteractive.h.

Referenced by n2l::cGuiButton::draw(), n2l::cGuiSlider::mouseClickAt(), n2l::cGuiSlider::mouseMove(), n2l::cGuiSButtonSelectBox::systemEvent(), and n2l::cGuiButtonSelectBox::systemEvent().

void n2l::cGuiInteractive::keystroke const cKeyEvent iEvent  )  [protected, virtual]
 

Handle a keystroke.

Definition at line 224 of file cGuiInteractive.cpp.

References addExtraKeyData(), n2l::cDynVar::Array, n2l::cGuiElement::broadcastAction(), n2l::cGuiElement::focus(), n2l::GuiActionType_Keystroke, n2l::GuiActionType_KeystrokeOutside, n2l::cDynVar::insert(), n2l::cKeyEvent::key(), n2l::cKeyEvent::mods(), and n2l::cKeyEvent::pressed().

Referenced by systemEvent().

void n2l::cGuiInteractive::load const cDynVar iDef  )  [virtual]
 

Load this elements properties from the provided definition.

Reimplemented from n2l::cGuiElement.

Reimplemented in n2l::cGuiButton, n2l::cGuiButtonSelectBox, n2l::cGuiSButton, n2l::cGuiSButtonSelectBox, n2l::cGuiSlider, n2l::cGuiTextDisplay, and n2l::cGuiTextInput.

Definition at line 54 of file cGuiInteractive.cpp.

References n2l::cGuiElement::load().

Referenced by cGuiInteractive(), n2l::cGuiTextInput::load(), n2l::cGuiTextDisplay::load(), n2l::cGuiSlider::load(), n2l::cGuiSButtonSelectBox::load(), n2l::cGuiSButton::load(), n2l::cGuiButtonSelectBox::load(), and n2l::cGuiButton::load().

void n2l::cGuiInteractive::mouseClickAt const cMouseButtonEvent iClick  )  [protected, virtual]
 

Handle a mouse click event.

Reimplemented in n2l::cGuiSlider.

Definition at line 134 of file cGuiInteractive.cpp.

References addExtraClickedData(), addExtraPressedData(), addExtraReleasedData(), n2l::cDynVar::Array, n2l::cGuiElement::broadcastAction(), n2l::cMouseButtonEvent::button(), collides(), n2l::GuiActionType_Clicked, n2l::GuiActionType_Pressed, n2l::GuiActionType_Released, n2l::cDynVar::insert(), n2l::MouseButton_Unknown, n2l::cMouseButtonEvent::pos(), n2l::cMouseButtonEvent::pressed(), n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::x(), and n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::y().

Referenced by n2l::cGuiSlider::mouseClickAt(), and systemEvent().

void n2l::cGuiInteractive::mouseClickOutside const cMouseButtonEvent iClick  )  [protected, virtual]
 

Handle a mouse click which is explicitly outside the scope of this element.

Normally this looks for button releases etc. to release a button, drag bar or slider, etc.

Definition at line 185 of file cGuiInteractive.cpp.

References addExtraReleasedData(), n2l::cDynVar::Array, n2l::cGuiElement::broadcastAction(), n2l::cMouseButtonEvent::button(), n2l::GuiActionType_Released, n2l::cDynVar::insert(), n2l::MouseButton_Unknown, n2l::cMouseButtonEvent::pos(), n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::x(), and n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::y().

Referenced by systemEventOutside().

void n2l::cGuiInteractive::mouseMove const tGuiPos iPos  )  [protected, virtual]
 

Handle mouse motion.

Reimplemented in n2l::cGuiSlider.

Definition at line 200 of file cGuiInteractive.cpp.

References addExtraOutData(), addExtraOverData(), n2l::cDynVar::Array, n2l::cGuiElement::broadcastAction(), collides(), n2l::GuiActionType_Out, n2l::GuiActionType_Over, n2l::cDynVar::insert(), n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::x(), and n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::y().

Referenced by n2l::cGuiSlider::mouseMove(), and systemEvent().

void n2l::cGuiInteractive::mouseMoveOutside const tGuiPos iPos  )  [protected, virtual]
 

Handle mouse motion which is explicitly not within the scope of this element.

Normally this is event is just used to register an 'out' event, etc.

Definition at line 244 of file cGuiInteractive.cpp.

References addExtraOutData(), n2l::cDynVar::Array, n2l::cGuiElement::broadcastAction(), n2l::GuiActionType_Out, n2l::cDynVar::insert(), n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::x(), and n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::y().

Referenced by systemEventOutside().

void n2l::cGuiInteractive::systemEvent const cAutoPtr< const cEventInterface > &  i_iEvent  )  [virtual]
 

Tell the element that a system event has occured.

Reimplemented from n2l::cGuiElement.

Reimplemented in n2l::cGuiButtonSelectBox, n2l::cGuiSButtonSelectBox, n2l::cGuiSlider, and n2l::cGuiTextDisplay.

Definition at line 60 of file cGuiInteractive.cpp.

References n2l::EventType_Key, n2l::EventType_MouseButton, n2l::EventType_MouseMotion, keystroke(), mouseClickAt(), mouseMove(), and n2l::cGuiElement::pos().

Referenced by n2l::cGuiTextDisplay::systemEvent(), n2l::cGuiSButtonSelectBox::systemEvent(), and n2l::cGuiButtonSelectBox::systemEvent().

void n2l::cGuiInteractive::systemEventOutside const cAutoPtr< const cEventInterface > &  i_iEvent  )  [virtual]
 

Inform the element that a system event took place outside of its scope.

Generally this is only used to register the release of mouse buttons, or a mouse out action when the mouse moves off of a clipped canvas.

Reimplemented from n2l::cGuiElement.

Reimplemented in n2l::cGuiButtonSelectBox, n2l::cGuiSButtonSelectBox, and n2l::cGuiTextDisplay.

Definition at line 87 of file cGuiInteractive.cpp.

References n2l::EventType_MouseButton, n2l::EventType_MouseMotion, mouseClickOutside(), mouseMoveOutside(), and n2l::cGuiElement::pos().

Referenced by n2l::cGuiTextDisplay::systemEventOutside(), n2l::cGuiSButtonSelectBox::systemEventOutside(), and n2l::cGuiButtonSelectBox::systemEventOutside().


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