IContainerControl

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:

AIX Considerations

In AIX, due to the limited capabilities of the container widget under Motif 1.2, the Open Class Library does not support the following:

OS/2 Considerations

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.

Windows Considerations

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:


IContainerControl - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


Note: The AIX version does not support constructing objects from a loaded dialog template or from an existing container control's window handle.


[view class]
~IContainerControl
public:
virtual ~IContainerControl()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IContainerControl


Overload 1
public:
IContainerControl(unsigned long id, IWindow* parentDialog)

Create an IContainerControl from a container control on a loaded dialog template.

Supported Platforms

Windows OS/2 AIX
Yes Yes No

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support this constructor.


Overload 2
public:
IContainerControl(const IWindowHandle& handle)

Create an IContainerControl from an existing container control's window handle

Supported Platforms

Windows OS/2 AIX
Yes Yes No

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support this constructor.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Adding and Removing Objects

Use these members add and remove objects.


[view class]
addObject
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
addObjectAfter
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
addObjects
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

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.


[view class]
addObjectsAfter
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

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.

Windows Considerations

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.


[view class]
deleteAllObjects
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
deleteSelectedObjects
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
removeAllObjects
public:
virtual IContainerControl& removeAllObjects()

Removes all objects from the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
removeObject
public:
virtual IContainerControl& removeObject( IContainerObject* object, bool allContainers = false )

Removes the specified object from this container or, optionally, all containers.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
removeObjectAt

Removes the object at the specified cursor's position.


Overload 1
public:
virtual IContainerControl& removeObjectAt( IContainerControl::TextCursor& cursor )

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
virtual IContainerControl& removeObjectAt( IContainerControl::ObjectCursor& cursor )

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
removeSelectedObjects
public:
virtual IContainerControl& removeSelectedObjects()

Removes all selected objects from the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Appearance

Use these members to query and set the accessible attributes of this class.


[view class]
areDetailsViewTitlesVisible
public:
bool areDetailsViewTitlesVisible() const

return true when the column titles are currently displayed for details view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

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.


[view class]
disableTitleUpdate
public:
virtual IContainerControl& disableTitleUpdate()

Disables the container title from being edited.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.


[view class]
enableTitleUpdate
public:
virtual IContainerControl& enableTitleUpdate( bool enable = true )

Allows the container title to be edited.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.


[view class]
hasMixedTargetEmphasis
public:
bool hasMixedTargetEmphasis() const

return true when the mixed target emphasis mode is set for direct manipulation over this container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

The Motif container widget does not support mixed target emphasis for direct manipulation. This function always returns false.

Windows Considerations

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.


[view class]
hasNormalTargetEmphasis
public:
bool hasNormalTargetEmphasis() const

return true when the regular target emphasis mode is set for drag operations over this container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
hasOrderedTargetEmphasis
public:
bool hasOrderedTargetEmphasis() const

return true when the ordered target emphasis mode is set for drag operations over this container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

The Motif container widget does not support ordered target emphasis for drag and drop. This function always returns false.

Windows Considerations

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.


[view class]
hideDetailsViewTitles
public:
virtual IContainerControl& hideDetailsViewTitles()

Removes column headings from details view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support hiding of the column titles.


[view class]
hideTitle
public:
virtual IContainerControl& hideTitle()

Removes the container title from the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
hideTitleSeparator
public:
virtual IContainerControl& hideTitleSeparator()

Removes the title separator from the container window.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
iconSize
public:
ISize iconSize() const

Returns the icon or bitmap size of all objects.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isExtendedSelection
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isMultipleSelection
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

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.


[view class]
isPMCompatible
public:
bool isPMCompatible() const

Returns true if the pmCompatible style is set for this container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

This function always returns false.

OS/2 Considerations

This function always returns true.

Windows Considerations

This function returns false if the pmCompatible style is not set and the native Windows containers are being used.


[view class]
isSingleSelection
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTitleSeparatorVisible
public:
bool isTitleSeparatorVisible() const

returns true when the title separator is currently displayed.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTitleVisible
public:
bool isTitleVisible() const

returns true when the container title is currently displayed.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTitleWriteable
public:
bool isTitleWriteable() const

Returns true if the data in the title can be edited.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

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.


[view class]
lineSpacing
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support changing the spacing between container objects.


[view class]
setExtendedSelection
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setIconSize
public:
virtual IContainerControl& setIconSize( const ISize& iconSize )

Sets the icon or bitmap size for all objects.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setLineSpacing
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support changing the spacing between container objects.


[view class]
setMixedTargetEmphasis
public:
virtual IContainerControl& setMixedTargetEmphasis()

Sets the drag mode to mixed-target emphasis.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support mixed-target emphasis for drag and drop.


