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.
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.