## Description

Parent class: XControl

### Overview

XContainerControl represents a container with multiple views like tree-, list- or icon view for a large amount of objects.

### Functions

#### GetColumn

#### Parameters

XContainerColumn * theColumnToSearch | Relative position to begin search. In cases CMA_FIRST and CMA_LAST ignored.
SHORT options | Valid values are:
CON_FIRST | Get the first column.
CON_LAST | Get the last column.
CON_NEXT | Get the next relative to theColumnToSearch.
CON_PREV | Get the previous relative to theColumnToSearch.

#### Return-Value

XContainerControl * The found column.

#### Remarks

Query a column from a container.

#### InsertColumn

#### Parameters

XContainerColumn * theColumnToInsert | This column should be inserted
XContainerColumn * insertPosition | The position to insert. Valid values are:
CON_FIRST | Insert as the first column.
CON_LAST | Insert as the last column.
XContaineColumn* | The column behind which the column should be inserted.

#### Return-Value

BOOL success

#### Remarks

Insert a column into a container. After you have added one or more columns, you must call Invalidate() so the columns are drawn.

#### RemoveColumn

#### Parameters

XContainerColumn * theColumn | The column to delete
SHORT option | How to delete. Valid values are:
CON_FREE | Destruct the column and free container related memory
CON_INVALIDATE | Redraw the container

#### Return-Value

BOOL success

#### Remarks

Removes a column

#### UpdateColumns

#### Remarks

Update columns in detail-view. If you have inserted, deleted or modified one ore more columns you must call UpdateColumns to make your changes visible.

#### XContainerControl

#### Parameters

XWindow * theOwner | The owning window.
XRect * rectangle | Position and size.
USHORT id | The id of the window. Default is zero.
ULONG style | The style. valid values are:
CON_AUTOPOSITION | objects are arranged automaticaly
CON_EXTENDSEL | extended selection is enabled
CON_MULTIPLESEL | mutiple selection is enabled
CON_READONLY | directe diting is disabled
CON_SINGLESEL | only one object can be selected

#### Remarks

#### Arrange

#### Remarks

Rearrange the object is the container

#### HScroll

#### Parameters

LONG pixels how much pixels to scroll

#### Remarks

Scrolls the container content horizontal

#### InvalidateObject

#### Parameters

XContainerObject * theObject | the object to invalidate (default is NULL)
SHORT options | options, valid values are:
CON_ERASE | erase the background
CON_REPOSITION | reposition
CON_NOREPOSITION | no reposition
CON_TEXTCHANGED | redraw the text
(default is CON_REPOSITION, can be or-ed)

#### Remarks

Invalidates one ore all objects

#### VScroll

#### Parameters

LONG pixels how much pixels to scroll

#### Remarks

Scrolls the container content vertical

#### ExpandTreeObject

#### Parameters

XContainerObject * obj | the object to expand/collaps
BOOL expand | TRUE=expand FALSE=collapse

#### Return-Value

TRUE success

#### Remarks

Expands/collaps an object in tree-view.

#### GetInfo

#### Parameters

XContainerInfo * the information buffer to hold the information (See the description of XContainerInfo )

#### Remarks

Querys information about the container.

#### SetInfo

#### Parameters

XContainerInfo * the information See the description of XContainerInfo

#### Remarks

Set information how to display the container.

#### AddObject

#### Parameters

XContainerObject * theObject | object to add
XContainerObject * parentObject | parent of the object (for tree-view) (default is NULL)
XContainerObject * sibObject | sibling object to insert behind, or:
CON_FIRST | insert at the top
CON_END | insert at the end
In this cases you have to make a typecast: (XContainerObject *) (default is CON_END)
BOOL redraw | redraw the object

#### Return-Value

BOOL success

#### Remarks

Add an object to the container. If you insert a large amount of objects you should set parameter to FALSE and call InvalidateObject(NULL) if you have finished inserting.

#### AddObjectList

#### Parameters

XContainerObject ** theObject | an array of pointer to objects to add
SHORT count | count of object in the array
XContainerObject * parentObject | parent of the objects (for tree-view) (default is NULL)
XContainerObject * sibObject | sibling object to insert behind, or:
CON_FIRST | insert at the top
CON_END | insert at the end
In this cases you have to make a typecast: (XContainerObject *) (default is CON_END)
BOOL redraw | draw the objects

#### Return-Value

BOOL success

#### Remarks

Add an object to the container. If you insert a large amount of objects you should set parameter to FALSE and call InvalidateObject(NULL) if you have finished inserting.

#### RemoveAll

#### Parameters

BOOL destroyObjects the destructors of the objects are called and memory ascociated with the container is freed.

#### Remarks

Remove all objects from a container

#### RemoveObject

#### Parameters

XContainerObject * theObject | the object to remove
BOOL destryObject | if TRUE the destructor of the object is called if FALSE it exist (usefull if an object is member of multiple container-controls) (default is TRUE)
BOOL redraw | redraw the container (default is TRUE)

#### Return-Value

BOOL success

#### Remarks

Removes an object from the container

#### RemoveObjectList

#### Parameters

XContainerObject ** theObjects | an array of pointer to objects to remove
SHORT count | the count of object in the array
BOOL destryObject | if TRUE the destructor of the objects are called if FALSE it exist (usefull if an object is member of multiple container-controls) (default is TRUE)
BOOL redraw | redraw the container (default is TRUE)

#### Return-Value

BOOL success

#### Remarks

Removes an array of objects from the container

#### SortObjects

#### Remarks

Sort the objects in the container. On default the objects are sorted by the title of the object. To sort them on a user-defined way you must override the method Sort() of the XContainerObject.

#### SetObjectEmphasis

#### Parameters

XContainerObject * theObject | object to change
SHORT emphasis | the needed emphasis, valid values are:
CON_CURSORED | the object is cursored
CON_DISABLED | the object is disabled
CON_INUSE | the objects icon is displayed open
CON_PICKED | the objects icon is displayed dragged
CON_SELECTED | the object is selected
CON_SOURCE | the object get source-emphasis
(can be or-ed)
BOOL enable | enable/disable emphasis

#### Remarks

Sets the emphasis of an object so displaying the objects icon is changed

#### FindObject

#### Parameters

XContainerObject * startObject | search relative to this object (default is NULL)
SHORT select | serach settings, valid values are:
CON_FIRST | get the first object of the container
CON_FIRSTCHILD | get the first child of startObject
CON_LAST | get the last object of the container
CON_LASTCHILD | get the last child of startObject
CON_NEXT | get the next object relative to startObject
CON_PARENT | get the parent of startObject
CON_PREV | get the previous object relative to startObject
default is CON_FIRST

#### Return-Value

XContainerObject * pointer to the found object (NULL if nothing is found)

#### Remarks

Get an object from the container with relative positions

#### GetObject

#### Parameters

XContainerObject * startObject | search relative to this object (default is NULL)
SHORT filter | the emphasis to search
CON_CURSORED | the object has the cursored
CON_DISABLED | the object is disabled
CON_INUSE | the objects icon is displayed open
CON_PICKED | the objects icon is displayed dragged
CON_SELECTED | the object is selected
CON_SOURCE | the object get source-emphasis
(default is CON_SELECTED, can be or-ed)

#### Return-Value

XContainerObject * pointer to the found object (NULL if nothing is found)

#### Remarks

Get an object from the container by querying the objects emphasis

This document was generated by Jens von Pilgrim's Autodoc