Class: Gdk::EventButton
- Inherits:
-
Object
- Object
- Gdk::EventButton
- Defined in:
- lib/gtk_paradise/core_classes/event_button.rb
Overview
Gdk::EventButton
Instance Method Summary collapse
-
#mouse_button_double_click?(event) ⇒ Boolean
# === mouse_button_double_click?.
-
#name? ⇒ Boolean
# === name? ========================================================================= #.
-
#x_position? ⇒ Boolean
(also: #x_coordinate?)
# === x_position? ========================================================================= #.
-
#y_position? ⇒ Boolean
(also: #y_coordinate?)
# === y_position? ========================================================================= #.
Instance Method Details
#mouse_button_double_click?(event) ⇒ Boolean
#
mouse_button_double_click?
Query whether the event is a double-click event, via the mouse button.
Obviously you have to pass in an event-instance to this method.
#
41 42 43 44 45 46 47 |
# File 'lib/gtk_paradise/core_classes/event_button.rb', line 41 def (event) # if ::Gtk.use_gtk2? # event.event_type == Gdk::Event::BUTTON2_PRESS and # event.button == 1 event.event_type == Gdk::EventType::BUTTON2_PRESS and event. == 1 end |
#name? ⇒ Boolean
#
name?
#
30 31 32 |
# File 'lib/gtk_paradise/core_classes/event_button.rb', line 30 def name? event_type.name end |
#x_position? ⇒ Boolean Also known as: x_coordinate?
#
x_position?
#
16 17 18 |
# File 'lib/gtk_paradise/core_classes/event_button.rb', line 16 def x_position? x end |
#y_position? ⇒ Boolean Also known as: y_coordinate?
#
y_position?
#
23 24 25 |
# File 'lib/gtk_paradise/core_classes/event_button.rb', line 23 def y_position? y end |