Class: Rabbit::InfoWindow
Constant Summary
Renderer::Display::ButtonHandler::BUTTON_PRESS_ACCEPTING_TIME
Constants included
from GetText
GetText::DOMAIN
Instance Method Summary
collapse
#connect_key, #disconnect_key
#add_button_press_hook, #add_button_release_hook, #add_motion_notify_hook, #add_scroll_hook, #call_hook_procs, #clear_button_press_hook, #clear_button_release_hook, #clear_hooks, #clear_motion_notify_hook, #clear_scroll_hook
Methods included from GetText
included
Constructor Details
#initialize(canvas) ⇒ InfoWindow
Returns a new instance of InfoWindow.
22
23
24
25
26
27
28
29
30
|
# File 'lib/rabbit/info-window.rb', line 22
def initialize(canvas)
@canvas = canvas
@window = nil
@timer_started = false
init_hook_handler
init_key_handler
init_button_handler
init_scroll_handler
end
|
Instance Method Details
#hide ⇒ Object
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/rabbit/info-window.rb', line 40
def hide
return unless showing?
(@window)
detach_key(@window)
each do |canvas|
canvas.detach
end
@window.signal_handler_disconnect(@window_destroy_id)
@window.destroy
@window = @window_destroy_id = nil
@canvas_widgets = @outer_box = nil
@timer_started = false
@previous_canvas = @current_canvas = @next_canvas = nil
end
|
#index_mode_off ⇒ Object
71
72
73
74
|
# File 'lib/rabbit/info-window.rb', line 71
def index_mode_off
return unless showing?
toggle_index_mode
end
|
#index_mode_on ⇒ Object
66
67
68
69
|
# File 'lib/rabbit/info-window.rb', line 66
def index_mode_on
return unless showing?
toggle_index_mode
end
|
#moved(index) ⇒ Object
59
60
61
62
63
64
|
# File 'lib/rabbit/info-window.rb', line 59
def moved(index)
return unless showing?
check_timer
update_note_text if on_note_mode?
adjust_slide(index)
end
|
#show(width = nil, height = nil) ⇒ Object
32
33
34
35
36
37
38
|
# File 'lib/rabbit/info-window.rb', line 32
def show(width=nil, height=nil)
init_gui(width, height)
@window.show_all
update_source
toggle_index_mode if @canvas.index_mode?
adjust_slide
end
|
#showing? ⇒ Boolean
55
56
57
|
# File 'lib/rabbit/info-window.rb', line 55
def showing?
!@window.nil?
end
|