Class: Wx::WrapSizer

Inherits:
BoxSizer show all
Defined in:
lib/wx/doc/gen/wrap_sizer.rb

Overview

A wrap sizer lays out its items in a single line, like a box sizer as long as there is space available in that direction.

Once all available space in the primary direction has been used, a new line is added and items are added there. So a wrap sizer has a primary orientation for adding items, and adds lines as needed in the secondary direction.

Category: Window Layout

See Also:

Direct Known Subclasses

HWrapSizer, VWrapSizer

Instance Method Summary collapse

Methods inherited from BoxSizer

#add_spacer, #get_orientation, #set_orientation

Methods inherited from Sizer

#add, #add_spacer, #add_stretch_spacer, #clear, #compute_fitting_client_size, #compute_fitting_window_size, #detach, #each_child, #fit, #fit_inside, #get_children, #get_containing_window, #get_item, #get_item_by_id, #get_item_count, #get_min_size, #get_position, #get_size, #hide, #insert, #insert_spacer, #insert_stretch_spacer, #is_empty, #layout, #prepend, #prepend_spacer, #prepend_stretch_spacer, #remove, #replace, #set_containing_window, #set_dimension, #set_item_min_size, #set_min_size, #set_size_hints, #show, #show_items

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(orient = Wx::Orientation::HORIZONTAL, flags = Wx::WRAPSIZER_DEFAULT_FLAGS) ⇒ Wx::WrapSizer

Constructor for a Wx::WrapSizer.

orient determines the primary direction of the sizer (the most common case being Orientation::HORIZONTAL). The flags parameter can be a combination of the values EXTEND_LAST_ON_EACH_LINE which will cause the last item on each line to use any remaining space on that line and REMOVE_LEADING_SPACES which removes any spacer elements from the beginning of a row. Both of these flags are on by default.

Parameters:

  • orient (Integer) (defaults to: Wx::Orientation::HORIZONTAL)
  • flags (Integer) (defaults to: Wx::WRAPSIZER_DEFAULT_FLAGS)


41
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 41

def initialize(orient=Wx::Orientation::HORIZONTAL, flags=Wx::WRAPSIZER_DEFAULT_FLAGS) end

Instance Method Details

#calc_minWx::Size

Implements the calculation of a box sizer’s minimal.

It is used internally only and must not be called by the user. Documented for information.

Returns:



64
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 64

def calc_min; end

#inform_first_direction(direction, size, availableOtherDir) ⇒ Boolean

Not used by an application.

This is the mechanism by which sizers can inform sub-items of the first determined size component. The sub-item can then better determine its size requirements. Returns true if the information was used (and the sub-item min size was updated).

Parameters:

  • direction (Integer)
  • size (Integer)
  • availableOtherDir (Integer)

Returns:

  • (Boolean)


51
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 51

def inform_first_direction(direction, size, availableOtherDir) end

#reposition_children(minSize) ⇒ void

This method returns an undefined value.

Method which must be overridden in the derived sizer classes.

The implementation should reposition the children using the current total size available to the sizer (m_size) and the size computed by the last call to #calc_min.

Parameters:

  • minSize (Array(Integer, Integer), Wx::Size)


58
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 58

def reposition_children(minSize) end