IOutlineBox

The IOutlineBox class creates and manages an unfilled rectangle control.

Portability Considerations

There are restrictions for specifying the color of controls based on the platform and which style of control you use.

AIX Considerations

In AIX, you cannot nest an outline box within a group box and vice versa if they are sibling controls. If you want that look, you should nest canvasses and put the controls in their own canvas or use the border style on the canvas itself.


IOutlineBox - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class. You cannot copy or assign IOutlineBox objects because both the copy constructor and assignment operator are private functions.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IOutlineBox


Overload 1
public:
IOutlineBox(unsigned long id, IWindow* parent)

Use this constructor to create an IOutlineBox object for an outline box control on a dialog window.

id
An outline box control ID.
parent
The parent dialog window.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Overload 2
public:
IOutlineBox(const IWindowHandle& handle)

Use this constructor to create an IOutlineBox object from an existing outline box control.

handle
An existing outline box window handle.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Overload 3
public:
IOutlineBox( unsigned long id, IWindow* parent, IWindow* owner, const IRectangle& initial = IRectangle ( ), const Style& style = defaultStyle ( ) )

Use this constructor to create an outline box control and object from a control ID, parent and owner windows, a rectangle, and a style.

id
An outline box control ID.
parent
The parent window.
owner
The owner window.
initial
A rectangle for the outline box control. It specifies the initial position and size of the outline box you are constructing. Optional.
style
The initial style for the outline box control. The default is classDefaultStyle. Optional.

Exception

IInvalidParameter A specified parameter was invalid. There are two possible causes. The parent window pointer specified was invalid. You must specify a valid IWindow pointer as the parent. Or, a valid outline box style was not specified. You must include one of the following in the outline box style: backgroundFrame, foregroundFrame, or halftoneFrame.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Colors

Use these members to query and set the color of the outline box.


[view class]
foregroundColor
public:
virtual IColor foregroundColor() const

Returns the foreground color value of the outline box or the default if no color for the outline box has been set.

Supported Platforms

Windows OS/2 AIX
Ignored Yes Yes

Windows Considerations

Returns the default foreground color value of the outline box.


[view class]
setForegroundColor
public:
virtual IOutlineBox& setForegroundColor( const IColor& color )

Sets the foreground color of the outline box.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setColor
protected:
virtual IOutlineBox& setColor( unsigned long colorArea, const IColor& color )

Sets the color area to the specified color.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Layout Support

Layout support members are overrides that supply information used by the canvas classes to provide dialog-like behavior.


[view class]
visibleRectangle
public:
virtual IRectangle visibleRectangle() const

Returns a rectangle that represents the area of the window that is actually painted by the control. This function will return a size of 0, since the control doesn't actually paint anything other than the line around an area.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Outline Types

Use these members to query and set the outline type. You can specify one of three types of outline box. You specify that the outline box be in the currently set foreground color, the system background color, or halftone shading using the foreground color.


[view class]
outlineType
public:
OutlineType outlineType() const

Returns the current type of outline for this outline box object. The returned value is one of the enumerators provided by OutlineType.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setOutlineType
public:
IOutlineBox& setOutlineType(const OutlineType& type)

Sets the type of outline for this outline box object.

Exception

IInvalidParameter An invalid OutlineType was specified. You must specify one of the valid OutlineType values. Current valid values are foreground, background, and halftone.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Styles

These style members provide a set of valid outline box styles for this class. Use these members to query and set the outline box styles. You can use these styles with the styles in IWindow.


[view class]
convertToGUIStyle
public:
virtual unsigned long convertToGUIStyle( const IBitFlag& style, bool extendedOnly = false ) const

Converts a style object into a value appropriate for the presentation system. The default action is to return the base GUI styles for the platform. Extended styles, those defined by the application and the Open Class Library, will be returned if you set extendedOnly to true.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
defaultStyle
public:
static Style defaultStyle()

Returns the default style. The default style is classDefaultStyle unless you have changed the style using setDefaultStyle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setDefaultStyle
public:
static void setDefaultStyle(const Style& style)

Sets the default style for all subsequent outline boxes.

style
Use the styles provided by IOutlineBox Styles to specify the default style.

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 style 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 and do not specifically specify window styles in the constructor, the Open Class Library queries the default style. Therefore, the only safe place to call this member function is when no other application threads that create windows are active.

Another way to avoid a conflict in a multithreaded application is to specifically specify window styles on window construction, rather than calling this member function.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
backgroundFrame
public:
static const Style backgroundFrame

Causes the outline box to have a frame equal to the background color.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
border3D
public:
static const Style border3D

Adds an etched 3D border to the control.

Supported Platforms

Windows OS/2 AIX
Yes Ignored Ignored


[view class]
classDefaultStyle
public:
static const Style classDefaultStyle

Provides the original default style for this class, which is the following: IOutlineBox::foregroundFrame | IWindow::visible | IOutlineBox::border3D.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
foregroundFrame
public:
static const Style foregroundFrame

Causes the outline box to have a frame equal to the foreground color.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
halftoneFrame
public:
static const Style halftoneFrame

Causes the outline box to have the frame shaded in a halftone of the foreground color. This is not supported in AIX.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored

AIX Considerations

The AIX release ignores the halftoneFrame.


IOutlineBox - Enumerations


[view class]
OutlineType
enum OutlineType { foreground, 
                   background, 
                   halftone }

Use these enumerators to specify outline types:

foreground
Specifies the currently set foreground color.
background
Specifies the system's background color.
halftone
Specifies halftone shading in the foreground color. This style is ignored in AIX.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IOutlineBox - Inherited Member Functions and Data

Inherited Public Functions

IControl
INotifier
IWindow

Inherited Public Data

IWindow
INotifier

Inherited Protected Functions

IWindow
INotifier
IControl

Inherited Protected Data