4 * Multiple Document Interface Frame Window.
6 * Portable Windows Library
8 * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
20 * The Original Code is Portable Windows Library.
22 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
24 * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
25 * All Rights Reserved.
27 * Contributor(s): ______________________________________.
30 * Revision 1.22 2001/05/22 12:49:33 robertj
31 * Did some seriously wierd rewrite of platform headers to eliminate the
32 * stupid GNU compiler warning about braces not matching.
34 * Revision 1.21 1999/03/10 03:49:52 robertj
35 * More documentation adjustments.
37 * Revision 1.20 1999/03/09 08:01:48 robertj
38 * Changed comments for doc++ support (more to come).
40 * Revision 1.19 1999/02/16 08:08:45 robertj
41 * MSVC 6.0 compatibility changes.
43 * Revision 1.18 1998/12/01 12:55:54 robertj
44 * new directory structure.
46 * Revision 1.17 1998/09/23 06:24:15 robertj
47 * Added open source copyright license.
49 * Revision 1.16 1996/04/30 12:33:40 robertj
50 * Changed "inPixels" boolean to enum for three coordinate systems.
52 * Revision 1.15 1996/01/02 13:15:35 robertj
53 * Mac OS compatibility.
55 * Revision 1.14 1995/11/09 12:15:49 robertj
56 * Removed redundent function in MDI frame.
58 * Revision 1.13 1995/03/14 12:41:44 robertj
59 * Updated documentation to use HTML codes.
61 * Revision 1.12 1995/02/19 04:10:07 robertj
64 * Revision 1.11 1995/01/03 09:36:13 robertj
67 * Revision 1.10 1994/08/23 11:32:52 robertj
70 * Revision 1.9 1994/08/22 00:46:48 robertj
71 * Added pragma fro GNU C++ compiler.
73 * Revision 1.8 1994/07/25 03:35:10 robertj
74 * Added ability to change area in which MDI children are limited.
76 * Revision 1.7 1994/07/21 23:49:31 robertj
77 * Removed redundent destructors.
79 * Revision 1.6 1994/07/17 10:46:06 robertj
80 * Added more functionality, esp ability to get at Window menu.
82 * Revision 1.5 1994/06/25 11:55:15 robertj
83 * Unix version synchronisation.
85 * Revision 1.4 1994/03/07 07:38:19 robertj
86 * Major enhancementsacross the board.
88 * Revision 1.3 1994/01/03 04:42:23 robertj
89 * Mass changes to common container classes and interactors etc etc etc.
91 * Revision 1.2 1993/07/14 12:49:16 robertj
97 #define _PMDIFRAMEWINDOW
107 /**A class representing a top level window "frame" for Multiple Document
108 Interface child windows. This is the "main" window that the application
109 creates when an MDI is required. On some platforms, eg MS-Windows variants,
110 this encloses the MDI child windows. On
112 class PMDIFrameWindow
: public PTopLevelWindow
114 PCLASSINFO(PMDIFrameWindow
, PTopLevelWindow
);
117 /**Construct a new MDI style top level window.
120 unsigned CanDo
=CanClose
|CanGrow
|CanIconify
|CanZoom
/// Titled window flags.
124 /**@name New functions for class */
125 /**Get the MDI document window that is the frontmost or "target" MDI child
129 pointer to active MDI child or NULL if there is none.
131 PMDIDocWindow
* GetActiveDocument();
133 /** Reposition and resize all child documents in a cascading fashion. */
134 virtual void CascadeDocuments();
136 /**Reposition and resize all child documents in a tiled fashion. The
137 parameter indicates the preference for tiling multiple windows.
139 virtual void TileDocuments(
140 BOOL vertically
= FALSE
/// Tiling orientation.
143 /** Reposition all child documents that are currently iconic. */
144 virtual void ArrangeIcons();
146 /**Set the area in the frames client area that child document windows are
149 These bounds are used if areas of the frame are not to be obscured by
150 the document child windows, eg when tool bars are used. The tiling and
151 cascading, as well as maximising the child, are limited to this area.
153 If this rectangle is empty then the document area is the entire frame
156 void SetDocumentArea(
157 const PRect
& rect
, /// Bounds for child windows.
158 CoordinateSystem coords
/// Coordinate system to use.
161 /**Get the area in the frames client area that child document windows are
164 These bounds are used if areas of the frame are not to be obscured by
165 the document child windows, eg when tool bars are used. The tiling and
166 cascading, as well as maximising the child, are limited to this area.
168 If this rectangle is empty then the document area is the entire frame
172 bounds area for MDI child windows.
174 PRect
GetDocumentArea(
175 CoordinateSystem coords
/// Coordinate system to use.
178 /**Get the standard "Window" sub-menu which contains a list of all the
179 active child windows as well as the standard Cascade, Tile and Arrange
183 reference to a sub-menu for the the MDI "Windows" menu.
185 PSubMenu
& GetWindowMenu();
190 /** Area within the MDI frame that MDI child windows may exist. */
194 // Include platform dependent part of class
195 #include <pwlib/mdiframe.h>
199 // End Of File ///////////////////////////////////////////////////////////////