X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..aaa6f9ba6bd0be1fe6a34800e6f753ffdc49900c:/docs/latex/wx/mdi.tex?ds=sidebyside diff --git a/docs/latex/wx/mdi.tex b/docs/latex/wx/mdi.tex index 61644c1874..fc91d4f436 100644 --- a/docs/latex/wx/mdi.tex +++ b/docs/latex/wx/mdi.tex @@ -10,6 +10,10 @@ which is itself a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{Window styles} \twocolwidtha{5cm} @@ -32,7 +36,7 @@ See also \helpref{window styles overview}{windowstyles}. \wxheading{Remarks} -Although internally an MDI child frame is a child of the MDI client window, in wxWindows +Although internally an MDI child frame is a child of the MDI client window, in wxWidgets you create it as a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. You can usually forget that the client window exists. @@ -51,13 +55,13 @@ frame's own menubar will be displayed. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxMDIChildFrame::wxMDIChildFrame}\label{wxmdichildframeconstr} +\membersection{wxMDIChildFrame::wxMDIChildFrame}\label{wxmdichildframector} \func{}{wxMDIChildFrame}{\void} Default constructor. -\func{}{wxMDIChildFrame}{\param{wxMDIParentFrame* }{parent}, \param{const wxWindowID }{id},\rtfsp +\func{}{wxMDIChildFrame}{\param{wxMDIParentFrame* }{parent}, \param{wxWindowID }{id},\rtfsp \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp \param{const wxString\& }{name = ``frame"}} @@ -73,10 +77,10 @@ Constructor, creating the window. \docparam{title}{The caption to be displayed on the frame's title bar.} \docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} +either the windowing system or wxWidgets, depending on platform.} \docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} +either the windowing system or wxWidgets, depending on platform.} \docparam{style}{The window style. See \helpref{wxMDIChildFrame}{wxmdichildframe}.} @@ -92,7 +96,7 @@ None. \helpref{wxMDIChildFrame::Create}{wxmdichildframecreate} -\membersection{wxMDIChildFrame::\destruct{wxMDIChildFrame}} +\membersection{wxMDIChildFrame::\destruct{wxMDIChildFrame}}\label{wxmdichildframedtor} \func{}{\destruct{wxMDIChildFrame}}{\void} @@ -111,17 +115,17 @@ Activates this MDI child frame. \membersection{wxMDIChildFrame::Create}\label{wxmdichildframecreate} -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp \param{const wxString\& }{name = ``frame"}} -Used in two-step frame construction. See \helpref{wxMDIChildFrame::wxMDIChildFrame}{wxmdichildframeconstr}\rtfsp +Used in two-step frame construction. See \helpref{wxMDIChildFrame::wxMDIChildFrame}{wxmdichildframector}\rtfsp for further details. \membersection{wxMDIChildFrame::Maximize}\label{wxmdichildframemaximize} -\func{void}{Maximize}{\void} +\func{void}{Maximize}{\param{bool}{maximize}} Maximizes this MDI child frame. @@ -141,7 +145,6 @@ Restores this MDI child frame (unmaximizes). \helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp \helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize} - \section{\class{wxMDIClientWindow}}\label{wxmdiclientwindow} An MDI client window is a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}, and manages zero or @@ -153,6 +156,10 @@ more \helpref{wxMDIChildFrame}{wxmdichildframe} objects. \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{Remarks} The client window is the area where MDI child windows exist. It doesn't have to cover the whole @@ -174,7 +181,7 @@ the active child is not maximized, and no border style when a child is maximized \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxMDIClientWindow::wxMDIClientWindow}\label{wxmdiclientwindowconstr} +\membersection{wxMDIClientWindow::wxMDIClientWindow}\label{wxmdiclientwindowctor} \func{}{wxMDIClientWindow}{\void} @@ -196,10 +203,10 @@ The second style of constructor is called within \helpref{wxMDIParentFrame::OnCr \wxheading{See also} -\helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframeconstr},\rtfsp +\helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframector},\rtfsp \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} -\membersection{wxMDIClientWindow::\destruct{wxMDIClientWindow}} +\membersection{wxMDIClientWindow::\destruct{wxMDIClientWindow}}\label{wxmdiclientwindowdtor} \func{}{\destruct{wxMDIClientWindow}}{\void} @@ -209,7 +216,7 @@ Destructor. \func{bool}{CreateClient}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}} -Used in two-step frame construction. See \helpref{wxMDIClientWindow::wxMDIClientWindow}{wxmdiclientwindowconstr}\rtfsp +Used in two-step frame construction. See \helpref{wxMDIClientWindow::wxMDIClientWindow}{wxmdiclientwindowctor}\rtfsp for further details. \section{\class{wxMDIParentFrame}}\label{wxmdiparentframe} @@ -225,16 +232,21 @@ and is used in many popular Windows applications, such as Microsoft Word(TM). \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{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 either \helpref{wxMDIChildFrame}{wxmdichildframe}, or \helpref{wxFrame}{wxframe}. +Child frames may be of class \helpref{wxMDIChildFrame}{wxmdichildframe} (contained +within the parent frame) or \helpref{wxFrame}{wxframe} (shown as a top-level frame). An MDI parent frame always has a \helpref{wxMDIClientWindow}{wxmdiclientwindow} associated with it, which -is the parent for MDI client frames. -This client window may be resized to accomodate non-MDI windows, as seen in Microsoft Visual C++ (TM) and +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 @@ -264,6 +276,8 @@ for Windows, it is implicit in wxTHICK\_FRAME).} \twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).} \twocolitem{\windowstyle{wxVSCROLL}}{Displays a vertical scrollbar in the {\it client window}, allowing the user to view child frames that are off the current view.} +\twocolitem{\windowstyle{wxFRAME\_NO\_WINDOW\_MENU}}{Under Windows, removes the Window menu that is normally +added automatically.} \end{twocollist} See also \helpref{window styles overview}{windowstyles}. @@ -275,13 +289,13 @@ See also \helpref{window styles overview}{windowstyles}. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxMDIParentFrame::wxMDIParentFrame}\label{wxmdiparentframeconstr} +\membersection{wxMDIParentFrame::wxMDIParentFrame}\label{wxmdiparentframector} \func{}{wxMDIParentFrame}{\void} Default constructor. -\func{}{wxMDIParentFrame}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp +\func{}{wxMDIParentFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp \param{const wxString\& }{name = ``frame"}} @@ -297,10 +311,10 @@ Constructor, creating the window. \docparam{title}{The caption to be displayed on the frame's title bar.} \docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} +either the windowing system or wxWidgets, depending on platform.} \docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} +either the windowing system or wxWidgets, depending on platform.} \docparam{style}{The window style. See \helpref{wxMDIParentFrame}{wxmdiparentframe}.} @@ -322,7 +336,7 @@ the active child is not maximized, and no border style when a child is maximized \helpref{wxMDIParentFrame::Create}{wxmdiparentframecreate},\rtfsp \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} -\membersection{wxMDIParentFrame::\destruct{wxMDIParentFrame}} +\membersection{wxMDIParentFrame::\destruct{wxMDIParentFrame}}\label{wxmdiparentframedtor} \func{}{\destruct{wxMDIParentFrame}}{\void} @@ -373,12 +387,12 @@ Arranges the MDI child windows in a cascade. \membersection{wxMDIParentFrame::Create}\label{wxmdiparentframecreate} -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp \param{const wxString\& }{name = ``frame"}} -Used in two-step frame construction. See \helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframeconstr}\rtfsp +Used in two-step frame construction. See \helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframector}\rtfsp for further details. \membersection{wxMDIParentFrame::GetClientSize}\label{wxmdiparentframegetclientsize} @@ -419,9 +433,12 @@ automatically by the client window. \helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp \helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar},\rtfsp -\helpref{wxWindow}{wxwindowonsize},\rtfsp \helpref{wxMDIClientWindow}{wxmdiclientwindow} + +\pythonnote{The wxPython version of this method takes no arguments and +returns a tuple containing width and height.} + \membersection{wxMDIParentFrame::GetActiveChild}\label{wxmdiparentframegetactivechild} \constfunc{wxMDIChildFrame*}{GetActiveChild}{\void} @@ -448,11 +465,25 @@ Returns the window being used as the toolbar for this frame. \helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar} +\membersection{wxMDIParentFrame::GetWindowMenu}\label{wxmdiparentframegetwindowmenu} + +\constfunc{wxMenu*}{GetWindowMenu}{\void} + +Returns the current Window menu (added by wxWidgets to the menubar). This function +is available under Windows only. + \membersection{wxMDIParentFrame::OnCreateClient}\label{wxmdiparentframeoncreateclient} \func{virtual wxMDIClientWindow*}{OnCreateClient}{\void} -Override this to return a different kind of client window. +Override this to return a different kind of client window. 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: + +\begin{verbatim} + frame = new MyParentFrame; + frame->Create(parent, myParentFrameId, wxT("My Parent Frame")); +\end{verbatim} \wxheading{Remarks} @@ -462,7 +493,7 @@ 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 {\bf OnScroll}, the scrollbar positions always return zero. -(Solutions to: \verb$julian.smart@ukonline.co.uk$). +(Solutions to: {\tt julian.smart@btopenworld.com}). \wxheading{See also} @@ -501,11 +532,25 @@ toolbars managed by the application. \helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp \helpref{wxMDIParentFrame::GetClientSize}{wxmdiparentframegetclientsize} +\membersection{wxMDIParentFrame::SetWindowMenu}\label{wxmdiparentframesetwindowmenu} + +\func{void}{SetWindowMenu}{\param{wxMenu*}{ menu}} + +Call this to change the current Window menu. Ownership of the menu object passes to +the frame when you call this function. + +This call is available under Windows only. + +To remove the window completely, use the wxFRAME\_NO\_WINDOW\_MENU window style. + \membersection{wxMDIParentFrame::Tile}\label{wxmdiparentframetile} -\func{void}{Tile}{\void} +\func{void}{Tile}{\param{wxOrientation}{ orient = wxHORIZONTAL}} + +Tiles the MDI child windows either horizontally or vertically depending on +whether \arg{orient} is wxHORIZONTAL or wxVERTICAL. -Tiles the MDI child windows. +Currently only implemented for MSW, does nothing under the other platforms. \wxheading{See also}