⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 splitter.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 2 页
字号:
user. It may return false to prevent the change or true to allow it.\wxheading{Parameters}\docparam{newSashPosition}{The new sash position (always positive or zero)}\wxheading{Remarks}The default implementation of this function verifies that the sizes of both panes of the splitter are greater than minimum pane size.\membersection{wxSplitterWindow::ReplaceWindow}\label{wxsplitterwindowreplacewindow}\func{bool}{ReplaceWindow}{\param{wxWindow * }{winOld}, \param{wxWindow * }{winNew}}This function replaces one of the windows managed by the wxSplitterWindow withanother one. It is in general better to use it instead of calling Unsplit()and then resplitting the window back because it will provoke much less flicker(if any). It is valid to call this function whether the splitter has twowindows or only one.Both parameters should be non-NULL and {\it winOld} must specify one of thewindows managed by the splitter. If the parameters are incorrect or the windowcouldn't be replaced, false is returned. Otherwise the function will returntrue, but please notice that it will not delete the replaced window and youmay wish to do it yourself.\wxheading{See also}\helpref{wxSplitterWindow::GetMinimumPaneSize}{wxsplitterwindowgetminimumpanesize}\wxheading{See also}\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit}\\\helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically}\\\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}\membersection{wxSplitterWindow::SetSashGravity}\label{wxsplitterwindowsetsashgravity}\func{void}{SetSashGravity}{\param{double }{gravity}}Sets the sash gravity. \wxheading{Parameters}\docparam{gravity}{The sash gravity. Value between 0.0 and 1.0.}\wxheading{Remarks}Gravity is real factor which controls position of sash while resizing wxSplitterWindow.Gravity tells wxSplitterWindow how much will left/top window grow while resizing.Example values:\begin{itemize}\itemsep=0pt\item{ 0.0  - only the bottom/right window is automatically resized}\item{ 0.5  - both windows grow by equal size}\item{ 1.0  - only left/top window grows}\end{itemize}Gravity should be a real value between 0.0 and 1.0.Default value of sash gravity is 0.0. That value is compatible with previous (before gravity was introduced) behaviour of wxSplitterWindow.\wxheading{See also}\helpref{wxSplitterWindow::GetSashGravity}{wxsplitterwindowgetsashgravity}\membersection{wxSplitterWindow::SetSashPosition}\label{wxsplitterwindowsetsashposition}\func{void}{SetSashPosition}{\param{int }{position}, \param{const bool}{ redraw = true}}Sets the sash position.\wxheading{Parameters}\docparam{position}{The sash position in pixels.}\docparam{redraw}{If true, resizes the panes and redraws the sash and border.}\wxheading{Remarks}Does not currently check for an out-of-range value.\wxheading{See also}\helpref{wxSplitterWindow::GetSashPosition}{wxsplitterwindowgetsashposition}\membersection{wxSplitterWindow::SetSashSize}\label{wxsplitterwindowsetsashsize}\func{void}{SetSashSize}{\param{int }{size}}Sets the sash size. Normally, the sash size is determined according to the metricsof each platform, but the application can override this, for example to showa thin sash that the user is not expected to drag. If {\it size} is more -1,the custom sash size will be used.\membersection{wxSplitterWindow::SetMinimumPaneSize}\label{wxsplitterwindowsetminimumpanesize}\func{void}{SetMinimumPaneSize}{\param{int }{paneSize}}Sets the minimum pane size.\wxheading{Parameters}\docparam{paneSize}{Minimum pane size in pixels.}\wxheading{Remarks}The default minimum pane size is zero, which means that either pane can be reduced to zero by draggingthe sash, thus removing one of the panes. To prevent this behaviour (and veto out-of-range sash dragging),set a minimum size, for example 20 pixels. If the wxSP\_PERMIT\_UNSPLIT styleis used when a splitter window is created, the window may be unsplit evenif minimum size is non-zero.\wxheading{See also}\helpref{wxSplitterWindow::GetMinimumPaneSize}{wxsplitterwindowgetminimumpanesize}\membersection{wxSplitterWindow::SetSplitMode}\label{wxsplitterwindowsetsplitmode}\func{void}{SetSplitMode}{\param{int }{mode}}Sets the split mode.\wxheading{Parameters}\docparam{mode}{Can be wxSPLIT\_VERTICAL or wxSPLIT\_HORIZONTAL.}\wxheading{Remarks}Only sets the internal variable; does not update the display.\wxheading{See also}\helpref{wxSplitterWindow::GetSplitMode}{wxsplitterwindowgetsplitmode}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}.\membersection{wxSplitterWindow::SplitHorizontally}\label{wxsplitterwindowsplithorizontally}\func{bool}{SplitHorizontally}{\param{wxWindow* }{window1}, \param{wxWindow* }{window2}, \param{int}{ sashPosition = 0}}Initializes the top and bottom panes of the splitter window.  Thechild windows are shown if they are currently hidden.\wxheading{Parameters}\docparam{window1}{The top pane.}\docparam{window2}{The bottom pane.}\docparam{sashPosition}{The initial position of the sash. If this value ispositive, it specifies the size of the upper pane. If it is negative, itsabsolute value gives the size of the lower pane. Finally, specify 0 (default)to choose the default position (half of the total window height).}\wxheading{Return value}true if successful, false otherwise (the window was already split).\wxheading{Remarks}This should be called if you wish to initially view two panes. It can also becalled at any subsequent time, but the application should check that thewindow is not currently split using \helpref{IsSplit}{wxsplitterwindowissplit}.\wxheading{See also}\helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically}, \helpref{wxSplitterWindow::IsSplit}{wxsplitterwindowissplit},\rtfsp\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit}\membersection{wxSplitterWindow::SplitVertically}\label{wxsplitterwindowsplitvertically}\func{bool}{SplitVertically}{\param{wxWindow* }{window1}, \param{wxWindow* }{window2}, \param{int}{ sashPosition = 0}}Initializes the left and right panes of the splitter window.  Thechild windows are shown if they are currently hidden.\wxheading{Parameters}\docparam{window1}{The left pane.}\docparam{window2}{The right pane.}\docparam{sashPosition}{The initial position of the sash. If this value ispositive, it specifies the size of the left pane. If it is negative, it isabsolute value gives the size of the right pane. Finally, specify 0 (default)to choose the default position (half of the total window width).}\wxheading{Return value}true if successful, false otherwise (the window was already split).\wxheading{Remarks}This should be called if you wish to initially view two panes. It can also be called at any subsequent time,but the application should check that the window is not currently split using \helpref{IsSplit}{wxsplitterwindowissplit}.\wxheading{See also}\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}, \helpref{wxSplitterWindow::IsSplit}{wxsplitterwindowissplit},\rtfsp\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit}.\membersection{wxSplitterWindow::Unsplit}\label{wxsplitterwindowunsplit}\func{bool}{Unsplit}{\param{wxWindow* }{toRemove = NULL}}Unsplits the window.\wxheading{Parameters}\docparam{toRemove}{The pane to remove, or NULL to remove the right or bottom pane.}\wxheading{Return value}true if successful, false otherwise (the window was not split).\wxheading{Remarks}This call will not actually delete the pane being removed; it calls \helpref{OnUnsplit}{wxsplitterwindowonunsplit}\rtfspwhich can be overridden for the desired behaviour. By default, the pane being removed is hidden.\wxheading{See also}\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp\helpref{wxSplitterWindow::IsSplit}{wxsplitterwindowissplit}, \helpref{wxSplitterWindow::OnUnsplit}{wxsplitterwindowonunsplit}\membersection{wxSplitterWindow::UpdateSize}\label{wxsplitterwindowupdatesize}\func{void}{UpdateSize}{\void}Causes any pending sizing of the sash and child panes to take placeimmediately.Such resizing normally takes place in idle time, in orderto wait for layout to be completed. However, this can causeunacceptable flicker as the panes are resized after the window has beenshown. To work around this, you can perform window layout (forexample by sending a size event to the parent window), and thencall this function, before showing the top-level window.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -