mdiframe.h
上传用户:hzhsqp
上传日期:2007-01-06
资源大小:1600k
文件大小:6k
- /*
- * mdiframe.h
- *
- * Multiple Document Interface Frame Window.
- *
- * Portable Windows Library
- *
- * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and limitations
- * under the License.
- *
- * The Original Code is Portable Windows Library.
- *
- * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
- *
- * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
- * All Rights Reserved.
- *
- * Contributor(s): ______________________________________.
- *
- * $Log: mdiframe.h,v $
- * Revision 1.21 1999/03/10 03:49:52 robertj
- * More documentation adjustments.
- *
- * Revision 1.20 1999/03/09 08:01:48 robertj
- * Changed comments for doc++ support (more to come).
- *
- * Revision 1.19 1999/02/16 08:08:45 robertj
- * MSVC 6.0 compatibility changes.
- *
- * Revision 1.18 1998/12/01 12:55:54 robertj
- * new directory structure.
- *
- * Revision 1.17 1998/09/23 06:24:15 robertj
- * Added open source copyright license.
- *
- * Revision 1.16 1996/04/30 12:33:40 robertj
- * Changed "inPixels" boolean to enum for three coordinate systems.
- *
- * Revision 1.15 1996/01/02 13:15:35 robertj
- * Mac OS compatibility.
- *
- * Revision 1.14 1995/11/09 12:15:49 robertj
- * Removed redundent function in MDI frame.
- *
- * Revision 1.13 1995/03/14 12:41:44 robertj
- * Updated documentation to use HTML codes.
- *
- * Revision 1.12 1995/02/19 04:10:07 robertj
- * Documentation.
- *
- * Revision 1.11 1995/01/03 09:36:13 robertj
- * Documentation.
- *
- * Revision 1.10 1994/08/23 11:32:52 robertj
- * Oops
- *
- * Revision 1.9 1994/08/22 00:46:48 robertj
- * Added pragma fro GNU C++ compiler.
- *
- * Revision 1.8 1994/07/25 03:35:10 robertj
- * Added ability to change area in which MDI children are limited.
- *
- * Revision 1.7 1994/07/21 23:49:31 robertj
- * Removed redundent destructors.
- *
- * Revision 1.6 1994/07/17 10:46:06 robertj
- * Added more functionality, esp ability to get at Window menu.
- *
- * Revision 1.5 1994/06/25 11:55:15 robertj
- * Unix version synchronisation.
- *
- * Revision 1.4 1994/03/07 07:38:19 robertj
- * Major enhancementsacross the board.
- *
- * Revision 1.3 1994/01/03 04:42:23 robertj
- * Mass changes to common container classes and interactors etc etc etc.
- *
- * Revision 1.2 1993/07/14 12:49:16 robertj
- * Fixed RCS keywords.
- *
- */
- #define _PMDIFRAMEWINDOW
- #ifdef __GNUC__
- #pragma interface
- #endif
- class PMDIDocWindow;
- /**A class representing a top level window "frame" for Multiple Document
- Interface child windows. This is the "main" window that the application
- creates when an MDI is required. On some platforms, eg MS-Windows variants,
- this encloses the MDI child windows. On
- */
- class PMDIFrameWindow : public PTopLevelWindow
- {
- PCLASSINFO(PMDIFrameWindow, PTopLevelWindow);
- public:
- /**Construct a new MDI style top level window.
- */
- PMDIFrameWindow(
- unsigned CanDo=CanClose|CanGrow|CanIconify|CanZoom /// Titled window flags.
- );
- /**@name New functions for class */
- /**Get the MDI document window that is the frontmost or "target" MDI child
- window.
-
- @return
- pointer to active MDI child or NULL if there is none.
- */
- PMDIDocWindow * GetActiveDocument();
- /** Reposition and resize all child documents in a cascading fashion. */
- virtual void CascadeDocuments();
- /**Reposition and resize all child documents in a tiled fashion. The
- parameter indicates the preference for tiling multiple windows.
- */
- virtual void TileDocuments(
- BOOL vertically = FALSE /// Tiling orientation.
- );
- /** Reposition all child documents that are currently iconic. */
- virtual void ArrangeIcons();
- /**Set the area in the frames client area that child document windows are
- limited to.
-
- These bounds are used if areas of the frame are not to be obscured by
- the document child windows, eg when tool bars are used. The tiling and
- cascading, as well as maximising the child, are limited to this area.
-
- If this rectangle is empty then the document area is the entire frame
- window.
- */
- void SetDocumentArea(
- const PRect & rect, /// Bounds for child windows.
- CoordinateSystem coords /// Coordinate system to use.
- );
- /**Get the area in the frames client area that child document windows are
- limited to.
-
- These bounds are used if areas of the frame are not to be obscured by
- the document child windows, eg when tool bars are used. The tiling and
- cascading, as well as maximising the child, are limited to this area.
-
- If this rectangle is empty then the document area is the entire frame
- window.
-
- @return
- bounds area for MDI child windows.
- */
- PRect GetDocumentArea(
- CoordinateSystem coords /// Coordinate system to use.
- ) const;
- /**Get the standard "Window" sub-menu which contains a list of all the
- active child windows as well as the standard Cascade, Tile and Arrange
- Icons menu items.
-
- @return
- reference to a sub-menu for the the MDI "Windows" menu.
- */
- PSubMenu & GetWindowMenu();
- protected:
- // Member variables
- /** Area within the MDI frame that MDI child windows may exist. */
- PRect documentArea;
- #ifdef DOC_PLUS_PLUS
- };
- #endif
- // Class declaration continued in platform specific header file ///////////////