[view class]
setMultipleSelection
public:
virtual IContainerControl& setMultipleSelection()

Sets the selection mode to multiple selection. Multiple selection is a mode that gives the user unrestricted selection of objects.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

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.


[view class]
setNormalTargetEmphasis
public:
virtual IContainerControl& setNormalTargetEmphasis()

Sets the drag mode to normal-target emphasis.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Ignored


[view class]
setOrderedTargetEmphasis
public:
virtual IContainerControl& setOrderedTargetEmphasis()

Sets the drag mode to ordered-target emphasis.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support ordered-target emphasis for drag and drop.


[view class]
setSingleSelection
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setTitle

Sets the title for the container that is displayed in all views.


Overload 1
public:
virtual IContainerControl& setTitle( const IResourceId& resourceId )

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
virtual IContainerControl& setTitle(const char* title)

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setTitleAlignment
public:
virtual IContainerControl& setTitleAlignment( TitleAlignment alignment = centered )

Sets the alignment attributes for the title. The default centers the title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
showDetailsViewTitles
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support hiding of the column titles.


[view class]
showTitle
public:
virtual IContainerControl& showTitle(bool show = true)

Shows the container title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
showTitleSeparator
public:
virtual IContainerControl& showTitleSeparator( bool show = true )

Displays a horizontal separator between the title and the work area.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
title
public:
virtual IString title() const

Returns the title of the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
titleRectangle
public:
IRectangle titleRectangle() const

Returns the rectangle that contains the container's title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Attributes

Use these attribute members to provide valid container styles for IContainerControl::setDefaultAttribute and for the constructor of the IContainerControl class.


[view class]
defaultAttribute
public:
static Attribute defaultAttribute()

Returns the default attribute. The default attribute is IContainerControl::classDefaultAttribute unless you have changed it using setDefaultAttribute.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setDefaultAttribute
public:
static void setDefaultAttribute(const Attribute& attribute)

Sets the default attribute for all subsequent containers.

attribute
Use the attributes provided by IContainerControl::Attribute to specify the default attribute.

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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
alignTitleCentered
public:
static const Attribute alignTitleCentered

Centers the container title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
alignTitleLeft
public:
static const Attribute alignTitleLeft

Left-justifies the container title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
alignTitleRight
public:
static const Attribute alignTitleRight

Right-justifies the container title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
classDefaultAttribute
public:
static const Attribute classDefaultAttribute

Specifies the original default attribute for this class, which is orderedTargetEmphasis | detailsViewTitles | visibleTreeLine | readOnlyTitle | iconView.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
detailsView
public:
static const Attribute detailsView

Shows the details view of the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
detailsViewTitles
public:
static const Attribute detailsViewTitles

Shows the details view titles.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
flowedView
public:
static const Attribute flowedView

Shows the flowed view of the container.
Note: This attribute is only valid when combined with the nameView attribute or the textView attribute.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.


[view class]
handleDrawBackground
public:
static const Attribute handleDrawBackground

Causes draw-background messages to be dispatched to objects of classes derived from ICnrDrawHandler.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

AIX Considerations

The AIX release does not support this attribute because AIX does not support the ICnrDrawHandler.

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of the container background.


[view class]
handleDrawItem
public:
static const Attribute handleDrawItem

Causes draw-item messages to be dispatched to objects of classes derived from ICnrDrawHandler.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

AIX Considerations

The AIX release does not support this attribute because AIX does not support the ICnrDrawHandler.

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of container objects.


[view class]
iconView
public:
static const Attribute iconView

Shows the icon view of the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
miniIcons
public:
static const Attribute miniIcons

Shows mini icons.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
mixedTargetEmphasis
public:
static const Attribute mixedTargetEmphasis

Sets the mixed-target emphasis.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support mixed-target emphasis for drag and drop.


[view class]
nameView
public:
static const Attribute nameView

Shows the name view of the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.


[view class]
orderedTargetEmphasis
public:
static const Attribute orderedTargetEmphasis

Sets the ordered-target emphasis.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support ordered-target emphasis for drag and drop.


[view class]
readOnlyTitle
public:
static const Attribute readOnlyTitle

Disables the editing of the container title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.


[view class]
textView
public:
static const Attribute textView

Shows the text view of the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.


[view class]
titleSeparator
public:
static const Attribute titleSeparator

Adds a separator line after the title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
treeView
public:
static const Attribute treeView

Shows the tree view of the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
visibleTitle
public:
static const Attribute visibleTitle

Shows the container title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
visibleTreeLine
public:
static const Attribute visibleTreeLine

Shows the tree line in the tree view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Automatic Deletion Behavior

Use these members to determine behavior that occurs automatically when a container is deleted.


