Class: Wx::MouseEvent
Overview
This event class contains information about the events generated by the mouse: they include mouse buttons press and release events and mouse move events.
All mouse events involving the buttons use Wx::MouseButton::MOUSE_BTN_LEFT for the left mouse button, Wx::MouseButton::MOUSE_BTN_MIDDLE for the middle one and Wx::MouseButton::MOUSE_BTN_RIGHT for the right one. And if the system supports more buttons, the Wx::MouseButton::MOUSE_BTN_AUX1 and Wx::MouseButton::MOUSE_BTN_AUX2 events can also be generated. Note that not all mice have even a middle button so a portable application should avoid relying on the events from it (but the right button click can be emulated using the left mouse button with the control key under Mac platforms with a single button mouse). For the EVT_ENTER_WINDOW and EVT_LEAVE_WINDOW events purposes, the mouse is considered to be inside the window if it is in the window client area and not inside one of its children. In other words, the parent window receives EVT_LEAVE_WINDOW event not only when the mouse leaves the window entirely but also when it enters one of its children. The position associated with a mouse event is expressed in the window coordinates of the window which generated the event, you can use Window#client_to_screen to convert it to screen coordinates and possibly call Window#screen_to_client next to convert it to window coordinates of another window.
Note the difference between methods like #left_down and the inherited Wx::MouseState#left_is_down: the former returns true when the event corresponds to the left mouse button click while the latter returns true if the left mouse button is currently being pressed. For example, when the user is dragging the mouse you can use LeftIsDown to test whether the left mouse button is (still) depressed. Also, by convention, if #left_down returns true, LeftIsDown will also return true in wxWidgets whatever the underlying GUI behaviour is (which is platform-dependent). The same applies, of course, to other mouse buttons as well.
Events using this class
The following event-handler methods redirect the events to member method or handler blocks for MouseEvent events. Event handler methods:
-
EvtHandler#evt_left_down(meth = nil, &block): Process a EVT_LEFT_DOWN event. The handler of this event should normally call event.Skip() to allow the default processing to take place as otherwise the window under mouse wouldn't get the focus.
-
EvtHandler#evt_left_up(meth = nil, &block): Process a EVT_LEFT_UP event.
-
EvtHandler#evt_left_dclick(meth = nil, &block): Process a EVT_LEFT_DCLICK event.
-
EvtHandler#evt_middle_down(meth = nil, &block): Process a EVT_MIDDLE_DOWN event.
-
EvtHandler#evt_middle_up(meth = nil, &block): Process a EVT_MIDDLE_UP event.
-
EvtHandler#evt_middle_dclick(meth = nil, &block): Process a EVT_MIDDLE_DCLICK event.
-
EvtHandler#evt_right_down(meth = nil, &block): Process a EVT_RIGHT_DOWN event.
-
EvtHandler#evt_right_up(meth = nil, &block): Process a EVT_RIGHT_UP event.
-
EvtHandler#evt_right_dclick(meth = nil, &block): Process a EVT_RIGHT_DCLICK event.
-
EvtHandler#evt_mouse_aux1_down(meth = nil, &block): Process a EVT_AUX1_DOWN event.
-
EvtHandler#evt_mouse_aux1_up(meth = nil, &block): Process a EVT_AUX1_UP event.
-
EvtHandler#evt_mouse_aux1_dclick(meth = nil, &block): Process a EVT_AUX1_DCLICK event.
-
EvtHandler#evt_mouse_aux2_down(meth = nil, &block): Process a EVT_AUX2_DOWN event.
-
EvtHandler#evt_mouse_aux2_up(meth = nil, &block): Process a EVT_AUX2_UP event.
-
EvtHandler#evt_mouse_aux2_dclick(meth = nil, &block): Process a EVT_AUX2_DCLICK event.
-
EvtHandler#evt_motion(meth = nil, &block): Process a EVT_MOTION event.
-
EvtHandler#evt_enter_window(meth = nil, &block): Process a EVT_ENTER_WINDOW event.
-
EvtHandler#evt_leave_window(meth = nil, &block): Process a EVT_LEAVE_WINDOW event.
-
EvtHandler#evt_mousewheel(meth = nil, &block): Process a EVT_MOUSEWHEEL event.
-
EvtHandler#evt_mouse_events(meth = nil, &block): Process all mouse events.
-
EvtHandler#evt_magnify(meth = nil, &block): Process a EVT_MAGNIFY event (new since wxWidgets 3.1.0).
Category: Events
Instance Method Summary collapse
-
#alt_down ⇒ Boolean
Returns true if the Alt key is pressed.
-
#aux1d_click ⇒ Boolean
Returns true if the event was a first extra button double click.
-
#aux1down ⇒ Boolean
Returns true if the first extra button mouse button changed to down.
-
#aux1is_down ⇒ Boolean
Returns true if the first extra button mouse button is currently down.
-
#aux1up ⇒ Boolean
Returns true if the first extra button mouse button changed to up.
-
#aux2d_click ⇒ Boolean
Returns true if the event was a second extra button double click.
-
#aux2down ⇒ Boolean
Returns true if the second extra button mouse button changed to down.
-
#aux2is_down ⇒ Boolean
Returns true if the second extra button mouse button is currently down.
-
#aux2up ⇒ Boolean
Returns true if the second extra button mouse button changed to up.
-
#button(but) ⇒ Boolean
Returns true if the event was generated by the specified button.
-
#button_d_click(but = Wx::MouseButton::MOUSE_BTN_ANY) ⇒ Boolean
If the argument is omitted, this returns true if the event was a mouse double click event.
-
#button_down(but = Wx::MouseButton::MOUSE_BTN_ANY) ⇒ Boolean
If the argument is omitted, this returns true if the event was a mouse button down event.
-
#button_up(but = Wx::MouseButton::MOUSE_BTN_ANY) ⇒ Boolean
If the argument is omitted, this returns true if the event was a mouse button up event.
-
#cmd_down ⇒ Boolean
Returns true if the key used for command accelerators is pressed.
-
#control_down ⇒ Boolean
Returns true if the Control key or Apple/Command key under macOS is pressed.
-
#dragging ⇒ Boolean
Returns true if this was a dragging event (motion while a button is depressed).
-
#entering ⇒ Boolean
Returns true if the mouse was entering the window.
-
#get_button ⇒ Integer
Returns the mouse button which generated this event or Wx::MouseButton::MOUSE_BTN_NONE if no button is involved (for mouse move, enter or leave event, for example).
-
#get_click_count ⇒ Integer
(also: #click_count)
Returns the number of mouse clicks for this event: 1 for a simple click, 2 for a double-click, 3 for a triple-click and so on.
-
#get_columns_per_action ⇒ Integer
(also: #columns_per_action)
Returns the configured number of columns (or whatever) to be scrolled per wheel action.
-
#get_lines_per_action ⇒ Integer
(also: #lines_per_action)
Returns the configured number of lines (or whatever) to be scrolled per wheel action.
-
#get_logical_position(dc) ⇒ Wx::Point
(also: #logical_position)
Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled).
-
#get_magnification ⇒ Float
(also: #magnification)
For magnify (pinch to zoom) events: returns the change in magnification.
-
#get_modifiers ⇒ Integer
(also: #modifiers)
Return the bit mask of all pressed modifier keys.
-
#get_position ⇒ Wx::Point
(also: #position)
Returns the physical mouse position.
-
#get_wheel_axis ⇒ Wx::MouseWheelAxis
(also: #wheel_axis)
Gets the axis the wheel operation concerns.
-
#get_wheel_delta ⇒ Integer
(also: #wheel_delta)
Get wheel delta, normally 120.
-
#get_wheel_rotation ⇒ Integer
(also: #wheel_rotation)
Get wheel rotation, positive or negative indicates direction of rotation.
-
#get_x ⇒ Integer
(also: #x)
Returns X coordinate of the physical mouse event position.
-
#get_y ⇒ Integer
(also: #y)
Returns Y coordinate of the physical mouse event position.
-
#has_any_modifiers ⇒ Boolean
(also: #has_any_modifiers?)
Returns true if any modifiers at all are pressed.
-
#has_modifiers ⇒ Boolean
(also: #has_modifiers?)
Returns true if Control or Alt are pressed.
-
#initialize(mouseEventType = Wx::EVT_NULL) ⇒ Wx::MouseEvent
constructor
Constructor.
-
#is_button ⇒ Boolean
(also: #button?)
Returns true if the event was a mouse button event (not necessarily a button down event - that may be tested using #button_down).
-
#is_page_scroll ⇒ Boolean
(also: #page_scroll?)
Returns true if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling.
-
#is_wheel_inverted ⇒ Boolean
(also: #wheel_inverted?)
On Mac, has the user selected “Natural” scrolling in their System Preferences? Currently false on all other OS’s.
-
#leaving ⇒ Boolean
Returns true if the mouse was leaving the window.
-
#left_d_click ⇒ Boolean
Returns true if the event was a left double click.
-
#left_down ⇒ Boolean
Returns true if the left mouse button changed to down.
-
#left_is_down ⇒ Boolean
Returns true if the left mouse button is currently down.
-
#left_up ⇒ Boolean
Returns true if the left mouse button changed to up.
-
#magnify ⇒ Boolean
Returns true if the event is a magnify (i.e. pinch to zoom) event.
-
#meta_down ⇒ Boolean
Returns true if the Meta key was down at the time of the event.
-
#middle_d_click ⇒ Boolean
Returns true if the event was a middle double click.
-
#middle_down ⇒ Boolean
Returns true if the middle mouse button changed to down.
-
#middle_is_down ⇒ Boolean
Returns true if the middle mouse button is currently down.
-
#middle_up ⇒ Boolean
Returns true if the middle mouse button changed to up.
-
#moving ⇒ Boolean
Returns true if this was a motion event and no mouse buttons were pressed.
-
#raw_control_down ⇒ Boolean
Returns true if the Control key (also under macOS).
-
#right_d_click ⇒ Boolean
Returns true if the event was a right double click.
-
#right_down ⇒ Boolean
Returns true if the right mouse button changed to down.
-
#right_is_down ⇒ Boolean
Returns true if the right mouse button is currently down.
-
#right_up ⇒ Boolean
Returns true if the right mouse button changed to up.
- #set_alt_down(down) ⇒ void (also: #alt_down=)
- #set_aux1down(down) ⇒ void (also: #aux1down=)
- #set_aux2down(down) ⇒ void (also: #aux2down=)
- #set_control_down(down) ⇒ void (also: #control_down=)
- #set_left_down(down) ⇒ void (also: #left_down=)
- #set_meta_down(down) ⇒ void (also: #meta_down=)
- #set_middle_down(down) ⇒ void (also: #middle_down=)
- #set_position(pos) ⇒ void (also: #position=)
- #set_raw_control_down(down) ⇒ void (also: #raw_control_down=)
- #set_right_down(down) ⇒ void (also: #right_down=)
- #set_shift_down(down) ⇒ void (also: #shift_down=)
- #set_state(state) ⇒ void (also: #state=)
- #set_x(x) ⇒ void (also: #x=)
- #set_y(y) ⇒ void (also: #y=)
-
#shift_down ⇒ Boolean
Returns true if the Shift key is pressed.
Methods inherited from Event
#clone, #get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(mouseEventType = Wx::EVT_NULL) ⇒ Wx::MouseEvent
Constructor.
Valid event types are:
382 |
# File 'lib/wx/doc/gen/events.rb', line 382 def initialize(mouseEventType=Wx::EVT_NULL) end |
Instance Method Details
#alt_down ⇒ Boolean
Returns true if the Alt key is pressed.
Notice that #get_modifiers should usually be used instead of this one.
738 |
# File 'lib/wx/doc/gen/events.rb', line 738 def alt_down; end |
#aux1d_click ⇒ Boolean
Returns true if the event was a first extra button double click.
386 |
# File 'lib/wx/doc/gen/events.rb', line 386 def aux1d_click; end |
#aux1down ⇒ Boolean
Returns true if the first extra button mouse button changed to down.
390 |
# File 'lib/wx/doc/gen/events.rb', line 390 def aux1down; end |
#aux1is_down ⇒ Boolean
Returns true if the first extra button mouse button is currently down.
624 |
# File 'lib/wx/doc/gen/events.rb', line 624 def aux1is_down; end |
#aux1up ⇒ Boolean
Returns true if the first extra button mouse button changed to up.
394 |
# File 'lib/wx/doc/gen/events.rb', line 394 def aux1up; end |
#aux2d_click ⇒ Boolean
Returns true if the event was a second extra button double click.
398 |
# File 'lib/wx/doc/gen/events.rb', line 398 def aux2d_click; end |
#aux2down ⇒ Boolean
Returns true if the second extra button mouse button changed to down.
402 |
# File 'lib/wx/doc/gen/events.rb', line 402 def aux2down; end |
#aux2is_down ⇒ Boolean
Returns true if the second extra button mouse button is currently down.
628 |
# File 'lib/wx/doc/gen/events.rb', line 628 def aux2is_down; end |
#aux2up ⇒ Boolean
Returns true if the second extra button mouse button changed to up.
406 |
# File 'lib/wx/doc/gen/events.rb', line 406 def aux2up; end |
#button(but) ⇒ Boolean
Returns true if the event was generated by the specified button.
414 |
# File 'lib/wx/doc/gen/events.rb', line 414 def (but) end |
#button_d_click(but = Wx::MouseButton::MOUSE_BTN_ANY) ⇒ Boolean
If the argument is omitted, this returns true if the event was a mouse double click event.
Otherwise the argument specifies which double click event was generated (see #button for the possible values).
421 |
# File 'lib/wx/doc/gen/events.rb', line 421 def (but=Wx::MouseButton::MOUSE_BTN_ANY) end |
#button_down(but = Wx::MouseButton::MOUSE_BTN_ANY) ⇒ Boolean
If the argument is omitted, this returns true if the event was a mouse button down event.
Otherwise the argument specifies which button-down event was generated (see #button for the possible values).
428 |
# File 'lib/wx/doc/gen/events.rb', line 428 def (but=Wx::MouseButton::MOUSE_BTN_ANY) end |
#button_up(but = Wx::MouseButton::MOUSE_BTN_ANY) ⇒ Boolean
If the argument is omitted, this returns true if the event was a mouse button up event.
Otherwise the argument specifies which button-up event was generated (see #button for the possible values).
435 |
# File 'lib/wx/doc/gen/events.rb', line 435 def (but=Wx::MouseButton::MOUSE_BTN_ANY) end |
#cmd_down ⇒ Boolean
Returns true if the key used for command accelerators is pressed.
Same as #control_down. Deprecated. Notice that #get_modifiers should usually be used instead of this one.
745 |
# File 'lib/wx/doc/gen/events.rb', line 745 def cmd_down; end |
#control_down ⇒ Boolean
Returns true if the Control key or Apple/Command key under macOS is pressed.
This function doesn’t distinguish between right and left control keys. Notice that #get_modifiers should usually be used instead of this one.
718 |
# File 'lib/wx/doc/gen/events.rb', line 718 def control_down; end |
#dragging ⇒ Boolean
Returns true if this was a dragging event (motion while a button is depressed).
442 |
# File 'lib/wx/doc/gen/events.rb', line 442 def dragging; end |
#entering ⇒ Boolean
Returns true if the mouse was entering the window.
449 |
# File 'lib/wx/doc/gen/events.rb', line 449 def entering; end |
#get_button ⇒ Integer
Returns the mouse button which generated this event or Wx::MouseButton::MOUSE_BTN_NONE if no button is involved (for mouse move, enter or leave event, for example).
Otherwise Wx::MouseButton::MOUSE_BTN_LEFT is returned for the left button down, up and double click events, Wx::MouseButton::MOUSE_BTN_MIDDLE and Wx::MouseButton::MOUSE_BTN_RIGHT for the same events for the middle and the right buttons respectively.
455 |
# File 'lib/wx/doc/gen/events.rb', line 455 def ; end |
#get_click_count ⇒ Integer Also known as: click_count
Returns the number of mouse clicks for this event: 1 for a simple click, 2 for a double-click, 3 for a triple-click and so on.
Currently this function is implemented only in WXOSX and returns -1 for the other platforms (you can still distinguish simple clicks from double-clicks as they generate different kinds of events however).
461 |
# File 'lib/wx/doc/gen/events.rb', line 461 def get_click_count; end |
#get_columns_per_action ⇒ Integer Also known as: columns_per_action
Returns the configured number of columns (or whatever) to be scrolled per wheel action.
Default value under most platforms is three.
477 |
# File 'lib/wx/doc/gen/events.rb', line 477 def get_columns_per_action; end |
#get_lines_per_action ⇒ Integer Also known as: lines_per_action
Returns the configured number of lines (or whatever) to be scrolled per wheel action.
Default value under most platforms is three.
469 |
# File 'lib/wx/doc/gen/events.rb', line 469 def get_lines_per_action; end |
#get_logical_position(dc) ⇒ Wx::Point Also known as: logical_position
Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled).
483 |
# File 'lib/wx/doc/gen/events.rb', line 483 def get_logical_position(dc) end |
#get_magnification ⇒ Float Also known as: magnification
For magnify (pinch to zoom) events: returns the change in magnification.
A value of 0 means no change, a positive value means we should enlarge (or zoom in), a negative value means we should shrink (or zoom out). This method is only valid to call for EVT_MAGNIFY events which are currently only generated under macOS.
492 |
# File 'lib/wx/doc/gen/events.rb', line 492 def get_magnification; end |
#get_modifiers ⇒ Integer Also known as: modifiers
Return the bit mask of all pressed modifier keys.
The return value is a combination of KeyModifier::MOD_ALT, KeyModifier::MOD_CONTROL, KeyModifier::MOD_SHIFT and KeyModifier::MOD_META bit masks. Additionally, KeyModifier::MOD_NONE is defined as 0, i.e. corresponds to no modifiers (see #has_any_modifiers) and KeyModifier::MOD_CMD is either KeyModifier::MOD_CONTROL (MSW and Unix) or KeyModifier::MOD_META (Mac), see #cmd_down. See KeyModifier for the full list of modifiers. Notice that this function is easier to use correctly than, for example, #control_down because when using the latter you also have to remember to test that none of the other modifiers is pressed:
if event.control_down && !event.alt_down && !event.shift_down && !event.meta_down
# ... handle Ctrl-XXX ...
and forgetting to do it can result in serious program bugs (e.g. program not working with European keyboard layout where AltGr key which is seen by the program as combination of CTRL and ALT is used). On the other hand, you can simply write:
if event.get_modifiers == Wx::KeyModifier::MOD_CONTROL
# ... handle Ctrl-XXX ...
with this function.
694 |
# File 'lib/wx/doc/gen/events.rb', line 694 def get_modifiers; end |
#get_position ⇒ Wx::Point Also known as: position
Returns the physical mouse position.
597 |
# File 'lib/wx/doc/gen/events.rb', line 597 def get_position; end |
#get_wheel_axis ⇒ Wx::MouseWheelAxis Also known as: wheel_axis
Gets the axis the wheel operation concerns.
Usually the mouse wheel is used to scroll vertically so Wx::MouseWheelAxis::MOUSE_WHEEL_VERTICAL is returned but some mice (and most trackpads) also allow to use the wheel to scroll horizontally in which case Wx::MouseWheelAxis::MOUSE_WHEEL_HORIZONTAL is returned. Notice that before wxWidgets 2.9.4 this method returned int.
522 |
# File 'lib/wx/doc/gen/events.rb', line 522 def get_wheel_axis; end |
#get_wheel_delta ⇒ Integer Also known as: wheel_delta
Get wheel delta, normally 120.
This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.
499 |
# File 'lib/wx/doc/gen/events.rb', line 499 def get_wheel_delta; end |
#get_wheel_rotation ⇒ Integer Also known as: wheel_rotation
Get wheel rotation, positive or negative indicates direction of rotation.
Current devices all send an event when rotation is at least +/-WheelDelta, but finer resolution devices can be created in the future. Because of this you shouldn’t assume that one event is equal to 1 line, but you should be able to either do partial line scrolling or wait until several events accumulate before scrolling.
514 |
# File 'lib/wx/doc/gen/events.rb', line 514 def get_wheel_rotation; end |
#get_x ⇒ Integer Also known as: x
Returns X coordinate of the physical mouse event position.
602 |
# File 'lib/wx/doc/gen/events.rb', line 602 def get_x; end |
#get_y ⇒ Integer Also known as: y
Returns Y coordinate of the physical mouse event position.
607 |
# File 'lib/wx/doc/gen/events.rb', line 607 def get_y; end |
#has_any_modifiers ⇒ Boolean Also known as: has_any_modifiers?
Returns true if any modifiers at all are pressed.
This is equivalent to get_modifiers
!=
KeyModifier::MOD_NONE. Notice that this is different from #has_modifiers method which doesn’t take e.g. Shift modifier into account. This method is most suitable for mouse events when any modifier, including Shift, can change the interpretation of the event.
702 |
# File 'lib/wx/doc/gen/events.rb', line 702 def has_any_modifiers; end |
#has_modifiers ⇒ Boolean Also known as: has_modifiers?
Returns true if Control or Alt are pressed.
Checks if Control, Alt or, under macOS only, Command key are pressed (notice that the real Control key is still taken into account under OS X too). This method returns false if only Shift is pressed for compatibility reasons and also because pressing Shift usually doesn’t change the interpretation of key events, see #has_any_modifiers if you want to take Shift into account as well.
710 |
# File 'lib/wx/doc/gen/events.rb', line 710 def has_modifiers; end |
#is_button ⇒ Boolean Also known as:
Returns true if the event was a mouse button event (not necessarily a button down event - that may be tested using #button_down).
527 |
# File 'lib/wx/doc/gen/events.rb', line 527 def ; end |
#is_page_scroll ⇒ Boolean Also known as: page_scroll?
Returns true if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling.
532 |
# File 'lib/wx/doc/gen/events.rb', line 532 def is_page_scroll; end |
#is_wheel_inverted ⇒ Boolean Also known as: wheel_inverted?
On Mac, has the user selected “Natural” scrolling in their System Preferences? Currently false on all other OS’s.
“Natural” scrolling means that content scrolling happens in the opposite direction, and if you are indeed scrolling content then you don’t need to use this function because macOS has already inverted the scroll direction. But there can be special situations where you want the mouse wheel action to work always in the same direction and in that case you will need this function.
506 |
# File 'lib/wx/doc/gen/events.rb', line 506 def is_wheel_inverted; end |
#leaving ⇒ Boolean
Returns true if the mouse was leaving the window.
540 |
# File 'lib/wx/doc/gen/events.rb', line 540 def leaving; end |
#left_d_click ⇒ Boolean
Returns true if the event was a left double click.
544 |
# File 'lib/wx/doc/gen/events.rb', line 544 def left_d_click; end |
#left_down ⇒ Boolean
Returns true if the left mouse button changed to down.
548 |
# File 'lib/wx/doc/gen/events.rb', line 548 def left_down; end |
#left_is_down ⇒ Boolean
Returns true if the left mouse button is currently down.
612 |
# File 'lib/wx/doc/gen/events.rb', line 612 def left_is_down; end |
#left_up ⇒ Boolean
Returns true if the left mouse button changed to up.
552 |
# File 'lib/wx/doc/gen/events.rb', line 552 def left_up; end |
#magnify ⇒ Boolean
Returns true if the event is a magnify (i.e. pinch to zoom) event.
Such events are currently generated only under macOS.
559 |
# File 'lib/wx/doc/gen/events.rb', line 559 def magnify; end |
#meta_down ⇒ Boolean
Returns true if the Meta key was down at the time of the event.
563 |
# File 'lib/wx/doc/gen/events.rb', line 563 def ; end |
#middle_d_click ⇒ Boolean
Returns true if the event was a middle double click.
567 |
# File 'lib/wx/doc/gen/events.rb', line 567 def middle_d_click; end |
#middle_down ⇒ Boolean
Returns true if the middle mouse button changed to down.
571 |
# File 'lib/wx/doc/gen/events.rb', line 571 def middle_down; end |
#middle_is_down ⇒ Boolean
Returns true if the middle mouse button is currently down.
616 |
# File 'lib/wx/doc/gen/events.rb', line 616 def middle_is_down; end |
#middle_up ⇒ Boolean
Returns true if the middle mouse button changed to up.
575 |
# File 'lib/wx/doc/gen/events.rb', line 575 def middle_up; end |
#moving ⇒ Boolean
Returns true if this was a motion event and no mouse buttons were pressed.
If any mouse button is held pressed, then this method returns false and #dragging returns true.
581 |
# File 'lib/wx/doc/gen/events.rb', line 581 def moving; end |
#raw_control_down ⇒ Boolean
Returns true if the Control key (also under macOS).
This function doesn’t distinguish between right and left control keys. Notice that #get_modifiers should usually be used instead of this one.
725 |
# File 'lib/wx/doc/gen/events.rb', line 725 def raw_control_down; end |
#right_d_click ⇒ Boolean
Returns true if the event was a right double click.
585 |
# File 'lib/wx/doc/gen/events.rb', line 585 def right_d_click; end |
#right_down ⇒ Boolean
Returns true if the right mouse button changed to down.
589 |
# File 'lib/wx/doc/gen/events.rb', line 589 def right_down; end |
#right_is_down ⇒ Boolean
Returns true if the right mouse button is currently down.
620 |
# File 'lib/wx/doc/gen/events.rb', line 620 def right_is_down; end |
#right_up ⇒ Boolean
Returns true if the right mouse button changed to up.
593 |
# File 'lib/wx/doc/gen/events.rb', line 593 def right_up; end |
#set_alt_down(down) ⇒ void Also known as: alt_down=
This method returns an undefined value.
764 |
# File 'lib/wx/doc/gen/events.rb', line 764 def set_alt_down(down) end |
#set_aux1down(down) ⇒ void Also known as: aux1down=
This method returns an undefined value.
662 |
# File 'lib/wx/doc/gen/events.rb', line 662 def set_aux1down(down) end |
#set_aux2down(down) ⇒ void Also known as: aux2down=
This method returns an undefined value.
667 |
# File 'lib/wx/doc/gen/events.rb', line 667 def set_aux2down(down) end |
#set_control_down(down) ⇒ void Also known as: control_down=
This method returns an undefined value.
749 |
# File 'lib/wx/doc/gen/events.rb', line 749 def set_control_down(down) end |
#set_left_down(down) ⇒ void Also known as: left_down=
This method returns an undefined value.
647 |
# File 'lib/wx/doc/gen/events.rb', line 647 def set_left_down(down) end |
#set_meta_down(down) ⇒ void Also known as: meta_down=
This method returns an undefined value.
769 |
# File 'lib/wx/doc/gen/events.rb', line 769 def (down) end |
#set_middle_down(down) ⇒ void Also known as: middle_down=
This method returns an undefined value.
652 |
# File 'lib/wx/doc/gen/events.rb', line 652 def set_middle_down(down) end |
#set_position(pos) ⇒ void Also known as: position=
This method returns an undefined value.
642 |
# File 'lib/wx/doc/gen/events.rb', line 642 def set_position(pos) end |
#set_raw_control_down(down) ⇒ void Also known as: raw_control_down=
This method returns an undefined value.
754 |
# File 'lib/wx/doc/gen/events.rb', line 754 def set_raw_control_down(down) end |
#set_right_down(down) ⇒ void Also known as: right_down=
This method returns an undefined value.
657 |
# File 'lib/wx/doc/gen/events.rb', line 657 def set_right_down(down) end |
#set_shift_down(down) ⇒ void Also known as: shift_down=
This method returns an undefined value.
759 |
# File 'lib/wx/doc/gen/events.rb', line 759 def set_shift_down(down) end |
#set_state(state) ⇒ void Also known as: state=
This method returns an undefined value.
672 |
# File 'lib/wx/doc/gen/events.rb', line 672 def set_state(state) end |
#set_x(x) ⇒ void Also known as: x=
This method returns an undefined value.
632 |
# File 'lib/wx/doc/gen/events.rb', line 632 def set_x(x) end |
#set_y(y) ⇒ void Also known as: y=
This method returns an undefined value.
637 |
# File 'lib/wx/doc/gen/events.rb', line 637 def set_y(y) end |
#shift_down ⇒ Boolean
Returns true if the Shift key is pressed.
This function doesn’t distinguish between right and left shift keys. Notice that #get_modifiers should usually be used instead of this one.
732 |
# File 'lib/wx/doc/gen/events.rb', line 732 def shift_down; end |