The wxSizerItem class is used to track the position, size and other attributes of each item managed by a wxSizer. In normal usage user code should never need to deal directly with a wxSizerItem, but derived sizer classes will.
Derived from
Include files
<wx/sizer.h>
Members
wxSizerItem::wxSizerItem
wxSizerItem::~wxSizerItem
wxSizerItem::CalcMin
wxSizerItem::DeleteWindows
wxSizerItem::DetachSizer
wxSizerItem::GetBorder
wxSizerItem::GetFlag
wxSizerItem::GetMinSize
wxSizerItem::GetPosition
wxSizerItem::GetProportion
wxSizerItem::GetRatio
wxSizerItem::GetRect
wxSizerItem::GetSize
wxSizerItem::GetSizer
wxSizerItem::GetSpacer
wxSizerItem::GetUserData
wxSizerItem::GetWindow
wxSizerItem::IsShown
wxSizerItem::IsSizer
wxSizerItem::IsSpacer
wxSizerItem::IsWindow
wxSizerItem::SetBorder
wxSizerItem::SetDimension
wxSizerItem::SetFlag
wxSizerItem::SetInitSize
wxSizerItem::SetProportion
wxSizerItem::SetRatio
wxSizerItem::SetSizer
wxSizerItem::SetSpacer
wxSizerItem::SetWindow
wxSizerItem::Show
wxSizerItem(int width, int height, int proportion, int flag, int border, wxObject* userData)
Construct a sizer item for tracking a spacer.
wxSizerItem(wxWindow* window, const wxSizerFlags& flags)
wxSizerItem(wxWindow* window, int proportion, int flag, int border, wxObject* userData)
Construct a sizer item for tracking a window.
wxSizerItem(wxSizer* window, const wxSizerFlags& flags)
wxSizerItem(wxSizer* sizer, int proportion, int flag, int border, wxObject* userData)
Construct a sizer item for tracking a subsizer.
~wxSizerItem()
Deletes the user data and subsizer, if any.
wxSize CalcMin()
Calculates the minimum desired size for the item, including any space needed by borders.
void DeleteWindows()
Destroy the window or the windows in a subsizer, depending on the type of item.
void DetachSizer()
Enable deleting the SizerItem without destroying the contained sizer.
int GetBorder() const
Return the border attribute.
int GetFlag() const
Return the flags attribute.
wxSize GetMinSize() const
Get the minimum size needed for the item.
wxPoint GetPosition() const
What is the current position of the item, as set in the last Layout.
int GetProportion() const
Get the proportion item attribute.
float GetRatio() const
Get the ration item attribute.
wxRect GetRect()
Get the rectangle of the item on the parent window, excluding borders.
wxSize GetSize() const
Get the current size of the item, as set in the last Layout.
wxSizer* GetSizer() const
If this item is tracking a sizer, return it. NULL otherwise.
const wxSize& GetSpacer() const
If this item is tracking a spacer, return its size.
wxObject* GetUserData() const
Get the userData item attribute.
wxWindow* GetWindow() const
If this item is tracking a window then return it. NULL otherwise.
bool IsShown() const
Is this item shown?
bool IsSizer() const
Is this item a sizer?
bool IsSpacer() const
Is this item a spacer?
bool IsWindow() const
Is this item a window?
void SetBorder(int border)
Set the border item attribute.
void SetDimension(wxPoint pos, wxSize size)
Set the position and size of the space allocated to the sizer, and adjust the position and size of the item to be within that space taking alignment and borders into account.
void SetFlag(int flag)
Set the flag item attribute.
void SetInitSize(int x, int y)
void SetProportion(int proportion)
Set the proportion item attribute.
void SetRatio(int width, int height)
void SetRatio(wxSize size)
void SetRatio(float ratio)
Set the ratio item attribute.
void SetSizer(wxSizer* sizer)
Set the sizer tracked by this item.
void SetSpacer(const wxSize& size)
Set the size of the spacer tracked by this item.
void SetWindow(wxWindow* window)
Set the window to be tracked by thsi item.
void Show(bool show)
Set the show item attribute, which sizers use to determine if the item is to be made part of the layout or not. If the item is tracking a window then it is shown or hidden as needed.