rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvViewFrame Class Reference

Container class. More...

#include <ilviews/gadgets/vframe.h>

Inheritance diagram for IlvViewFrame:
IlvGadgetContainer IlvContainer IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvPort

List of all members.

Public Types

enum  IlvFrameState { IlvFrameNormalState, IlvFrameMinimizedState, IlvFrameMaximizedState }
 

This enumeration defines the various states that IlvViewFrame objects can take.

More...

Public Member Functions

 IlvViewFrame (IlvView *parent, const char *title, const IlvRect &rect, IlBoolean visible=IlTrue)
 Constructor.
virtual void closeFrame ()
 Is called when the user closes the view frame.
IlvViewgetClient () const
 Returns the client view managed by the view frame.
virtual void getClientBBox (IlvRect &bbox) const
 Returns the bounding box of the client view managed by the view frame.
int getCurrentState () const
 The current frame state.
IlvDesktopManagergetDesktopManager () const
 Returns the desktop manager that handles the frame.
IlvBitmapgetIcon () const
 Returns the bitmap associated with the view frame.
IlvPopupMenugetMenu () const
 Returns the IlvPopupMenu object attached to the frame.
IlvDim getMinHeight () const
 Returns the minimum height of the view frame.
IlvDim getMinWidth () const
 Returns the minimum width of the view frame.
const char * getTitle () const
 Returns the title of the view frame.
void getTitleBarBBox (IlvRect &bbox) const
 Returns the bounding box of the title bar of the view frame.
virtual void maximizeFrame ()
 Is called to maximize the frame to make it fit the view of the desktop manager.
virtual void minimizeFrame ()
 Is called to minimize the frame so that only its title bar is visible.
void registerClientView (IlvView *view) const
 Registers the specified view as a client view of this view frame.
virtual void restoreFrame ()
 Is called to restore the frame to its normal size.
void setIcon (IlvBitmap *bitmap)
 Sets the bitmap associated with the view frame.
void setMinHeight (IlvDim size)
 Sets the minimum height of the view frame.
void setMinWidth (IlvDim size)
 Sets the minimum width of the view frame.
virtual void setTitle (const char *title)
 Sets the title of the view frame.
void showMenu (const IlvPoint &point)
 Displays the IlvPopupMenu object attached to the frame at the specified location.
void unRegisterClientView (IlvView *view) const
 Unregisters the specified client view of the view frame.

Static Public Member Functions

static IlBoolean IsShowingContentsWhileDragging ()
 Indicates whether the entire contents of a view frame is drawn when the view frame is moved or resized.
static void ShowContentsWhileDragging (IlBoolean value)
 Specifies whether the entire contents of a view frame is drawn when the view frame is moved or resized.

Detailed Description

Container class.

Library: ilvadvgdt

The IlvViewFrame class defines a special container that encapsulates a client view. It adds a title bar composed of an icon, a label, and several buttons to the client view. The client view is added to the view frame by creating it as a child view of the view frame. A frame can be in one of the three following states: normal, maximized, or minimized.

IlvViewFramea.gif

Example of an Application Using IlvViewFrame Objects

See also:
IlvDesktopManager.

Member Enumeration Documentation

This enumeration defines the various states that IlvViewFrame objects can take.

See also:
IlvViewFrame::getCurrentState.
Enumerator:
IlvFrameNormalState 

The default state for a view frame. The client view is visible, and can be resized by dragging the view frame border.

See also:
restoreFrame.
IlvFrameMinimizedState 

In this state, only the title bar of the view frame is visible

See also:
minimizeFrame.
IlvFrameMaximizedState 

In this state, the view frame occupies the entire desktop view and hides any other view frame.

See also:
maximizeFrame.

Constructor & Destructor Documentation

IlvViewFrame::IlvViewFrame ( IlvView parent,
const char *  title,
const IlvRect rect,
IlBoolean  visible = IlTrue 
)

Constructor.

Initializes a new instance of the class IlvViewFrame as a child view of parent.

Parameters:
parent The parent view of the view frame.
title The view frame title. This title is displayed in the title bar of the view frame.
rect The size and position of the view frame.
visible A Boolean value specifying whether the view frame should be visible.
Warning:
[note] The parent view of an IlvViewFrame must be linked to an IlvDesktopManager object. If this is not the case, a desktop manager is automatically created by this constructor.

Member Function Documentation

virtual void IlvViewFrame::closeFrame (  )  [virtual]

Is called when the user closes the view frame.

The default implementation calls the destroy callbacks associated with the frame and its client view. To handle the destruction of a view frame you can either override this method in your own subclass of IlvViewFrame, or use a destroy callback.

See also:
IlvView::setDestroyCallback.
IlvView* IlvViewFrame::getClient (  )  const

Returns the client view managed by the view frame.

Returns:
The client view managed by the view frame, or 0 if there is none.
virtual void IlvViewFrame::getClientBBox ( IlvRect bbox  )  const [virtual]

Returns the bounding box of the client view managed by the view frame.

Parameters:
bbox The returned bounding box of the client view.
int IlvViewFrame::getCurrentState (  )  const

The current frame state.

