|
|
LibN2L-4 Library Code Reference
Classes
Compounds
Files
Members
Method Index
Full Reference
n2l::cGuiCanvas Class ReferenceA 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:
[legend]Collaboration diagram for n2l::cGuiCanvas:
[legend]List of all members.Public Member Functions
- cGuiCanvas ()
- cGuiCanvas (const tGuiPos &iPos, const tGuiPos &iSize)
- cGuiCanvas (const cVfsNodeInterface &iNode)
- cGuiCanvas (const cDynVar &iDefinition)
- virtual ~cGuiCanvas ()
- void load (const cVfsNodeInterface &iNode)
- Load this elements properties from the provided VFS Node.
- void load (const cDynVar &iDefinition)
- Load this elements properties from the provided definition.
- void add (const tGuiName &iName, const cAutoPtr< cGuiElement > &i_ioElement)
- virtual const cAutoPtr< cGuiElement > remove (const tGuiName &iName)
- virtual const cAutoPtr< cGuiElement > get (const tGuiName &iName)
- Find a child node by the name provided.
- virtual tOElementList getByType (const type_info &iType)
- virtual tOElementList & getByType (tOElementList &oList, const type_info &iType)
- void clipping (const tBool iClip)
- Set the value of the clipping property.
- const tBool clipping () const
- Get the value of the clipping property.
- void innerOffset (const tGuiPos &iPos)
- Set the value of the inner offset.
- const tGuiPos & innerOffset () const
- Get the value of the inner offset.
- void clear ()
- Empty the canvas completely.
- virtual void systemEvent (const cAutoPtr< const cEventInterface > &i_iEvent)
- Tell the element that a system event has occured.
- virtual void systemEventOutside (const cAutoPtr< const cEventInterface > &i_iEvent)
- Inform the element that a system event took place outside of its scope.
- virtual void update (const tUint iTimePassed)
- Inform the canvas how much time has passed since its last update, usually this is called once per frame.
- virtual void dropAllFocus (const cGuiElement *const ioFrom)
- Force all elements to drop focus, usually so that the requesting element may steal it.
- virtual void focusForward ()
- Find the currently focused element and blur, then give focus to the next element in the 'wantsFocus' list.
- virtual void focusBack ()
- Find the currently focused element and blur, then give focus to the previous element in the 'wantsFocus' list.
- virtual void draw () const
- Draw ourselves on the screen.
- virtual const cAutoPtr< cGuiElement > clone () const
- Method to return a copy of this element.
- virtual const tBool hasChildren () const
- Return whether or not this element has children that must be searched if trying to find a node.
- virtual void enabled (const tBool iEnabled)
- virtual const tBool enabled () const
- virtual void prop (const tString &iName, const cDynVar &iVal, const tString &iInnerKey="")
- Set a property by name.
- virtual const cDynVar prop (const tString &iName, const tString &iInnerKey="") const
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 |
( |
|
) |
|
|
| n2l::cGuiCanvas::cGuiCanvas |
( |
const tGuiPos & |
iPos, |
|
|
const tGuiPos & |
iSize |
|
) |
|
|
| n2l::cGuiCanvas::cGuiCanvas |
( |
const cDynVar & |
iDefinition |
) |
|
|
| n2l::cGuiCanvas::~cGuiCanvas |
( |
|
) |
[virtual] |
|
Member Function Documentation
| void n2l::cGuiCanvas::clear |
( |
|
) |
|
|
| const tBool n2l::cGuiCanvas::clipping |
( |
|
) |
const |
|
| void n2l::cGuiCanvas::clipping |
( |
const tBool |
iClip |
) |
|
|
|
|
Set the value of the clipping property.
Definition at line 185 of file cGuiCanvas.cpp. |
|
|
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] |
|
| void n2l::cGuiCanvas::draw |
( |
|
) |
const [virtual] |
|
| void n2l::cGuiCanvas::dropAllFocus |
( |
const cGuiElement *const |
ioFrom |
) |
[virtual] |
|
| virtual const tBool n2l::cGuiCanvas::enabled |
( |
|
) |
const [inline, virtual] |
|
| void n2l::cGuiCanvas::enabled |
( |
const tBool |
iEnabled |
) |
[virtual] |
|
| void n2l::cGuiCanvas::focusBack |
( |
|
) |
[virtual] |
|
| void n2l::cGuiCanvas::focusForward |
( |
|
) |
[virtual] |
|
| 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 |
|
| 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(). |
| const cDynVar n2l::cGuiCanvas::prop |
( |
const tString & |
iName, |
|
|
const tString & |
iInnerKey = "" |
|
) |
const [virtual] |
|
| 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(). |
|
|
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::update |
( |
const tUint |
iTimePassed |
) |
[virtual] |
|
The documentation for this class was generated from the following files:
|