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>



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



~wxSizerItem(void)

Deletes the user data and subsizer, if any.



wxSizerItem::CalcMin



wxSize CalcMin(void)

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



wxSizerItem::DeleteWindows



void DeleteWindows(void)

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



wxSizerItem::DetachSizer



void DetachSizer(void)

Enable deleting the SizerItem without destroying the contained sizer.



wxSizerItem::GetBorder

int GetBorder(void) const

Return the border attribute.



wxSizerItem::GetFlag

int GetFlag(void) const

Return the flags attribute.



wxSizerItem::GetMinSize

wxSize GetMinSize(void) const

Get the minimum size needed for the item.



wxSizerItem::GetPosition

wxPoint GetPosition(void) const

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



wxSizerItem::GetProportion

int GetProportion(void) const

Get the proportion item attribute.



wxSizerItem::GetRatio

float GetRatio(void) const

Get the ration item attribute.



wxSizerItem::GetRect



wxRect GetRect(void)

Get the rectangle of the item on the parent window, excluding borders.



wxSizerItem::GetSize

wxSize GetSize(void) const

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



wxSizerItem::GetSizer

wxSizer* GetSizer(void) const

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



wxSizerItem::GetSpacer

const wxSize& GetSpacer(void) const

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



wxSizerItem::GetUserData

wxObject* GetUserData(void) const

Get the userData item attribute.



wxSizerItem::GetWindow

wxWindow* GetWindow(void) const

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



wxSizerItem::IsShown

bool IsShown(void) const

Is this item shown?



wxSizerItem::IsSizer

bool IsSizer(void) const

Is this item a sizer?



wxSizerItem::IsSpacer

bool IsSpacer(void) const

Is this item a spacer?



wxSizerItem::IsWindow

bool IsWindow(void) 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.

ymasuda 平成17年11月19日