Class: Gdk::EventButton

Inherits:
Object
  • Object
show all
Defined in:
lib/gtk_paradise/core_classes/event_button.rb

Overview

Gdk::EventButton

Instance Method Summary collapse

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.

#

Returns:

  • (Boolean)


41
42
43
44
45
46
47
# File 'lib/gtk_paradise/core_classes/event_button.rb', line 41

def mouse_button_double_click?(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.button == 1
end

#name?Boolean

#

name?

#

Returns:

  • (Boolean)


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?

#

Returns:

  • (Boolean)


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?

#

Returns:

  • (Boolean)


23
24
25
# File 'lib/gtk_paradise/core_classes/event_button.rb', line 23

def y_position?
  y
end