ArcFM Engine Developer Guide
MdiTabManager Class
Members 


Product Availability
Required Licenses
.NET Assembly
Provides the management of the tabbed MDI windows.
Syntax
'Declaration
 
Public Class MdiTabManager 
'Usage
 
Dim instance As MdiTabManager
public class MdiTabManager 
Remarks

This class provides the management of the application Forms that are use as MDI child windows. This class provides the ability to show the MDI child windows with a set of tabs at the top of the parent client area so that the user can easily see which MDI windows are available and can easily switch between windows. In addition, the MDI windows can be split into groups (either horizontally or vertically but not both) so provide futher flexibility. There is only one instance of this class that is created by the main window of this application. The main window becomes the MDI parent window that contains the tabbed MDI child forms. A form is specified as being a tabbed MDI child window by calling the AddMdiTabForm method of this manager. This method creates a MdiTab tab and associates the tab with the form via the tab's Form property. The MdiTab tab has a Form property that allows the form for a specified tab to be found. Likewise, this manager has a TabFromForm that allows the MdiTab for a specified form to be found.

When a new tab is created, it is added to a hidden collection of tabs. The visible property of the associated form is set to false. The manager also contains a collection of MdiTabGroup objects. Each of these objects, in turn, contains a collection of MdiTab tabs. Initially, the MdiTabGroup collection is empty. When the first form is made visible, a MdiTabGroup is automatically created and the tab for the form is added to the collection of MdiTab tabs for that group.

The user forms are created in the MainApp.InitializeApplication method when the application starts. Reflection is used to traverse all classes in all the extensions defined for the application and find those classes which have the [FrameworkMdiWindow] custom attribute. The class is checked to ensure that it is derived from MdiTabForm which then qualifies it to become a tabbed MDI window. The LayoutManager is then called to create an instance of the class, either by calling its default constructor if no persistence information is found for the class or by calling its deserialization constructor if persistence information is found. Unfortunately, the display layout of the tabbed MDI forms cannot take place when the forms are being created. The Infragisitics system depends on the Visible property of the form which does not become valid until the actual window for the form is created. Therefore, the display layout of the form cannot be completed during the InitializeApplication method and must wait until the Load event for the main window occurs. This has two consequences. First, the Initialize method of the IExtensionInitialize interface cannot contain code which tries to manipulate the display layout of the MDI forms (a limitation to the programmer using the framework). Second, the persistence data for the MDI forms must be cached until needed for the MDI layout during the Load event (a complexity for the framework design). The persistence data needed during the Load event is cached in private variables of the MdiTabForm.

The internal method RestoreMdiLayout is called during the Load event of the main window to restore the MDI (filler) area layout. The Infragistics system provides for the MdiTabs to be allocated into various tab groups (MdiTabGroup). These tab groups can be cascaded either horizontally or vertically based on the Orientation property of this MdiTabManager. (When all tabs are in a single tab group, the drag and drop operation will allow either orientation to be defined, regardless of the Orientation setting.) Initially no tab groups are defined. When the first MDI form is made visible, the Infragistics system intercepts this event, creates a new MdiTabGroup, and moves the MdiTab from the hidden collection (and its form) to that tab group. As additional MDI forms are made visible, they are added to the end of the list of tabs for the current tab group. Thus, for the MDI forms to be restored to the same display layout as persisted, they must first be ordered by tab group by tab within each group and then made visible in that order. A new tab group is created whenever the next form in the ordered list belongs in the next tab group. The new group is created via MoveToNewGroup method which creates the new tab group and moves the specified tab to that group.

A MdiTabGroup has three properties which are persisted: the extent (size) of the form area for the group, the first display tab, and the selected tab. The MdiTab has no information that is persisted. The text and icon for tab comes from the text and icon for its associated tabbed MDI form.

Inheritance Hierarchy

System.Object
   Miner.Windows.TabbedMdi.MdiTabManager

Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

MdiTabManager Members
Miner.Windows.TabbedMdi Namespace

 

 


Send Comment