Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multiple Document Interface (MDI)

Similar presentations


Presentation on theme: "Multiple Document Interface (MDI)"— Presentation transcript:

1 Multiple Document Interface (MDI)

2 Table of Contents What is MDI? Alternatives Advantages Disadvantages
MDI Windows Frame Window Client Window Child Window Child Window Arrangement Accelerators References

3 What is MDI? The multiple-document interface (MDI) is a specification that defines a user interface for applications that enable the user to work with more than one document at the same time.

4 Alternatives Single Document Interface (SDI) – all windows are independent of each other. E.g. Microsoft Internet Explorer 6 (IE6), GIMP, Windows Calculator. Tabbed Document Interface (TDI) – tabs are used to manage open documents. E.g. Sublime Text, Mozilla Firefox, Windows Task Manager.

5 Advantages A single menu bar and/or toolbar is shared between all child windows. An application's child windows can be hidden/shown/minimized/maximized as a whole. Features such as "Tile" and "Cascade" can be implemented for the child windows. Consistent cross-platform application behavior between platforms. The application author can implement good window management himself. An advanced window manager can be upgraded independently of the applications. Floating toolbars from one application do not clutter the workspace of other applications.

6 Disadvantages Can be tricky to implement on desktops using multiple monitors. Virtual desktops cannot be spanned by children of the MDI. MDI can make it more difficult to work with several applications at once. The shared menu might change, which may cause confusion to some users. MDI child windows behave differently from those in SDI applications, requiring users to learn two subtly different windowing concepts. Deeply nested, branching hierarchies of child windows can be confusing. Many window managers have built-in support for manipulating groups of separate windows, which is typically more flexible than MDI. Controls and hotkeys learned for the MDI application may not apply to others.

7

8 Frame Window The frame window is like the main window of the application: it has a sizing border, a title bar, a window menu, a minimize button, and a maximize button. The application must register a window class for the frame window and provide a window procedure to support it.

9 Register Child and Frame Window Classes

10 Client Window The client window is the parent window of all MDI child windows in the application and a child of the frame window. MDI application can create, activate, or maximize child windows by sending messages to the MDI client window. Belongs to the preregistered window class MDICLIENT.

11 Create client window

12 Child Window Each child window has a sizing border, a title bar, a window menu, a minimize button, and a maximize button. Child window is clipped and cannot appear outside of the client window.

13 Create the Child window

14 Child Window Arrangement
Tile Cascade

15 Accelerators ALT + – (minus) opens the window menu.
Include the TranslateMDISysAccel function in application’S message loop. The loop must call TranslateMDISysAccel before calling the TranslateAccelerator or DispatchMessage function. ALT + – (minus) opens the window menu. CTRL + F4 closes the active child window. CTRL + F6 activates the next child window. Accelerators

16 Message Loop

17 References


Download ppt "Multiple Document Interface (MDI)"

Similar presentations


Ads by Google