# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # The {Wx::SizerItem} class is used to track the position, size and other attributes of each item managed by a {Wx::Sizer}. # It is not usually necessary to use this class because the sizer elements can also be identified by their positions or window or sizer pointers but sometimes it may be more convenient to use it directly. # === # # Category: Window Layout # class SizerItem < Object # @overload assign_spacer(size) # Set the size of the spacer tracked by this item. # Old spacer, if any, is deleted. # @param size [Array(Integer, Integer), Wx::Size] # @return [void] # @overload assign_spacer(w, h) # Set the size of the spacer tracked by this item. # Old spacer, if any, is deleted. # @param w [Integer] # @param h [Integer] # @return [void] def assign_spacer(*args) end # @overload set_ratio(width, height) # Set the ratio item attribute. # @param width [Integer] # @param height [Integer] # @return [void] # @overload set_ratio(size) # Set the ratio item attribute. # @param size [Wx::Size] # @return [void] # @overload set_ratio(ratio) # Set the ratio item attribute. # @param ratio [Float] # @return [void] def set_ratio(*args) end alias_method :ratio=, :set_ratio # Set the window to be tracked by this item. # This is a low-level method which is dangerous if used incorrectly, avoid using it if possible, i.e. if higher level methods such as {Wx::Sizer#replace} can be used instead. # # If the sizer item previously contained a window, it is dissociated from the sizer containing this sizer item (if any), but this object doesn't have the pointer to the containing sizer and so it's the caller's responsibility to call {Wx::Window#set_containing_sizer} on window. Failure to do this can result in memory corruption when the window is destroyed later, so it is crucial to not forget to do it. # Also note that the previously contained window is not deleted, so it's also the callers responsibility to do it, if necessary. # @param window [Wx::Window] # @return [void] def assign_window(window) end # Set the sizer tracked by this item. # Old sizer, if any, is deleted. # @param sizer [Wx::Sizer] # @return [void] def assign_sizer(sizer) end # Calculates the minimum desired size for the item, including any space needed by borders. # @return [Wx::Size] def calc_min; end # Destroy the window or the windows in a subsizer, depending on the type of item. # @return [void] def delete_windows; end # Enable deleting the SizerItem without destroying the contained sizer. # @return [void] def detach_sizer; end # Return the border attribute. # @return [Integer] def get_border; end alias_method :border, :get_border # Return the flags attribute. # See wxSizer flags list for details. # @return [Integer] def get_flag; end alias_method :flag, :get_flag # Return the numeric id of {Wx::SizerItem}, or {Wx::StandardID::ID_NONE} if the id has not been set. # @return [Integer] def get_id; end alias_method :id, :get_id # Get the minimum size needed for the item. # @return [Wx::Size] def get_min_size; end alias_method :min_size, :get_min_size # @overload set_min_size(size) # Sets the minimum size to be allocated for this item. # If this item is a window, the size is also passed to {Wx::Window#set_min_size}. # @param size [Array(Integer, Integer), Wx::Size] # @return [void] # @overload set_min_size(x, y) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param x [Integer] # @param y [Integer] # @return [void] def set_min_size(*args) end alias_method :min_size=, :set_min_size # What is the current position of the item, as set in the last Layout. # @return [Wx::Point] def get_position; end alias_method :position, :get_position # Get the proportion item attribute. # @return [Integer] def get_proportion; end alias_method :proportion, :get_proportion # Get the ratio item attribute. # @return [Float] def get_ratio; end alias_method :ratio, :get_ratio # Get the rectangle of the item on the parent window, excluding borders. # @return [Wx::Rect] def get_rect; end alias_method :rect, :get_rect # Get the current size of the item, as set in the last Layout. # @return [Wx::Size] def get_size; end alias_method :size, :get_size # If this item is tracking a sizer, return it. # NULL otherwise. # @return [Wx::Sizer] def get_sizer; end alias_method :sizer, :get_sizer # If this item is tracking a spacer, return its size. # @return [Wx::Size] def get_spacer; end alias_method :spacer, :get_spacer # Get the userData item attribute. # @return [Wx::Object] def get_user_data; end alias_method :user_data, :get_user_data # If this item is tracking a window then return it. # NULL otherwise. # @return [Wx::Window] def get_window; end alias_method :window, :get_window # Returns true if this item is a window or a spacer and it is shown or if this item is a sizer and not all of its elements are hidden. # In other words, for sizer items, all of the child elements must be hidden for the sizer itself to be considered hidden. # As an exception, if the {Wx::SizerFlagBits::RESERVE_SPACE_EVEN_IF_HIDDEN} flag was used for this sizer item, then {Wx::SizerItem#is_shown} always returns true for it (see {Wx::SizerFlags#reserve_space_even_if_hidden}). # @return [true,false] def is_shown; end alias_method :shown?, :is_shown # Is this item a sizer? # @return [true,false] def is_sizer; end alias_method :sizer?, :is_sizer # Is this item a spacer? # @return [true,false] def is_spacer; end alias_method :spacer?, :is_spacer # Is this item a window? # @return [true,false] def is_window; end alias_method :window?, :is_window # Set the border item attribute. # @param border [Integer] # @return [void] def set_border(border) end alias_method :border=, :set_border # Set the position and size of the space allocated to the sizer, and adjust the position and size of the item to be within that space taking alignment and borders into account. # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @return [void] def set_dimension(pos, size) end # Set the flag item attribute. # @param flag [Integer] # @return [void] def set_flag(flag) end alias_method :flag=, :set_flag # Sets the numeric id of the {Wx::SizerItem} to id. # @param id [Integer] # @return [void] def set_id(id) end alias_method :id=, :set_id # Sets the minimum size to be allocated for this item. # This is identical to {Wx::SizerItem#set_min_size}, prefer to use the other function, as its name is more clear. # @param x [Integer] # @param y [Integer] # @return [void] def set_init_size(x, y) end # Set the proportion item attribute. # @param proportion [Integer] # @return [void] def set_proportion(proportion) end alias_method :proportion=, :set_proportion # @param userData [Wx::Object] # @return [void] def set_user_data(userData) end alias_method :user_data=, :set_user_data # Set the show item attribute, which sizers use to determine if the item is to be made part of the layout or not. # If the item is tracking a window then it is shown or hidden as needed. # @param show [true,false] # @return [void] def show(show) end end # SizerItem end