wxRuby Documentation Home

# Wx::SizerItem

The SizerItem class is used to track the position, size and other
attributes of each item managed by a Sizer. In
normal usage user code should never need to deal directly with a
SizerItem, but derived sizer classes will.

## Derived from

Object

## Methods

- SizerItem.new
- SizerItem#calc_min
- SizerItem#delete_windows
- SizerItem#detach_sizer
- SizerItem#get_border
- SizerItem#get_flag
- SizerItem#get_min_size
- SizerItem#get_position
- SizerItem#get_proportion
- SizerItem#get_ratio
- SizerItem#get_rect
- SizerItem#get_size
- SizerItem#get_sizer
- SizerItem#get_spacer
- SizerItem#get_user_data
- SizerItem#get_window
- SizerItem#is_shown
- SizerItem#is_sizer
- SizerItem#is_spacer
- SizerItem#is_window
- SizerItem#set_border
- SizerItem#set_dimension
- SizerItem#set_flag
- SizerItem#set_init_size
- SizerItem#set_proportion
- SizerItem#set_ratio
- SizerItem#set_sizer
- SizerItem#set_spacer
- SizerItem#set_window
- SizerItem#show

### SizerItem.new

SizerItem.new(%(arg-type)Integer% width, Integer height, Integer proportion, Integer flag, Integer border, Object userData)

Construct a sizer item for tracking a spacer.

SizerItem.new(%(arg-type)Window% window, SizerFlags flags) SizerItem.new(%(arg-type)Window% window, Integer proportion, Integer flag, Integer border, Object userData)

Construct a sizer item for tracking a window.

SizerItem.new(%(arg-type)Sizer% window, SizerFlags flags) SizerItem.new(%(arg-type)Sizer% sizer, Integer proportion, Integer flag, Integer border, Object userData)

Construct a sizer item for tracking a subsizer.

destructor()

Deletes the user data and subsizer, if any.

### SizerItem#calc_min

Size calc_min()

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

### SizerItem#delete_windows

delete_windows()

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

### SizerItem#detach_sizer

detach_sizer()

Enable deleting the SizerItem without destroying the contained sizer.

### SizerItem#get_border

Integer get_border()

Return the border attribute.

### SizerItem#get_flag

Integer get_flag()

Return the flags attribute.

### SizerItem#get_min_size

Size get_min_size()

Get the minimum size needed for the item.

### SizerItem#get_position

Point get_position()

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

### SizerItem#get_proportion

Integer get_proportion()

Get the proportion item attribute.

### SizerItem#get_ratio

float get_ratio()

Get the ration item attribute.

### SizerItem#get_rect

Rect get_rect()

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

### SizerItem#get_size

Size get_size()

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

### SizerItem#get_sizer

Sizer get_sizer()

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

### SizerItem#get_spacer

Size get_spacer()

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

### SizerItem#get_user_data

Object get_user_data()

Get the userData item attribute.

### SizerItem#get_window

Window get_window()

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

### SizerItem#is_shown

Boolean is_shown()

Is this item shown?

### SizerItem#is_sizer

Boolean is_sizer()

Is this item a sizer?

### SizerItem#is_spacer

Boolean is_spacer()

Is this item a spacer?

### SizerItem#is_window

Boolean is_window()

Is this item a window?

### SizerItem#set_border

set_border(%(arg-type)Integer% border)

Set the border item attribute.

### SizerItem#set_dimension

set_dimension(%(arg-type)Point% pos, Size 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.

### SizerItem#set_flag

set_flag(%(arg-type)Integer% flag)

Set the flag item attribute.

### SizerItem#set_init_size

set_init_size(%(arg-type)Integer% x, Integer y)

### SizerItem#set_proportion

set_proportion(%(arg-type)Integer% proportion)

Set the proportion item attribute.

### SizerItem#set_ratio

set_ratio(%(arg-type)Integer% width, Integer height) set_ratio(%(arg-type)Size% size) set_ratio(%(arg-type)Float% ratio)

Set the ratio item attribute.

### SizerItem#set_sizer

set_sizer(%(arg-type)Sizer% sizer)

Set the sizer tracked by this item.

### SizerItem#set_spacer

set_spacer(%(arg-type)Size% size)

Set the size of the spacer tracked by this item.

### SizerItem#set_window

set_window(%(arg-type)Window% window)

Set the window to be tracked by thsi item.

### SizerItem#show

show(%(arg-type)Boolean% 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.

[This page automatically generated from the Textile source at 2023-06-09 00:45:37 +0000]