# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # TBK_BUTTONBAR = 256 # TBK_HORZ_LAYOUT = 32768 # # EVT_TOOLBOOK_PAGE_CHANGED = 10091 # # EVT_TOOLBOOK_PAGE_CHANGING = 10090 # {Wx::Toolbook} is a class similar to {Wx::Notebook} but which uses a {Wx::ToolBar} to show the labels instead of the tabs. # There is no documentation for this class yet but its usage is identical to {Wx::Notebook} (except for the features clearly related to tabs only), so please refer to that class documentation for now. You can also use the Notebook Sample to see {Wx::Toolbook} in action. # One feature of this class not supported by {Wx::BookCtrlBase} is the support for disabling some of the pages, see {Wx::Toolbook#enable_page}. # === Styles # # This class supports the following styles: # # - {Wx::TBK_BUTTONBAR}: Use {Wx::ButtonToolBar}-based implementation under macOS (ignored under other platforms). # - {Wx::TBK_HORZ_LAYOUT}: Shows the text and the icons alongside, not vertically stacked (only implement under Windows and GTK 2 platforms as it relies on {Wx::TB_HORZ_LAYOUT} flag support). # # The common {Wx::BookCtrl} styles described in the wxBookCtrl Overview are also supported. # === Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::BookCtrlEvent} events. # Event handler methods for events emitted by this class: # - {Wx::EvtHandler#evt_toolbook_page_changed}(id, meth = nil, &block): The page selection was changed. Processes a {Wx::EVT_TOOLBOOK_PAGE_CHANGED} event. # - {Wx::EvtHandler#evt_toolbook_page_changing}(id, meth = nil, &block): The page selection is about to be changed. Processes a {Wx::EVT_TOOLBOOK_PAGE_CHANGING} event. This event can be vetoed (using {Wx::NotifyEvent#veto}). # # === # # Category: Book Controls # @see wxBookCtrl Overview # @see Wx::BookCtrlBase # @see Wx::Notebook # @see Notebook Sample # # class Toolbook < BookCtrlBase # @overload initialize() # Constructs a choicebook control. # @return [Toolbook] # @overload initialize(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=('')) # Constructs a choicebook control. # @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 name [String] # @return [Toolbook] def initialize(*args) end # Create the tool book control that has already been constructed with the 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] # @param name [String] # @return [true,false] def create(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=('')) end # Returns the {Wx::ToolBarBase} associated with the control. # @return [Wx::ToolBarBase] def get_tool_bar; end alias_method :tool_bar, :get_tool_bar # @overload enable_page(page, enable) # Enables or disables the specified page. # Using this function, a page can be disabled when it can't be used, while still remaining present to let the users know that more functionality is available, even if currently inaccessible. # Icons for disabled pages are created by {Wx::Bitmap#convert_to_disabled}. # # true if successful, false otherwise (currently only if the index is invalid). # @param page [Integer] The index of the page. # @param enable [true,false] true to enable the page and false to disable it. # @return [true,false] # @overload enable_page(page, enable) # Enables or disables the specified page. # This is similar to the overload above, but finds the index of the specified page. # # true if successful, false otherwise, e.g. if page is not one of the pages of this control. # @param page [Wx::Window] Pointer of a page windows inside the book control. # @param enable [true,false] true to enable the page and false to disable it. # @return [true,false] def enable_page(*args) end end # Toolbook end