3D PLM Enterprise Architecture
|
User Interface - Dialogs
|
CATDlgDocument
The application main window |
Quick Reference |
CATDialog
|
+---CATDlgWindow
|
+---CATDlgDocument
The Application Window
|
The application window is the main frame window to display documents and
to present to the end user the tools to edit these documents. It contains
one or several windows displaying documents, whether it is set as SDI or
MDI. It usually features a menu bar, a status bar, and toolbars that
can be docked to its frame sides, or undocked as independent dialog boxes. |
Use the application window as a base class when you want to create the window
for a new application.
Containment Parent
The parent of a instance of a class that derives from CATDlgDocument
must be an instance of a class that derives from CATInteractiveApplication. |
[Top]
Styles
Name |
Description |
default |
The default application window style. The application window accepts
only one document opened at a time, and is therefore qualifed as
Single-Document Interface |
CATDlgWndFrameMDI |
The application window is a Multiple-Document Interface (MDI) window,
and allows the end user to display multiple documents at the same time.
This is available with Windows only |
[Top]
Events
Notification |
Method |
Sent when |
CATDlgDroppedFileNotification |
GetDroppedFileNotification |
Whenever the end user drops an object in a document window |
CATDlgDSLogoNotification |
GetDSLogoNotification |
Whenever the end user clicks on the DS logo |
CATDlgEscapeNotification |
GetEscapeNotification |
Whenever the Escape key is pressed |
[Top]
Programmer's Guide
Create the main window for your application by deriving the CATDlgDocument
class. CATDlgDocument cannot be instantiated and must always be derived. This
application window will make the link between your application and the different
objects, that is other windows or containers, menus and controls, and the
application. Your application window will then aggregate or reference your
dialog objects, manage their layout, describe their behavior using callbacks to
react to the end-user interactions and call the appropriate programs to match
the end-user requests. A main application window includes all window
capabilities of your operating system, such as move, resize, minimize, and
maximize.
The Multiple Document Interface mode is specific to Windows operating
systems. With MDI, the dialog windows, instances of the CATDlgDialog classes,
that display documents, are within the application window, instance of the
derived class of CATDlgDocument. Such an MDI application window doesn't accept
CATDlgBox instances as children.
[Top]
Constructing an Application Window
Derive CATDlgDocument. A main window father is always a
CATInteractiveApplication instance. A main window can be used as the parent
object of the following dialog objects:
- Any types and numbers of boxes (CATDlgBox instances) except CATDlgTabPage
which must have a CATDlgTabContainer instance as parent
- Any type and numbers of CATDlgBlackBox instances
- Any type and number of controls (CATDlgControl instances)
- Any number of CATDlgToolBar instances
- One instance of CATDlgBarMenu and of CATDlgStatusBar
_pAppWindow = new MainWindow(iApplication, iName)
|
[Top]
Retrieving the Contextual Menu, the Menu Bar, and the Status Bar
You can retrieve the contextual menu, the menu bar, or the status bar of an
application window as follows:
- get the contextual menu with the GetContextualMenu method
get contextual menu |
CATDlgContextualMenu * pCtxMenu;
pCtxMenu = _pAppWindow->GetContextualMenu();
|
- get the menu bar with the GetBarMenu method
get menu bar |
CATDlgBarMenu * pBarMenu;
pBarMenu = _pAppWindow->GetBarMenu();
|
- get the status bar with the GetStatusBar method
get status bar |
CATDlgStatusBar * pStatusBar;
pStatusBar = _pAppWindow->GetStatusBar();
|
[Top]
Managing the MDI Mode
You can manage the MDI mode as follows:
- Retrieve whether the application window is MDI with the IsMDI method
int MDI;
MDI = _pAppWindow->IsMDI();
if (MDI)
... // main application window is MDI
|
- Activate a dialog window with the MDIActivate method
CATDlgDialog * pDialogWindoToActivate = ...;
_pAppWindow->MDIActivate(pDialogWindoToActivate);
|
- Retrieve the active dialog window with the MDIGetActive method:
CATDlgDialog * pActiveDialogWindow;
pActiveDialogWindow = _pAppWindow->MDIGetActive();
|
- Arrange the icons of the iconified dialog windows with the MDIIconArrange
method:
_pAppWindow->MDIIconArrange();
|
- Maximize a dialog window with the MDIMaximize method:
CATDlgDialog * pDialogWindowToMaximize = ...;
_pAppWindow->MDIMaximize(pDialogWindowToMaximize);
|
- Minimize a dialog window with the MDIMinimize method:
CATDlgDialog * pDialogWindowToMinimize = ...;
_pAppWindow->MDIMinimize(pDialogWindowToMinimize);
|
- Activate the next a dialog window with the MDINext method:
- Activate the previous dialog window with the MDIPrevious method:
_pAppWindow->MDIPrevious();
|
- Restore a minimized dialog window with the MDIRestore method:
CATDlgDialog * pDialogWindowToRestore = ...;
_pAppWindow->MDIRestore(pDialogWindowToRestore);
|
- Tile the dialog windows with the MDITile method. The tiling can be
described using one, or a combination of the different parameters:
CATDlgTileHorizontal |
The windows are arranged horizontally, with up to three windows on
the same row |
CATDlgTileVertical |
The windows are arrangedvertically, with up to three windows on the
same column |
CATDlgTileSkipHidden |
Minimized windows are kept minimized |
For example, tile the windows horizontally, and leave the minimized
windows:
_pAppWindow->MDITile(CATDlgTileHorizontal|CATDlgTileSkipHidden);
|
- Cascade the dialog windows with the MDICascade method. The cascading mode
can be described using the following parameters:
default |
All the dialog windows are processed, even the minimized ones |
CATDlgTileSkipHidden |
Minimized windows are kept minimized |
For example, cascade the windows, but leave the minimized windows:
_pAppWindow->MDICascade(CATDlgTileSkipHidden);
|
[Top]
Setting a Title to an Application Main Window
The application window title should be set by the resource file using a key
built with the identifier you declare as the second parameter of the application
window constructor.
[Top]
History
Version: 1 [Jan 2000] |
Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.