# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::RBN # {Wx::RBN::RibbonControl} serves as a base class for all controls which share the ribbon characteristics of having a ribbon art provider, and (optionally) non-continuous resizing. # Despite what the name may imply, it is not the top-level control for creating a ribbon interface - that is {Wx::RBN::RibbonBar}. # Ribbon controls often have a region which is "transparent", and shows the contents of the ribbon page or panel behind it. If implementing a new ribbon control, then it may be useful to realise that this effect is done by the art provider when painting the background of the control, and hence in the paint handler for the new control, you should call a draw background method on the art provider ({Wx::RBN::RibbonArtProvider#draw_button_bar_background} and {Wx::RBN::RibbonArtProvider#draw_tool_bar_background} typically just redraw what is behind the rectangle being painted) if you want transparent regions. # === # # Category: Ribbon User Interface # class RibbonControl < Control # @overload initialize() # Constructor. # @return [Wx::RBN::RibbonControl] # @overload initialize(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::ControlNameStr) # Constructor. # If parent is a {Wx::RBN::RibbonControl} with a non-NULL art provider, then the art provider of new control is set to that of parent. # @param parent [Wx::Window] # @param id [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param validator [Wx::Validator] # @param name [String] # @return [Wx::RBN::RibbonControl] def initialize(*args) end # Set the art provider to be used. # In many cases, setting the art provider will also set the art provider on all child windows which extend {Wx::RBN::RibbonControl}. # In most cases, controls will not take ownership of the given pointer, with the notable exception being {Wx::RBN::RibbonBar#set_art_provider}. # @param art [Wx::RBN::RibbonArtProvider] # @return [void] def set_art_provider(art) end alias_method :art_provider=, :set_art_provider # Get the art provider to be used. # Note that until an art provider has been set in some way, this function may return NULL. # @return [Wx::RBN::RibbonArtProvider] def get_art_provider; end alias_method :art_provider, :get_art_provider # # true if this window can take any size (greater than its minimum size), false if it can only take certain sizes. # @see Wx::RBN::RibbonControl#get_next_smaller_size # # @see Wx::RBN::RibbonControl#get_next_larger_size # @return [Boolean] def is_sizing_continuous; end alias_method :sizing_continuous?, :is_sizing_continuous # @overload get_next_smaller_size(direction) # If sizing is not continuous, then return a suitable size for the control which is smaller than the current size. # The current size if there is no smaller size, otherwise a suitable size which is smaller in the given direction(s), and the same as the current size in the other direction (if any). # @see Wx::RBN::RibbonControl#is_sizing_continuous # @param direction [Wx::Orientation] The direction(s) in which the size should reduce. # @return [Wx::Size] # @overload get_next_smaller_size(direction, relative_to) # If sizing is not continuous, then return a suitable size for the control which is smaller than the given size. # relative_to if there is no smaller size, otherwise a suitable size which is smaller in the given direction(s), and the same as relative_to in the other direction (if any). # @see Wx::RBN::RibbonControl#is_sizing_continuous # # @see Wx::RBN::RibbonControl#do_get_next_smaller_size # @param direction [Wx::Orientation] The direction(s) in which the size should reduce. # @param relative_to [Wx::Size] The size for which a smaller size should be found. # @return [Wx::Size] def get_next_smaller_size(*args) end alias_method :next_smaller_size, :get_next_smaller_size # @overload get_next_larger_size(direction) # If sizing is not continuous, then return a suitable size for the control which is larger than the current size. # The current size if there is no larger size, otherwise a suitable size which is larger in the given direction(s), and the same as the current size in the other direction (if any). # @see Wx::RBN::RibbonControl#is_sizing_continuous # @param direction [Wx::Orientation] The direction(s) in which the size should increase. # @return [Wx::Size] # @overload get_next_larger_size(direction, relative_to) # If sizing is not continuous, then return a suitable size for the control which is larger than the given size. # relative_to if there is no larger size, otherwise a suitable size which is larger in the given direction(s), and the same as relative_to in the other direction (if any). # @see Wx::RBN::RibbonControl#is_sizing_continuous # # @see Wx::RBN::RibbonControl#do_get_next_larger_size # @param direction [Wx::Orientation] The direction(s) in which the size should increase. # @param relative_to [Wx::Size] The size for which a larger size should be found. # @return [Wx::Size] def get_next_larger_size(*args) end alias_method :next_larger_size, :get_next_larger_size # Perform initial size and layout calculations after children have been added, and/or realize children. # @return [Boolean] def realize; end # Alias for {Wx::RBN::RibbonControl#realize}. # @return [Boolean] def realise; end # Get the first ancestor which is a {Wx::RBN::RibbonBar} (or derived) or NULL if not having such parent. # @return [Wx::RBN::RibbonBar] def get_ancestor_ribbon_bar; end alias_method :ancestor_ribbon_bar, :get_ancestor_ribbon_bar # Finds the best width and height given the parent's width and height. # Used to implement the {Wx::RBN::RibbonPanelOption::RIBBON_PANEL_FLEXIBLE} panel style. # @param parentSize [Array(Integer, Integer), Wx::Size] # @return [Wx::Size] def get_best_size_for_parent_size(parentSize) end alias_method :best_size_for_parent_size, :get_best_size_for_parent_size end # RibbonControl end