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.
|
|
|
|
|
2008-11-22 00:21:10 +00:00
|
|
|
Under wxMSW, the client window will automatically have a sunken border style
|
2008-09-25 18:14:44 +00:00
|
|
|
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.
|
2008-11-04 02:46:19 +00:00
|
|
|
|
|
|
|
Objects of this class are only created by wxMDIParentFrame which uses
|
|
|
|
the default constructor and calls CreateClient() immediately
|
|
|
|
afterwards.
|
|
|
|
*/
|
2008-09-25 18:14:44 +00:00
|
|
|
wxMDIClientWindow();
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
2008-11-04 02:46:19 +00:00
|
|
|
Called by wxMDIParentFrame immediately after creating the client
|
|
|
|
window.
|
|
|
|
|
|
|
|
This function may be overridden in the derived class but the base class
|
|
|
|
version must usually be called first to really create 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-11-04 02:46:19 +00:00
|
|
|
The window style. Only wxHSCROLL and wxVSCROLL bits are meaningful
|
|
|
|
here.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
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-11-04 02:46:19 +00:00
|
|
|
An MDI (Multiple Document Interface) parent frame is a window which can
|
|
|
|
contain MDI child frames in its client area which emulates the full
|
|
|
|
desktop.
|
|
|
|
|
|
|
|
MDI is a user-interface model in which all the window reside inside the
|
|
|
|
single parent window as opposed to being separate from each other. It
|
|
|
|
remains popular despite dire warnings from Microsoft itself (which
|
|
|
|
popularized this model in the first model) that MDI is obsolete.
|
|
|
|
|
|
|
|
An MDI parent frame always has a wxMDIClientWindow associated with it,
|
|
|
|
which is the parent for MDI child frames. In the simplest case, the client
|
|
|
|
window takes up the entire parent frame area but it is also possible to
|
|
|
|
resize it to be smaller in order to have other windows in the frame, a
|
|
|
|
typical example is using a sidebar along one of the window edges.
|
|
|
|
|
|
|
|
The appearance of MDI applications differs between different ports. The
|
|
|
|
classic MDI model, with child windows which can be independently moved,
|
|
|
|
resized etc, is only available under MSW, which provides native support for
|
|
|
|
it. In Mac ports, multiple top level windows are used for the MDI children
|
|
|
|
too and the MDI parent frame itself is invisible, to accommodate the native
|
|
|
|
look and feel requirements. In all the other ports, a tab-based MDI
|
|
|
|
implementation (sometimes called TDI) is used and so at most one MDI child
|
|
|
|
is visible at any moment (child frames are always maximized).
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
@remarks
|
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
Although it is possible to have multiple MDI parent frames, a typical MDI
|
|
|
|
application has a single MDI parent frame window inside which multiple MDI
|
|
|
|
child frames, i.e. objects of class wxMDIChildFrame, can be created.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
@beginStyleTable
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
There are no special styles for this class, all wxFrame styles apply to it
|
|
|
|
in the usual way. The only exception is that wxHSCROLL and wxVSCROLL styles
|
|
|
|
apply not to the frame itself but to the client window, so that using them
|
|
|
|
enables horizontal and vertical scrollbars for this window and not the
|
|
|
|
frame.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@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.
|
2008-11-04 02:46:19 +00:00
|
|
|
|
|
|
|
Use Create() for the objects created using this constructor.
|
2008-09-25 18:14:44 +00:00
|
|
|
*/
|
|
|
|
wxMDIParentFrame();
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
Constructor, creating the window.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
Notice that if you override virtual OnCreateClient() method you
|
|
|
|
shouldn't be using this constructor but the default constructor and
|
|
|
|
Create() as otherwise your overridden method is never going to be
|
|
|
|
called because of the usual C++ virtual call resolution rules.
|
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param parent
|
2008-11-04 02:46:19 +00:00
|
|
|
The window parent. Usually is @NULL.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param id
|
2008-11-04 02:46:19 +00:00
|
|
|
The window identifier. It may take a value of @c wxID_ANY to
|
|
|
|
indicate a default 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-11-04 02:46:19 +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-11-04 02:46:19 +00:00
|
|
|
The window size. The value @c wxDefaultSize indicates a default
|
|
|
|
size, chosen by either the windowing system or wxWidgets, depending
|
|
|
|
on platform.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param style
|
2008-11-04 02:46:19 +00:00
|
|
|
The window style. Default value includes wxHSCROLL and wxVSCROLL
|
|
|
|
styles.
|
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
|
2008-11-04 02:46:19 +00:00
|
|
|
with the item, allowing the application user to set Motif resource
|
|
|
|
values for individual windows.
|
|
|
|
|
|
|
|
@remarks
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-11-22 00:21:10 +00:00
|
|
|
Under wxMSW, the client window will automatically have a sunken
|
2008-11-04 02:46:19 +00:00
|
|
|
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-11-08 15:17:16 +00:00
|
|
|
const wxString& name = wxFrameNameStr);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-11-04 02:46:19 +00:00
|
|
|
Destructor.
|
|
|
|
|
|
|
|
Destroys all child windows and menu bar if present.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
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-11-04 02:46:19 +00:00
|
|
|
The MDI children are maintained in an ordered list and this function
|
|
|
|
switches to the next element in this list, wrapping around the end of
|
|
|
|
it if the currently active child is the last one.
|
|
|
|
|
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-11-04 02:46:19 +00:00
|
|
|
This method is only implemented in MSW MDI implementation and does
|
|
|
|
nothing under the other platforms.
|
|
|
|
|
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-11-04 02:46:19 +00:00
|
|
|
This method is only implemented in MSW MDI implementation and does
|
|
|
|
nothing under the other platforms.
|
|
|
|
|
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.
|
2008-11-04 02:46:19 +00:00
|
|
|
|
2008-10-11 13:10:48 +00:00
|
|
|
See wxMDIParentFrame() for further details.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-11-04 02:46:19 +00:00
|
|
|
bool Create(wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
2008-03-08 13:52:38 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
2008-11-04 02:46:19 +00:00
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
2008-10-29 15:34:31 +00:00
|
|
|
const wxString& name = wxFrameNameStr);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a pointer to the active MDI child, if there is one.
|
2008-11-04 02:46:19 +00:00
|
|
|
|
|
|
|
If there are any children at all this function returns a non-@NULL
|
|
|
|
pointer.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-11-08 15:25:07 +00:00
|
|
|
virtual wxMDIChildFrame* GetActiveChild() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-11-04 02:46:19 +00:00
|
|
|
Returns a pointer to the client window.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
@see OnCreateClient()
|
|
|
|
*/
|
2008-11-08 15:25:07 +00:00
|
|
|
wxMDIClientWindowBase* GetClientWindow() const;
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
/**
|
|
|
|
Returns the current MDI Window menu.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
Unless wxFRAME_NO_WINDOW_MENU style was used, a default menu listing
|
|
|
|
all the currently active children and providing the usual operations
|
|
|
|
(tile, cascade, ...) on them is created automatically by the library
|
|
|
|
and this function can be used to retrieve it. Notice that the default
|
|
|
|
menu can be replaced by calling SetWindowMenu().
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
This function is currently not available under OS X.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
@return The current Window menu or @NULL.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-11-04 02:46:19 +00:00
|
|
|
wxMenu *GetWindowMenu() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-11-04 02:46:19 +00:00
|
|
|
Returns whether the MDI implementation is tab-based.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
Currently only the MSW port uses the real MDI. In Mac ports the usual
|
|
|
|
SDI is used, as common under this platforms, and all the other ports
|
|
|
|
use TDI implementation.
|
2008-03-08 13:52:38 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
TDI-based MDI applications have different appearance and functionality
|
|
|
|
(e.g. child frames can't be minimized and only one of them is visible
|
|
|
|
at any given time) so the application may need to adapt its interface
|
|
|
|
somewhat depending on the return value of this function.
|
|
|
|
*/
|
|
|
|
static bool IsTDI();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-11-04 02:46:19 +00:00
|
|
|
Override this to return a different kind of client window.
|
2008-03-08 13:52:38 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
If you override this 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:
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
@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
|
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
You might wish to derive from wxMDIClientWindow in order to implement
|
|
|
|
different erase behaviour, for example, such as painting a bitmap on
|
|
|
|
the background.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
/**
|
2008-11-04 02:46:19 +00:00
|
|
|
Replace the current MDI Window menu.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
Ownership of the menu object passes to the frame when you call this
|
|
|
|
function, i.e. the menu will be deleted by it when it's no longer
|
|
|
|
needed (usually when the frame itself is deleted or when
|
|
|
|
SetWindowMenu() is called again).
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
To remove the window completely, you can use the wxFRAME_NO_WINDOW_MENU
|
|
|
|
window style but this function also allows to do it by passing @NULL
|
|
|
|
pointer as @a menu.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
This function is currently not available under OS X.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
@param menu
|
|
|
|
The menu to be used instead of the standard MDI Window menu or @NULL.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-11-08 15:25:07 +00:00
|
|
|
virtual void SetWindowMenu(wxMenu* menu);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-11-04 02:46:19 +00:00
|
|
|
Tiles the MDI child windows either horizontally or vertically depending
|
|
|
|
on whether @a orient is @c wxHORIZONTAL or @c wxVERTICAL.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
This method is only implemented in MSW MDI implementation and does
|
|
|
|
nothing under the other platforms.
|
2008-09-25 18:14:44 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
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-11-04 02:46:19 +00:00
|
|
|
An MDI child frame is a frame that can only exist inside 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-11-04 02:46:19 +00:00
|
|
|
All of the standard wxFrame styles can be used but most of them are ignored
|
|
|
|
by TDI-based MDI implementations.
|
2008-03-08 13:52:38 +00:00
|
|
|
@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,
|
2008-11-04 02:46:19 +00:00
|
|
|
in wxWidgets you create it as a child of wxMDIParentFrame. In fact, 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-10-11 13:10:48 +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 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,
|
2008-11-08 15:17:16 +00:00
|
|
|
const wxString& name = wxFrameNameStr);
|
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
|
|
|
*/
|
2008-10-29 15:34:31 +00:00
|
|
|
bool Create(wxMDIParentFrame* parent, wxWindowID id, const wxString& title,
|
2008-03-08 13:52:38 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
2008-10-29 15:34:31 +00:00
|
|
|
const wxString& name = wxFrameNameStr);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
/**
|
|
|
|
Returns the MDI parent frame containing this child.
|
|
|
|
|
|
|
|
Notice that this may return a different object than GetParent() as the
|
|
|
|
child frames may be created as children of the client window
|
|
|
|
internally.
|
|
|
|
*/
|
|
|
|
wxMDIParentFrame *GetMDIParent() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns true for MDI children in TDI implementations.
|
|
|
|
|
|
|
|
TDI-based implementations represent MDI children as pages in a
|
|
|
|
wxNotebook and so they are always maximized and can't be restored or
|
|
|
|
iconized.
|
|
|
|
|
|
|
|
@see wxMDIParentFrame::IsTDI().
|
|
|
|
*/
|
|
|
|
virtual bool IsAlwaysMaximized() const;
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
Maximizes this MDI child frame.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-11-04 02:46:19 +00:00
|
|
|
This function doesn't do anything if IsAlwaysMaximized() returns @true.
|
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Activate(), Restore()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-10-29 15:34:31 +00:00
|
|
|
virtual void Maximize(bool maximize = true);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Restores this MDI child frame (unmaximizes).
|
2008-11-04 02:46:19 +00:00
|
|
|
|
|
|
|
This function doesn't do anything if IsAlwaysMaximized() returns @true.
|
|
|
|
|
|
|
|
@see Activate(), Maximize()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
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
|
|
|
|