1 \section{\class{wxSashLayoutWindow
}}\label{wxsashlayoutwindow
}
3 wxSashLayoutWindow responds to OnCalculateLayout events generated
4 by
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
}. It allows the
5 application to use simple accessors to specify how the window should be
6 laid out, rather than having to respond to events. The fact that
7 the class derives from wxSashWindow allows sashes to be used if required,
8 to allow the windows to be user-resizable.
10 The documentation for
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} explains
11 the purpose of this class in more detail.
13 \wxheading{Derived from
}
15 \helpref{wxSashWindow
}{wxsashwindow
}\\
16 \helpref{wxWindow
}{wxwindow
}\\
17 \helpref{wxEvtHandler
}{wxevthandler
}\\
18 \helpref{wxObject
}{wxobject
}
20 \wxheading{Include files
}
26 \helpref{wxAdv
}{librarieslist
}
28 \wxheading{Window styles
}
30 See
\helpref{wxSashWindow
}{wxsashwindow
}.
32 \wxheading{Event handling
}
34 This class handles the EVT
\_QUERY\_LAYOUT\_INFO and EVT
\_CALCULATE\_LAYOUT events
35 for you. However, if you use sashes, see
\helpref{wxSashWindow
}{wxsashwindow
} for
36 relevant event information.
38 See also
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} for information
39 about the layout events.
43 \helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
},
\helpref{wxSashWindow
}{wxsashwindow
},
\helpref{Event handling overview
}{eventhandlingoverview
}
45 \latexignore{\rtfignore{\wxheading{Members
}}}
47 \membersection{wxSashLayoutWindow::wxSashLayoutWindow
}\label{wxsashlayoutwindowctor
}
49 \func{}{wxSashLayoutWindow
}{\void}
53 \func{}{wxSashLayoutWindow
}{\param{wxSashLayoutWindow*
}{ parent
},
\param{wxWindowID
}{id
},
54 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
55 \param{const wxSize\&
}{size = wxDefaultSize
},
56 \param{long
}{style = wxCLIP
\_CHILDREN \pipe wxSW
\_3D},
57 \param{const wxString\&
}{name = "layoutWindow"
}}
59 Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.
61 \wxheading{Parameters
}
63 \docparam{parent
}{Pointer to a parent window.
}
65 \docparam{id
}{Window identifier. If -
1, will automatically create an identifier.
}
67 \docparam{pos
}{Window position. wxDefaultPosition is (-
1, -
1) which indicates that wxSashLayoutWindows
68 should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
71 \docparam{size
}{Window size. wxDefaultSize is (-
1, -
1) which indicates that wxSashLayoutWindows
72 should generate a default size for the window.
}
74 \docparam{style
}{Window style. For window styles, please see
\helpref{wxSashLayoutWindow
}{wxsashlayoutwindow
}.
}
76 \docparam{name
}{Window name.
}
79 \membersection{wxSashLayoutWindow::Create
}\label{wxsashlayoutwindowcreate
}
81 \func{bool
}{Create
}{\param{wxSashLayoutWindow*
}{ parent
},
\param{wxWindowID
}{id
},
82 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
83 \param{const wxSize\&
}{size = wxDefaultSize
},
84 \param{long
}{style = wxCLIP
\_CHILDREN \pipe wxSW
\_3D},
85 \param{const wxString\&
}{name = "layoutWindow"
}}
87 Initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window.
89 \wxheading{Parameters
}
91 \docparam{parent
}{Pointer to a parent window.
}
93 \docparam{id
}{Window identifier. If -
1, will automatically create an identifier.
}
95 \docparam{pos
}{Window position. wxDefaultPosition is (-
1, -
1) which indicates that wxSashLayoutWindows
96 should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
99 \docparam{size
}{Window size. wxDefaultSize is (-
1, -
1) which indicates that wxSashLayoutWindows
100 should generate a default size for the window.
}
102 \docparam{style
}{Window style. For window styles, please see
\helpref{wxSashLayoutWindow
}{wxsashlayoutwindow
}.
}
104 \docparam{name
}{Window name.
}
107 \membersection{wxSashLayoutWindow::GetAlignment
}\label{wxsashlayoutwindowgetalignment
}
109 \constfunc{wxLayoutAlignment
}{GetAlignment
}{\void}
111 Returns the alignment of the window: one of wxLAYOUT
\_TOP, wxLAYOUT
\_LEFT, wxLAYOUT
\_RIGHT, wxLAYOUT
\_BOTTOM.
113 \membersection{wxSashLayoutWindow::GetOrientation
}\label{wxsashlayoutwindowgetorientation
}
115 \constfunc{wxLayoutOrientation
}{GetOrientation
}{\void}
117 Returns the orientation of the window: one of wxLAYOUT
\_HORIZONTAL, wxLAYOUT
\_VERTICAL.
119 \membersection{wxSashLayoutWindow::OnCalculateLayout
}\label{wxsashlayoutwindowoncalculatelayout
}
121 \func{void
}{OnCalculateLayout
}{\param{wxCalculateLayoutEvent\&
}{ event
}}
123 The default handler for the event that is generated by wxLayoutAlgorithm. The implementation
124 of this function calls wxCalculateLayoutEvent::SetRect to shrink the provided size according to
125 how much space this window takes up. For further details,
126 see
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} and
\helpref{wxCalculateLayoutEvent
}{wxcalculatelayoutevent
}.
128 \membersection{wxSashLayoutWindow::OnQueryLayoutInfo
}\label{wxsashlayoutwindowonquerylayoutinfo
}
130 \func{void
}{OnQueryLayoutInfo
}{\param{wxQueryLayoutInfoEvent\&
}{ event
}}
132 The default handler for the event that is generated by OnCalculateLayout to get
133 size, alignment and orientation information for the window. The implementation
134 of this function uses member variables as set by accessors called by the application.
135 For further details, see
\helpref{wxLayoutAlgorithm
}{wxlayoutalgorithm
} and
\helpref{wxQueryLayoutInfoEvent
}{wxquerylayoutinfoevent
}.
137 \membersection{wxSashLayoutWindow::SetAlignment
}\label{wxsashlayoutwindowsetalignment
}
139 \func{void
}{SetAlignment
}{\param{wxLayoutAlignment
}{ alignment
}}
141 Sets the alignment of the window (which edge of the available parent client area the window
142 is attached to).
{\it alignment
} is one of wxLAYOUT
\_TOP, wxLAYOUT
\_LEFT, wxLAYOUT
\_RIGHT, wxLAYOUT
\_BOTTOM.
144 \membersection{wxSashLayoutWindow::SetDefaultSize
}\label{wxsashlayoutwindowsetdefaultsize
}
146 \func{void
}{SetDefaultSize
}{\param{const wxSize\&
}{size
}}
148 Sets the default dimensions of the window. The dimension other than the orientation will be fixed to this
149 value, and the orientation dimension will be ignored and the window stretched to fit the available space.
151 \membersection{wxSashLayoutWindow::SetOrientation
}\label{wxsashlayoutwindowsetorientation
}
153 \func{void
}{SetOrientation
}{\param{wxLayoutOrientation
}{ orientation
}}
155 Sets the orientation of the window (the direction the window will stretch in, to fill the available
156 parent client area).
{\it orientation
} is one of wxLAYOUT
\_HORIZONTAL, wxLAYOUT
\_VERTICAL.