h1(#wxsashlayoutwindow). Wx::SashLayoutWindow SashLayoutWindow responds to OnCalculateLayout events generated by "LayoutAlgorithm":layoutalgorithm.html. 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 SashWindow allows sashes to be used if required, to allow the windows to be user-resizable. The documentation for "LayoutAlgorithm":layoutalgorithm.html explains the purpose of this class in more detail. h2. Derived from "SashWindow":sashwindow.html "Window":window.html "EvtHandler":evthandler.html "Object":object.html h2. Window styles See "SashWindow":sashwindow.html. h2. Event handling This class handles the EVT_QUERY_LAYOUT_INFO and EVT_CALCULATE_LAYOUT events for you. However, if you use sashes, see "SashWindow":sashwindow.html for relevant event information. See also "LayoutAlgorithm":layoutalgorithm.html for information about the layout events. h2. See also "LayoutAlgorithm":layoutalgorithm.html, "SashWindow":sashwindow.html, "Event handling overview":eventhandlingoverview.html
h2. Methods * "SashLayoutWindow.new":#SashLayoutWindow_new * "SashLayoutWindow#create":#SashLayoutWindow_create * "SashLayoutWindow#get_alignment":#SashLayoutWindow_getalignment * "SashLayoutWindow#get_orientation":#SashLayoutWindow_getorientation * "SashLayoutWindow#on_calculate_layout":#SashLayoutWindow_oncalculatelayout * "SashLayoutWindow#on_query_layout_info":#SashLayoutWindow_onquerylayoutinfo * "SashLayoutWindow#set_alignment":#SashLayoutWindow_setalignment * "SashLayoutWindow#set_default_size":#SashLayoutWindow_setdefaultsize * "SashLayoutWindow#set_orientation":#SashLayoutWindow_setorientation
h3(#SashLayoutWindow_new). SashLayoutWindow.new *SashLayoutWindow.new*(%(arg-type)"SashLayoutWindow":sashlayoutwindow.html% parent, %(arg-type)Integer% id, %(arg-type)"Point":point.html% pos = DEFAULT_POSITION, %(arg-type)"Size":size.html% size = DEFAULT_SIZE, %(arg-type)Integer% style = CLIP_CHILDREN SW_3D, %(arg-type)String% name = "layoutWindow") Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window. h4. Parameters * _parent_ Pointer to a parent window. * _id_ Window identifier. If -1, will automatically create an identifier. * _pos_ Window position. DefaultPosition is (-1, -1) which indicates that SashLayoutWindows should generate a default position for the window. If using the SashLayoutWindow class directly, supply an actual position. * _size_ Window size. DefaultSize is (-1, -1) which indicates that SashLayoutWindows should generate a default size for the window. * _style_ Window style. For window styles, please see "SashLayoutWindow":sashlayoutwindow.html. * _name_ Window name. h3(#SashLayoutWindow_create). SashLayoutWindow#create Boolean *create*(%(arg-type)"SashLayoutWindow":sashlayoutwindow.html% parent, %(arg-type)Integer% id, %(arg-type)"Point":point.html% pos = DEFAULT_POSITION, %(arg-type)"Size":size.html% size = DEFAULT_SIZE, %(arg-type)Integer% style = CLIP_CHILDREN SW_3D, %(arg-type)String% name = "layoutWindow") Initializes a sash layout window, which can be a child of a frame, dialog or any other non-control window. h4. Parameters * _parent_ Pointer to a parent window. * _id_ Window identifier. If -1, will automatically create an identifier. * _pos_ Window position. DefaultPosition is (-1, -1) which indicates that SashLayoutWindows should generate a default position for the window. If using the SashLayoutWindow class directly, supply an actual position. * _size_ Window size. DefaultSize is (-1, -1) which indicates that SashLayoutWindows should generate a default size for the window. * _style_ Window style. For window styles, please see "SashLayoutWindow":sashlayoutwindow.html. * _name_ Window name. h3(#SashLayoutWindow_getalignment). SashLayoutWindow#get_alignment "LayoutAlignment":layoutalignment.html *get_alignment*() Returns the alignment of the window: one of LAYOUT_TOP, LAYOUT_LEFT, LAYOUT_RIGHT, LAYOUT_BOTTOM. h3(#SashLayoutWindow_getorientation). SashLayoutWindow#get_orientation "LayoutOrientation":layoutorientation.html *get_orientation*() Returns the orientation of the window: one of LAYOUT_HORIZONTAL, LAYOUT_VERTICAL. h3(#SashLayoutWindow_oncalculatelayout). SashLayoutWindow#on_calculate_layout *on_calculate_layout*(%(arg-type)"CalculateLayoutEvent":calculatelayoutevent.html% event) The default handler for the event that is generated by LayoutAlgorithm. The implementation of this function calls CalculateLayoutEvent::SetRect to shrink the provided size according to how much space this window takes up. For further details, see "LayoutAlgorithm":layoutalgorithm.html and "CalculateLayoutEvent":calculatelayoutevent.html. h3(#SashLayoutWindow_onquerylayoutinfo). SashLayoutWindow#on_query_layout_info *on_query_layout_info*(%(arg-type)"QueryLayoutInfoEvent":querylayoutinfoevent.html% 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 "LayoutAlgorithm":layoutalgorithm.html and "QueryLayoutInfoEvent":querylayoutinfoevent.html. h3(#SashLayoutWindow_setalignment). SashLayoutWindow#set_alignment *set_alignment*(%(arg-type)"LayoutAlignment":layoutalignment.html% alignment) Sets the alignment of the window (which edge of the available parent client area the window is attached to). _alignment_ is one of LAYOUT_TOP, LAYOUT_LEFT, LAYOUT_RIGHT, LAYOUT_BOTTOM. h3(#SashLayoutWindow_setdefaultsize). SashLayoutWindow#set_default_size *set_default_size*(%(arg-type)"Size":size.html% 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. h3(#SashLayoutWindow_setorientation). SashLayoutWindow#set_orientation *set_orientation*(%(arg-type)"LayoutOrientation":layoutorientation.html% 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 LAYOUT_HORIZONTAL, LAYOUT_VERTICAL.