# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::AUI # {Wx::AUI::AuiToolBar} is a dockable toolbar, part of the {Wx::AUI} class framework. # # See also wxAUI Overview. # The appearance of this class is configurable and can be changed by calling {Wx::AUI::AuiToolBar#set_art_provider}. By default, native art provider is used if available (currently only in WXMSW) and {Wx::AuiGenericToolBarArt} otherwise. # ### Styles # # This class supports the following styles: # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_TEXT}: Display the label strings on the toolbar buttons. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_NO_TOOLTIPS}: Do not show tooltips for the toolbar items. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_NO_AUTORESIZE}: Do not automatically resize the toolbar when new tools are added. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_GRIPPER}: Show the toolbar's gripper control. If the toolbar is added to an AUI pane that contains a gripper, this style will be automatically set. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_OVERFLOW}: Show an overflow menu containing toolbar items that can't fit on the toolbar if it is too small. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_VERTICAL}: Using this style forces the toolbar to be vertical and be only dockable to the left or right sides of the window whereas by default it can be horizontal or vertical and be docked anywhere. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_HORZ_LAYOUT}: # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_HORIZONTAL}: Analogous to {Wx::AUI::AuiToolBarStyle::AUI_TB_VERTICAL}, but forces the toolbar to be horizontal. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_PLAIN_BACKGROUND}: Draw a plain background (based on parent) instead of the default gradient background. # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_HORZ_TEXT}: Equivalent to {Wx::AUI::AuiToolBarStyle::AUI_TB_HORZ_LAYOUT} | {Wx::AUI::AuiToolBarStyle::AUI_TB_TEXT} # # - {Wx::AUI::AuiToolBarStyle::AUI_TB_DEFAULT_STYLE}: The default is to have no styles. # # ### Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::AUI::AuiToolBarEvent} events. # Event handler methods for events emitted by this class: # # - {Wx::EvtHandler#evt_auitoolbar_tool_dropdown}(id, meth = nil, &block): Process a {Wx::AUI::EVT_AUITOOLBAR_TOOL_DROPDOWN} event # # - {Wx::EvtHandler#evt_auitoolbar_overflow_click}(id, meth = nil, &block): Process a {Wx::AUI::EVT_AUITOOLBAR_OVERFLOW_CLICK} event # # - {Wx::EvtHandler#evt_auitoolbar_right_click}(id, meth = nil, &block): Process a {Wx::AUI::EVT_AUITOOLBAR_RIGHT_CLICK} event # # - {Wx::EvtHandler#evt_auitoolbar_middle_click}(id, meth = nil, &block): Process a {Wx::AUI::EVT_AUITOOLBAR_MIDDLE_CLICK} event # # - {Wx::EvtHandler#evt_auitoolbar_begin_drag}(id, meth = nil, &block): Process a {Wx::AUI::EVT_AUITOOLBAR_BEGIN_DRAG} event # # Category: Window Docking (wxAUI) # # @wxrb_require USE_AUI class AuiToolBar < Control # @overload initialize() # Default constructor, use {Wx::AUI::AuiToolBar#create} later. # @return [Wx::AUI::AuiToolBar] # @overload initialize(parent, id=Wx::StandardID::ID_ANY, position=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::AUI::AuiToolBarStyle::AUI_TB_DEFAULT_STYLE) # Constructor creating and initializing the object. # @param parent [Wx::Window] # @param id [Integer] # @param position [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @return [Wx::AUI::AuiToolBar] def initialize(*args) end # Really create {Wx::AUI::AuiToolBar} created using default constructor. # @param parent [Wx::Window] # @param id [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @return [Boolean] def create(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::AUI::AuiToolBarStyle::AUI_TB_DEFAULT_STYLE) end # Sets the style of the window. # # Please note that some styles cannot be changed after the window creation and that {Wx::AUI::AuiToolBar#refresh} might need to be called after changing the others for the change to take place immediately. # See Window styles for more information about flags. # @see Wx::AUI::AuiToolBar#get_window_style_flag # @param style [Integer] # @return [void] def set_window_style_flag(style) end alias_method :window_style_flag=, :set_window_style_flag # Gets the window style that was passed to the constructor or {Wx::AUI::AuiToolBar#create} method. # # {Wx::AUI::AuiToolBar#get_window_style} is another name for the same function. # @return [Integer] def get_window_style_flag; end alias_method :window_style_flag, :get_window_style_flag # @param art [Wx::AUI::AuiToolBarArt] # @return [void] def set_art_provider(art) end alias_method :art_provider=, :set_art_provider # @return [Wx::AUI::AuiToolBarArt] def get_art_provider; end alias_method :art_provider, :get_art_provider # Sets the font for this window. # # This function should not be called for the parent window if you don't want its font to be inherited by its children, use {Wx::AUI::AuiToolBar#set_own_font} instead in this case and see {Wx::AUI::AuiToolBar#inherit_attributes} for more explanations. # Please notice that the given font is not automatically used for {Wx::PaintDC} objects associated with this window, you need to call {Wx::DC#set_font} too. However this font is used by any standard controls for drawing their text as well as by {Wx::AUI::AuiToolBar#get_text_extent}. # # true if the font was really changed, false if it was already set to this font and nothing was done. # @see Wx::AUI::AuiToolBar#get_font # @see Wx::AUI::AuiToolBar#inherit_attributes # @param font [Wx::Font,Wx::FontInfo] Font to associate with this window, pass {Wx::NULL_FONT} to reset to the default font. # @return [Boolean] def set_font(font) end alias_method :font=, :set_font # @overload add_tool(toolId, label, bitmap, short_help_string=(''), kind=Wx::ItemKind::ITEM_NORMAL) # @param toolId [Integer] # @param label [String] # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @param short_help_string [String] # @param kind [Wx::ItemKind] # @return [Wx::AUI::AuiToolBarItem] # @overload add_tool(toolId, label, bitmap, disabled_bitmap, kind, short_help_string, long_help_string, client_data) # @param toolId [Integer] # @param label [String] # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @param disabled_bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @param kind [Wx::ItemKind] # @param short_help_string [String] # @param long_help_string [String] # @param client_data [Wx::Object] # @return [Wx::AUI::AuiToolBarItem] # @overload add_tool(toolId, bitmap, disabled_bitmap, toggle=false, client_data=nil, short_help_string=(''), long_help_string=('')) # @param toolId [Integer] # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @param disabled_bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @param toggle [Boolean] # @param client_data [Wx::Object] # @param short_help_string [String] # @param long_help_string [String] # @return [Wx::AUI::AuiToolBarItem] def add_tool(*args) end # @param toolId [Integer] # @param label [String] # @param width [Integer] # @return [Wx::AUI::AuiToolBarItem] def add_label(toolId, label=(''), width=-1) end # @param control [Wx::Control] # @param label [String] # @return [Wx::AUI::AuiToolBarItem] def add_control(control, label=('')) end # @return [Wx::AUI::AuiToolBarItem] def add_separator; end # @param pixels [Integer] # @return [Wx::AUI::AuiToolBarItem] def add_spacer(pixels) end # @param proportion [Integer] # @return [Wx::AUI::AuiToolBarItem] def add_stretch_spacer(proportion=1) end # @return [Boolean] def realize; end # @param window_id [Integer] # @return [Wx::Control] def find_control(window_id) end # @param x [Integer] # @param y [Integer] # @return [Wx::AUI::AuiToolBarItem] def find_tool_by_position(x, y) end # @param idx [Integer] # @return [Wx::AUI::AuiToolBarItem] def find_tool_by_index(idx) end # @param toolId [Integer] # @return [Wx::AUI::AuiToolBarItem] def find_tool(toolId) end # @return [void] def clear_tools; end # @return [void] def clear; end # Destroys the tool with the given ID and its associated window, if any. # # true if the tool was destroyed or false otherwise, e.g. if the tool with the given ID was not found. # @param toolId [Integer] ID of a previously added tool. # @return [Boolean] def destroy_tool(toolId) end # Destroys the tool at the given position and its associated window, if any. # # true if the tool was destroyed or false otherwise, e.g. if the provided index is out of range. # @param idx [Integer] The index, or position, of a previously added tool. # @return [Boolean] def destroy_tool_by_index(idx) end # Removes the tool with the given ID from the toolbar. # # Note that if this tool was added by {Wx::AUI::AuiToolBar#add_control}, the associated control is not deleted and must either be reused (e.g. by reparenting it under a different window) or destroyed by caller. If this behaviour is unwanted, prefer using {Wx::AUI::AuiToolBar#destroy_tool} instead. # # true if the tool was removed or false otherwise, e.g. if the tool with the given ID was not found. # @param toolId [Integer] ID of a previously added tool. # @return [Boolean] def delete_tool(toolId) end # Removes the tool at the given position from the toolbar. # # Note that if this tool was added by {Wx::AUI::AuiToolBar#add_control}, the associated control is not deleted and must either be reused (e.g. by reparenting it under a different window) or destroyed by caller. If this behaviour is unwanted, prefer using {Wx::AUI::AuiToolBar#destroy_tool_by_index} instead. # # true if the tool was removed or false otherwise, e.g. if the provided index is out of range. # @param idx [Integer] The index, or position, of a previously added tool. # @return [Boolean] def delete_by_index(idx) end # @return [Integer] def get_tool_count; end alias_method :tool_count, :get_tool_count # @param toolId [Integer] # @return [Integer] def get_tool_pos(toolId) end alias_method :tool_pos, :get_tool_pos # @param toolId [Integer] # @return [Integer] def get_tool_index(toolId) end alias_method :tool_index, :get_tool_index # @param toolId [Integer] # @return [Boolean] def get_tool_fits(toolId) end alias_method :tool_fits, :get_tool_fits # @param toolId [Integer] # @return [Wx::Rect] def get_tool_rect(toolId) end alias_method :tool_rect, :get_tool_rect # @param toolId [Integer] # @return [Boolean] def get_tool_fits_by_index(toolId) end alias_method :tool_fits_by_index, :get_tool_fits_by_index # @return [Boolean] def get_tool_bar_fits; end alias_method :tool_bar_fits, :get_tool_bar_fits # @overload set_margins(size) # @param size [Array(Integer, Integer), Wx::Size] # @return [void] # @overload set_margins(x, y) # @param x [Integer] # @param y [Integer] # @return [void] # @overload set_margins(left, right, top, bottom) # @param left [Integer] # @param right [Integer] # @param top [Integer] # @param bottom [Integer] # @return [void] def set_margins(*args) end alias_method :margins=, :set_margins # @param size [Array(Integer, Integer), Wx::Size] # @return [void] def set_tool_bitmap_size(size) end alias_method :tool_bitmap_size=, :set_tool_bitmap_size # @return [Wx::Size] def get_tool_bitmap_size; end alias_method :tool_bitmap_size, :get_tool_bitmap_size # @return [Boolean] def get_overflow_visible; end alias_method :overflow_visible, :get_overflow_visible # @param visible [Boolean] # @return [void] def set_overflow_visible(visible) end alias_method :overflow_visible=, :set_overflow_visible # @return [Boolean] def get_gripper_visible; end alias_method :gripper_visible, :get_gripper_visible # @param visible [Boolean] # @return [void] def set_gripper_visible(visible) end alias_method :gripper_visible=, :set_gripper_visible # @param toolId [Integer] # @param state [Boolean] # @return [void] def toggle_tool(toolId, state) end # @param toolId [Integer] # @return [Boolean] def get_tool_toggled(toolId) end alias_method :tool_toggled, :get_tool_toggled # @param toolId [Integer] # @param state [Boolean] # @return [void] def enable_tool(toolId, state) end # @param toolId [Integer] # @return [Boolean] def get_tool_enabled(toolId) end alias_method :tool_enabled, :get_tool_enabled # Set whether the specified toolbar item has a drop down button. # # This is only valid for {Wx::ItemKind::ITEM_NORMAL} tools. # @see Wx::AUI::AuiToolBarItem#set_has_drop_down # @param toolId [Integer] # @param dropdown [Boolean] # @return [void] def set_tool_drop_down(toolId, dropdown) end # Returns whether the specified toolbar item has an associated drop down button. # # # @see Wx::AUI::AuiToolBarItem#has_drop_down # @param toolId [Integer] # @return [Boolean] def get_tool_drop_down(toolId) end alias_method :tool_drop_down, :get_tool_drop_down # @param padding [Integer] # @return [void] def set_tool_border_padding(padding) end alias_method :tool_border_padding=, :set_tool_border_padding # @return [Integer] def get_tool_border_padding; end alias_method :tool_border_padding, :get_tool_border_padding # @param orientation [Integer] # @return [void] def set_tool_text_orientation(orientation) end alias_method :tool_text_orientation=, :set_tool_text_orientation # @return [Integer] def get_tool_text_orientation; end alias_method :tool_text_orientation, :get_tool_text_orientation # @param packing [Integer] # @return [void] def set_tool_packing(packing) end alias_method :tool_packing=, :set_tool_packing # @return [Integer] def get_tool_packing; end alias_method :tool_packing, :get_tool_packing # @param toolId [Integer] # @param proportion [Integer] # @return [void] def set_tool_proportion(toolId, proportion) end # @param toolId [Integer] # @return [Integer] def get_tool_proportion(toolId) end alias_method :tool_proportion, :get_tool_proportion # @param separation [Integer] # @return [void] def set_tool_separation(separation) end alias_method :tool_separation=, :set_tool_separation # @return [Integer] def get_tool_separation; end alias_method :tool_separation, :get_tool_separation # @param toolId [Integer] # @param sticky [Boolean] # @return [void] def set_tool_sticky(toolId, sticky) end # @param toolId [Integer] # @return [Boolean] def get_tool_sticky(toolId) end alias_method :tool_sticky, :get_tool_sticky # @param toolId [Integer] # @return [String] def get_tool_label(toolId) end alias_method :tool_label, :get_tool_label # @param toolId [Integer] # @param label [String] # @return [void] def set_tool_label(toolId, label) end # @param toolId [Integer] # @return [Wx::Bitmap] def get_tool_bitmap(toolId) end alias_method :tool_bitmap, :get_tool_bitmap # @param toolId [Integer] # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image] # @return [void] def set_tool_bitmap(toolId, bitmap) end # @param toolId [Integer] # @return [String] def get_tool_short_help(toolId) end alias_method :tool_short_help, :get_tool_short_help # @param toolId [Integer] # @param help_string [String] # @return [void] def set_tool_short_help(toolId, help_string) end # @param toolId [Integer] # @return [String] def get_tool_long_help(toolId) end alias_method :tool_long_help, :get_tool_long_help # @param toolId [Integer] # @param help_string [String] # @return [void] def set_tool_long_help(toolId, help_string) end # Add toolbar items that are always displayed in the overflow menu. # # If there are custom items set, then the overflow menu will be displayed even if there are no items from the main toolbar that overflow. # #
# Note: #

The toolbar must have the {Wx::AUI::AuiToolBarStyle::AUI_TB_OVERFLOW} style. #

#
# @param prepend [Array,nil] are the items to show before any overflow items # @param append [Array,nil] are the items to show after any overflow items # @return [void] def set_custom_overflow_items(prepend, append) end # get size of hint rectangle for a particular dock location # @param dock_direction [Integer] # @return [Wx::Size] def get_hint_size(dock_direction) end alias_method :hint_size, :get_hint_size # @param pane [Wx::AUI::AuiPaneInfo] # @return [Boolean] def is_pane_valid(pane) end alias_method :pane_valid?, :is_pane_valid end # AuiToolBar end