AaronCameron.net
No ads. No Profit. No Master, But Truth.
Not a Member? - Login or Create an Account
Thursday the 24th of May 2012 @ 04:06am
Front Page Journal Projects Your Profile About
[]

LibN2L-4 Library Code Reference

Classes
Compounds
Files
Members
Method Index
Full Reference

n2l::cGuiCanvas Class Reference

A class representing a 2d area of the screen on which widgets may be placed and interact. More...

#include <cGuiCanvas.h>

Inheritance diagram for n2l::cGuiCanvas:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

A class representing a 2d area of the screen on which widgets may be placed and interact.

Definition at line 45 of file cGuiCanvas.h.


Constructor & Destructor Documentation

n2l::cGuiCanvas::cGuiCanvas  ) 
 

Definition at line 47 of file cGuiCanvas.cpp.

n2l::cGuiCanvas::cGuiCanvas const tGuiPos iPos,
const tGuiPos iSize
 

n2l::cGuiCanvas::cGuiCanvas const cVfsNodeInterface iNode  ) 
 

Definition at line 65 of file cGuiCanvas.cpp.

References load().

n2l::cGuiCanvas::cGuiCanvas const cDynVar iDefinition  ) 
 

Definition at line 75 of file cGuiCanvas.cpp.

References load().

n2l::cGuiCanvas::~cGuiCanvas  )  [virtual]
 

Definition at line 85 of file cGuiCanvas.cpp.

References clear().


Member Function Documentation

void n2l::cGuiCanvas::add const tGuiName iName,
const cAutoPtr< cGuiElement > &  i_ioElement
 

Definition at line 142 of file cGuiCanvas.cpp.

References n2l::asString(), and n2l::cAutoPtr< TPtr >::dumbPtr().

Referenced by load().

void n2l::cGuiCanvas::clear  ) 
 

Empty the canvas completely.

Definition at line 249 of file cGuiCanvas.cpp.

Referenced by ~cGuiCanvas().

const tBool n2l::cGuiCanvas::clipping  )  const
 

Get the value of the clipping property.

Definition at line 191 of file cGuiCanvas.cpp.

Referenced by cloneInto(), draw(), load(), and systemEvent().

void n2l::cGuiCanvas::clipping const tBool  iClip  ) 
 

Set the value of the clipping property.

Definition at line 185 of file cGuiCanvas.cpp.

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

Method to return a copy of this element.

Useful as a way to get a non-const, bindable and canvas-able instance of an element from the resource loader.

Note:
Bindings, name and canvas parent information are not cloned.

Implements n2l::cGuiElement.

Definition at line 558 of file cGuiCanvas.cpp.

References cloneInto().

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

Definition at line 566 of file cGuiCanvas.cpp.

References clipping(), n2l::cGuiElement::cloneInto(), enabled(), and innerOffset().

Referenced by clone().

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

Draw ourselves on the screen.

Note:
This method does not set the projection matrix.

Reimplemented from n2l::cGuiElement.

Definition at line 266 of file cGuiCanvas.cpp.

References clipping(), n2l::cGuiElement::draw(), enabled(), innerOffset(), n2l::cGuiElement::innerPos(), n2l::cGuiElement::innerSize(), n2l::cGuiElement::outerPos(), n2l::cGuiElement::outerSize(), n2l::cGuiElement::pos(), and n2l::cGuiElement::size().

void n2l::cGuiCanvas::dropAllFocus const cGuiElement *const   ioFrom  )  [virtual]
 

Force all elements to drop focus, usually so that the requesting element may steal it.

This is normally done when a focusable element is clicked on.

Definition at line 495 of file cGuiCanvas.cpp.

References n2l::cGuiElement::canvas(), and dropAllFocus().

Referenced by dropAllFocus(), and n2l::cGuiElement::focus().

virtual const tBool n2l::cGuiCanvas::enabled  )  const [inline, virtual]
 

Definition at line 122 of file cGuiCanvas.h.

Referenced by cloneInto(), draw(), load(), prop(), systemEvent(), systemEventOutside(), and update().

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

Definition at line 586 of file cGuiCanvas.cpp.

void n2l::cGuiCanvas::focusBack  )  [virtual]
 

Find the currently focused element and blur, then give focus to the previous element in the 'wantsFocus' list.

Definition at line 532 of file cGuiCanvas.cpp.

References n2l::cGuiElement::focus().

Referenced by systemEvent().

void n2l::cGuiCanvas::focusForward  )  [virtual]
 

Find the currently focused element and blur, then give focus to the next element in the 'wantsFocus' list.

Definition at line 508 of file cGuiCanvas.cpp.

