The IContainerControl class displays a container of objects in any of the following supported views:
Like other controls in the library, you can construct this control in one of the following ways:
You can derive classes from the following handlers and attach them to a container control:
In AIX, due to the limited capabilities of the container widget under Motif 1.2, the Open Class Library does not support the following:
A container will not paint over sibling windows that lie over it. For this reason, a container can be hidden by a sibling combination box, group box, or outline box control, even if the control does not paint the portion of its window that overlaps the container (for example, the interior of a group box). You can cause the container to paint correctly by placing it on top of all overlapping sibling windows, either by changing the order that you create it relative to its sibling windows, or by using function IWindow::positionOnSiblings or IWindow::positionBehindSibling.
The native Windows containers (that is, containers constructed without the pmCompatible style) are wrappers of the Windows list view and tree view controls. Both controls are maintained simultaneously by IContainerControl. The underlying controls are only created when necessary. If you create the container in a tree view and never switch to a nontree view, then a Windows list view control is never created. This approach is recommended for applications never using a nontree view. Likewise, a container that is created in a nontree view and never switches to a tree view or adds child objects will not cause an underlying Windows tree view control to be created and maintained.
The native Windows containers do have limitations when compared to the pmCompatible containers. These limitations are documented in each of the affected functions. The most notable limitations are in the details view and are described in functions and classes used by the details view.
The native Windows containers do not support constructing this control in the following ways:
You can construct and destruct objects of this class.
Note:
![]() |
public:
virtual ~IContainerControl()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IContainerControl(unsigned long id, IWindow* parentDialog)
Create an IContainerControl from a container control on a loaded dialog template.
Windows | OS/2 | AIX |
Yes | Yes | No |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support this constructor.
public:
IContainerControl(const IWindowHandle& handle)
Create an IContainerControl from an existing container control's window handle
Windows | OS/2 | AIX |
Yes | Yes | No |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support this constructor.
public:
IContainerControl( unsigned long id, IWindow* parent, IWindow* owner, const IRectangle& location = IRectangle ( ), const Style& style = defaultStyle ( ), const Attribute& attribute = defaultAttribute ( ) )
Create an IContainerControl on a window by specifying the parent and owner.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members add and remove objects.
![]() |
public:
virtual IContainerControl& addObject( const IContainerObject* newObject, IContainerObject* parentObject = 0 )
Adds an object to the container. In the tree view, the parent defines the object's location. When you specify parentObject, this function adds the object as its last immediate descendent. Otherwise, the container adds the object as the last object in the root level.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& addObjectAfter( const IContainerObject* newObject, const IContainerObject* afterObject, IContainerObject* parentObject = 0 )
Adds a new object by placing it after a specified object.
When you specify 0 for afterObject. The object is placed at either of the following locations:
If afterObject is nonzero, the container ignores parentObject. The newObject is placed at the same level of the tree as afterObject and immediately following it.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& addObjects( ICnrAllocator& allocator, IContainerObject* parentObject = 0 )
Adds multiple objects to the container. In tree view, the parent defines the location of the objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support adding multiple objects with one call. This function can be used, but the objects will be inserted separately.
![]() |
public:
virtual IContainerControl& addObjectsAfter( ICnrAllocator& allocator, const IContainerObject* afterObject, IContainerObject* parentObject = 0 )
Adds multiple objects to be placed after a given object. If you specify 0 for the afterObject argument, the objects are added as the first objects in the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The Motif container container widget does not support adding multiple objects with one call. This function can be used, but the objects will be inserted separately.
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support adding multiple objects with one call. This function can be used, but the objects will be inserted separately.
![]() |
public:
virtual IContainerControl& deleteAllObjects()
Deletes all objects in this container. If an object exists in other containers, it is removed from them as well before being deleted.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& deleteSelectedObjects()
Deletes the selected objects in this container. If an object exists in other containers, it is removed from them as well before being deleted.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& removeAllObjects()
Removes all objects from the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& removeObject( IContainerObject* object, bool allContainers = false )
Removes the specified object from this container or, optionally, all containers.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Removes the object at the specified cursor's position.
public:
virtual IContainerControl& removeObjectAt( IContainerControl::TextCursor& cursor )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IContainerControl& removeObjectAt( IContainerControl::ObjectCursor& cursor )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& removeSelectedObjects()
Removes all selected objects from the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query and set the accessible attributes of this class.
![]() |
public:
bool areDetailsViewTitlesVisible() const
return true when the column titles are currently displayed for details view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support hiding of column titles. This function always returns true for these containers.
![]() |
public:
virtual IContainerControl& disableTitleUpdate()
Disables the container title from being edited.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.
![]() |
public:
virtual IContainerControl& enableTitleUpdate( bool enable = true )
Allows the container title to be edited.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.
![]() |
public:
bool hasMixedTargetEmphasis() const
return true when the mixed target emphasis mode is set for direct manipulation over this container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The Motif container widget does not support mixed target emphasis for direct manipulation. This function always returns false.
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support mixed target emphasis for direct manipulation. This function always returns false.
![]() |
public:
bool hasNormalTargetEmphasis() const
return true when the regular target emphasis mode is set for drag operations over this container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool hasOrderedTargetEmphasis() const
return true when the ordered target emphasis mode is set for drag operations over this container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The Motif container widget does not support ordered target emphasis for drag and drop. This function always returns false.
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support ordered target emphasis for drag and drop. This function always returns false.
![]() |
public:
virtual IContainerControl& hideDetailsViewTitles()
Removes column headings from details view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support hiding of the column titles.
![]() |
public:
virtual IContainerControl& hideTitle()
Removes the container title from the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& hideTitleSeparator()
Removes the title separator from the container window.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
ISize iconSize() const
Returns the icon or bitmap size of all objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isExtendedSelection() const
returns true when the container is in extended-selection mode. Extended selection is an enhanced version of single selection that lets the user select discontiguous sets of container items.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isMultipleSelection() const
returns true when the container is in multiple-selection mode. Multiple selection is a mode that allows the user unrestricted selection of objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not differentiate between multiple and extended selection modes. Use CTRL-Left Mouse Button to select objects in either mode.
![]() |
public:
bool isPMCompatible() const
Returns true if the pmCompatible style is set for this container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This function always returns false.
This function always returns true.
This function returns false if the pmCompatible style is not set and the native Windows containers are being used.
![]() |
public:
bool isSingleSelection() const
returns true when the container is in the single-selection mode. In this mode, you can only select a single object at a time. Selecting a new object removes the selection from a prior object. In a single-selection container, one object is always selected. If you remove an object with selection emphasis, the container selects another object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTitleSeparatorVisible() const
returns true when the title separator is currently displayed.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTitleVisible() const
returns true when the container title is currently displayed.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTitleWriteable() const
Returns true if the data in the title can be edited.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title. This function always returns false.
![]() |
public:
long lineSpacing() const
Returns the space between lines, in pixels. This is the amount you can add to the minimum distance required by the container control for emphasis painting. You cannot reduce the minimum distance required by the presentation system.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support changing the spacing between container objects.
![]() |
public:
virtual IContainerControl& setExtendedSelection()
Sets the selection mode to extended selection. Extended selection is an enhanced version of single selection that lets the user select discontiguous sets of container items.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setIconSize( const ISize& iconSize )
Sets the icon or bitmap size for all objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setLineSpacing(long lineSpacing)
Sets the vertical distance between records. This is the amount you can add to the minimum distance required by the container control for emphasis painting. You cannot reduce the minimum distance required by the presentation system.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support changing the spacing between container objects.
![]() |
public:
virtual IContainerControl& setMixedTargetEmphasis()
Sets the drag mode to mixed-target emphasis.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support mixed-target emphasis for drag and drop.
![]() |
public:
virtual IContainerControl& setMultipleSelection()
Sets the selection mode to multiple selection. Multiple selection is a mode that gives the user unrestricted selection of objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not differentiate between multiple and extended selection modes. Use CTRL-Left Mouse Button to select objects in either mode.
![]() |
public:
virtual IContainerControl& setNormalTargetEmphasis()
Sets the drag mode to normal-target emphasis.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
![]() |
public:
virtual IContainerControl& setOrderedTargetEmphasis()
Sets the drag mode to ordered-target emphasis.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support ordered-target emphasis for drag and drop.
![]() |
public:
virtual IContainerControl& setSingleSelection()
Sets the selection mode to single selection. In this mode, the user (or your code) can only select a single object at a time. Selecting a new object removes the selection from a prior object. In a single-selection container, one object is always selected. If you remove an object with selection emphasis, the container selects another object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Sets the title for the container that is displayed in all views.
public:
virtual IContainerControl& setTitle( const IResourceId& resourceId )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IContainerControl& setTitle(const char* title)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setTitleAlignment( TitleAlignment alignment = centered )
Sets the alignment attributes for the title. The default centers the title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& showDetailsViewTitles( bool show = true )
Displays column headings in the details view. Although you set the column titles (that is, headings) for the individual column objects, you must use this function to tell the container control to display the column titles for the details view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support hiding of the column titles.
![]() |
public:
virtual IContainerControl& showTitle(bool show = true)
Shows the container title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& showTitleSeparator( bool show = true )
Displays a horizontal separator between the title and the work area.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString title() const
Returns the title of the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IRectangle titleRectangle() const
Returns the rectangle that contains the container's title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these attribute members to provide valid container styles for IContainerControl::setDefaultAttribute and for the constructor of the IContainerControl class.
![]() |
public:
static Attribute defaultAttribute()
Returns the default attribute. The default attribute is IContainerControl::classDefaultAttribute unless you have changed it using setDefaultAttribute.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void setDefaultAttribute(const Attribute& attribute)
Sets the default attribute for all subsequent containers.
This member function is not thread safe. In a multithreaded application, it should only be called when a conflict is not possible. A conflict can arise if you set the default attribute on one thread at the same time that it is being queried on another. In this situation, the query would take place while the style is in an unknown state.
When you create a window class that has attributes and do not specify the attributes in the constructor, the Open Class Library queries the default attribute. Therefore, the only safe place to call this member function is when no other application threads that create windows with attributes are active.
Another way to avoid a conflict in a multithreaded application is to specify window attributes on window construction, rather than calling this member function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute alignTitleCentered
Centers the container title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute alignTitleLeft
Left-justifies the container title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute alignTitleRight
Right-justifies the container title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute classDefaultAttribute
Specifies the original default attribute for this class, which is orderedTargetEmphasis | detailsViewTitles | visibleTreeLine | readOnlyTitle | iconView.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute detailsView
Shows the details view of the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute detailsViewTitles
Shows the details view titles.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute flowedView
Shows the flowed view of the container.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.
![]() |
public:
static const Attribute handleDrawBackground
Causes draw-background messages to be dispatched to objects of classes derived from ICnrDrawHandler.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The AIX release does not support this attribute because AIX does not support the ICnrDrawHandler.
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of the container background.
![]() |
public:
static const Attribute handleDrawItem
Causes draw-item messages to be dispatched to objects of classes derived from ICnrDrawHandler.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The AIX release does not support this attribute because AIX does not support the ICnrDrawHandler.
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of container objects.
![]() |
public:
static const Attribute iconView
Shows the icon view of the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute miniIcons
Shows mini icons.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute mixedTargetEmphasis
Sets the mixed-target emphasis.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support mixed-target emphasis for drag and drop.
![]() |
public:
static const Attribute nameView
Shows the name view of the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.
![]() |
public:
static const Attribute orderedTargetEmphasis
Sets the ordered-target emphasis.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support ordered-target emphasis for drag and drop.
![]() |
public:
static const Attribute readOnlyTitle
Disables the editing of the container title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.
![]() |
public:
static const Attribute textView
Shows the text view of the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.
![]() |
public:
static const Attribute titleSeparator
Adds a separator line after the title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute treeView
Shows the tree view of the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute visibleTitle
Shows the container title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Attribute visibleTreeLine
Shows the tree line in the tree view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to determine behavior that occurs automatically when a container is deleted.
![]() |
public:
virtual IContainerControl& setDeleteColumnsOnClose( bool destroy = true )
Deletes all columns in the container when the container is deleted. Only columns that are allocated by using operator new are marked for automatic deletion. Because columns can be in multiple containers, the container's default behavior only removes columns but does not delete them when the container is deleted.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setDeleteObjectsOnClose( bool destroy = true )
Deletes all objects in the container when the container is deleted. Because objects can be in multiple containers, the container's default behavior only removes objects but does not delete them when the container is deleted.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool willDeleteColumnsOnClose() const
If the columns will be deleted when the container is deleted, true is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool willDeleteObjectsOnClose() const
If container objects will be deleted when the container is deleted, true is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to change the view.
![]() |
public:
virtual IContainerControl& arrangeIconView()
Arranges the icon view. The icons are arranged in horizontal rows from left to right.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
CM_ARRANGE provides additional information on arrangement in the Presentation Manager Programming Reference, Volume 3.
![]() |
public:
virtual IContainerControl& showDetailsView()
Sets the current view to details view. This member function displays the container objects as multiple columns of data with one row for each object. Optionally, you can divide the output into two regions using a single vertical split bar ( see IContainerControl::setDetailsViewSplit ).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& showFlowedNameView()
Sets the current view to the flowed name view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& showFlowedTextView()
Sets the current view to the flowed text view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& showIconView()
Sets the current view to the icon view. If you have called arrangeIconView or have specified the autoPosition style, this member function displays the container objects as icons with the icon text below the icon. If you have more objects than will fit in a row, the objects flow into a second row. If there are more rows of objects than will fit in your container's window, the user can vertically scroll the container to see the rest of the objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
In Motif, icon view always uses the style autoPosition. You cannot reposition the icons using the mouse. Functions that programmatically relocate icons, such as moveIconTo, are not supported.
![]() |
public:
virtual IContainerControl& showMiniIcons(bool mini = true)
Shows mini icons in any non-text view. For best results, provide a 16X16 and a 20X20 1-bit-per-pixel version of the image in the .ico file loaded for the IContainerObject. When showMiniIcons is called, the smaller icons are displayed; otherwise, the regular-sized icon is resized accordingly.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The Open Class Library does not use the small icons in the .ico files but creates reduced versions of the objects' icons.
The Open Class Library does not use the small icons in the .ico files but creates reduced versions of the objects' icons.
![]() |
public:
virtual IContainerControl& showNameView()
Sets the current view to the non-flowed name view. If there are more objects than will fit in the container, the user can vertically scroll the container to see the rest of the objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.
![]() |
public:
virtual IContainerControl& showTextView()
Sets the current view to the non-flowed text view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Text view displays icons.
The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.
![]() |
public:
virtual IContainerControl& showTreeIconView()
Displays the objects as icons in a tree to represent their relationship to one another.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& showTreeNameView()
Sets the current view to the tree name view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& showTreeTextView()
Displays the objects in a tree to represent their relationship to one another. Unlike showTreeIconView, this function only displays the object's text and not the object's icon.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Tree-text view displays icons.
These operators compare two IContainerControls.
![]() |
public:
bool operator ==(const IContainerControl& container)
If two containers are the same (that is, their storage location is identical), true is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members return miscellaneous informaton for this compound control.
![]() |
public:
virtual IWindowHandle handleForChildCreation() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members in the details view.
![]() |
public:
virtual IContainerControl& addColumn( const IContainerColumn* column, const IContainerColumn* afterColumn = 0 )
Adds a column to the container. If you specify afterColumn, the container adds the column after this column. Otherwise, the container adds the column as the last column.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
See the IContainerColumn description for more information concerning adding columns to a Windows native container (that is, a container constructed without the pmCompatible style).
![]() |
Retrieves the column at the specified 0-based index or cursor.
public:
IContainerColumn* columnAt(unsigned long index) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IContainerColumn* columnAt( const ColumnCursor& cursor ) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long columnCount() const
Returns the number of columns in the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IRectangle detailsTitleRectangle( bool rightSide = false ) const
Returns the details view, column-title rectangle in container window coordinates. This rectangle represents all currently visible column titles in the details view window, not just one column. The container must be in the details view when this function is called.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The containers do not support a split bar and thus have no right window.
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar and thus have no right window.
![]() |
public:
IContainerColumn* detailsViewSplit() const
Returns the last column before the split bar.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.
![]() |
public:
virtual IContainerControl& hideSplitBar()
Removes the split bar from the details view work area.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.
![]() |
public:
bool isColumnRight(const IContainerColumn* column) const
If the specified column is to the right of the split bar, true is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar and thus have no right window.
![]() |
public:
virtual IContainerControl& removeColumn( const IContainerColumn* column )
Removes the specified column from the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& removeColumnAt( IContainerControl::ColumnCursor& cursor )
Removes the column at a specified cursor position.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setDetailsViewSplit( const IContainerColumn* lastColumnBeforeSplit, unsigned long pixelsFromLeft = 50 )
Splits the details view. You determine where the split occurs by specifying the last column to view in the left window. If a split bar already exists, it is moved to the new location. The lastColumnBeforeSplit parameter is the last column that will ever be scrolled in the left frame. The pixelsFromLeft parameter is the location of the split bar in pixels.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.
![]() |
public:
virtual IContainerControl& showSplitBar( bool showSplitBar = true )
Adds the split bar to the details view work area.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.
![]() |
public:
unsigned long splitBarOffset() const
Returns the offset of the split bar, in pixels, from the left side of the container window.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.
Use these members to query the view.
![]() |
public:
bool isDetailsView() const
returns true if the container is in details view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isFlowed() const
returns true if the current container view is flowed. This function applies to the name and text views only.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isFlowedNameView() const
Returns true if the container is currently in the flowed name view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a non-flowed name view.
![]() |
public:
bool isFlowedTextView() const
Returns true if the container is currently in the flowed text view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a non-flowed text view.
![]() |
public:
bool isIconView(bool iconOnly = false) const
returns true if the container is currently in an icon view. If iconOnly is false, true is returned for both the icon view and the tree-icon view. If iconOnly is true, true is returned only for the icon view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isNameView(bool nameOnly = false) const
returns true if the container is currently in a name view. If nameOnly is false, true is returned for both the name view and the tree-name view. If nameOnly is true, true is returned for only the name view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isShowingMiniIcons() const
returns true if the container mode is set for displaying mini icons.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTextView(bool textOnly = false) const
returns true if the container is currently in a text view. If textOnly is false, true is returned for both the text view and the tree-text view. If textOnly is true, true is returned for only the text view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTreeIconView() const
Returns true only if the container is in the tree-icon view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTreeNameView() const
Returns true only if the container is currently in the tree-name view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTreeTextView() const
Returns true only if the container is currently in the tree-text view.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isTreeView() const
returns true if the container is currently in a tree view. This includes the tree-icon, the tree-text, and the tree-name views.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members in direct editing in the container.
![]() |
public:
virtual IContainerControl& closeEdit()
Closes an open edit field.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IContainerColumn* currentEditColumn() const
Retrieves the column being edited. If a column is not being edited, 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMultiLineEdit* currentEditMLE() const
Retrieves the multiline edit (MLE) field being used for editing. If an edit operation is not in effect, 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IContainerObject* currentEditObject() const
Retrieves the object being edited. If an object is not being edited, 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& editColumnTitle( IContainerColumn* column )
Opens an edit field on a specified column's heading.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the column titles.
![]() |
public:
virtual IContainerControl& editContainerTitle()
Opens an edit field on the container title.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.
![]() |
public:
virtual IContainerControl& editObject( IContainerObject* object, IContainerColumn* column = 0 )
Opens an edit field on a specified object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setEditColumn( IContainerColumn* column )
Stores the specified column where editing occurs. This function is used by ICnrEditHandler.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setEditMLE( IMultiLineEdit* editField )
Stores the specified multiline edit (MLE) field being used for editing.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& setEditObject( IContainerObject* object )
Stores the specified object where editing occurs.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to customize the conditions for detecting a drag operation.
![]() |
protected:
virtual bool isDragStarting(IEvent& event)
Queries whether conditions are met to satisfy a drag operation.
A drag operation will occur if the mouse pointer is over a container object when the button is pressed.
Windows | OS/2 | AIX |
Yes | No | No |
Use these members to filter the container.
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support filtering of container objects.
![]() |
Filters the container by calling the specified IContainerControl::FilterFn::isMemberOf function for each object in the container. If you do not specify a FilterFn, objects currently hidden or filtered from the container are restored to the container.
public:
virtual IContainerControl& filter( const IContainerControl::FilterFn& filterObject )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support filtering of container objects.
public:
virtual IContainerControl& filter()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support filtering of container objects.
These members implement the class.
![]() |
protected:
unsigned long attributes( const IContainerObject* object ) const
Returns an attribute mask for the specified object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual unsigned long baseRecordSize()
Returns the size of the RECORDCORE portion of the objects stored in a container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual ISize calcMinimumSize() const
Returns a minimum size for the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
IContainerColumn* column( IContainerColumn* column, unsigned long command, bool visible )
Returns a column matching the command criteria.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
unsigned long containerAttributes() const
Returns the current container attribute mask.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
static IPrivateResource& containerKey()
Returns the key used to control access when updating the container. The key acts as a semaphore to the container updates.
In a multithreaded application, use this resource to serialize access to the container list, which is obtained by IContainerControl::containerList(). This will assure that your access to the container list is serialized with IContainerControl's internal accesses.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
static ICnrControlList& containerList()
Returns the list of containers in this application.
In a multithreaded application, you should obtain a resource lock to serialize access to this list before reading it. Use IContainerControl::containerKey() to obtain the resource to use for the resource lock. This will assure that your access is serialized with IContainerControl's internal accesses.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
static IWindowHandle hwndAllocation()
Returns the container used for object allocation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual void setAttributes( IContainerObject* object, unsigned long attributeToTurnOn, unsigned long attributeToTurnOff )
Updates the attributes of the specified object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual void setContainerAttributes( unsigned long attributeToTurnOff, unsigned long attributeToTurnOn )
Sets the attributes into the container control.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual void setEmphasis( IContainerObject* object, unsigned long emphasisAttribute, bool setOn = true )
Sets the specified object to the specified emphasis attribute.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to initialize the container.
![]() |
public:
static void initialize()
Sets up the container environment. If the first container component you create is an IContainerControl, the library calls this function automatically.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to apply behavior to the objects in the container.
![]() |
public:
virtual IContainerControl& allObjectsDo( IContainerControl::Iterator& iteratorObject, bool includeDescendents = false )
Calls IContainerControl::Iterator::applyTo on the specified iterator for all objects in the container. If you specify true for includeDescendents, the tree view descendent objects are called as well. The iteration stops when either of the following occurs:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to execute miscellaneous IContainerControl operations.
![]() |
public:
static IContainerControl* containerFromHandle( const IWindowHandle& handle )
Retrieves a container from the list ( see IContainerControl::containerList ) using the specified handle.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerControl& disableCaching()
Stops the dispatch of ICnrQueryDeltaEvents to an ICnrHandler.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support data caching.
![]() |
public:
virtual IContainerControl& disableDrawBackground()
Stops the dispatch of ICnrDrawBackgroundEvents to an ICnrDrawHandler.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of the container background.
![]() |
public:
virtual IContainerControl& disableDrawItem()
Stops the dispatch of ICnrDrawItemEvents to an ICnrDrawHandler.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of container objects.
![]() |
public:
virtual IContainerControl& enableCaching( unsigned long deltaValue = 30 )
If an ICnrHandler has been created and added to the container, this function causes the dispatch of an ICnrQueryDeltaEvent to the handler when the container scrolls past the predefined delta value.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support data caching.
![]() |
public:
virtual IContainerControl& enableDrawBackground( bool enable = true )
If an ICnrDrawHandler has been created and added to the container, this function causes the container to dispatch the ICnrDrawBackgroundEvent to its handlers.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of the container background.
![]() |
public:
virtual IContainerControl& enableDrawItem( bool enable = true )
If an ICnrDrawHandler