Views
Application Framework Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvDvDockableMainWindow Class Reference

Application Framework desktop container. More...

#include <ilviews/appframe/mainwin.h>

Inheritance diagram for IlvDvDockableMainWindow:
IlvDockableMainWindow IlvDvMainWindowInterface IlvDockableContainer IlvDvInterface IlvPanedContainer IlvGadgetContainer IlvContainer IlvStylist IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvStylable IlvPort IlvValueInterface

Public Member Functions

 IlvDvDockableMainWindow (IlvAbstractView *parent, const IlvRect &rect, IlBoolean visible=IlTrue)
 Constructs an IlvDvDockableMainWindow object. More...
 
 IlvDvDockableMainWindow (IlvDisplay *display, const char *name, const char *title, const IlvRect &dims, IlUInt properties=0, IlBoolean visible=IlTrue, IlvSystemView transientFor=0)
 Constructs an IlvDvDockableMainWindow object. More...
 
 IlvDvDockableMainWindow (IlvDisplay *display, IlvSystemView parent, const IlvRect &rect, IlBoolean visible=IlTrue)
 Constructs an IlvDvDockableMainWindow object. More...
 
 IlvDvDockableMainWindow (IlvDisplay *display, IlvSystemView window)
 Constructs an IlvDvDockableMainWindow object. More...
 
virtual IlvDvContainerHandlercreateContainerHandler (IlvDvDocTemplate *docTpl, IlUInt viewTemplateIndex=0) const
 Gets a view container handler. More...
 
IlvPanecreatePaneWithFile (const char *name, const char *filename, const IlvDockingPaneLocation &loc, const IlSymbol *showHideAction=0)
 Creates a named pane from an .ilv file. More...
 
virtual void dockBarSet (IlvDvBarSet *barSet, IlBoolean update=IlTrue)
 Docks a set of bars. More...
 
IlvDvViewContainerInterfacegetActiveViewContainer () const
 Returns the active document view container. More...
 
virtual IlvDvApplicationgetDvApplication () const
 Gets the application that owns the window. More...
 
virtual IlvGadgetContainergetGadgetContainer ()
 Gets the top container of the window. More...
 
virtual const IlvGadgetContainergetGadgetContainer () const
 Gets the top container of the window. More...
 
virtual IlvToolBargetMenuBar () const
 Returns the menu bar of the window. More...
 
virtual IlvToolBargetToolBar (const IlSymbol *name) const
 Retrieves a bar with the given name from the window. More...
 
virtual void initialize ()
 Initializes the window. More...
 
virtual IlBoolean isShowingTooltips () const
 Shows tooltips for menu items. More...
 
virtual IlBoolean isUsingBigIcons () const
 Shows menu item icons in large size. More...
 
virtual IlBoolean processAction (const IlSymbol *actionName)
 Processes an action. More...
 
virtual void readOptions (const IlvDvOptions *)
 Reads options. More...
 
virtual void removeBarSet (const IlvDvBarSet *barSet, IlBoolean update=IlTrue)
 Removes a set of bars. More...
 
virtual void saveConfiguration (const IlvDvBarSet &barSet)
 Saves the location of a set of dockable bars. More...
 
virtual void setDvApplication (IlvDvApplication *app)
 Sets the application that owns the window to the parameter application.
 
virtual void setStatusLabel (const char *)
 Changes the text displayed in the status bar to the text given as the parameter.
More...
 
virtual void showWindow (IlBoolean bShow=IlTrue)
 Shows the window. More...
 
virtual void updateOptions (IlvDvOptions *)
 Updates options. More...
 
virtual IlBoolean withShortcuts () const
 Shows the action accelerators in tooltips. More...
 
- Public Member Functions inherited from IlvDvMainWindowInterface
virtual IlvDvDocViewInterfacegetActiveView () const
 Gets the active view of the window. More...
 
- Public Member Functions inherited from IlvDvInterface
IlBoolean callMethod (const IlSymbol *methodName, IlvDvValue *returnedValue,...)
 Generic method for calling a method that is exported in a class interface. More...
 
IlvDvValuegetFieldValue (const IlSymbol *fieldName, IlvDvValue &value) const
 Gets a field value. More...
 
virtual IlBoolean isProcessingAction (const IlSymbol *methodName) const
 Returns IlTrue if the given action can be processed by the class. More...
 
virtual IlBoolean refreshAction (const IlSymbol *actionName, IlvDvActionDescriptor *desc) const
 Refresh all the menu items that reference the action given by the parameter actionName. More...
 
void setFieldValue (const IlSymbol *fieldName, const IlvDvValue &value)
 Sets a field value. More...
 

Detailed Description

Application Framework desktop container.

Library: ilvappframe