Returns:
The current frame state. The valid returned values are defined by the IlvFrameState enumeration.
See also:
IlvFrameState, maximizeFrame, minimizeFrame, restoreFrame.
IlvDesktopManager* IlvViewFrame::getDesktopManager (  )  const

Returns the desktop manager that handles the frame.

Returns:
The desktop manager that handles this frame.
See also:
IlvDesktopManager.
IlvBitmap* IlvViewFrame::getIcon (  )  const

Returns the bitmap associated with the view frame.

The bitmap is displayed in the title bar of the view frame.

Returns:
The bitmap of the frame.
See also:
setIcon, IlvBitmap.
IlvPopupMenu* IlvViewFrame::getMenu (  )  const

Returns the IlvPopupMenu object attached to the frame.

The pop-up menu is displayed when the user clicks the icon of the title bar. This menu contains predefined items for changing the frame state. You can modify this menu by adding or removing items.

Returns:
The IlvPopupMenu object used by the frame.
See also:
showMenu.
IlvDim IlvViewFrame::getMinHeight (  )  const

Returns the minimum height of the view frame.

The view frame cannot be resized to a size smaller than its minimum dimensions.

Returns:
The minimum height of this view frame.
See also:
setMinHeight, getMinWidth.
IlvDim IlvViewFrame::getMinWidth (  )  const

Returns the minimum width of the view frame.

The view frame cannot be resized to a size smaller than its minimum dimensions.

Returns:
The minimum width of this view frame.
See also:
setMinWidth, getMinHeight.
const char* IlvViewFrame::getTitle (  )  const

Returns the title of the view frame.

The title is displayed in the title bar of the view frame.

Returns:
The title of the frame.
See also:
setTitle.

Reimplemented from IlvView.

void IlvViewFrame::getTitleBarBBox ( IlvRect bbox  )  const

Returns the bounding box of the title bar of the view frame.

Parameters:
bbox The returned bounding box of the title bar.
static IlBoolean IlvViewFrame::IsShowingContentsWhileDragging (  )  [static]

Indicates whether the entire contents of a view frame is drawn when the view frame is moved or resized.

If this method returns IlFalse, only the ghost image of the view frame is drawn when the view frame is moved or resized.

Returns:
A Boolean value indicating whether the entire contents of a view frame is drawn when the view frame is moved or resized.
virtual void IlvViewFrame::maximizeFrame (  )  [virtual]

Is called to maximize the frame to make it fit the view of the desktop manager.

See also:
IlvFrameState, restoreFrame, minimizeFrame, IlvDesktopManager::isMaximizing.
virtual void IlvViewFrame::minimizeFrame (  )  [virtual]

Is called to minimize the frame so that only its title bar is visible.

See also:
IlvFrameState, restoreFrame, maximizeFrame.
void IlvViewFrame::registerClientView ( IlvView view  )  const

Registers the specified view as a client view of this view frame.

A client view will forward some events to its view frame. This method is automatically called on the main client view of the view frame. You need to call this method if your main client view contains subviews. In this case, call this method giving each subview as parameter.

Parameters:
view The view to be registered as a client view.
See also:
unRegisterClientView.
virtual void IlvViewFrame::restoreFrame (  )  [virtual]

Is called to restore the frame to its normal size.

See also:
IlvFrameState, minimizeFrame, maximizeFrame.
void IlvViewFrame::setIcon ( IlvBitmap bitmap  ) 

Sets the bitmap associated with the view frame.

The bitmap is displayed in the title bar of the view frame.

Parameters:
bitmap The new bitmap. The old bitmap, if any, is unlocked, and the new one is locked. 0 is not a valid value. You must provide a valid pointer to an IlvBitmap object.
See also:
getIcon, IlvBitmap.
void IlvViewFrame::setMinHeight ( IlvDim  size  ) 

Sets the minimum height of the view frame.

The view frame cannot be resized to a size smaller than its minimum dimensions.

Parameters:
size The minimum height of this view frame.
See also:
getMinHeight, setMinWidth.
void IlvViewFrame::setMinWidth ( IlvDim  size  ) 

Sets the minimum width of the view frame.

The view frame cannot be resized to a size smaller than its minimum dimensions.

Parameters:
size The minimum width of this view frame.
See also:
getMinWidth, setMinHeight.
virtual void IlvViewFrame::setTitle ( const char *  title  )  [virtual]

Sets the title of the view frame.

The title is displayed in the title bar of the view frame.

Parameters:
title The new title. The old title is deleted.
See also:
getTitle.

Reimplemented from IlvView.

static void IlvViewFrame::ShowContentsWhileDragging ( IlBoolean  value  )  [static]

Specifies whether the entire contents of a view frame is drawn when the view frame is moved or resized.

Parameters:
value A Boolean value specifying whether the entire contents of a view frame contents should be drawn when the view frame is moved or resized.
See also:
IsShowingContentsWhileDragging.
void IlvViewFrame::showMenu ( const IlvPoint point  ) 

Displays the IlvPopupMenu object attached to the frame at the specified location.

Parameters:
point The location where the pop-up menu is displayed.
See also:
getMenu.
void IlvViewFrame::unRegisterClientView ( IlvView view  )  const

Unregisters the specified client view of the view frame.

Parameters:
view The view to be unregistered.
See also:
registerClientView.

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.