# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation 
# generator. Do not alter this file.
# :startdoc:


module Wx

  # This class represents the events generated by book controls ({Wx::Notebook}, {Wx::Listbook}, {Wx::Choicebook}, {Wx::Treebook}, {Wx::AUI::AuiNotebook}).
  # The PAGE_CHANGING events are sent before the current page is changed. It allows the program to examine the current page (which can be retrieved with {Wx::BookCtrlEvent#get_old_selection}) and to veto the page change by calling {Wx::NotifyEvent#veto} if, for example, the current values in the controls of the old page are invalid.
  # The PAGE_CHANGED events are sent after the page has been changed and the program cannot veto it any more, it just informs it about the page change.
  # To summarize, if the program is interested in validating the page values before allowing the user to change it, it should process the PAGE_CHANGING event, otherwise PAGE_CHANGED is probably enough. In any case, it is probably unnecessary to process both events at once.
  # === 
  # 
  # Category:  {Wx::Events}, Book Controls
  # @see Wx::Notebook
  # @see  Wx::Listbook
  # @see  Wx::Choicebook
  # @see  Wx::Treebook
  # @see  Wx::Toolbook
  # @see  Wx::AUI::AuiNotebook 
  # 
  # 
  class BookCtrlEvent < NotifyEvent
  
    # Constructor (used internally by wxWidgets only).
    # @param eventType [Integer] 
    # @param id [Integer] 
    # @param sel [Integer] 
    # @param oldSel [Integer] 
    # @return [BookCtrlEvent]
    def initialize(eventType=Wx::EVT_NULL, id=0, sel=Wx::NOT_FOUND, oldSel=Wx::NOT_FOUND) end
    
    # Returns the page that was selected before the change, {Wx::NOT_FOUND} if none was selected.
    # @return [Integer]
    def get_old_selection; end
    alias_method :old_selection, :get_old_selection
    
    # Returns the currently selected page, or {Wx::NOT_FOUND} if none was selected.
    # under Windows, {Wx::BookCtrlEvent#get_selection} will return the same value as {Wx::BookCtrlEvent#get_old_selection} when called from the EVT_BOOKCTRL_PAGE_CHANGING handler and not the page which is going to be selected.
    # @return [Integer]
    def get_selection; end
    alias_method :selection, :get_selection
    
    # Sets the id of the page selected before the change.
    # @param page [Integer] 
    # @return [void]
    def set_old_selection(page) end
    alias_method :old_selection=, :set_old_selection
    
    # Sets the selection member variable.
    # @param page [Integer] 
    # @return [void]
    def set_selection(page) end
    alias_method :selection=, :set_selection
    
  end # BookCtrlEvent
  

end