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
|
<HTML>
<head><title>wxSashLayoutWindow</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxsashlayoutwindow"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx197.htm#wxsashevent"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx199.htm#wxsashwindow"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxSashLayoutWindow</H2>
<P>
wxSashLayoutWindow responds to OnCalculateLayout events generated
by <A HREF="wx125.htm#wxlayoutalgorithm">wxLayoutAlgorithm</A>. It allows the
application to use simple accessors to specify how the window should be
laid out, rather than having to respond to events. The fact that
the class derives from wxSashWindow allows sashes to be used if required,
to allow the windows to be user-resizable.<P>
The documentation for <A HREF="wx125.htm#wxlayoutalgorithm">wxLayoutAlgorithm</A> explains
the purpose of this class in more detail.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx199.htm#wxsashwindow">wxSashWindow</A><BR>
<A HREF="wx260.htm#wxwindow">wxWindow</A><BR>
<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><BR>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/laywin.h><P>
<B><FONT COLOR="#FF0000">Window styles</FONT></B><P>
See <A HREF="wx199.htm#wxsashwindow">wxSashWindow</A>.<P>
<B><FONT COLOR="#FF0000">Event handling</FONT></B><P>
This class handles the EVT_QUERY_LAYOUT_INFO and EVT_CALCULATE_LAYOUT events
for you. However, if you use sashes, see <A HREF="wx199.htm#wxsashwindow">wxSashWindow</A> for
relevant event information.<P>
See also <A HREF="wx125.htm#wxlayoutalgorithm">wxLayoutAlgorithm</A> for information
about the layout events.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx125.htm#wxlayoutalgorithm">wxLayoutAlgorithm</A>, <A HREF="wx199.htm#wxsashwindow">wxSashWindow</A>, <A HREF="wx299.htm#eventhandlingoverview">Event handling overview</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic801">wxSashLayoutWindow::wxSashLayoutWindow</A><BR>
<A HREF="#topic802">wxSashLayoutWindow::~wxSashLayoutWindow</A><BR>
<A HREF="#wxsashlayoutwindowgetalignment">wxSashLayoutWindow::GetAlignment</A><BR>
<A HREF="#wxsashlayoutwindowgetorientation">wxSashLayoutWindow::GetOrientation</A><BR>
<A HREF="#wxsashlayoutwindowoncalculatelayout">wxSashLayoutWindow::OnCalculateLayout</A><BR>
<A HREF="#wxsashlayoutwindowonquerylayoutinfo">wxSashLayoutWindow::OnQueryLayoutInfo</A><BR>
<A HREF="#wxsashlayoutwindowsetalignment">wxSashLayoutWindow::SetAlignment</A><BR>
<A HREF="#wxsashlayoutwindowsetdefaultsize">wxSashLayoutWindow::SetDefaultSize</A><BR>
<A HREF="#wxsashlayoutwindowsetorientation">wxSashLayoutWindow::SetOrientation</A><BR>
<P>
<HR>
<A NAME="topic801"></A>
<H3>wxSashLayoutWindow::wxSashLayoutWindow</H3>
<P>
<B></B> <B>wxSashLayoutWindow</B>()<P>
Default constructor.<P>
<B></B> <B>wxSashLayoutWindow</B>(<B>wxSashLayoutWindow*</B><I> parent</I>, <B>wxSashLayoutWindowID </B><I>id</I>,
<B>const wxPoint& </B><I>pos = wxDefaultPosition</I>,
<B>const wxSize& </B><I>size = wxDefaultSize</I>,
<B>long </B><I>style = wxCLIP_CHILDREN | wxSW_3D</I>,
<B>const wxString& </B><I>name = "layoutWindow"</I>)<P>
Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>parent</I><UL><UL>
Pointer to a parent window.</UL></UL>
<P>
<I>id</I><UL><UL>
Window identifier. If -1, will automatically create an identifier.</UL></UL>
<P>
<I>pos</I><UL><UL>
Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashLayoutWindows
should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply
an actual position.</UL></UL>
<P>
<I>size</I><UL><UL>
Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
should generate a default size for the window.</UL></UL>
<P>
<I>style</I><UL><UL>
Window style. For window styles, please see <A HREF="wx198.htm#wxsashlayoutwindow">wxSashLayoutWindow</A>.</UL></UL>
<P>
<I>name</I><UL><UL>
Window name.</UL></UL>
<P>
<HR>
<A NAME="topic802"></A>
<H3>wxSashLayoutWindow::~wxSashLayoutWindow</H3>
<P>
<B></B> <B>~wxSashLayoutWindow</B>()<P>
Destructor.<P>
<HR>
<A NAME="wxsashlayoutwindowgetalignment"></A>
<H3>wxSashLayoutWindow::GetAlignment</H3>
<P>
<B>wxLayoutAlignment</B> <B>GetAlignment</B>() <B>const</B><P>
Returns the alignment of the window: one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM.<P>
<HR>
<A NAME="wxsashlayoutwindowgetorientation"></A>
<H3>wxSashLayoutWindow::GetOrientation</H3>
<P>
<B>wxLayoutOrientation</B> <B>GetOrientation</B>() <B>const</B><P>
Returns the orientation of the window: one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL.<P>
<HR>
<A NAME="wxsashlayoutwindowoncalculatelayout"></A>
<H3>wxSashLayoutWindow::OnCalculateLayout</H3>
<P>
<B>void</B> <B>OnCalculateLayout</B>(<B>wxCalculateLayoutEvent&</B><I> event</I>)<P>
The default handler for the event that is generated by wxLayoutAlgorithm. The implementation
of this function calls wxCalculateLayoutEvent::SetRect to shrink the provided size according to
how much space this window takes up. For further details,
see <A HREF="wx125.htm#wxlayoutalgorithm">wxLayoutAlgorithm</A> and <A HREF="wx38.htm#wxcalculatelayoutevent">wxCalculateLayoutEvent</A>.<P>
<HR>
<A NAME="wxsashlayoutwindowonquerylayoutinfo"></A>
<H3>wxSashLayoutWindow::OnQueryLayoutInfo</H3>
<P>
<B>void</B> <B>OnQueryLayoutInfo</B>(<B>wxQueryLayoutInfoEvent&</B><I> event</I>)<P>
The default handler for the event that is generated by OnCalculateLayout to get
size, alignment and orientation information for the window. The implementation
of this function uses member variables as set by accessors called by the application.
For further details, see <A HREF="wx125.htm#wxlayoutalgorithm">wxLayoutAlgorithm</A> and <A HREF="wx189.htm#wxquerylayoutinfoevent">wxQueryLayoutInfoEvent</A>.<P>
<HR>
<A NAME="wxsashlayoutwindowsetalignment"></A>
<H3>wxSashLayoutWindow::SetAlignment</H3>
<P>
<B>void</B> <B>SetAlignment</B>(<B>wxLayoutAlignment</B><I> alignment</I>)<P>
Sets the alignment of the window (which edge of the available parent client area the window
is attached to). <I>alignment</I> is one of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM.<P>
<HR>
<A NAME="wxsashlayoutwindowsetdefaultsize"></A>
<H3>wxSashLayoutWindow::SetDefaultSize</H3>
<P>
<B>void</B> <B>SetDefaultSize</B>(<B>const wxSize& </B><I>size</I>)<P>
Sets the default dimensions of the window. The dimension other than the orientation will be fixed to this
value, and the orientation dimension will be ignored and the window stretched to fit the available space.<P>
<HR>
<A NAME="wxsashlayoutwindowsetorientation"></A>
<H3>wxSashLayoutWindow::SetOrientation</H3>
<P>
<B>void</B> <B>SetOrientation</B>(<B>wxLayoutOrientation</B><I> orientation</I>)<P>
Sets the orientation of the window (the direction the window will stretch in, to fill the available
parent client area). <I>orientation</I> is one of wxLAYOUT_HORIZONTAL, wxLAYOUT_VERTICAL.<P>
<P>
</BODY></HTML>
|