📄 mdi.tex
字号:
\section{\class{wxMDIChildFrame}}\label{wxmdichildframe}An MDI child frame is a frame that can only exist on a \helpref{wxMDIClientWindow}{wxmdiclientwindow},which is itself a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}.\wxheading{Derived from}\helpref{wxFrame}{wxframe}\\\helpref{wxWindow}{wxwindow}\\\helpref{wxEvtHandler}{wxevthandler}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/mdi.h>\wxheading{Window styles}\twocolwidtha{5cm}\begin{twocollist}\itemsep=0pt\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.}\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).}\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).}\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).}\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.}\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).}\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only;for Windows, it is implicit in wxTHICK\_FRAME).}\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).}\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).}\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).}\end{twocollist}See also \helpref{window styles overview}{windowstyles}.\wxheading{Remarks}Although internally an MDI child frame is a child of the MDI client window, in wxWidgetsyou create it as a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. You can usuallyforget that the client window exists.MDI child frames are clipped to the area of the MDI client window, and may be iconizedon the client window.You can associate a menubar with a child frame as usual, although an MDI child doesn't displayits menubar under its own title bar. The MDI parent frame's menubar will be changed toreflect the currently active child frame. If there are currently no children, the parentframe's own menubar will be displayed.\wxheading{See also}\helpref{wxMDIClientWindow}{wxmdiclientwindow}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp\helpref{wxFrame}{wxframe}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxMDIChildFrame::wxMDIChildFrame}\label{wxmdichildframector}\func{}{wxMDIChildFrame}{\void}Default constructor.\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"}}Constructor, creating the window.\wxheading{Parameters}\docparam{parent}{The window parent. This should not be NULL.}\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}\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 byeither the windowing system or wxWidgets, depending on platform.}\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen byeither the windowing system or wxWidgets, depending on platform.}\docparam{style}{The window style. See \helpref{wxMDIChildFrame}{wxmdichildframe}.}\docparam{name}{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 forindividual windows.}\wxheading{Remarks}None.\wxheading{See also}\helpref{wxMDIChildFrame::Create}{wxmdichildframecreate}\membersection{wxMDIChildFrame::\destruct{wxMDIChildFrame}}\label{wxmdichildframedtor}\func{}{\destruct{wxMDIChildFrame}}{\void}Destructor. Destroys all child windows and menu bar if present.\membersection{wxMDIChildFrame::Activate}\label{wxmdichildframeactivate}\func{void}{Activate}{\void}Activates this MDI child frame.\wxheading{See also}\helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize},\rtfsp\helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore}\membersection{wxMDIChildFrame::Create}\label{wxmdichildframecreate}\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}{wxmdichildframector}\rtfspfor further details.\membersection{wxMDIChildFrame::Maximize}\label{wxmdichildframemaximize}\func{void}{Maximize}{\param{bool}{maximize}}Maximizes this MDI child frame.\wxheading{See also}\helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp\helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore}\membersection{wxMDIChildFrame::Restore}\label{wxmdichildframerestore}\func{void}{Restore}{\void}Restores this MDI child frame (unmaximizes).\wxheading{See also}\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 ormore \helpref{wxMDIChildFrame}{wxmdichildframe} objects.\wxheading{Derived from}\helpref{wxWindow}{wxwindow}\\\helpref{wxEvtHandler}{wxevthandler}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/mdi.h>\wxheading{Remarks}The client window is the area where MDI child windows exist. It doesn't have to cover the wholeparent 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 {\bf wxMDIClientWindow} class is usually adequate without further derivation, and it is createdautomatically when the MDI parent frame is created. If the application needs to derive a new class,the function \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} must beoverridden 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 whenthe active child is not maximized, and no border style when a child is maximized.\wxheading{See also}\helpref{wxMDIChildFrame}{wxmdichildframe}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp\helpref{wxFrame}{wxframe}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxMDIClientWindow::wxMDIClientWindow}\label{wxmdiclientwindowctor}\func{}{wxMDIClientWindow}{\void}Default constructor.\func{}{wxMDIClientWindow}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}}Constructor, creating the window.\wxheading{Parameters}\docparam{parent}{The window parent.}\docparam{style}{The window style. Currently unused.}\wxheading{Remarks}The second style of constructor is called within \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}.\wxheading{See also}\helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframector},\rtfsp\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}\membersection{wxMDIClientWindow::\destruct{wxMDIClientWindow}}\label{wxmdiclientwindowdtor}\func{}{\destruct{wxMDIClientWindow}}{\void}Destructor.\membersection{wxMDIClientWindow::CreateClient}\label{wxmdiclientwindowcreateclient}\func{bool}{CreateClient}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}}Used in two-step frame construction. See \helpref{wxMDIClientWindow::wxMDIClientWindow}{wxmdiclientwindowctor}\rtfspfor further details.\section{\class{wxMDIParentFrame}}\label{wxmdiparentframe}An MDI (Multiple Document Interface) parent frame is a window which can containMDI child frames in its own `desktop'. It is a convenient way to avoid window clutter,and is used in many popular Windows applications, such as Microsoft Word(TM).\wxheading{Derived from}\helpref{wxFrame}{wxframe}\\\helpref{wxWindow}{wxwindow}\\\helpref{wxEvtHandler}{wxevthandler}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/mdi.h>\wxheading{Remarks}There may be multiple MDI parent frames in a single application, but this probably only makes sensewithin programming development environments.Child frames may be of class \helpref{wxMDIChildFrame}{wxmdichildframe} (containedwithin 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, whichis the parent for MDI child frames.This client window may be resized to accommodate non-MDI windows, as seen in Microsoft Visual C++ (TM) andMicrosoft 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 obsoleteuser 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 framesbecause the window decorations are simulated.\wxheading{Window styles}\twocolwidtha{5cm}\begin{twocollist}\itemsep=0pt\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.}\twocolitem{\windowstyle{wxHSCROLL}}{Displays a horizontal scrollbar in the {\it client window}, allowingthe user to view child frames that are off the current view.}\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).}\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).}\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).}\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.}\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).}\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only;for Windows, it is implicit in wxTHICK\_FRAME).}\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).}\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).}\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}, allowingthe 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 normallyadded automatically.}\end{twocollist}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -