AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzUICanvas Class Reference

#include <CzUICanvas.h>

Inheritance diagram for CzUICanvas:
CzUIPanel CzUIBase CzActorImage CzActor IzXomlResource IzAnimTarget CzUITabBar

List of all members.

Public Member Functions

 CzUICanvas ()
bool Update (float dt)
 Updates this actors logic.
int LoadFromXoml (IzXomlResource *parent, bool load_children, CzXmlNode *node)
 Creates an instance of this class from XML.

Protected Member Functions

void LinkChanged (CzActor *child, bool remove)
 Called from an actor when an actor that links to this actor unlinks itself.
bool UpdateLayout ()
 Updates the actors layout.

Constructor & Destructor Documentation

CzUICanvas::CzUICanvas ( ) [inline]

Member Function Documentation

void CzUICanvas::LinkChanged ( CzActor child,
bool  remove 
) [protected, virtual]

Called from an actor when an actor that links to this actor unlinks itself.

Reimplemented from CzUIPanel.

Reimplemented in CzUITabBar.

int CzUICanvas::LoadFromXoml ( IzXomlResource parent,
bool  load_children,
CzXmlNode node 
) [virtual]

Creates an instance of this class from XML.

LoadFromXoml is the main method used by all classes that can be instantiated from XOML mark-up. This method creates an instance of this class from the supplied XML node structure specified by node. if parent is not NULL then the created instance will utilise the supplied parent to determine where it should live within the app. For example, if the parent is a scene then the actor will be placed in that scene. if the parent is another actor then this actor will be placed into the scene of the supplied actor and linked as a child to the parent actor. If load_chlldren is true then any child nodes contained within the actor will also be loaded. Note that as CzUIBase is derived from CzActorImage, CzActorImage::LoadFromXoml() will also be called to load CzActor specific properties.

Parameters:
[in]parentIf non-null, the parent.
load_childrentrue to load child nodes.
[in]nodeIf non-null, the XOML markup node that defines this object
Returns:
negative value for error. if 0 then processing of further XOML will stop.

Reimplemented from CzUIBase.

Reimplemented in CzUITabBar.

bool CzUICanvas::Update ( float  dt) [virtual]

Updates this actors logic.

Updates the UI actors logic, including:

  • Processing event actions
  • Processing any attached modifiers
  • Updating dragging state
  • Updating physics
  • Updating the attached timeline
  • Updating any show / hide timelines
  • Updating the scroller
  • Checking for an updating layout if dirty

This method should be overriden by derived actors to provide the UI actor specific logic.

Note that dt is used to scale actor internals that rely on time. This value enables the actor run in an environment where time (the frame rate of the device) can vary allowing animation to keep up without slowing down or speeding up when the frame rate varies.

Note that if an actor returns false then it will automatically be removed from the scene.

Parameters:
dtThe number of seconds since the app was last updated
Returns:
true if it succeeds, false if it fails.

Reimplemented from CzUIBase.

Reimplemented in CzUITabBar.

bool CzUICanvas::UpdateLayout ( ) [protected, virtual]

Updates the actors layout.

Recalculates the actors layout. Used mainly by container actors to modify the layout of their child content. This method is usually overridden by a derived class in order to update the layout of its children.. See CzUIStackPanel::UpdateLayout() for a simple example.

Returns:
true if it succeeds, false if it fails.

Reimplemented from CzUIBase.

Reimplemented in CzUITabBar.


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