Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Toolkit User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

22.5 The Docking Views Classes

Because the docking views architecture builds on the extended docking windows architecture, each of the docking windows classes also participates in the docking views architecture.

Figure 152: Objective Toolkit's Docking Views Class Hierarchy

There are also changes and additions to existing classes such as SECMDIFrameWnd and SECMDIChildWnd. These changes ensure that SECDockableFrame objects are included in the command routing class chain so that menu picks are properly routed to a docked document if it is active.

22.5.1 SECDockableFrame

The SECDockableFrame class derives from SECFrameWnd and is the focal point of the docking views architecture. This class is a hybrid of a control bar and a frame window. It possesses the attributes and functionality of both. Because it is a frame-derived object, an instance of SECDockableFrame can parent a CView, CSplitterWnd, SECTabWnd or any CWnd-derivative. An SECDockableFrame also has an optional title bar for showing activation and contains the logic required to change the menu bar when activated, like a frame window. Like an SECControlBar, a dockable frame can be docked and resized when it is docked.

An SECDockableFrame object acts as the immediate parent window of the view when its docked or floating outside the main frame, which fulfills the MFC requirement that views always reside as a child of a frame object.

22.5.2 SECFrameBar

The SECFrameBar class derives from SECControlBar. This class acts as a container for the SECDockableFrame when the view is either docked or floating outside the main frame. It adds the accessor method GetDockedFrame(). This class acts as the bridge between the docking views architecture and the docking windows architecture.

22.5.3 SECMDIChildWnd

The SECMDIChildWnd class derives from CMDIChildWnd and acts as the parent window for the view when floating as an MDI child.

22.5.4 SECMultiDocTemplate

The SECMultiDocTemplate class plays an essential role. Derived from CMultiDocTemplate, it not only creates the document, view, and frame window but it also connects them together. As you might expect, the SECMultiDocTemplate inherits most of its functionality from its base class. However, it adds knowledge of the SECDockableFrame class and knows how to open a new document as either a normal MDI child or a docking document. In addition, the SECMultiDocTemplate class also adds a ToggleDocking() method, which allows open documents to be toggled between docked and undocked states.

SECMultiDocTemplate has an overloaded constructor that allows you to specify the run-time classes of the necessary participants in case you need to derive from the base architecture classes.

The parameters of this constructor are described in the table below. The first four parameters are the same as that of the parent class, CMultiDocTemplate.

Table 55: Parameters for SECMultiDocTemplate's constructor

Parameter Description
nIDResource The ID of the resources used with the document type.
pDocClass Points to the CRuntimeClass object of the document class.
pFrameClass Points to the CRuntimeClass object of the frame window class.
pViewClass Points to the CRuntimeClass object of the view class.
nIDDockableResource The ID of the resources used to load the accelerator table and menus for the SECDockableFrame.
pDdockableFrameClass Points to the CRuntimeClass object of the dockable frame class (defaults to SECDockableFrame).
pCcontrolBarClass Points to the CRuntimeClass object of the control bar class (defaults to SECFrameBar).

Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.