$szTitle = "wxsashlayoutwindow"; include "./_header.inc"; ?>
wxsashlayoutwindow responds to oncalculatelayout events generated by wxlayoutalgorithm. 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.
the documentation for wxlayoutalgorithm explains the purpose of this class in more detail.
derived from
wxsashwindow
wxwindow
wxevthandler
wxobject
include files
<wx/laywin.h>
window styles
see wxsashwindow.
event handling
this class handles the evt_query_layout_info and evt_calculate_layout events for you. however, if you use sashes, see wxsashwindow for relevant event information.
see also wxlayoutalgorithm for information about the layout events.
see also
wxlayoutalgorithm, wxsashwindow, event handling overview
members
wxsashlayoutwindow::wxsashlayoutwindow
wxsashlayoutwindow::create
wxsashlayoutwindow::getalignment
wxsashlayoutwindow::getorientation
wxsashlayoutwindow::oncalculatelayout
wxsashlayoutwindow::onquerylayoutinfo
wxsashlayoutwindow::setalignment
wxsashlayoutwindow::setdefaultsize
wxsashlayoutwindow::setorientation
wxsashlayoutwindow()
default constructor.
wxsashlayoutwindow(wxsashlayoutwindow* parent, wxwindowid id, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxclip_children | wxsw_3d, const wxstring& name = "layoutwindow")
constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window.
parameters
parent
id
pos
size
style
name
bool create(wxsashlayoutwindow* parent, wxwindowid id, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxclip_children | wxsw_3d, const wxstring& name = "layoutwindow")
initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window.
parameters
parent
id
pos
size
style
name
wxlayoutalignment getalignment() const
returns the alignment of the window: one of wxlayout_top, wxlayout_left, wxlayout_right, wxlayout_bottom.
wxlayoutorientation getorientation() const
returns the orientation of the window: one of wxlayout_horizontal, wxlayout_vertical.
void oncalculatelayout(wxcalculatelayoutevent& event)
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 wxlayoutalgorithm and wxcalculatelayoutevent.
void onquerylayoutinfo(wxquerylayoutinfoevent& event)
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 wxlayoutalgorithm and wxquerylayoutinfoevent.
void setalignment(wxlayoutalignment alignment)
sets the alignment of the window (which edge of the available parent client area the window is attached to). alignment is one of wxlayout_top, wxlayout_left, wxlayout_right, wxlayout_bottom.
void setdefaultsize(const wxsize& size)
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.
void setorientation(wxlayoutorientation orientation)
sets the orientation of the window (the direction the window will stretch in, to fill the available parent client area). orientation is one of wxlayout_horizontal, wxlayout_vertical.
include "./_footer.inc"; ?>