2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: mdi.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxMDIClientWindow
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxMDIClientWindow
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
An MDI client window is a child of wxMDIParentFrame, and manages zero or
|
|
|
|
more wxMDIChildFrame objects.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-09-25 18:14:44 +00:00
|
|
|
@remarks
|
|
|
|
|
|
|
|
The client window is the area where MDI child windows exist. It doesn't have to
|
|
|
|
cover the whole parent frame; other windows such as toolbars and a help window
|
|
|
|
might coexist with it. There can be scrollbars on a client window, which are
|
|
|
|
controlled by the parent window style.
|
|
|
|
|
|
|
|
The wxMDIClientWindow class is usually adequate without further derivation, and
|
|
|
|
it is created automatically when the MDI parent frame is created. If the application
|
|
|
|
needs to derive a new class, the function wxMDIParentFrame::OnCreateClient() must
|
|
|
|
be overridden in order to give an opportunity to use a different class of client
|
|
|
|
window.
|
|
|
|
|
|
|
|
Under Windows 95, the client window will automatically have a sunken border style
|
|
|
|
when the active child is not maximized, and no border style when a child is maximized.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-10-11 13:10:48 +00:00
|
|
|
@library{wxcore}
|
|
|
|
@category{managedwnd}
|
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
@see wxMDIChildFrame, wxMDIParentFrame, wxFrame
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
class wxMDIClientWindow : public wxWindow
|
|
|
|
{
|
|
|
|
public:
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Default constructor.
|
|
|
|
*/
|
|
|
|
wxMDIClientWindow();
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
Constructor, creating the window.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param parent
|
2008-03-09 12:33:59 +00:00
|
|
|
The window parent.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param style
|
2008-03-09 12:33:59 +00:00
|
|
|
The window style. Currently unused.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-09-25 18:14:44 +00:00
|
|
|
@remarks This constructor is called within wxMDIParentFrame::OnCreateClient().
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-09-25 18:14:44 +00:00
|
|
|
@see wxMDIParentFrame::wxMDIParentFrame(), wxMDIParentFrame::OnCreateClient()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor.
|
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual ~wxMDIClientWindow();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Used in two-step frame construction. See wxMDIClientWindow()
|
|
|
|
for further details.
|
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual bool CreateClient(wxMDIParentFrame* parent, long style = 0);
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
@class wxMDIParentFrame
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
An MDI (Multiple Document Interface) parent frame is a window which can contain
|
|
|
|
MDI child frames in its own 'desktop'. It is a convenient way to avoid window
|
2008-09-25 18:14:44 +00:00
|
|
|
clutter, and is used in many popular Windows applications, such as Microsoft Word(TM).
|
|
|
|
|
|
|
|
@remarks
|
|
|
|
|
|
|
|
There may be multiple MDI parent frames in a single application, but this probably
|
|
|
|
only makes sense within programming development environments.
|
|
|
|
|
|
|
|
Child frames may be of class wxMDIChildFrame (contained within the parent frame)
|
|
|
|
or wxFrame (shown as a top-level frame).
|
|
|
|
|
|
|
|
An MDI parent frame always has a wxMDIClientWindow associated with it, which is the
|
|
|
|
parent for MDI child frames. This client window may be resized to accommodate non-MDI
|
|
|
|
windows, as seen in Microsoft Visual C++ (TM) and Microsoft Publisher (TM), where
|
|
|
|
a documentation window is placed to one side of the workspace.
|
|
|
|
|
|
|
|
MDI remains popular despite dire warnings from Microsoft itself that MDI is an obsolete
|
|
|
|
user interface style.
|
|
|
|
|
|
|
|
The implementation is native in Windows, and simulated under Motif. Under Motif, the
|
|
|
|
child window frames will often have a different appearance from other frames because
|
|
|
|
the window decorations are simulated.
|
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@beginStyleTable
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxCAPTION}
|
2008-03-08 13:52:38 +00:00
|
|
|
Puts a caption on the frame.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxDEFAULT_FRAME_STYLE}
|
2008-09-25 18:14:44 +00:00
|
|
|
Defined as @c wxMINIMIZE_BOX | @c wxMAXIMIZE_BOX | @c wxTHICK_FRAME |
|
|
|
|
@c wxSYSTEM_MENU | @c wxCAPTION.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxHSCROLL}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a horizontal scrollbar in the client window, allowing the
|
|
|
|
user to view child frames that are off the current view.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxICONIZE}
|
2008-03-08 13:52:38 +00:00
|
|
|
Display the frame iconized (minimized) (Windows only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMAXIMIZE}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays the frame maximized (Windows only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMAXIMIZE_BOX}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a maximize box on the frame (Windows and Motif only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMINIMIZE}
|
2008-09-25 18:14:44 +00:00
|
|
|
Identical to @c wxICONIZE.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMINIMIZE_BOX}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a minimize box on the frame (Windows and Motif only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxRESIZE_BORDER}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a resizeable border around the window (Motif only; for
|
2008-09-25 18:14:44 +00:00
|
|
|
Windows, it is implicit in @c wxTHICK_FRAME).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxSTAY_ON_TOP}
|
2008-03-08 13:52:38 +00:00
|
|
|
Stay on top of other windows (Windows only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxSYSTEM_MENU}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a system menu (Windows and Motif only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxTHICK_FRAME}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a thick frame around the window (Windows and Motif only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxVSCROLL}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a vertical scrollbar in the client window, allowing the
|
|
|
|
user to view child frames that are off the current view.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxFRAME_NO_WINDOW_MENU}
|
2008-03-08 13:52:38 +00:00
|
|
|
Under Windows, removes the Window menu that is normally added
|
|
|
|
automatically.
|
|
|
|
@endStyleTable
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxcore}
|
|
|
|
@category{managedwnd}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
@see wxMDIChildFrame, wxMDIClientWindow, wxFrame, wxDialog
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
class wxMDIParentFrame : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Default constructor.
|
|
|
|
*/
|
|
|
|
wxMDIParentFrame();
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
Constructor, creating the window.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param parent
|
2008-03-09 12:33:59 +00:00
|
|
|
The window parent. This should be @NULL.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param id
|
2008-03-09 12:33:59 +00:00
|
|
|
The window identifier. It may take a value of -1 to indicate a default
|
2008-09-25 18:14:44 +00:00
|
|
|
value.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param title
|
2008-03-09 12:33:59 +00:00
|
|
|
The caption to be displayed on the frame's title bar.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param pos
|
2008-09-25 18:14:44 +00:00
|
|
|
The window position. The value @c wxDefaultPosition indicates a default position,
|
|
|
|
chosen by either the windowing system or wxWidgets, depending on platform.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param size
|
2008-09-25 18:14:44 +00:00
|
|
|
The window size. The value @c wxDefaultSize indicates a default size, chosen by
|
2008-03-09 12:33:59 +00:00
|
|
|
either the windowing system or wxWidgets, depending on platform.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param style
|
2008-03-09 12:33:59 +00:00
|
|
|
The window style. See wxMDIParentFrame.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param name
|
2008-09-25 18:14:44 +00:00
|
|
|
The name of the window. This parameter is used to associate a name
|
|
|
|
with the item, allowing the application user to set Motif resource values
|
|
|
|
for individual windows.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@remarks During the construction of the frame, the client window will be
|
2008-09-25 18:14:44 +00:00
|
|
|
created. To use a different class from wxMDIClientWindow, override
|
2008-03-09 12:33:59 +00:00
|
|
|
OnCreateClient().
|
2008-10-11 13:10:48 +00:00
|
|
|
Under Windows 95, the client window will automatically have a
|
|
|
|
sunken border style when the active child is not maximized,
|
|
|
|
and no border style when a child is maximized.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Create(), OnCreateClient()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
wxMDIParentFrame(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2008-03-09 12:33:59 +00:00
|
|
|
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
2008-03-08 14:43:31 +00:00
|
|
|
const wxString& name = "frame");
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor. Destroys all child windows and menu bar if present.
|
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual ~wxMDIParentFrame();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Activates the MDI child following the currently active one.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see ActivatePrevious()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual void ActivateNext();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Activates the MDI child preceding the currently active one.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see ActivateNext()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual void ActivatePrevious();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Arranges any iconized (minimized) MDI child windows.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Cascade(), Tile()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual void ArrangeIcons();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Arranges the MDI child windows in a cascade.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Tile(), ArrangeIcons()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual void Cascade();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-10-11 13:10:48 +00:00
|
|
|
Used in two-step frame construction.
|
|
|
|
See wxMDIParentFrame() for further details.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
bool Create(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2008-03-09 12:33:59 +00:00
|
|
|
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
2008-03-08 13:52:38 +00:00
|
|
|
const wxString& name = "frame");
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a pointer to the active MDI child, if there is one.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
wxMDIChildFrame* GetActiveChild() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This gets the size of the frame 'client area' in pixels.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param width
|
2008-03-09 12:33:59 +00:00
|
|
|
Receives the client width in pixels.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param height
|
2008-03-09 12:33:59 +00:00
|
|
|
Receives the client height in pixels.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-09-25 18:14:44 +00:00
|
|
|
@remarks
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-09-25 18:14:44 +00:00
|
|
|
The client area is the area which may be drawn on by the programmer, excluding
|
|
|
|
title bar, border, status bar, and toolbar if present.
|
|
|
|
|
|
|
|
If you wish to manage your own toolbar (or perhaps you have more than one),
|
|
|
|
provide an @b OnSize event handler. Call GetClientSize() to find how much space
|
|
|
|
there is for your windows and don't forget to set the size and position of
|
|
|
|
the MDI client window as well as your toolbar and other windows (but not the
|
|
|
|
status bar).
|
|
|
|
|
|
|
|
If you have set a toolbar with wxMDIParentFrame::SetToolbar(), the client size
|
|
|
|
returned will have subtracted the toolbar height. However, the available positions
|
|
|
|
for the client window and other windows of the frame do not start at zero - you
|
|
|
|
must add the toolbar height.
|
|
|
|
|
|
|
|
The position and size of the status bar and toolbar (if known to the frame) are
|
|
|
|
always managed by wxMDIParentFrame, regardless of what behaviour is defined in
|
|
|
|
your @b OnSize event handler. However, the client window position and size are always
|
|
|
|
set in @b OnSize, so if you override this event handler, make sure you deal with the
|
|
|
|
client window.
|
|
|
|
|
|
|
|
You do not have to manage the size and position of MDI child windows, since they
|
|
|
|
are managed automatically by the client window.
|
|
|
|
|
|
|
|
@see GetToolBar(), SetToolBar(), wxMDIClientWindow
|
|
|
|
|
|
|
|
@beginWxPythonOnly
|
|
|
|
The wxPython version of this method takes no arguments and returns a tuple containing
|
|
|
|
width and height.
|
|
|
|
@endWxPythonOnly
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-10-13 11:09:56 +00:00
|
|
|
void GetClientSize(int* width, int* height) const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a pointer to the client window.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see OnCreateClient()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
wxMDIClientWindow* GetClientWindow() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the window being used as the toolbar for this frame.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see SetToolBar()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
virtual wxWindow* GetToolBar() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the current Window menu (added by wxWidgets to the menubar). This
|
|
|
|
function
|
|
|
|
is available under Windows only.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
wxMenu* GetWindowMenu() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Override this to return a different kind of client window. If you override this
|
2008-09-25 18:14:44 +00:00
|
|
|
function, you must create your parent frame in two stages, or your function will
|
|
|
|
never be called, due to the way C++ treats virtual functions called from constructors.
|
|
|
|
For example:
|
|
|
|
|
|
|
|
@code
|
|
|
|
frame = new MyParentFrame;
|
|
|
|
frame->Create(parent, myParentFrameId, wxT("My Parent Frame"));
|
|
|
|
@endcode
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-09-25 18:14:44 +00:00
|
|
|
@remarks
|
|
|
|
|
|
|
|
You might wish to derive from wxMDIClientWindow in order to implement different
|
|
|
|
erase behaviour, for example, such as painting a bitmap on the background.
|
|
|
|
|
|
|
|
Note that it is probably impossible to have a client window that scrolls
|
|
|
|
as well as painting a bitmap or pattern, since in @b OnScroll, the scrollbar
|
2008-10-11 13:10:48 +00:00
|
|
|
positions always return zero.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see GetClientWindow(), wxMDIClientWindow
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
virtual wxMDIClientWindow* OnCreateClient();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the window to be used as a toolbar for this
|
|
|
|
MDI parent window. It saves the application having to manage the positioning
|
|
|
|
of the toolbar MDI client window.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param toolbar
|
2008-03-09 12:33:59 +00:00
|
|
|
Toolbar to manage.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-09-25 18:14:44 +00:00
|
|
|
@remarks
|
|
|
|
|
|
|
|
When the frame is resized, the toolbar is resized to be the width of the frame
|
|
|
|
client area, and the toolbar height is kept the same.
|
|
|
|
|
|
|
|
When the frame is resized, the toolbar is resized to be the width of the frame
|
|
|
|
client area, and the toolbar height is kept the same.
|
|
|
|
|
|
|
|
The parent of the toolbar must be this frame.
|
|
|
|
|
|
|
|
If you wish to manage your own toolbar (or perhaps you have more than one),
|
|
|
|
don't call this function, and instead manage your subwindows and the MDI client
|
|
|
|
window by providing an @b OnSize event handler. Call wxMDIParentFrame::GetClientSize()
|
|
|
|
to find how much space there is for your windows.
|
|
|
|
|
|
|
|
Note that SDI (normal) frames and MDI child windows must always have their toolbars
|
|
|
|
managed by the application.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see GetToolBar(), GetClientSize()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
virtual void SetToolBar(wxWindow* toolbar);
|
|
|
|
|
|
|
|
/**
|
2008-10-11 13:10:48 +00:00
|
|
|
Call this to change the current Window menu.
|
|
|
|
Ownership of the menu object passes to the frame when you call this function.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
This call is available under Windows only.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
To remove the window completely, use the @c wxFRAME_NO_WINDOW_MENU window style.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
void SetWindowMenu(wxMenu* menu);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Tiles the MDI child windows either horizontally or vertically depending on
|
2008-09-25 18:14:44 +00:00
|
|
|
whether @a orient is @c wxHORIZONTAL or @c wxVERTICAL.
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
Currently only implemented for MSW, does nothing under the other platforms.
|
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual void Tile(wxOrientation orient = wxHORIZONTAL);
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
@class wxMDIChildFrame
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
An MDI child frame is a frame that can only exist on a wxMDIClientWindow,
|
|
|
|
which is itself a child of wxMDIParentFrame.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@beginStyleTable
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxCAPTION}
|
2008-03-08 13:52:38 +00:00
|
|
|
Puts a caption on the frame.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxDEFAULT_FRAME_STYLE}
|
2008-09-25 18:14:44 +00:00
|
|
|
Defined as @c wxMINIMIZE_BOX | @c wxMAXIMIZE_BOX | @c wxTHICK_FRAME |
|
|
|
|
@c wxSYSTEM_MENU | @c wxCAPTION.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxICONIZE}
|
2008-03-08 13:52:38 +00:00
|
|
|
Display the frame iconized (minimized) (Windows only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMAXIMIZE}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays the frame maximized (Windows only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMAXIMIZE_BOX}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a maximize box on the frame (Windows and Motif only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMINIMIZE}
|
2008-09-25 18:14:44 +00:00
|
|
|
Identical to @c wxICONIZE.
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxMINIMIZE_BOX}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a minimize box on the frame (Windows and Motif only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxRESIZE_BORDER}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a resizeable border around the window (Motif only; for
|
2008-09-25 18:14:44 +00:00
|
|
|
Windows, it is implicit in @c wxTHICK_FRAME).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxSTAY_ON_TOP}
|
2008-03-08 13:52:38 +00:00
|
|
|
Stay on top of other windows (Windows only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxSYSTEM_MENU}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a system menu (Windows and Motif only).
|
2008-04-06 14:43:04 +00:00
|
|
|
@style{wxTHICK_FRAME}
|
2008-03-08 13:52:38 +00:00
|
|
|
Displays a thick frame around the window (Windows and Motif only).
|
|
|
|
@endStyleTable
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-10-11 13:10:48 +00:00
|
|
|
@remarks
|
|
|
|
Although internally an MDI child frame is a child of the MDI client window,
|
|
|
|
in wxWidgets you create it as a child of wxMDIParentFrame.
|
|
|
|
You can usually forget that the client window exists.
|
|
|
|
MDI child frames are clipped to the area of the MDI client window, and may
|
|
|
|
be iconized on the client window.
|
|
|
|
You can associate a menubar with a child frame as usual, although an MDI
|
|
|
|
child doesn't display its menubar under its own title bar.
|
|
|
|
The MDI parent frame's menubar will be changed to reflect the currently
|
|
|
|
active child frame.
|
|
|
|
If there are currently no children, the parent frame's own menubar will
|
|
|
|
be displayed.
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxcore}
|
|
|
|
@category{managedwnd}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
@see wxMDIClientWindow, wxMDIParentFrame, wxFrame
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
class wxMDIChildFrame : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Default constructor.
|
|
|
|
*/
|
|
|
|
wxMDIChildFrame();
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
Constructor, creating the window.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param parent
|
2008-03-09 12:33:59 +00:00
|
|
|
The window parent. This should not be @NULL.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param id
|
2008-03-09 12:33:59 +00:00
|
|
|
The window identifier. It may take a value of -1 to indicate a default
|
2008-09-25 18:14:44 +00:00
|
|
|
value.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param title
|
2008-03-09 12:33:59 +00:00
|
|
|
The caption to be displayed on the frame's title bar.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param pos
|
2008-09-25 18:14:44 +00:00
|
|
|
The window position. The value @c wxDefaultPosition indicates a default position,
|
|
|
|
chosen by either the windowing system or wxWidgets, depending on platform.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param size
|
2008-09-25 18:14:44 +00:00
|
|
|
The window size. The value @c wxDefaultSize indicates a default size, chosen by
|
2008-03-09 12:33:59 +00:00
|
|
|
either the windowing system or wxWidgets, depending on platform.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param style
|
2008-03-09 12:33:59 +00:00
|
|
|
The window style. See wxMDIChildFrame.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param name
|
2008-03-09 12:33:59 +00:00
|
|
|
The name of the window. This parameter is used to associate a name with the
|
2008-09-25 18:14:44 +00:00
|
|
|
item, allowing the application user to set Motif resource values for individual
|
|
|
|
windows.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Create()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
wxMDIChildFrame(wxMDIParentFrame* parent, wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = "frame");
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor. Destroys all child windows and menu bar if present.
|
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual ~wxMDIChildFrame();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Activates this MDI child frame.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Maximize(), Restore()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual void Activate();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-10-11 13:10:48 +00:00
|
|
|
Used in two-step frame construction.
|
|
|
|
See wxMDIChildFrame() for further details.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
bool Create(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = "frame");
|
|
|
|
|
|
|
|
/**
|
|
|
|
Maximizes this MDI child frame.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Activate(), Restore()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
void Maximize(bool maximize);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Restores this MDI child frame (unmaximizes).
|
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual void Restore();
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|