Contents Up Previous Next

wxSizerItem

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

wxObject

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::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::wxSizerItem

wxSizerItem(int width, int height, int proportion, int flag, int border, wxObject* userData)

Construct a sizer item for tracking a spacer.

wxSizerItem(wxWindow* window, int proportion, int flag, int border, wxObject* userData)

Construct a sizer item for tracking a window.

wxSizerItem(wxSizer* sizer, int proportion, int flag, int border, wxObject* userData)

Construct a sizer item for tracking a subsizer.


wxSizerItem::~wxSizerItem

~wxSizerItem()

Deletes the user data and subsizer, if any.


wxSizerItem::CalcMin

wxSize CalcMin()

Calculates the minimum desired size for the item, including any space needed by borders.


wxSizerItem::DeleteWindows

void DeleteWindows()

Destroy the window or the windows in a subsizer, depending on the type of item.


wxSizerItem::DetachSizer

void DetachSizer()

Enable deleting the SizerItem without destroying the contained sizer.


wxSizerItem::GetBorder

int GetBorder() const

Return the border attribute.


wxSizerItem::GetFlag

int GetFlag() const

Return the flags attribute.


wxSizerItem::GetMinSize

wxSize GetMinSize() const

Get the minimum size needed for the item.


wxSizerItem::GetPosition

wxPoint GetPosition() const

What is the current position of the item, as set in the last Layout.


wxSizerItem::GetProportion

int GetProportion() const

Get the proportion item attribute.


wxSizerItem::GetRatio

float GetRatio() const

Get the ration item attribute.


wxSizerItem::GetSize

wxSize GetSize() const

Get the current size of the item, as set in the last Layout.


wxSizerItem::GetSizer

wxSizer* GetSizer() const

If this item is tracking a sizer, return it. NULL otherwise.


wxSizerItem::GetSpacer

const wxSize& GetSpacer() const

If this item is tracking a spacer, return its size.


wxSizerItem::GetUserData

wxObject* GetUserData() const

Get the userData item attribute.


wxSizerItem::GetWindow

wxWindow* GetWindow() const

If this item is trackign a window then return it. NULL otherwise.


wxSizerItem::IsShown

bool IsShown() const

Is this item shown?


wxSizerItem::IsSizer

bool IsSizer() const

Is this item a sizer?


wxSizerItem::IsSpacer

bool IsSpacer() const

Is this item a spacer?


wxSizerItem::IsWindow

bool IsWindow() const

Is this item a window?


wxSizerItem::SetBorder

void SetBorder(int border)

Set the border item attribute.


wxSizerItem::SetDimension

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.


wxSizerItem::SetFlag

void SetFlag(int flag)

Set the flag item attribute.


wxSizerItem::SetInitSize

void SetInitSize(int x, int y)


wxSizerItem::SetProportion

void SetProportion(int proportion)

Set the proportion item attribute.


wxSizerItem::SetRatio

void SetRatio(int width, int height)

void SetRatio(wxSize size)

void SetRatio(float ratio)

Set the ratio item attribute.


wxSizerItem::SetSizer

void SetSizer(wxSizer* sizer)

Set the sizer tracked by this item.


wxSizerItem::SetSpacer

void SetSpacer(const wxSize& size)

Set the size of the spacer tracked by this item.


wxSizerItem::SetWindow

void SetWindow(wxWindow* window)

Set the window to be tracked by thsi item.


wxSizerItem::Show

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.