# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # The predefined constants for the number of times we propagate event upwards window child-parent chain. # # # class EventPropagation < Wx::Enum # don't propagate it at all # EVENT_PROPAGATE_NONE = Wx::EventPropagation.new(0) # propagate it until it is processed # EVENT_PROPAGATE_MAX = Wx::EventPropagation.new(2147483647) end # EventPropagation # The different categories for a {Wx::Event}; see {Wx::Event#get_event_category}. # # They are used as OR-combinable flags by Wx::EventLoopBase::YieldFor. # class EventCategory < Wx::Enum # This is the category for those events which are generated to update the appearance of the GUI but which (usually) do not comport data processing, i.e. # EVT_CATEGORY_UI = Wx::EventCategory.new(1) # This category groups those events which are generated directly from the user through input devices like mouse and keyboard and usually result in data to be processed from the application (e.g. # EVT_CATEGORY_USER_INPUT = Wx::EventCategory.new(2) # This category is for {Wx::SocketEvent}. # EVT_CATEGORY_SOCKET = Wx::EventCategory.new(4) # This category is for {Wx::TimerEvent}. # EVT_CATEGORY_TIMER = Wx::EventCategory.new(8) # This category is for any event used to send notifications from the secondary threads to the main one or in general for notifications among different threads (which may or may not be user-generated). # EVT_CATEGORY_THREAD = Wx::EventCategory.new(16) # This mask is used in Wx::EventLoopBase::YieldFor to specify that all event categories should be processed. # EVT_CATEGORY_ALL = Wx::EventCategory.new(127) end # EventCategory # Flags for categories of keys. # # These values are used by {Wx::KeyEvent#is_key_in_category}. They may be combined via the bitwise operators |, &, and ~. # class KeyCategoryFlags < Wx::Enum # arrow keys, on and off numeric keypads # K_CATEGORY_ARROW = Wx::KeyCategoryFlags.new(1) # page up and page down keys, on and off numeric keypads # K_CATEGORY_PAGING = Wx::KeyCategoryFlags.new(2) # home and end keys, on and off numeric keypads # K_CATEGORY_JUMP = Wx::KeyCategoryFlags.new(4) # tab key, on and off numeric keypads # K_CATEGORY_TAB = Wx::KeyCategoryFlags.new(8) # backspace and delete keys, on and off numeric keypads # K_CATEGORY_CUT = Wx::KeyCategoryFlags.new(16) # union of {Wx::K_CATEGORY}_ARROW, {Wx::K_CATEGORY}_PAGING, and {Wx::K_CATEGORY}_JUMP categories # K_CATEGORY_NAVIGATION = Wx::KeyCategoryFlags.new(7) end # KeyCategoryFlags # # JOYSTICK1 = 0 # # JOYSTICK2 = 1 # # JOY_BUTTON_ANY = -1 # # JOY_BUTTON1 = 1 # # JOY_BUTTON2 = 2 # # JOY_BUTTON3 = 4 # # JOY_BUTTON4 = 8 # The possibles modes to pass to {Wx::UpdateUIEvent.set_mode}. # # # class UpdateUIMode < Wx::Enum # Send UI update events to all windows. # UPDATE_UI_PROCESS_ALL = Wx::UpdateUIMode.new(0) # Send UI update events to windows that have the {Wx::WS_EX_PROCESS_UI_UPDATES} flag specified. # UPDATE_UI_PROCESS_SPECIFIED = Wx::UpdateUIMode.new(1) end # UpdateUIMode # Possible axis values for mouse wheel scroll events. # # # class MouseWheelAxis < Wx::Enum # Vertical scroll event. # MOUSE_WHEEL_VERTICAL = Wx::MouseWheelAxis.new(0) # Horizontal scroll event. # MOUSE_WHEEL_HORIZONTAL = Wx::MouseWheelAxis.new(1) end # MouseWheelAxis # See {Wx::IdleEvent.set_mode} for more info. # # # class IdleMode < Wx::Enum # Send idle events to all windows. # IDLE_PROCESS_ALL = Wx::IdleMode.new(0) # Send idle events to windows that have the {Wx::WS_EX_PROCESS_IDLE} flag specified. # IDLE_PROCESS_SPECIFIED = Wx::IdleMode.new(1) end # IdleMode # A special event type usually used to indicate that some {Wx::Event} has yet no type assigned. # EVT_NULL = 10000 # # EVT_ANY = -1 # # EVT_BUTTON = 10202 # # EVT_CHECKBOX = 10203 # # EVT_CHOICE = 10204 # # EVT_LISTBOX = 10205 # # EVT_LISTBOX_DCLICK = 10206 # # EVT_CHECKLISTBOX = 10207 # # EVT_MENU = 10208 # # EVT_SLIDER = 10209 # # EVT_RADIOBOX = 10210 # # EVT_RADIOBUTTON = 10211 # # EVT_SCROLLBAR = 10212 # # EVT_VLBOX = 10213 # # EVT_COMBOBOX = 10214 # # EVT_TOOL_RCLICKED = 10215 # # EVT_TOOL_DROPDOWN = 10217 # # EVT_TOOL_ENTER = 10216 # # EVT_COMBOBOX_DROPDOWN = 10218 # # EVT_COMBOBOX_CLOSEUP = 10219 # # EVT_THREAD = 10002 # # EVT_LEFT_DOWN = 10220 # # EVT_LEFT_UP = 10221 # # EVT_MIDDLE_DOWN = 10222 # # EVT_MIDDLE_UP = 10223 # # EVT_RIGHT_DOWN = 10224 # # EVT_RIGHT_UP = 10225 # # EVT_MOTION = 10226 # # EVT_ENTER_WINDOW = 10227 # # EVT_LEAVE_WINDOW = 10228 # # EVT_LEFT_DCLICK = 10229 # # EVT_MIDDLE_DCLICK = 10230 # # EVT_RIGHT_DCLICK = 10231 # # EVT_SET_FOCUS = 10232 # # EVT_KILL_FOCUS = 10233 # # EVT_CHILD_FOCUS = 10234 # # EVT_MOUSEWHEEL = 10235 # # EVT_MAGNIFY = 10242 # # EVT_AUX1_DOWN = 10236 # # EVT_AUX1_UP = 10237 # # EVT_AUX1_DCLICK = 10238 # # EVT_AUX2_DOWN = 10239 # # EVT_AUX2_UP = 10240 # # EVT_AUX2_DCLICK = 10241 # # EVT_CHAR = 10243 # # EVT_CHAR_HOOK = 10245 # # EVT_NAVIGATION_KEY = 10246 # # EVT_KEY_DOWN = 10247 # # EVT_KEY_UP = 10248 # # EVT_SET_CURSOR = 10250 # # EVT_SCROLL_TOP = 10251 # # EVT_SCROLL_BOTTOM = 10252 # # EVT_SCROLL_LINEUP = 10253 # # EVT_SCROLL_LINEDOWN = 10254 # # EVT_SCROLL_PAGEUP = 10255 # # EVT_SCROLL_PAGEDOWN = 10256 # # EVT_SCROLL_THUMBTRACK = 10257 # # EVT_SCROLL_THUMBRELEASE = 10258 # # EVT_SCROLL_CHANGED = 10259 # # EVT_SPIN_UP = 10253 # # EVT_SPIN_DOWN = 10254 # # EVT_SPIN = 10257 # # EVT_SCROLLWIN_TOP = 10260 # # EVT_SCROLLWIN_BOTTOM = 10261 # # EVT_SCROLLWIN_LINEUP = 10262 # # EVT_SCROLLWIN_LINEDOWN = 10263 # # EVT_SCROLLWIN_PAGEUP = 10264 # # EVT_SCROLLWIN_PAGEDOWN = 10265 # # EVT_SCROLLWIN_THUMBTRACK = 10266 # # EVT_SCROLLWIN_THUMBRELEASE = 10267 # # EVT_GESTURE_PAN = 10268 # # EVT_GESTURE_ZOOM = 10269 # # EVT_GESTURE_ROTATE = 10270 # # EVT_TWO_FINGER_TAP = 10271 # # EVT_LONG_PRESS = 10272 # # EVT_PRESS_AND_TAP = 10273 # # EVT_SIZE = 10274 # # EVT_MOVE = 10276 # # EVT_CLOSE_WINDOW = 10280 # # EVT_END_SESSION = 10281 # # EVT_QUERY_END_SESSION = 10282 # # EVT_ACTIVATE_APP = 10284 # # EVT_ACTIVATE = 10285 # # EVT_CREATE = 10286 # # EVT_DESTROY = 10287 # # EVT_SHOW = 10288 # # EVT_ICONIZE = 10289 # # EVT_MAXIMIZE = 10290 # # EVT_FULLSCREEN = 10291 # # EVT_MOUSE_CAPTURE_CHANGED = 10292 # # EVT_MOUSE_CAPTURE_LOST = 10293 # # EVT_PAINT = 10294 # # EVT_ERASE_BACKGROUND = 10295 # # EVT_NC_PAINT = 10296 # # EVT_MENU_OPEN = 10297 # # EVT_MENU_CLOSE = 10298 # # EVT_MENU_HIGHLIGHT = 10299 # # EVT_CONTEXT_MENU = 10300 # # EVT_SYS_COLOUR_CHANGED = 10301 # # EVT_DISPLAY_CHANGED = 10302 # # EVT_DPI_CHANGED = 10303 # # EVT_QUERY_NEW_PALETTE = 10304 # # EVT_PALETTE_CHANGED = 10305 # # EVT_JOY_BUTTON_DOWN = 10306 # # EVT_JOY_BUTTON_UP = 10307 # # EVT_JOY_MOVE = 10308 # # EVT_JOY_ZMOVE = 10309 # # EVT_DROP_FILES = 10310 # # EVT_INIT_DIALOG = 10311 # # EVT_IDLE = 10001 # # EVT_UPDATE_UI = 10312 # # EVT_SIZING = 10275 # # EVT_MOVING = 10277 # # EVT_MOVE_START = 10278 # # EVT_MOVE_END = 10279 # # EVT_HIBERNATE = 10283 # # EVT_TEXT_COPY = 10313 # # EVT_TEXT_CUT = 10314 # # EVT_TEXT_PASTE = 10315 # # EVT_COMMAND_LEFT_CLICK = 10316 # # EVT_COMMAND_LEFT_DCLICK = 10317 # # EVT_COMMAND_RIGHT_CLICK = 10318 # # EVT_COMMAND_RIGHT_DCLICK = 10319 # # EVT_COMMAND_SET_FOCUS = 10320 # # EVT_COMMAND_KILL_FOCUS = 10321 # # EVT_COMMAND_ENTER = 10322 # # EVT_HELP = 10323 # # EVT_DETAILED_HELP = 10324 # # EVT_TOOL = 10208 # # EVT_WINDOW_MODAL_DIALOG_CLOSED = 10182 # Generates a new unique event type. # Usually this function is only used by {define_event} and not called directly. # @return [Wx::AUI::AuiMDIChildFrame::EventType] def self.new_event_type; end # In a GUI application, this function posts event to the specified dest object using {Wx::EvtHandler#add_pending_event}. # Otherwise, it dispatches event immediately using {Wx::EvtHandler#process_event}. See the respective documentation for details (and caveats). Because of limitation of {Wx::EvtHandler#add_pending_event} this function is not thread-safe for event objects having {Wx::String} fields, use {queue_event} instead. # @param dest [Wx::EvtHandler] # @param event [Wx::Event] # @return [void] def self.post_event(dest, event) end # An event is a structure holding information about an event passed to a callback or member function. # {Wx::Event} used to be a multipurpose event object, and is an abstract base class for other event classes (see below). # For more information about events, see the Events and Event Handling overview. # # === # # Category: {Wx::Events} # @see Wx::CommandEvent # @see Wx::MouseEvent # # class Event < Object # Returns the object (usually a window) associated with the event, if any. # @return [Wx::Object] def get_event_object; end alias_method :event_object, :get_event_object # Returns the identifier of the given event type, such as {Wx::EVT_BUTTON}. # @return [Wx::AUI::AuiMDIChildFrame::EventType] def get_event_type; end alias_method :event_type, :get_event_type # Returns a generic category for this event. # {Wx::Event} implementation returns {Wx::EventCategory::EVT_CATEGORY_UI} by default. # This function is used to selectively process events in Wx::EventLoopBase::YieldFor. # @return [EventCategory] def get_event_category; end alias_method :event_category, :get_event_category # Returns the identifier associated with this event, such as a button command id. # @return [Integer] def get_id; end alias_method :id, :get_id # Returns true if the event handler should be skipped, false otherwise. # @return [true,false] def get_skipped; end alias_method :skipped, :get_skipped # Gets the timestamp for the event. # The timestamp is the time in milliseconds since some fixed moment (not necessarily the standard Unix Epoch, so only differences between the timestamps and not their absolute values usually make sense). # wxWidgets returns a non-NULL timestamp only for mouse and key events (see {Wx::MouseEvent} and {Wx::KeyEvent}). # @return [Integer] def get_timestamp; end alias_method :timestamp, :get_timestamp # Returns true if the event is or is derived from {Wx::CommandEvent} else it returns false. # exists only for optimization purposes. # @return [true,false] def is_command_event; end alias_method :command_event?, :is_command_event # Sets the propagation level to the given value (for example returned from an earlier call to {Wx::Event#stop_propagation}). # @param propagationLevel [Integer] # @return [void] def resume_propagation(propagationLevel) end # Sets the originating object. # @param object [Wx::Object] # @return [void] def set_event_object(object) end alias_method :event_object=, :set_event_object # Sets the event type. # @param type [Wx::AUI::AuiMDIChildFrame::EventType] # @return [void] def set_event_type(type) end alias_method :event_type=, :set_event_type # Sets the identifier associated with this event, such as a button command id. # @param id [Integer] # @return [void] def set_id(id) end alias_method :id=, :set_id # Sets the timestamp for the event. # @param timeStamp [Integer] # @return [void] def set_timestamp(timeStamp=0) end alias_method :timestamp=, :set_timestamp # Test if this event should be propagated or not, i.e. if the propagation level is currently greater than 0. # @return [true,false] def should_propagate; end # This method can be used inside an event handler to control whether further event handlers bound to this event will be called after the current one returns. # Without {Wx::Event#skip} (or equivalently if Skip(false) is used), the event will not be processed any more. If Skip(true) is called, the event processing system continues searching for a further handler function for this event, even though it has been processed already in the current handler. # In general, it is recommended to skip all non-command events to allow the default handling to take place. The command events are, however, normally not skipped as usually a single command such as a button click or menu item selection must only be processed by one handler. # @param skip [true,false] # @return [void] def skip(skip=true) end # Stop the event from propagating to its parent window. # Returns the old propagation level value which may be later passed to {Wx::Event#resume_propagation} to allow propagating the event again. # @return [Integer] def stop_propagation; end end # Event # This event class contains information about command events, which originate from a variety of simple controls. # Note that {Wx::CommandEvents} and {Wx::CommandEvent}-derived event classes by default and unlike other {Wx::Event}-derived classes propagate upward from the source window (the window which emits the event) up to the first parent which processes the event. Be sure to read How Events Propagate Upwards. # More complex controls, such as {Wx::TreeCtrl}, have separate command event classes. # === Events using this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::CommandEvent} events. # Event handler methods: # # - {Wx::EvtHandler#evt_command}(id, event, meth = nil, &block): Process a command, supplying the window identifier, command event identifier, and member function. # # - {Wx::EvtHandler#evt_command_range}(id1, id2, event, meth = nil, &block): Process a command for a range of window identifiers, supplying the minimum and maximum window identifiers, command event identifier, and member function. # # - {Wx::EvtHandler#evt_button}(id, meth = nil, &block): Process a {Wx::EVT_BUTTON} command, which is generated by a {Wx::Button} control. # # - {Wx::EvtHandler#evt_checkbox}(id, meth = nil, &block): Process a {Wx::EVT_CHECKBOX} command, which is generated by a {Wx::CheckBox} control. # # - {Wx::EvtHandler#evt_choice}(id, meth = nil, &block): Process a {Wx::EVT_CHOICE} command, which is generated by a {Wx::Choice} control. # # - {Wx::EvtHandler#evt_combobox}(id, meth = nil, &block): Process a {Wx::EVT_COMBOBOX} command, which is generated by a {Wx::ComboBox} control. # # - {Wx::EvtHandler#evt_listbox}(id, meth = nil, &block): Process a {Wx::EVT_LISTBOX} command, which is generated by a {Wx::ListBox} control. # # - {Wx::EvtHandler#evt_listbox_dclick}(id, meth = nil, &block): Process a {Wx::EVT_LISTBOX_DCLICK} command, which is generated by a {Wx::ListBox} control. # # - {Wx::EvtHandler#evt_checklistbox}(id, meth = nil, &block): Process a {Wx::EVT_CHECKLISTBOX} command, which is generated by a {Wx::CheckListBox} control. # # - {Wx::EvtHandler#evt_menu}(id, meth = nil, &block): Process a {Wx::EVT_MENU} command, which is generated by a menu item. # # - {Wx::EvtHandler#evt_menu_range}(id1, id2, meth = nil, &block): Process a {Wx::EVT_MENU} command, which is generated by a range of menu items. # # - {Wx::EvtHandler#evt_context_menu}(meth = nil, &block): Process the event generated when the user has requested a popup menu to appear by pressing a special keyboard key (under Windows) or by right clicking the mouse. # # - {Wx::EvtHandler#evt_radiobox}(id, meth = nil, &block): Process a {Wx::EVT_RADIOBOX} command, which is generated by a {Wx::RadioBox} control. # # - {Wx::EvtHandler#evt_radiobutton}(id, meth = nil, &block): Process a {Wx::EVT_RADIOBUTTON} command, which is generated by a {Wx::RadioButton} control. # # - {Wx::EvtHandler#evt_scrollbar}(id, meth = nil, &block): Process a {Wx::EVT_SCROLLBAR} command, which is generated by a {Wx::ScrollBar} control. This is provided for compatibility only; more specific scrollbar event macros should be used instead (see {Wx::ScrollEvent}). # # - {Wx::EvtHandler#evt_slider}(id, meth = nil, &block): Process a {Wx::EVT_SLIDER} command, which is generated by a {Wx::Slider} control. # # - {Wx::EvtHandler#evt_text}(id, meth = nil, &block): Process a {Wx::EVT_TEXT} command, which is generated by a {Wx::TextCtrl} control. # # - {Wx::EvtHandler#evt_text_enter}(id, meth = nil, &block): Process a {Wx::EVT_TEXT_ENTER} command, which is generated by a {Wx::TextCtrl} control. Note that you must use {Wx::TE_PROCESS_ENTER} flag when creating the control if you want it to generate such events. # # - {Wx::EvtHandler#evt_text_maxlen}(id, meth = nil, &block): Process a {Wx::EVT_TEXT_MAXLEN} command, which is generated by a {Wx::TextCtrl} control when the user tries to enter more characters into it than the limit previously set with SetMaxLength(). # # - {Wx::EvtHandler#evt_togglebutton}(id, meth = nil, &block): Process a {Wx::EVT_TOGGLEBUTTON} event. # # - {Wx::EvtHandler#evt_tool}(id, meth = nil, &block): Process a {Wx::EVT_TOOL} event (a synonym for {Wx::EVT_MENU}). Pass the id of the tool. # # - {Wx::EvtHandler#evt_tool_range}(id1, id2, meth = nil, &block): Process a {Wx::EVT_TOOL} event for a range of identifiers. Pass the ids of the tools. # # - {Wx::EvtHandler#evt_tool_rclicked}(id, meth = nil, &block): Process a {Wx::EVT_TOOL_RCLICKED} event. Pass the id of the tool. (Not available on wxOSX.) # # - {Wx::EvtHandler#evt_tool_rclicked_range}(id1, id2, meth = nil, &block): Process a {Wx::EVT_TOOL_RCLICKED} event for a range of ids. Pass the ids of the tools. (Not available on wxOSX.) # # - {Wx::EvtHandler#evt_tool_enter}(id, meth = nil, &block): Process a {Wx::EVT_TOOL_ENTER} event. Pass the id of the toolbar itself. The value of {Wx::CommandEvent#get_selection} is the tool id, or -1 if the mouse cursor has moved off a tool. (Not available on wxOSX.) # # - {Wx::EvtHandler#evt_command_left_click}(id, meth = nil, &block): Process a {Wx::EVT_COMMAND_LEFT_CLICK} command, which is generated by a control (wxMSW only). # # - {Wx::EvtHandler#evt_command_left_dclick}(id, meth = nil, &block): Process a {Wx::EVT_COMMAND_LEFT_DCLICK} command, which is generated by a control (wxMSW only). # # - {Wx::EvtHandler#evt_command_right_click}(id, meth = nil, &block): Process a {Wx::EVT_COMMAND_RIGHT_CLICK} command, which is generated by a control (wxMSW only). # # - {Wx::EvtHandler#evt_command_set_focus}(id, meth = nil, &block): Process a {Wx::EVT_COMMAND_SET_FOCUS} command, which is generated by a control (wxMSW only). # # - {Wx::EvtHandler#evt_command_kill_focus}(id, meth = nil, &block): Process a {Wx::EVT_COMMAND_KILL_FOCUS} command, which is generated by a control (wxMSW only). # # - {Wx::EvtHandler#evt_command_enter}(id, meth = nil, &block): Process a {Wx::EVT_COMMAND_ENTER} command, which is generated by a control. # # === # # Category: {Wx::Events} # class CommandEvent < Event # Constructor. # @param commandEventType [Wx::AUI::AuiMDIChildFrame::EventType] # @param id [Integer] # @return [Wx::CommandEvent] def initialize(commandEventType=Wx::EVT_NULL, id=0) end # Returns client data pointer for a listbox or choice selection event (not valid for a deselection). # @return [Object] def get_client_data; end alias_method :client_data, :get_client_data # Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox. # For a menu item, this method returns -1 if the item is not checkable or a boolean value (true or false) for checkable items indicating the new state of the item. # @return [Integer] def get_int; end alias_method :int, :get_int # Returns item index for a listbox or choice selection event (not valid for a deselection). # @return [Integer] def get_selection; end alias_method :selection, :get_selection # Returns item string for a listbox or choice selection event. # If one or several items have been deselected, returns the index of the first deselected item. If some items have been selected and others deselected at the same time, it will return the index of the first selected item. # @return [String] def get_string; end alias_method :string, :get_string # This method can be used with checkbox and menu events: for the checkboxes, the method returns true for a selection event and false for a deselection one. # For the menu events, this method indicates if the menu item just has become checked or unchecked (and thus only makes sense for checkable menu items). # Notice that this method cannot be used with {Wx::CheckListBox} currently. # @return [true,false] def is_checked; end alias_method :checked?, :is_checked # For a listbox or similar event, returns true if it is a selection, false if it is a deselection. # If some items have been selected and others deselected at the same time, it will return true. # @return [true,false] def is_selection; end alias_method :selection?, :is_selection # Sets the client data for this event. # @param clientData [Object] # @return [void] def set_client_data(clientData) end alias_method :client_data=, :set_client_data # Sets the m_extraLong member. # @param extraLong [Integer] # @return [void] def set_extra_long(extraLong) end alias_method :extra_long=, :set_extra_long # Sets the m_commandInt member. # @param intCommand [Integer] # @return [void] def set_int(intCommand) end alias_method :int=, :set_int # Sets the m_commandString member. # @param string [String] # @return [void] def set_string(string) end alias_method :string=, :set_string end # CommandEvent end