# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # A flex grid sizer is a sizer which lays out its children in a two-dimensional table with all table fields in one row having the same height and all fields in one column having the same width, but all rows or all columns are not necessarily the same height or width as in the {Wx::GridSizer}. # Since wxWidgets 2.5.0, {Wx::FlexGridSizer} can also size items equally in one direction but unequally ("flexibly") in the other. If the sizer is only flexible in one direction (this can be changed using {Wx::FlexGridSizer#set_flexible_direction}), it needs to be decided how the sizer should grow in the other ("non-flexible") direction in order to fill the available space. The {Wx::FlexGridSizer#set_non_flexible_grow_mode} method serves this purpose. # === # # Category: Window Layout # @see Wx::Sizer # @see Sizers Overview # # class FlexGridSizer < GridSizer # @overload initialize(cols, vgap, hgap) # {Wx::FlexGridSizer} constructors. # Please see {Wx::GridSizer::GridSizer} documentation. # @param cols [Integer] # @param vgap [Integer] # @param hgap [Integer] # @return [FlexGridSizer] # @overload initialize(cols, gap=(Wx::Size.new(0, 0))) # {Wx::FlexGridSizer} constructors. # Please see {Wx::GridSizer::GridSizer} documentation. # @param cols [Integer] # @param gap [Array(Integer, Integer), Wx::Size] # @return [FlexGridSizer] # @overload initialize(rows, cols, vgap, hgap) # {Wx::FlexGridSizer} constructors. # Please see {Wx::GridSizer::GridSizer} documentation. # @param rows [Integer] # @param cols [Integer] # @param vgap [Integer] # @param hgap [Integer] # @return [FlexGridSizer] # @overload initialize(rows, cols, gap) # {Wx::FlexGridSizer} constructors. # Please see {Wx::GridSizer::GridSizer} documentation. # @param rows [Integer] # @param cols [Integer] # @param gap [Array(Integer, Integer), Wx::Size] # @return [FlexGridSizer] def initialize(*args) end # Specifies that column idx (starting from zero) should be grown if there is extra space available to the sizer. # The proportion parameter has the same meaning as the stretch factor for the sizers (see {Wx::BoxSizer}) except that if all proportions are 0, then all columns are resized equally (instead of not being resized at all). # Notice that the column must not be already growable, if you need to change the proportion you must call {Wx::FlexGridSizer#remove_growable_col} first and then make it growable (with a different proportion) again. You can use {Wx::FlexGridSizer#is_col_growable} to check whether a column is already growable. # @param idx [Integer] # @param proportion [Integer] # @return [void] def add_growable_col(idx, proportion=0) end # Specifies that row idx (starting from zero) should be grown if there is extra space available to the sizer. # This is identical to {Wx::FlexGridSizer#add_growable_col} except that it works with rows and not columns. # @param idx [Integer] # @param proportion [Integer] # @return [void] def add_growable_row(idx, proportion=0) end # Returns a {Wx::Orientation} value that specifies whether the sizer flexibly resizes its columns, rows, or both (default). # One of the following values: # - {Wx::Orientation::VERTICAL}: Rows are flexibly sized.- {Wx::Orientation::HORIZONTAL}: Columns are flexibly sized.- {Wx::Orientation::BOTH}: Both rows and columns are flexibly sized (this is the default value). # @see Wx::FlexGridSizer#set_flexible_direction # @return [Integer] def get_flexible_direction; end alias_method :flexible_direction, :get_flexible_direction # Returns the value that specifies how the sizer grows in the "non-flexible" direction if there is one. # The behaviour of the elements in the flexible direction (i.e. both rows and columns by default, or rows only if {Wx::FlexGridSizer#get_flexible_direction} is {Wx::Orientation::VERTICAL} or columns only if it is {Wx::Orientation::HORIZONTAL}) is always governed by their proportion as specified in the call to {Wx::FlexGridSizer#add_growable_row} or {Wx::FlexGridSizer#add_growable_col}. What happens in the other direction depends on the value of returned by this function as described below. # One of the following values: # - {Wx::FlexSizerGrowMode::FLEX_GROWMODE_NONE}: Sizer doesn't grow its elements at all in the non-flexible direction.- {Wx::FlexSizerGrowMode::FLEX_GROWMODE_SPECIFIED}: Sizer honors growable columns/rows set with {Wx::FlexGridSizer#add_growable_col} and {Wx::FlexGridSizer#add_growable_row} in the non-flexible direction as well. In this case equal sizing applies to minimum sizes of columns or rows (this is the default value).- {Wx::FlexSizerGrowMode::FLEX_GROWMODE_ALL}: Sizer equally stretches all columns or rows in the non-flexible direction, independently of the proportions applied in the flexible direction. # @see Wx::FlexGridSizer#set_flexible_direction # @see Wx::FlexGridSizer#set_non_flexible_grow_mode # @return [FlexSizerGrowMode] def get_non_flexible_grow_mode; end alias_method :non_flexible_grow_mode, :get_non_flexible_grow_mode # Returns true if column idx is growable. # @param idx [Integer] # @return [true,false] def is_col_growable(idx) end alias_method :col_growable?, :is_col_growable # Returns true if row idx is growable. # @param idx [Integer] # @return [true,false] def is_row_growable(idx) end alias_method :row_growable?, :is_row_growable # Specifies that the idx column index is no longer growable. # @param idx [Integer] # @return [void] def remove_growable_col(idx) end # Specifies that the idx row index is no longer growable. # @param idx [Integer] # @return [void] def remove_growable_row(idx) end # Specifies whether the sizer should flexibly resize its columns, rows, or both. # Argument direction can be {Wx::Orientation::VERTICAL}, {Wx::Orientation::HORIZONTAL} or {Wx::Orientation::BOTH} (which is the default value). Any other value is ignored. # See {Wx::FlexGridSizer#get_flexible_direction} for the explanation of these values. Note that this method does not trigger relayout. # @param direction [Integer] # @return [void] def set_flexible_direction(direction) end alias_method :flexible_direction=, :set_flexible_direction # Specifies how the sizer should grow in the non-flexible direction if there is one (so {Wx::FlexGridSizer#set_flexible_direction} must have been called previously). # Argument mode can be one of those documented in {Wx::FlexGridSizer#get_non_flexible_grow_mode}, please see there for their explanation. Note that this method does not trigger relayout. # @param mode [FlexSizerGrowMode] # @return [void] def set_non_flexible_grow_mode(mode) end alias_method :non_flexible_grow_mode=, :set_non_flexible_grow_mode # Returns a read-only array containing the heights of the rows in the sizer. # @return [Wx::ArrayInt] def get_row_heights; end alias_method :row_heights, :get_row_heights # Returns a read-only array containing the widths of the columns in the sizer. # @return [Wx::ArrayInt] def get_col_widths; end alias_method :col_widths, :get_col_widths # 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 {Wx::FlexGridSizer#calc_min}. # Note that you should never call this method directly, call {Wx::FlexGridSizer#layout} instead if you need to manually update the sizer elements positions. This method is only called by wxWidgets itself. # @param minSize [Array(Integer, Integer), Wx::Size] # @return [void] def reposition_children(minSize) end # This method is abstract and has to be overwritten by any derived class. # Here, the sizer will do the actual calculation of its children's minimal sizes. # @return [Wx::Size] def calc_min; end end # FlexGridSizer end