[view class]
setDeleteColumnsOnClose
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setDeleteObjectsOnClose
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
willDeleteColumnsOnClose
public:
bool willDeleteColumnsOnClose() const

If the columns will be deleted when the container is deleted, true is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
willDeleteObjectsOnClose
public:
bool willDeleteObjectsOnClose() const

If container objects will be deleted when the container is deleted, true is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Changing Views

Use these members to change the view.


[view class]
arrangeIconView
public:
virtual IContainerControl& arrangeIconView()

Arranges the icon view. The icons are arranged in horizontal rows from left to right.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

OS/2 Considerations

CM_ARRANGE provides additional information on arrangement in the Presentation Manager Programming Reference, Volume 3.


[view class]
showDetailsView
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 ).

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
showFlowedNameView
public:
virtual IContainerControl& showFlowedNameView()

Sets the current view to the flowed name view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
showFlowedTextView
public:
virtual IContainerControl& showFlowedTextView()

Sets the current view to the flowed text view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
showIconView
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

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.


[view class]
showMiniIcons
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

The Open Class Library does not use the small icons in the .ico files but creates reduced versions of the objects' icons.

Windows Considerations

The Open Class Library does not use the small icons in the .ico files but creates reduced versions of the objects' icons.


[view class]
showNameView
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.


[view class]
showTextView
public:
virtual IContainerControl& showTextView()

Sets the current view to the non-flowed text view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

Text view displays icons.

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) only support flowed name and flowed text views.


[view class]
showTreeIconView
public:
virtual IContainerControl& showTreeIconView()

Displays the objects as icons in a tree to represent their relationship to one another.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
showTreeNameView
public:
virtual IContainerControl& showTreeNameView()

Sets the current view to the tree name view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
showTreeTextView
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

Tree-text view displays icons.


Comparison

These operators compare two IContainerControls.


[view class]
operator ==
public:
bool operator ==(const IContainerControl& container)

If two containers are the same (that is, their storage location is identical), true is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Compound Control Method

These members return miscellaneous informaton for this compound control.


[view class]
handleForChildCreation
public:
virtual IWindowHandle handleForChildCreation() const
Call this function to get the widget to be used as the parent when you create a child of the container. The User Interface Class library uses this function when it adds container objects to a container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Details View Functions

Use these members in the details view.


[view class]
addColumn
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

See the IContainerColumn description for more information concerning adding columns to a Windows native container (that is, a container constructed without the pmCompatible style).


[view class]
columnAt

Retrieves the column at the specified 0-based index or cursor.


Overload 1
public:
IContainerColumn* columnAt(unsigned long index) const

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IContainerColumn* columnAt( const ColumnCursor& cursor ) const

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
columnCount
public:
unsigned long columnCount() const

Returns the number of columns in the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
detailsTitleRectangle
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

The containers do not support a split bar and thus have no right window.

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar and thus have no right window.


[view class]
detailsViewSplit
public:
IContainerColumn* detailsViewSplit() const

Returns the last column before the split bar.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.


[view class]
hideSplitBar
public:
virtual IContainerControl& hideSplitBar()

Removes the split bar from the details view work area.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.


[view class]
isColumnRight
public:
bool isColumnRight(const IContainerColumn* column) const

If the specified column is to the right of the split bar, true is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar and thus have no right window.


[view class]
removeColumn
public:
virtual IContainerControl& removeColumn( const IContainerColumn* column )

Removes the specified column from the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
removeColumnAt
public:
virtual IContainerControl& removeColumnAt( IContainerControl::ColumnCursor& cursor )

Removes the column at a specified cursor position.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setDetailsViewSplit
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.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.


[view class]
showSplitBar
public:
virtual IContainerControl& showSplitBar( bool showSplitBar = true )

Adds the split bar to the details view work area.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.


[view class]
splitBarOffset
public:
unsigned long splitBarOffset() const

Returns the offset of the split bar, in pixels, from the left side of the container window.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a split bar.


Determining the View

Use these members to query the view.


[view class]
isDetailsView
public:
bool isDetailsView() const

returns true if the container is in details view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isFlowed
public:
bool isFlowed() const

returns true if the current container view is flowed. This function applies to the name and text views only.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isFlowedNameView
public:
bool isFlowedNameView() const

Returns true if the container is currently in the flowed name view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a non-flowed name view.


[view class]
isFlowedTextView
public:
bool isFlowedTextView() const

Returns true if the container is currently in the flowed text view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support a non-flowed text view.


[view class]
isIconView
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isNameView
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isShowingMiniIcons
public:
bool isShowingMiniIcons() const

returns true if the container mode is set for displaying mini icons.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTextView
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTreeIconView
public:
bool isTreeIconView() const

