# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # BK_DEFAULT = 0 # BK_TOP = 16 # BK_BOTTOM = 32 # BK_LEFT = 64 # BK_RIGHT = 128 # BK_ALIGN_MASK = 240 # No tab at the specified point. # BK_HITTEST_NOWHERE = 1 # The point is over an icon. # BK_HITTEST_ONICON = 2 # The point is over a tab label. # BK_HITTEST_ONLABEL = 4 # The point if over a tab item but not over its icon or label. # BK_HITTEST_ONITEM = 16 # The point is over the page area. # BK_HITTEST_ONPAGE = 8 # A book control is a convenient way of displaying multiple pages of information, displayed one page at a time. # wxWidgets has five variants of this control: # # - {Wx::Choicebook}: controlled by a {Wx::Choice} # - {Wx::Listbook}: controlled by a {Wx::ListCtrl} # - {Wx::Notebook}: uses a row of tabs # - {Wx::Treebook}: controlled by a {Wx::TreeCtrl} # - {Wx::Toolbook}: controlled by a {Wx::ToolBar} # # This abstract class is the parent of all these book controls, and provides their basic interface. This is a pure virtual class so you cannot allocate it directly. # === # # Category: Book Controls # @see wxBookCtrl Overview # # class BookCtrlBase < Control include Wx::WithImages # Symbolic constant indicating that no image should be used. # NO_IMAGE = -1 # Returns the image index for the given page. # @param nPage [Integer] # @return [Integer] def get_page_image(nPage) end alias_method :page_image, :get_page_image # Sets the image index for the given page. # image is an index into the image list which was set with {Wx::BookCtrlBase#set_image_list}. # @param page [Integer] # @param image [Integer] # @return [true,false] def set_page_image(page, image) end # Returns the string for the given page. # @param nPage [Integer] # @return [String] def get_page_text(nPage) end alias_method :page_text, :get_page_text # Sets the text for the given page. # @param page [Integer] # @param text [String] # @return [true,false] def set_page_text(page, text) end # Returns the currently selected page, or {Wx::NOT_FOUND} if none was selected. # Note that this method may return either the previously or newly selected page when called from the EVT_BOOKCTRL_PAGE_CHANGED handler depending on the platform and so {Wx::BookCtrlEvent#get_selection} should be used instead in this case. # @return [Integer] def get_selection; end alias_method :selection, :get_selection # Returns the currently selected page or NULL. # @return [Wx::Window] def get_current_page; end alias_method :current_page, :get_current_page # Sets the selection to the given page, returning the previous selection. # Notice that the call to this function generates the page changing events, use the {Wx::BookCtrlBase#change_selection} function if you don't want these events to be generated. # @see Wx::BookCtrlBase#get_selection # @param page [Integer] # @return [Integer] def set_selection(page) end alias_method :selection=, :set_selection # Cycles through the tabs. # The call to this function generates the page changing events. # @param forward [true,false] # @return [void] def advance_selection(forward=true) end # Changes the selection to the given page, returning the previous selection. # This function behaves as {Wx::BookCtrlBase#set_selection} but does not generate the page changing events. # See User Generated Events vs Programmatically Generated Events for more information. # @param page [Integer] # @return [Integer] def change_selection(page) end # Returns the index of the specified tab window or {Wx::NOT_FOUND} if not found. # The zero-based tab index or {Wx::NOT_FOUND} if not found. # @param page [Wx::Window] One of the control pages. # @return [Integer] def find_page(page) end # Adds a new page. # The page must have the book control itself as the parent and must not have been added to this control previously. # The call to this function will generate the page changing and page changed events if select is true, but not when inserting the very first page (as there is no previous page selection to switch from in this case and so it wouldn't make sense to e.g. veto such event). # # true if successful, false otherwise. # # Do not delete the page, it will be deleted by the book control. # @see Wx::BookCtrlBase#insert_page # @param page [Wx::Window] Specifies the new page. # @param text [String] Specifies the text for the new page. # @param select [true,false] Specifies whether the page should be selected. # @param imageId [Integer] Specifies the optional image index for the new page. # @return [true,false] def add_page(page, text, select=false, imageId=Wx::AUI::AuiMDIClientWindow::NO_IMAGE) end # Deletes all pages. # @return [true,false] def delete_all_pages; end # Deletes the specified page, and the associated window. # The call to this function generates the page changing events when deleting the currently selected page or a page preceding it in the index order, but it does not send any events when deleting the last page: while in this case the selection also changes, it becomes invalid and for compatibility reasons the control never generates events with the invalid selection index. # @param page [Integer] # @return [true,false] def delete_page(page) end # Inserts a new page at the specified position. # true if successful, false otherwise. # # Do not delete the page, it will be deleted by the book control. # @see Wx::BookCtrlBase#add_page # @param index [Integer] Specifies the position for the new page. # @param page [Wx::Window] Specifies the new page. # @param text [String] Specifies the text for the new page. # @param select [true,false] Specifies whether the page should be selected. # @param imageId [Integer] Specifies the optional image index for the new page. # @return [true,false] def insert_page(index, page, text, select=false, imageId=Wx::AUI::AuiMDIClientWindow::NO_IMAGE) end # Deletes the specified page, without deleting the associated window. # See {Wx::BookCtrlBase#delete_page} for a note about the events generated by this function. # @param page [Integer] # @return [true,false] def remove_page(page) end # Returns the number of pages in the control. # @return [Integer] def get_page_count; end alias_method :page_count, :get_page_count # Returns the window at the given page position. # @param page [Integer] # @return [Wx::Window] def get_page(page) end alias_method :page, :get_page # Returns the sizer containing the control for page selection, if any. # Some derived classes, e.g. {Wx::Choicebook}, use a separate control for switching the currently selected page and this function returns the sizer used for positioning this control and the pages themselves inside the book control. # Note that many classes, notably {Wx::Notebook}, do not use any such control, and this function simply returns NULL for them. # Non-owning pointer to the sizer or NULL. # @return [Wx::Sizer] def get_control_sizer; end alias_method :control_sizer, :get_control_sizer # @overload initialize() # Default ctor. # @return [BookCtrlBase] # @overload initialize(parent, winid, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=('')) # Constructs the book control with the given parameters. # See {Wx::BookCtrlBase#create} for two-step construction. # @param parent [Wx::Window] # @param winid [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param name [String] # @return [BookCtrlBase] def initialize(*args) end # Constructs the book control with the given parameters. # @param parent [Wx::Window] # @param winid [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, winid, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=('')) end # Sets the width and height of the pages. # This method is currently not implemented for {Wx::GTK}. # @param size [Array(Integer, Integer), Wx::Size] # @return [void] def set_page_size(size) end alias_method :page_size=, :set_page_size # Returns the index of the tab at the specified position or {Wx::NOT_FOUND} if none. # If flags parameter is non-NULL, the position of the point inside the tab is returned as well. # # Returns the zero-based tab index or {Wx::NOT_FOUND} if there is no tab at the specified position. # @param pt [Array(Integer, Integer), Wx::Point] Specifies the point for the hit test. # @return [Array(Integer,Integer)] def hit_test(pt) end end # BookCtrlBase end