class Oekaki::Event

Public Class Methods

new() click to toggle source
Calls superclass method Oekaki::Tool::new
# File lib/oekaki.rb, line 112
def initialize
  super
end

Public Instance Methods

draw(&bk) click to toggle source
# File lib/oekaki.rb, line 116
def draw(&bk)
  W.signal_connect("expose_event", &bk)
end
key_in(&bk) click to toggle source
# File lib/oekaki.rb, line 124
def key_in(&bk)
  W.signal_connect("key_press_event", &bk)
end
make_window(&bk) click to toggle source
# File lib/oekaki.rb, line 133
def make_window(&bk)
  w = Gtk::Window.new
  w.instance_eval(&bk)
  w.show_all
  w
end
mouse_button(&bk) click to toggle source
# File lib/oekaki.rb, line 128
def mouse_button(&bk)
  W.add_events(Gdk::Event::BUTTON_PRESS_MASK)
  W.signal_connect("button_press_event", &bk)
end
timer(interval, &bk) click to toggle source
# File lib/oekaki.rb, line 120
def timer(interval, &bk)
  Gtk.timeout_add(interval, &bk)
end
window_changed() { || ... } click to toggle source
# File lib/oekaki.rb, line 140
def window_changed(&bk)
  W.signal_connect("configure_event") do
    @width, @height = get_window_size
    yield
  end
end