IlvDvDockableMainWindow is a subclass of IlvDockableContainer. It is the common main window class for Application Framework applications. It handles dockable toolbars by providing services such as docking and undocking and saving their locations and states. It also manages the view frames (Multiple Document Interface).
The IlvDvDockableMainWindow window reads the definition of its menu and its toolbars by reading options that are usually generated by the Application Framework Editor. Similarly, it saves and restores the size of the main window.

Constructor & Destructor Documentation

◆ IlvDvDockableMainWindow() [1/4]

IlvDvDockableMainWindow::IlvDvDockableMainWindow ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect dims,
IlUInt  properties = 0,
IlBoolean  visible = IlTrue,
IlvSystemView  transientFor = 0 
)

Constructs an IlvDvDockableMainWindow object.

This constructor creates an instance of IlvDvDockableMainWindow, whose display, name, title, dimensions, properties, visibility, and window for which it is transient for, are given by the parameters display, name, title, dims, properties, visible, and transientFor respectively.

◆ IlvDvDockableMainWindow() [2/4]

IlvDvDockableMainWindow::IlvDvDockableMainWindow ( IlvAbstractView parent,
const IlvRect rect,
IlBoolean  visible = IlTrue 
)

Constructs an IlvDvDockableMainWindow object.

This constructor creates an instance of IlvDvDockableMainWindow, whose parent, dimensions and visibility are given by the parameters parent, rect and visible respectively.

◆ IlvDvDockableMainWindow() [3/4]

IlvDvDockableMainWindow::IlvDvDockableMainWindow ( IlvDisplay display,
IlvSystemView  parent,
const IlvRect rect,
IlBoolean  visible = IlTrue 
)

Constructs an IlvDvDockableMainWindow object.

This constructor creates an instance of IlvDvDockableMainWindow, whose display, parent, dimensions and visibility are given by the parameters display, parent, rect and visible respectively.

◆ IlvDvDockableMainWindow() [4/4]

IlvDvDockableMainWindow::IlvDvDockableMainWindow ( IlvDisplay display,
IlvSystemView  window 
)

Constructs an IlvDvDockableMainWindow object.

This constructor creates an instance of IlvDvDockableMainWindow, whose display and parent are given by the parameters display and parent respectively.

Member Function Documentation

◆ createContainerHandler()

virtual IlvDvContainerHandler* IlvDvDockableMainWindow::createContainerHandler ( IlvDvDocTemplate docTpl,
IlUInt  viewTemplateIndex = 0 
) const
virtual

Gets a view container handler.

This handler will be called by document templates to create and handle view containers.

Returns
The new view container handler.
See also
IlvDvContainerHandler

Implements IlvDvMainWindowInterface.

◆ createPaneWithFile()

IlvPane* IlvDvDockableMainWindow::createPaneWithFile ( const char *  name,
const char *  filename,
const IlvDockingPaneLocation loc,
const IlSymbol showHideAction = 0 
)

Creates a named pane from an .ilv file.

Parameters
nameThe name of the pane to create.
filenameThe name of the .ilv file.
locThe location where the new pane is to be located. This parameter is not used if a location is already defined in the configuration of the panes.
showHideActionThe name of the action that is linked to the visibility state of the new pane.
Returns
The new pane.

◆ dockBarSet()

virtual void IlvDvDockableMainWindow::dockBarSet ( IlvDvBarSet barSet,
IlBoolean  update = IlTrue 
)
virtual

Docks a set of bars.

Called by a document template to dock its set of toolbars within the window.

Parameters
barSetSpecifies the set of toolbars.
updateIf IlTrue, the window must be updated.
See also
IlvDvBarSet

Implements IlvDvMainWindowInterface.

◆ getActiveViewContainer()

IlvDvViewContainerInterface* IlvDvDockableMainWindow::getActiveViewContainer ( ) const
virtual

Returns the active document view container.

Returns
The active document view container.

Implements IlvDvMainWindowInterface.

◆ getDvApplication()

virtual IlvDvApplication* IlvDvDockableMainWindow::getDvApplication ( ) const
virtual

Gets the application that owns the window.

Returns
The application that owns the window.

Implements IlvDvMainWindowInterface.

◆ getGadgetContainer() [1/2]

virtual IlvGadgetContainer* IlvDvDockableMainWindow::getGadgetContainer ( )
virtual

Gets the top container of the window.

Usually, it returns the window itself.

Returns
The top container of the window.

Implements IlvDvMainWindowInterface.

◆ getGadgetContainer() [2/2]

virtual const IlvGadgetContainer* IlvDvDockableMainWindow::getGadgetContainer ( ) const
virtual

Gets the top container of the window.

Usually, it returns the window itself.

Returns
The top container of the window.

Implements IlvDvMainWindowInterface.

◆ getMenuBar()

virtual IlvToolBar* IlvDvDockableMainWindow::getMenuBar ( ) const
virtual

Returns the menu bar of the window.

