Class: Wx::BoxSizer

Inherits:
Sizer show all
Defined in:
lib/wx/doc/gen/box_sizer.rb

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

See Also:

Instance Method Summary collapse

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, #inform_first_direction, #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

Constructor for a Wx::BoxSizer.

orient may be either of Orientation::VERTICAL or Orientation::HORIZONTAL for creating either a column sizer or a row sizer.

Parameters:

  • orient (Integer)


25
# File 'lib/wx/doc/gen/box_sizer.rb', line 25

def initialize(orient) 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

Parameters:

  • size (Integer)

Returns:



39
# File 'lib/wx/doc/gen/box_sizer.rb', line 39

def add_spacer(size) end

#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:



45
# File 'lib/wx/doc/gen/box_sizer.rb', line 45

def calc_min; end

#get_orientationInteger Also known as: orientation

Returns the orientation of the box sizer, either Orientation::VERTICAL or Orientation::HORIZONTAL.

Returns:

  • (Integer)


49
# File 'lib/wx/doc/gen/box_sizer.rb', line 49

def get_orientation; 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)


63
# File 'lib/wx/doc/gen/box_sizer.rb', line 63

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.

Parameters:

  • orient (Integer)


55
# File 'lib/wx/doc/gen/box_sizer.rb', line 55

def set_orientation(orient) end