Class: Rabbit::Renderer::Display::ClutterEmbed
- Inherits:
-
Object
- Object
- Rabbit::Renderer::Display::ClutterEmbed
show all
- Includes:
- Base, ButtonHandler, Cursor, Gesture, Graffiti, Info, KeyHandler, Magnifier, Mask, Menu, Progress, Search, Spotlight, Engine::Cairo
- Defined in:
- lib/rabbit/renderer/display/clutter-embed.rb
Constant Summary
ButtonHandler::BUTTON_PRESS_ACCEPTING_TIME
Constants included
from Mask
Mask::MASK_SIZE_STEP
Constants included
from DirtyCount
DirtyCount::TOO_DIRTY
Constants included
from GetText
GetText::DOMAIN
Instance Attribute Summary collapse
#background, #foreground
Attributes included from Base
#adjustment_x, #adjustment_y, #draw_scaled_image, #gl_quaternion, #gl_scale, #graffiti_color, #graffiti_line_width, #margin_bottom, #margin_left, #margin_right, #margin_top, #page_margin_bottom, #page_margin_left, #page_margin_right, #page_margin_top, #paper_height, #paper_width, #progress_background, #progress_foreground, #slides_per_page, #x_dpi, #y_dpi
Class Method Summary
collapse
Instance Method Summary
collapse
#alpha_available?, available_with_gdk?, available_with_gdk_pixbuf?, available_with_pango?, #background_image=, #create_pango_context, #draw_arc, #draw_arc_by_radius, #draw_background, #draw_layout, #draw_line, #draw_lines, #draw_pixbuf, #draw_polygon, #draw_poppler_page, #draw_rectangle, #draw_rounded_rectangle, #draw_rsvg_handle, #finish_context, #finish_renderer, #init_context, #init_renderer, #make_layout, #poppler_available?, #prepare_renderer, #reflect_context, #restore_context, #rotate_context, #rsvg_available?, #save_context, #scale_context, #set_font_resolution, #set_source_pixbuf, #shear_context, #to_gdk_rgb, #translate_context
Methods included from Kernel
#draw_background, #draw_circle, #draw_circle_by_radius, #draw_cone, #draw_cube, #draw_dodecahedron, #draw_flag, #draw_flag_layout, #draw_icosahedron, #draw_octahedron, #draw_rectangle_flag, #draw_slide, #draw_sphere, #draw_teapot, #draw_tetrahedron, #draw_torus, #draw_triangle_flag, #flag_size, #gl_call_list, #gl_compile, #gl_supported?, #make_color, #new_list_id, #poppler_available?, #reflect_context, #restore_context, #rotate_context, #rsvg_available?, #save_context, #scale_context, #shear_context, #translate_context, #z_far, #z_view
Methods included from Magnifier
#toggle_magnifier
Methods included from Spotlight
#toggle_spotlight
Methods included from Info
#hide_info_window, #show_info_window, #toggle_info_window
Methods included from KeyHandler
#connect_key, #disconnect_key
Methods included from Search
#search_slide, #searching?, #stop_slide_search
Methods included from Mask
#expand_hole, #narrow_hole, #set_hole
Methods included from Base
#create_pango_context, #create_pango_layout, #height, #make_layout, #redraw, #update_title, #width
#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 Base
#add_gesture_action, #blackouting?, #can_undo_graffiti?, #change_graffiti_color, #clean, #clean_if_dirty, #clear_theme, #confirm, #connect_key, #create_pango_context, #disconnect_key, #each_slide_pixbuf, #expand_hole, #font_families, #gl_available?, #graffiti_mode?, #have_graffiti?, #hiding?, #narrow_hole, #off_screen_canvas, #post_init_gui, #print, #printable?, #redraw, #search_slide, #searching?, #setup_event, #stop_slide_search, #to_attrs, #toggle_info_window, #toggle_spotlight, #whiteouting?
Methods included from DirtyCount
#bit_dirty, #dirty, #dirty?, #dirty_count_clean, #very_dirty
Methods included from GetText
included
Constructor Details
Returns a new instance of ClutterEmbed.
52
53
54
55
56
57
58
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 52
def initialize(canvas)
@recreate_id = nil
@need_reload_theme = false
super
@filename = nil
init_clutter_embed
end
|
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
51
52
53
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 51
def filename
@filename
end
|
Class Method Details
.priority ⇒ Object
29
30
31
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 29
def priority
0
end
|
Instance Method Details
#attach_to(window, container = nil) ⇒ Object
191
192
193
194
195
196
197
198
199
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 191
def attach_to(window, container=nil)
super
add_widgets_to_container(@container)
widget.show
(@window)
attach_key(@window)
end
|
#cache_all_slides ⇒ Object
226
227
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 226
def cache_all_slides
end
|
#clear_slide ⇒ Object
64
65
66
67
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 64
def clear_slide
super
redraw
end
|
#detach ⇒ Object
201
202
203
204
205
206
207
208
209
210
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 201
def detach
detach_key(@window)
(@window)
widget.hide
unless @window.destroyed?
remove_widgets_from_container(@container)
end
super
end
|
#display? ⇒ Boolean
178
179
180
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 178
def display?
true
end
|
#index_mode_off ⇒ Object
150
151
152
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 150
def index_mode_off
restore_cursor(:index)
end
|
#index_mode_on ⇒ Object
145
146
147
148
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 145
def index_mode_on
keep_cursor(:index)
update_cursor(nil, true)
end
|
#post_apply_theme ⇒ Object
81
82
83
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 81
def post_apply_theme
recreate_actors
end
|
#post_fullscreen ⇒ Object
69
70
71
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 69
def post_fullscreen
update_cursor(:blank, true)
end
|
#post_iconify ⇒ Object
78
79
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 78
def post_iconify
end
|
#post_move(old_index, index) ⇒ Object
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 85
def post_move(old_index, index)
update_title
old_actor = retrieve_actor(old_index)
old_actor.hide if old_actor
actor = retrieve_actor(index)
if actor and !hiding?
actor.show
actor.raise_top
if old_actor
transition = @canvas.slides[index].transition
transition_method = "transition_#{transition}"
if transition and respond_to?(transition_method, true)
send(transition_method, old_actor, actor, old_index, index)
end
end
end
end
|
#post_move_in_slide(old_index, index) ⇒ Object
105
106
107
108
109
110
111
112
113
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 105
def post_move_in_slide(old_index, index)
actor = retrieve_actor(nil, old_index)
actor.hide if actor
actor = retrieve_actor(nil, index)
if actor and !hiding?
actor.show
actor.raise_top
end
end
|
#post_parse ⇒ Object
118
119
120
121
122
123
124
125
126
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 118
def post_parse
clear_button_handler
update_title
if @need_reload_theme
@need_reload_theme = false
reload_theme
end
end
|
#post_to_pixbuf(canceled) ⇒ Object
142
143
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 142
def post_to_pixbuf(canceled)
end
|
#post_toggle_index_mode ⇒ Object
131
132
133
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 131
def post_toggle_index_mode
recreate_actors
end
|
#post_unfullscreen ⇒ Object
73
74
75
76
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 73
def post_unfullscreen
update_cursor(nil, true)
end
|
#pre_parse ⇒ Object
115
116
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 115
def pre_parse
end
|
#pre_to_pixbuf(slide_size) ⇒ Object
135
136
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 135
def pre_to_pixbuf(slide_size)
end
|
#pre_toggle_index_mode ⇒ Object
128
129
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 128
def pre_toggle_index_mode
end
|
#reload_theme(&callback) ⇒ Object
182
183
184
185
186
187
188
189
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 182
def reload_theme(&callback)
if @canvas.applying?
@need_reload_theme = true
else
callback ||= Utils.process_pending_events_proc
@canvas.activate("ReloadTheme", &callback)
end
end
|
#reset_adjustment ⇒ Object
212
213
214
215
216
217
218
219
220
221
222
223
224
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 212
def reset_adjustment
super
@actors.each do |slide_actors|
slide_actors.each do |actor|
actor.x = 0
actor.y = 0
actor.set_scale(1, 1)
actor.set_rotation(Clutter::X_AXIS, 0, 0, 0, 0)
actor.set_rotation(Clutter::Y_AXIS, 0, 0, 0, 0)
actor.set_rotation(Clutter::Z_AXIS, 0, 0, 0, 0)
end
end
end
|
#to_pixbufing(i) ⇒ Object
138
139
140
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 138
def to_pixbufing(i)
true
end
|
#toggle_blackout ⇒ Object
166
167
168
169
170
171
172
173
174
175
176
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 166
def toggle_blackout
super
if blackouting?
@stage.color = Clutter::Color.parse("black")
current_actor.hide
else
reset_stage_color
current_actor.show
end
redraw
end
|
#toggle_whiteout ⇒ Object
154
155
156
157
158
159
160
161
162
163
164
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 154
def toggle_whiteout
super
if whiteouting?
@stage.color = Clutter::Color.parse("white")
current_actor.hide
else
reset_stage_color
current_actor.show
end
redraw
end
|
60
61
62
|
# File 'lib/rabbit/renderer/display/clutter-embed.rb', line 60
def widget
@embed
end
|