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, #post_terminal, #pre_terminal
#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.
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/rabbit/info-window.rb', line 36
def initialize(canvas)
@canvas = canvas
@window = nil
@timer_id = nil
@note_area = nil
init_hook_handler
init_key_handler
init_button_handler
init_scroll_handler
end
|
Instance Method Details
#hide ⇒ Object
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/rabbit/info-window.rb', line 55
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 = @grid = nil
GLib::Source.remove(@timer_id) if @timer_id
@timer_id = nil
@previous_canvas = @current_canvas = @next_canvas = nil
end
|
#index_mode_off ⇒ Object
91
92
93
94
|
# File 'lib/rabbit/info-window.rb', line 91
def index_mode_off
return unless showing?
toggle_index_mode
end
|
#index_mode_on ⇒ Object
86
87
88
89
|
# File 'lib/rabbit/info-window.rb', line 86
def index_mode_on
return unless showing?
toggle_index_mode
end
|
#moved ⇒ Object
75
76
77
78
|
# File 'lib/rabbit/info-window.rb', line 75
def moved
return unless showing?
update
end
|
#parsed ⇒ Object
80
81
82
83
84
|
# File 'lib/rabbit/info-window.rb', line 80
def parsed
return unless showing?
update_source
update
end
|
#show(width = nil, height = nil) ⇒ Object
47
48
49
50
51
52
53
|
# File 'lib/rabbit/info-window.rb', line 47
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
71
72
73
|
# File 'lib/rabbit/info-window.rb', line 71
def showing?
!@window.nil?
end
|