Product Home Class IndexDownload

CK_Manager

CK_Object
   |
   +----CK_Component
           |
           +----CK_Manager

All components are either primitives (CK_Primitive) or managers (CK_Manager). Manager components can be given child components, which can be primitive components, or other manager components. Some managers, such as CK_RowColumn, are responsible for positioning their children automatically. Other managers, such as CK_BBoard, simply draw their children whereever they are placed. Both the row-column and the bulletin board managers can have any number of children. The following managers however, can only have one child: CK_ClipWindow, CK_Frame.

The CK_Manager is the base class for all manager components. It provides common member functions for adding, replacing, and removing children.


Public Methods

addChild
Makes a component a child of the manager.
removeChild
Removes a component from the manager's control.
replaceChild
Replaces a child of the manager with a different component.

Inherited Methods

getProp(int property, int *)
Gets the value of an integer type property.
getProp(int property, const CK_Bitmap **)
Gets a const pointer to a bitmap for bitmap typed properties.
getProp(int property, const CK_Font **)
Gets a const pointer to a font for font typed properties.
getProp(int property, const char **)
Gets a const pointer to a character string for string typed properties.
getProp(int property, RGBQUAD *)
Gets an RGBQUAD for properties that are colors.
getProp(int property, CK_Render **)
Gets a pointer to a CK_Render object for render callback properties.
setDirty
Forces the component to be redrawn.
setProp(int property, int)
Sets the value of an integer typed property.
setProp(int property, const CK_Bitmap *)
Sets the value of a bitmap typed property.
setProp(int property, const CK_Font *)
Sets the value of a font typed property.
setProp(int property, const char *)
Sets the value of a string typed property.
setProp(int property, const RGBQUAD *)
Sets the value of an RGBQUAD typed property.
setProp(int property, CK_Render *)
Sets the value of a render callback typed property.
setResized
Indicates to the engine that the property was resized.

Places a component under the manager's control. The component becomes a child of the manager. If the manager component is visible on the screen, the display is automatically updated to show the new child.

Parameters

comp
The component to become a child of the manager.

Removes a component from the manager's control. The component will no longer be a child of the manager. The display will automatically be updated to reflect the removed child.

Parameters

comp
The component to be removed.

Replaces one child component with another component. For most components, this is identical to first calling removeChild(), and then calling addChild(). For CK_RowColumn components, the replaceChild() method makes a difference. Since addChild() will always add a component to the end of the row (or column), replacing a component in the middle of the row can only be achieved by calling this method.

Parameters

existing
The component to be replaced.
replacement
The replacement component.