1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
|
\section{\class{wxSashWindow}}\label{wxsashwindow}
wxSashWindow allows any of its edges to have a sash which can be dragged
to resize the window. The actual content window will be created by the application
as a child of wxSashWindow. The window (or an ancestor) will be notified of a drag
via a \helpref{wxSashEvent}{wxsashevent} notification.
\wxheading{Derived from}
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/sashwin.h>
\wxheading{Window styles}
The following styles apply in addition to the normal wxWindow styles.
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxSW\_3D}}{Draws a 3D effect sash and border.}
\twocolitem{\windowstyle{wxSW\_3DSASH}}{Draws a 3D effect sash.}
\twocolitem{\windowstyle{wxSW\_3DBORDER}}{Draws a 3D effect border.}
\twocolitem{\windowstyle{wxSW\_BORDER}}{Draws a thin black border.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_SASH\_DRAGGED(id, func)}}{Process a wxEVT\_SASH\_DRAGGED event,
when the user has finished dragging a sash.}
\twocolitem{{\bf EVT\_SASH\_DRAGGED\_RANGE(id1, id2, func)}}{Process a wxEVT\_SASH\_DRAGGED\_RANGE event,
when the user has finished dragging a sash. The event handler is called when windows with ids in the
given range have their sashes dragged.}
\end{twocollist}
\wxheading{Data types}
{\small
\begin{verbatim}
enum wxSashEdgePosition {
wxSASH_TOP = 0,
wxSASH_RIGHT,
wxSASH_BOTTOM,
wxSASH_LEFT,
wxSASH_NONE = 100
};
\end{verbatim}
}
\wxheading{See also}
\helpref{wxSashEvent}{wxsashevent}, \helpref{wxSashLayoutWindow}{wxsashlayoutwindow}, \helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxSashWindow::wxSashWindow}\label{wxsashwindowctor}
\func{}{wxSashWindow}{\void}
Default constructor.
\func{}{wxSashWindow}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},
\param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize},
\param{long }{style = wxCLIP\_CHILDREN \pipe wxSW\_3D},
\param{const wxString\& }{name = "sashWindow"}}
Constructs a sash window, which can be a child of a frame, dialog or any other non-control window.
\wxheading{Parameters}
\docparam{parent}{Pointer to a parent window.}
\docparam{id}{Window identifier. If -1, will automatically create an identifier.}
\docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashWindows
should generate a default position for the window. If using the wxSashWindow class directly, supply
an actual position.}
\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxSashWindows
should generate a default size for the window.}
\docparam{style}{Window style. For window styles, please see \helpref{wxSashWindow}{wxsashwindow}.}
\docparam{name}{Window name.}
\membersection{wxSashWindow::\destruct{wxSashWindow}}\label{wxsashwindowdtor}
\func{}{\destruct{wxSashWindow}}{\void}
Destructor.
\membersection{wxSashWindow::GetSashVisible}\label{wxsashwindowgetsashvisible}
\constfunc{bool}{GetSashVisible}{\param{wxSashEdgePosition }{edge}}
Returns true if a sash is visible on the given edge, false otherwise.
\wxheading{Parameters}
\docparam{edge}{Edge. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
\wxheading{See also}
\helpref{wxSashWindow::SetSashVisible}{wxsashwindowsetsashvisible}
\membersection{wxSashWindow::GetMaximumSizeX}\label{wxsashwindowgetmaximumsizex}
\constfunc{int}{GetMaximumSizeX}{\void}
Gets the maximum window size in the x direction.
\membersection{wxSashWindow::GetMaximumSizeY}\label{wxsashwindowgetmaximumsizey}
\constfunc{int}{GetMaximumSizeY}{\void}
Gets the maximum window size in the y direction.
\membersection{wxSashWindow::GetMinimumSizeX}\label{wxsashwindowgetminimumsizex}
\func{int}{GetMinimumSizeX}{\void}
Gets the minimum window size in the x direction.
\membersection{wxSashWindow::GetMinimumSizeY}\label{wxsashwindowgetminimumsizey}
\constfunc{int}{GetMinimumSizeY}{\void}
Gets the minimum window size in the y direction.
\membersection{wxSashWindow::HasBorder}\label{wxsashwindowhasborder}
\constfunc{bool}{HasBorder}{\param{wxSashEdgePosition }{edge}}
Returns true if the sash has a border, false otherwise.
This function is obsolete since the sash border property is unused.
\wxheading{Parameters}
\docparam{edge}{Edge. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
\wxheading{See also}
\helpref{wxSashWindow::SetSashBorder}{wxsashwindowsetsashborder}
\membersection{wxSashWindow::SetMaximumSizeX}\label{wxsashwindowsetmaximumsizex}
\func{void}{SetMaximumSizeX}{\param{int}{ min}}
Sets the maximum window size in the x direction.
\membersection{wxSashWindow::SetMaximumSizeY}\label{wxsashwindowsetmaximumsizey}
\func{void}{SetMaximumSizeY}{\param{int}{ min}}
Sets the maximum window size in the y direction.
\membersection{wxSashWindow::SetMinimumSizeX}\label{wxsashwindowsetminimumsizex}
\func{void}{SetMinimumSizeX}{\param{int}{ min}}
Sets the minimum window size in the x direction.
\membersection{wxSashWindow::SetMinimumSizeY}\label{wxsashwindowsetminimumsizey}
\func{void}{SetMinimumSizeY}{\param{int}{ min}}
Sets the minimum window size in the y direction.
\membersection{wxSashWindow::SetSashVisible}\label{wxsashwindowsetsashvisible}
\func{void}{SetSashVisible}{\param{wxSashEdgePosition }{edge}, \param{bool}{ visible}}
Call this function to make a sash visible or invisible on a particular edge.
\wxheading{Parameters}
\docparam{edge}{Edge to change. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
\docparam{visible}{true to make the sash visible, false to make it invisible.}
\wxheading{See also}
\helpref{wxSashWindow::GetSashVisible}{wxsashwindowgetsashvisible}
\membersection{wxSashWindow::SetSashBorder}\label{wxsashwindowsetsashborder}
\func{void}{SetSashBorder}{\param{wxSashEdgePosition }{edge}, \param{bool}{ hasBorder}}
Call this function to give the sash a border, or remove the border.
This function is obsolete since the sash border property is unused.
\wxheading{Parameters}
\docparam{edge}{Edge to change. One of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.}
\docparam{hasBorder}{true to give the sash a border visible, false to remove it.}
\wxheading{See also}
\helpref{wxSashWindow::HasBorder}{wxsashwindowhasborder}
|