Class: Wx::BoxSizer
Overview
The basic idea behind a box sizer is that windows will most often be laid out in rather simple basic geometry, typically in a row or a column or several hierarchies of either.
For more information, please see BoxSizer.
Category: Window Layout
Direct Known Subclasses
HBoxSizer, StaticBoxSizer, StdDialogButtonSizer, VBoxSizer, WrapSizer
Instance Method Summary collapse
-
#add_spacer(size) ⇒ Wx::SizerItem
Adds non-stretchable space to the main orientation of the sizer only.
-
#calc_min ⇒ Wx::Size
Implements the calculation of a box sizer’s minimal.
-
#get_orientation ⇒ Integer
(also: #orientation)
Returns the orientation of the box sizer, either Orientation::VERTICAL or Orientation::HORIZONTAL.
-
#inform_first_direction(direction, size, availableOtherDir) ⇒ Boolean
Inform sizer about the first direction that has been decided (by parent item).
-
#initialize(*args) ⇒ BoxSizer
constructor
A new instance of BoxSizer.
-
#reposition_children(minSize) ⇒ void
Method which must be overridden in the derived sizer classes.
-
#set_orientation(orient) ⇒ void
(also: #orientation=)
Sets the orientation of the box sizer, either Orientation::VERTICAL or Orientation::HORIZONTAL.
Methods inherited from Sizer
#add, #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::BoxSizer #initialize(orient) {|sizer| ... } ⇒ Wx::BoxSizer
Returns a new instance of BoxSizer.
33 |
# File 'lib/wx/doc/gen/box_sizer.rb', line 33 def initialize(*args) end |
Instance Method Details
#add_spacer(size) ⇒ Wx::SizerItem
Adds non-stretchable space to the main orientation of the sizer only.
More readable way of calling:
if box_sizer.vertical?
box_sizer.add(0, size, 0)
else
box_size.add(size, 0, 0)
end
47 |
# File 'lib/wx/doc/gen/box_sizer.rb', line 47 def add_spacer(size) end |
#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.
53 |
# File 'lib/wx/doc/gen/box_sizer.rb', line 53 def calc_min; end |
#get_orientation ⇒ Integer Also known as: orientation
Returns the orientation of the box sizer, either Orientation::VERTICAL or Orientation::HORIZONTAL.
57 |
# File 'lib/wx/doc/gen/box_sizer.rb', line 57 def get_orientation; end |
#inform_first_direction(direction, size, availableOtherDir) ⇒ Boolean
Inform sizer about the first direction that has been decided (by parent item).
Returns true if it made use of the information (and recalculated min size).
80 |
# File 'lib/wx/doc/gen/box_sizer.rb', line 80 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.
71 |
# File 'lib/wx/doc/gen/box_sizer.rb', line 71 def reposition_children(minSize) end |
#set_orientation(orient) ⇒ void Also known as: orientation=
This method returns an undefined value.
Sets the orientation of the box sizer, either Orientation::VERTICAL or Orientation::HORIZONTAL.
63 |
# File 'lib/wx/doc/gen/box_sizer.rb', line 63 def set_orientation(orient) end |