Returns
The menu bar of the window. It can return 0.

Implements IlvDvMainWindowInterface.

◆ getToolBar()

virtual IlvToolBar* IlvDvDockableMainWindow::getToolBar ( const IlSymbol barName) const
virtual

Retrieves a bar with the given name from the window.

Returns the bar owned by the window whose name is given by the parameter barName.

Returns
The bar with the given name from the window. It can return 0 if no bars with the given name were found.

Implements IlvDvMainWindowInterface.

◆ initialize()

virtual void IlvDvDockableMainWindow::initialize ( )
virtual

Initializes the window.

Called by the application once it has created the window and the window options have been read. This method must be overridden to add initialization code.
For example, the IlvDvDockableMainWindow class overrides this method to tag the Windows popup menu that will be used for adding new window titles.

Reimplemented from IlvDvMainWindowInterface.

◆ isShowingTooltips()

virtual IlBoolean IlvDvDockableMainWindow::isShowingTooltips ( ) const
virtual

Shows tooltips for menu items.

Returns IlTrue if tooltips must be displayed for menu items in the window toolbars. Otherwise, it returns IlFalse. By default, it returns IlTrue.

Returns
IlTrue if tooltips must be displayed for menu items in the window toolbars. Otherwise, it returns IlFalse.

Reimplemented from IlvDvMainWindowInterface.

◆ isUsingBigIcons()

virtual IlBoolean IlvDvDockableMainWindow::isUsingBigIcons ( ) const
virtual

Shows menu item icons in large size.

Returns IlTrue if the menu item icons must be displayed in large size. If it returns IlFalse, icons are displayed in normal size. By default, it return IlFalse.

Returns
IlTrue if the menu item icons must be displayed in large size. Otherwise, it returns IlFalse.

Reimplemented from IlvDvMainWindowInterface.

◆ processAction()

virtual IlBoolean IlvDvDockableMainWindow::processAction ( const IlSymbol actionName)
virtual

Processes an action.

Tries to process the action given by the parameter actionName. If a macro Action(actionName, actionMethod) is inserted in the interface table of the class with a specified external name equal to the actionName parameter, the processAction method will automatically call the actionMethod method.

Returns
IlTrue if the action is processed.

Reimplemented from IlvDvInterface.

◆ readOptions()

virtual void IlvDvDockableMainWindow::readOptions ( const IlvDvOptions *  options)
virtual

Reads options.

Called to make the window read options that it had saved during the previous session.
It is redefined by the IlvDvDockableMainWindow subclass to read the location and state of bars that were saved the last time the application closed.

Reimplemented from IlvDvMainWindowInterface.

◆ removeBarSet()

virtual void IlvDvDockableMainWindow::removeBarSet ( const IlvDvBarSet barSet,
IlBoolean  update = IlTrue 
)
virtual

Removes a set of bars.

Called by a document template to remove a set of toolbars.

Parameters
barSetSpecifies the set of toolbars.
updateIf IlTrue, the window must be updated.
See also
IlvDvBarSet

Implements IlvDvMainWindowInterface.

◆ saveConfiguration()

virtual void IlvDvDockableMainWindow::saveConfiguration ( const IlvDvBarSet barSet)
virtual

Saves the location of a set of dockable bars.

Called to save the location of bars within the bar set given by the parameter barSet.

See also
IlvDvBarSet

Reimplemented from IlvDvMainWindowInterface.

◆ setStatusLabel()

virtual void IlvDvDockableMainWindow::setStatusLabel ( const char *  text)
virtual

Changes the text displayed in the status bar to the text given as the parameter.

For example, it is called when menu items are highlighted to display the description of the corresponding actions.

Reimplemented from IlvDvMainWindowInterface.

◆ showWindow()

virtual void IlvDvDockableMainWindow::showWindow ( IlBoolean  show = IlTrue)
virtual

Shows the window.

Called by the application to show or hide the window. By default, this method shows or hides the gadget container returned by the getGadgetContainer() method, depending on the value of the parameter show.

Reimplemented from IlvDvMainWindowInterface.

◆ updateOptions()

virtual void IlvDvDockableMainWindow::updateOptions ( IlvDvOptions *  options)
virtual

Updates options.

Called to make the window update the application options that it had saved during the previous session.
It is redefined by the IlvDvDockableMainWindow subclass to save the current location and state of its bars.

Reimplemented from IlvDvMainWindowInterface.

◆ withShortcuts()

virtual IlBoolean IlvDvDockableMainWindow::withShortcuts ( ) const
virtual

Shows the action accelerators in tooltips.

Returns IlTrue if action accelerators must be shown in the menu item tooltips. By default, it returns IlTrue.

Returns
IlTrue if action accelerators must be shown in the menu item tooltips. Otherwise, it returns IlFalse.

Reimplemented from IlvDvMainWindowInterface.