Returns true only if the container is in the tree-icon view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTreeNameView
public:
bool isTreeNameView() const

Returns true only if the container is currently in the tree-name view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTreeTextView
public:
bool isTreeTextView() const

Returns true only if the container is currently in the tree-text view.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isTreeView
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Direct Editing

Use these members in direct editing in the container.


[view class]
closeEdit
public:
virtual IContainerControl& closeEdit()

Closes an open edit field.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
currentEditColumn
public:
IContainerColumn* currentEditColumn() const

Retrieves the column being edited. If a column is not being edited, 0 is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
currentEditMLE
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
currentEditObject
public:
IContainerObject* currentEditObject() const

Retrieves the object being edited. If an object is not being edited, 0 is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
editColumnTitle
public:
virtual IContainerControl& editColumnTitle( IContainerColumn* column )

Opens an edit field on a specified column's heading.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the column titles.


[view class]
editContainerTitle
public:
virtual IContainerControl& editContainerTitle()

Opens an edit field on the container title.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support editing of the container title.


[view class]
editObject
public:
virtual IContainerControl& editObject( IContainerObject* object, IContainerColumn* column = 0 )

Opens an edit field on a specified object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setEditColumn
public:
virtual IContainerControl& setEditColumn( IContainerColumn* column )

Stores the specified column where editing occurs. This function is used by ICnrEditHandler.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setEditMLE
public:
virtual IContainerControl& setEditMLE( IMultiLineEdit* editField )

Stores the specified multiline edit (MLE) field being used for editing.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setEditObject
public:
virtual IContainerControl& setEditObject( IContainerObject* object )

Stores the specified object where editing occurs.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Drag and Drop Support

Use these members to customize the conditions for detecting a drag operation.


[view class]
isDragStarting
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.

Supported Platforms

Windows OS/2 AIX
Yes No No


Filtering Objects

Use these members to filter the container.

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support filtering of container objects.


[view class]
filter

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.


Overload 1
public:
virtual IContainerControl& filter( const IContainerControl::FilterFn& filterObject )

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support filtering of container objects.


Overload 2
public:
virtual IContainerControl& filter()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support filtering of container objects.


Implementation

These members implement the class.


[view class]
attributes
protected:
unsigned long attributes( const IContainerObject* object ) const

Returns an attribute mask for the specified object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
baseRecordSize
protected:
virtual unsigned long baseRecordSize()

Returns the size of the RECORDCORE portion of the objects stored in a container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
calcMinimumSize
protected:
virtual ISize calcMinimumSize() const

Returns a minimum size for the container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
column
protected:
IContainerColumn* column( IContainerColumn* column, unsigned long command, bool visible )

Returns a column matching the command criteria.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
containerAttributes
protected:
unsigned long containerAttributes() const

Returns the current container attribute mask.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
containerKey
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
containerList
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
hwndAllocation
protected:
static IWindowHandle hwndAllocation()

Returns the container used for object allocation.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setAttributes
protected:
virtual void setAttributes( IContainerObject* object, unsigned long attributeToTurnOn, unsigned long attributeToTurnOff )

Updates the attributes of the specified object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setContainerAttributes
protected:
virtual void setContainerAttributes( unsigned long attributeToTurnOff, unsigned long attributeToTurnOn )

Sets the attributes into the container control.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setEmphasis
protected:
virtual void setEmphasis( IContainerObject* object, unsigned long emphasisAttribute, bool setOn = true )

Sets the specified object to the specified emphasis attribute.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Initialization

Use these members to initialize the container.


[view class]
initialize
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Iterating Objects

Use these members to apply behavior to the objects in the container.


[view class]
allObjectsDo
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:

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Miscellaneous

Use these members to execute miscellaneous IContainerControl operations.


[view class]
containerFromHandle
public:
static IContainerControl* containerFromHandle( const IWindowHandle& handle )

Retrieves a container from the list ( see IContainerControl::containerList ) using the specified handle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
disableCaching
public:
virtual IContainerControl& disableCaching()

Stops the dispatch of ICnrQueryDeltaEvents to an ICnrHandler.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support data caching.


[view class]
disableDrawBackground
public:
virtual IContainerControl& disableDrawBackground()

Stops the dispatch of ICnrDrawBackgroundEvents to an ICnrDrawHandler.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of the container background.


[view class]
disableDrawItem
public:
virtual IContainerControl& disableDrawItem()

Stops the dispatch of ICnrDrawItemEvents to an ICnrDrawHandler.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of container objects.


[view class]
enableCaching
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support data caching.


[view class]
enableDrawBackground
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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

Windows Considerations

The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of the container background.


[view class]
enableDrawItem
public:
virtual IContainerControl& enableDrawItem( bool enable = true )

If an ICnrDrawHandler