IFrameWindow maintains objects of the IFrameExtension class to record information about each of its frame-extension windows. You add a frame extension to a frame window by calling IFrameWindow::addExtension. You do not need to create an IFrameExtension object yourself.
IFrameWindow::extensions and IFrameWindow::setExtensions deal with collections of such frame extensions. Each collection is actually an object of the IFrameExtensions class, which is a list of the extensions currently added to the IFrameWindow object.
Frame extensions have the following attributes:
Use these functions to construct objects of the IFrameExtension class. You cannot copy or assign IFrameExtension objects because both the copy constructor and assignment operator are private functions. You can construct objects of this class by providing the same set of parameters as for IFrameWindow::addExtension.
![]() |
public:
~IFrameExtension()
Destructor for the class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IFrameExtension( IWindow* window, IFrameWindow::Location location, double percentage, IFrameWindow::SeparatorType separator )
Create relative-type extensions using this constructor.
You can construct objects of this class by providing the following set of parameters:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IFrameExtension( IWindow* window, IFrameWindow::Location location, IFrameWindow::SeparatorType separator )
Use this constructor to create frame extensions that are sized to the minimum size of the associated window.
You can construct objects of this class by providing the same set of parameters as for IFrameWindow::addExtension.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IFrameExtension( IWindow* window, IFrameWindow::Location location, unsigned long widthOrHeight, IFrameWindow::SeparatorType separator )
Use this constructor for a fixed-type extension.
You construct objects of this class by providing the following set of parameters.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
When adding a frame extension, you specify where the frame extension is attached. See IFrameWindow::Location for details on locations. You can attach the frame extension relative to the client area, the menu bar, or the title bar. You can query the location of the extension as well as the ID of the frame control to which the extension is attached.
![]() |
public:
virtual unsigned long attachedToId() const
Returns the ID of the frame control this extension is attached to.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IFrameWindow::Location location() const
Returns the frame extension's location.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Using the frame-extension sizing members, you can query and set the size of the frame extension.
You can query the width and height of relative- and fixed-type extensions. See the Extension Type group for information on types of extensions.
You can reset the size of an extension or indicate that the extension is to be sized to the minimum size of the window it contains. The size of a separator, if requested, is not included in the size of the extension.
Various sizing calculations are provided. You can calculate a total rectangle based on a specified rectangle plus the frame extension's size. This total also includes the separator width. The opposite calculation function is also provided. You specify a base rectangle and the rectangle size is returned minus the frame extension's size and separator width.
![]() |
public:
virtual ISWP attachTo(ISWP& baseSWP)
Returns the SWP structure which contains information about how the frame extension is sized when attached to the control. The SWP structure is updated to account for the space this extension occupies.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
![]() |
public:
virtual IRectangle baseRectFor( const IRectangle& totalRect ) const
Calculates and returns a rectangle representing the client rectangle without its frame extension. Both the rectangle you specify and the returned rectangle are in the orientation of the native windowing system. You can use the class ICoordinateSystem to determine the native orientation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This function always returns a default IRectangle.
![]() |
public:
virtual unsigned long fixedSize() const
Returns the fixed width or height in window coordinates. If the extension is of type relative, 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual double relativeSize() const
Returns the relative width or height as a percentage. If the extension is of type fixed, 0.0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Resets the size of the extension.
public:
virtual IFrameExtension& setSize( unsigned long widthOrHeight )
Use this setSize function to set the size of a fixed-type extension.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IFrameExtension& setSize(int widthOrHeight)
Use this setSize function to set the size of a fixed-type extension.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IFrameExtension& setSize(double widthOrHeight)
Use this setSize function to set the size of a relative-type extension.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual ISize sizeTo(const ISize& baseSize) const
Calculates and returns the size this extension would be if attached to a control of the specified size.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support this function. The function always returns the specified baseSize value.
![]() |
public:
virtual IRectangle totalRectFor( const IRectangle& baseRect ) const
Calculates and returns a new rectangle value. This value is baseRect plus the frame extension's size and position. Both the rectangle you specify and the returned rectangle are in the orientation of the native windowing system. You can use the class ICoordinateSystem to determine the native orientation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This function always returns a default IRectangle.
![]() |
public:
virtual IFrameExtension& useMinimumSize()
Specifies that the width or height of the extension is assigned from the minimum size of the window it contains.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
When adding a frame extension, you specify the type of extension using one of the Type enumerations: fixed, relative, or minimumSize.
A fixed extension remains a specific size.
When adding a relative extension, you specify the percentage of the frame control that the extension will occupy. The extension is sized when the frame control is resized.
You can specify that the extension be sized according to its associated control's minimum size.
The type of extension you choose depends on the desired layout of your controls.
![]() |
public:
Type type() const
Returns the extension type for this frame extension object. The returned value is an enumerator provided by Type.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query the window that is associated with the extension. This control is the control specified when the extension was added to the frame.
![]() |
public:
IWindow* control() const
Returns a pointer to the window that occupies this frame extension.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
A separator is a visual delineator between an extension and the window to which it is attached. You specify whether you want a separator when adding a frame extension by using IFrameWindow::addExtension. You can specify no separator, a thin separator line, or a thick separator line. The separator types are defined in the enumeration IFrameWindow::SeparatorType. You can query the width of the separator line. The separator width is not included in the size of the frame extensions. See the Extension Sizing members for more details.
In the Motif environment, the separator consists of a XmSeparator widget. You can query and set the handle of the separator using setSeparatorHandle and separatorHandle. You can query the IFrameWindow::separatorType of the separator with the separatorType function.
![]() |
public:
virtual void drawSeparator(const IPresSpaceHandle& psh)
Draws the separator line between a frame extension and the adjacent control (or extension) it is attached to.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
![]() |
public:
virtual unsigned long separatorWidth() const
Returns the width of the separator line between this frame extension and either of the following:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum Type { fixed, relative, minimumSize }
Use these enumerators to specify how the frame extension is sized:
Windows | OS/2 | AIX |
Yes | Yes | Yes |