References n2l::cGuiElement::focus().

Referenced by systemEvent().

const cAutoPtr< cGuiElement > n2l::cGuiCanvas::get const tGuiName iName  )  [virtual]
 

Find a child node by the name provided.

Note:
The default return is 0

Reimplemented from n2l::cGuiElement.

Definition at line 210 of file cGuiCanvas.cpp.

References n2l::cAutoPtr< TPtr >::isSet().

Referenced by remove().

cGuiElement::tOElementList & n2l::cGuiCanvas::getByType tOElementList oList,
const type_info &  iType
[virtual]
 

Definition at line 233 of file cGuiCanvas.cpp.

cGuiElement::tOElementList n2l::cGuiCanvas::getByType const type_info &  iType  )  [virtual]
 

Note:
Final

Reimplemented from n2l::cGuiElement.

Definition at line 226 of file cGuiCanvas.cpp.

const tBool n2l::cGuiCanvas::hasChildren  )  const [virtual]
 

Return whether or not this element has children that must be searched if trying to find a node.

Reimplemented from n2l::cGuiElement.

Definition at line 580 of file cGuiCanvas.cpp.

const tGuiPos & n2l::cGuiCanvas::innerOffset  )  const
 

Get the value of the inner offset.

Definition at line 204 of file cGuiCanvas.cpp.

Referenced by cloneInto(), draw(), load(), systemEvent(), and systemEventOutside().

void n2l::cGuiCanvas::innerOffset const tGuiPos iPos  ) 
 

Set the value of the inner offset.

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

Load this elements properties from the provided definition.

Reimplemented from n2l::cGuiElement.

Definition at line 100 of file cGuiCanvas.cpp.

References add(), clipping(), n2l::cGuiFactory::current(), enabled(), n2l::cDynVar::end(), n2l::cResourceManager::getGuiElement(), innerOffset(), n2l::cDynVar::keyExists(), load(), n2l::cGuiElement::load(), and n2l::cGuiElement::name().

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

Load this elements properties from the provided VFS Node.

Reimplemented from n2l::cGuiElement.

Definition at line 92 of file cGuiCanvas.cpp.

References n2l::cGuiElement::validateAndDecode().

Referenced by cGuiCanvas(), and load().

const cDynVar n2l::cGuiCanvas::prop const tString iName,
const tString iInnerKey = ""
const [virtual]
 

Reimplemented from n2l::cGuiElement.

Definition at line 602 of file cGuiCanvas.cpp.

References enabled(), and n2l::cGuiElement::prop().

void n2l::cGuiCanvas::prop const tString iName,
const cDynVar iVal,
const tString iInnerKey = ""
[virtual]
 

Set a property by name.

Which properites are supported and the format for each set is renegotiated as required.

Note:
Each derived class needs to reimplement this method to support its own properties. Parent classes should be called AFTER the derived class checks, not before which is opposite to most similar classes.

Reimplemented from n2l::cGuiElement.

Definition at line 592 of file cGuiCanvas.cpp.

References enabled(), and n2l::cGuiElement::prop().

const cAutoPtr< cGuiElement > n2l::cGuiCanvas::remove const tGuiName iName  )  [virtual]
 

Definition at line 166 of file cGuiCanvas.cpp.

References get(), and n2l::cAutoPtr< TPtr >::isSet().

Referenced by update().

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

Tell the element that a system event has occured.

Reimplemented from n2l::cGuiElement.

Definition at line 342 of file cGuiCanvas.cpp.

References clipping(), enabled(), n2l::EventType_Key, n2l::EventType_MouseButton, n2l::EventType_MouseMotion, focusBack(), focusForward(), innerOffset(), n2l::Key_Tab, n2l::KMod_Shift, n2l::cGuiElement::outerSize(), n2l::cMouseMotionEvent::pos(), n2l::cGuiElement::pos(), n2l::cMouseButtonEvent::pos(), n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::x(), and n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::y().

void n2l::cGuiCanvas::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.

Definition at line 431 of file cGuiCanvas.cpp.

References enabled(), n2l::EventType_MouseButton, n2l::EventType_MouseMotion, innerOffset(), n2l::cMouseMotionEvent::pos(), n2l::cGuiElement::pos(), and n2l::cMouseButtonEvent::pos().

void n2l::cGuiCanvas::update const tUint  iTimePassed  )  [virtual]
 

Inform the canvas how much time has passed since its last update, usually this is called once per frame.

Reimplemented from n2l::cGuiElement.

Definition at line 475 of file cGuiCanvas.cpp.

References enabled(), remove(), and n2l::cGuiElement::update().


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