Class: Wx::WrapSizer
- 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
Direct Known Subclasses
Instance Method Summary collapse
-
#calc_min ⇒ Wx::Size
Implements the calculation of a box sizer’s minimal.
-
#inform_first_direction(direction, size, availableOtherDir) ⇒ Boolean
Not used by an application.
-
#initialize(*args) ⇒ WrapSizer
constructor
A new instance of WrapSizer.
-
#reposition_children(minSize) ⇒ void
Method which must be overridden in the derived sizer classes.
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 #initialize(orient = Wx::Orientation::HORIZONTAL, flags = Wx::WRAPSIZER_DEFAULT_FLAGS) {|sizer| ... } ⇒ Wx::WrapSizer
Returns a new instance of WrapSizer.
51 |
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 51 def initialize(*args) end |
Instance Method Details
#calc_min ⇒ Wx::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.
74 |
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 74 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).
61 |
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 61 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.
68 |
# File 'lib/wx/doc/gen/wrap_sizer.rb', line 68 def reposition_children(minSize) end |