UI.UiNodeManager Class Reference


Detailed Description

UiNodeManager is used for managing nodes used by UI elements.

Currently it manages three types: Group, ImageGeometry, and TextGeometry. A client of the manager should call the appropriate get*() method when it needs a node of specific type, and return*() when it is finished with the node. Typically, the get*() method should be called in the constructor, while the return*() method should be called in the destructor.

If the cache is enabled, then any node that is returned is automatically added to the cache. If the cache is not empty when calling get*(), then a cached node is returned, otherwise a new node is created.

If the cache is disabled, then the get*() methods will always return a new node, and the return*() method will do nothing.

The cache can be enabled/disabled using setEnableCache(). When the cache is disabled, then the cached nodes are cleared.

The cache is disabled by default.

#include <class_u_i_1_1_ui_node_manager.h>

List of all members.

Public Member Functions

  getGroup ()
  Returns a Group node.
  returnGroup ()
  getImageGeometry ()
  Returns an ImageGeometry node with its image path set to the given path.
  returnImageGeometry ()
  getTextGeometry ()
  Returns an ImageGeometry node with its height set to the char size.
  returnTextGeometry ()
  isCachingEnabled ()
  setEnableCaching ()
  Enables or disables the cache.

Member Function Documentation

UI.UiNodeManager.getGroup ( )

Returns a Group node.

UI.UiNodeManager.returnGroup ( )
UI.UiNodeManager.getImageGeometry ( )

Returns an ImageGeometry node with its image path set to the given path.

UI.UiNodeManager.returnImageGeometry ( )
UI.UiNodeManager.getTextGeometry ( )

Returns an ImageGeometry node with its height set to the char size.

UI.UiNodeManager.returnTextGeometry ( )
UI.UiNodeManager.isCachingEnabled ( )
UI.UiNodeManager.setEnableCaching ( )

Enables or disables the cache.

The cache is cleared when it is disabled.


UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager
UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager UI.UiNodeManager