Module: Rabbit::Renderer::Base
Constant Summary
Constants included
from DirtyCount
DirtyCount::TOO_DIRTY
Constants included
from GetText
GetText::DOMAIN
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from DirtyCount
#bit_dirty, #dirty, #dirty?, #dirty_count_clean, #very_dirty
Methods included from GetText
included
Instance Attribute Details
#adjustment_x ⇒ Object
Returns the value of attribute adjustment_x.
44
45
46
|
# File 'lib/rabbit/renderer/base.rb', line 44
def adjustment_x
@adjustment_x
end
|
#adjustment_y ⇒ Object
Returns the value of attribute adjustment_y.
44
45
46
|
# File 'lib/rabbit/renderer/base.rb', line 44
def adjustment_y
@adjustment_y
end
|
#base_height ⇒ Object
Returns the value of attribute base_height.
38
39
40
|
# File 'lib/rabbit/renderer/base.rb', line 38
def base_height
@base_height
end
|
#base_width ⇒ Object
Returns the value of attribute base_width.
37
38
39
|
# File 'lib/rabbit/renderer/base.rb', line 37
def base_width
@base_width
end
|
#draw_scaled_image ⇒ Object
Returns the value of attribute draw_scaled_image.
47
48
49
|
# File 'lib/rabbit/renderer/base.rb', line 47
def draw_scaled_image
@draw_scaled_image
end
|
#gl_quaternion ⇒ Object
Returns the value of attribute gl_quaternion.
46
47
48
|
# File 'lib/rabbit/renderer/base.rb', line 46
def gl_quaternion
@gl_quaternion
end
|
#gl_scale ⇒ Object
Returns the value of attribute gl_scale.
46
47
48
|
# File 'lib/rabbit/renderer/base.rb', line 46
def gl_scale
@gl_scale
end
|
#graffiti_color ⇒ Object
Returns the value of attribute graffiti_color.
45
46
47
|
# File 'lib/rabbit/renderer/base.rb', line 45
def graffiti_color
@graffiti_color
end
|
#graffiti_line_width ⇒ Object
Returns the value of attribute graffiti_line_width.
45
46
47
|
# File 'lib/rabbit/renderer/base.rb', line 45
def graffiti_line_width
@graffiti_line_width
end
|
#margin_bottom ⇒ Object
Returns the value of attribute margin_bottom.
41
42
43
|
# File 'lib/rabbit/renderer/base.rb', line 41
def margin_bottom
@margin_bottom
end
|
#margin_left ⇒ Object
Returns the value of attribute margin_left.
40
41
42
|
# File 'lib/rabbit/renderer/base.rb', line 40
def margin_left
@margin_left
end
|
#margin_right ⇒ Object
Returns the value of attribute margin_right.
40
41
42
|
# File 'lib/rabbit/renderer/base.rb', line 40
def margin_right
@margin_right
end
|
#margin_top ⇒ Object
Returns the value of attribute margin_top.
41
42
43
|
# File 'lib/rabbit/renderer/base.rb', line 41
def margin_top
@margin_top
end
|
#page_margin_bottom ⇒ Object
95
96
97
|
# File 'lib/rabbit/renderer/base.rb', line 95
def page_margin_bottom
@page_margin_bottom || 0
end
|
#page_margin_left ⇒ Object
83
84
85
|
# File 'lib/rabbit/renderer/base.rb', line 83
def page_margin_left
@page_margin_left || 0
end
|
#page_margin_right ⇒ Object
87
88
89
|
# File 'lib/rabbit/renderer/base.rb', line 87
def page_margin_right
@page_margin_right || 0
end
|
#page_margin_top ⇒ Object
91
92
93
|
# File 'lib/rabbit/renderer/base.rb', line 91
def page_margin_top
@page_margin_top || 0
end
|
#paper_height ⇒ Object
Returns the value of attribute paper_height.
39
40
41
|
# File 'lib/rabbit/renderer/base.rb', line 39
def paper_height
@paper_height
end
|
#paper_width ⇒ Object
Returns the value of attribute paper_width.
39
40
41
|
# File 'lib/rabbit/renderer/base.rb', line 39
def paper_width
@paper_width
end
|
#progress_background ⇒ Object
Returns the value of attribute progress_background.
43
44
45
|
# File 'lib/rabbit/renderer/base.rb', line 43
def progress_background
@progress_background
end
|
#progress_foreground ⇒ Object
Returns the value of attribute progress_foreground.
42
43
44
|
# File 'lib/rabbit/renderer/base.rb', line 42
def progress_foreground
@progress_foreground
end
|
#slides_per_page ⇒ Object
Returns the value of attribute slides_per_page.
39
40
41
|
# File 'lib/rabbit/renderer/base.rb', line 39
def slides_per_page
@slides_per_page
end
|
#x_dpi ⇒ Object
Returns the value of attribute x_dpi.
36
37
38
|
# File 'lib/rabbit/renderer/base.rb', line 36
def x_dpi
@x_dpi
end
|
#y_dpi ⇒ Object
Returns the value of attribute y_dpi.
36
37
38
|
# File 'lib/rabbit/renderer/base.rb', line 36
def y_dpi
@y_dpi
end
|
Instance Method Details
#add_gesture_action(sequence, action, &block) ⇒ Object
267
268
|
# File 'lib/rabbit/renderer/base.rb', line 267
def add_gesture_action(sequence, action, &block)
end
|
#blackouting? ⇒ Boolean
199
200
201
|
# File 'lib/rabbit/renderer/base.rb', line 199
def blackouting?
@blackout
end
|
#can_undo_graffiti? ⇒ Boolean
238
239
240
|
# File 'lib/rabbit/renderer/base.rb', line 238
def can_undo_graffiti?
false
end
|
#change_graffiti_color ⇒ Object
264
265
|
# File 'lib/rabbit/renderer/base.rb', line 264
def change_graffiti_color
end
|
#clean ⇒ Object
179
180
181
|
# File 'lib/rabbit/renderer/base.rb', line 179
def clean
dirty_count_clean
end
|
#clean_if_dirty ⇒ Object
183
184
185
|
# File 'lib/rabbit/renderer/base.rb', line 183
def clean_if_dirty
clean if dirty?
end
|
#clear_slide ⇒ Object
126
127
128
129
|
# File 'lib/rabbit/renderer/base.rb', line 126
def clear_slide
current = @canvas.current_slide
current.clear_waiting if current
end
|
#clear_theme ⇒ Object
187
188
189
190
191
192
193
|
# File 'lib/rabbit/renderer/base.rb', line 187
def clear_theme
init_color
clear_keys
clear_progress_color
clear_graffiti_config
clear_gesture_actions
end
|
#confirm ⇒ Object
172
173
174
|
# File 'lib/rabbit/renderer/base.rb', line 172
def confirm
true
end
|
#connect_key(keyval, modifier, flags, &block) ⇒ Object
258
259
|
# File 'lib/rabbit/renderer/base.rb', line 258
def connect_key(keyval, modifier, flags, &block)
end
|
#create_pango_context ⇒ Object
160
161
162
|
# File 'lib/rabbit/renderer/base.rb', line 160
def create_pango_context
Pango::Context.new
end
|
#disconnect_key(keyval, modifier) ⇒ Object
261
262
|
# File 'lib/rabbit/renderer/base.rb', line 261
def disconnect_key(keyval, modifier)
end
|
#display? ⇒ Boolean
168
169
170
|
# File 'lib/rabbit/renderer/base.rb', line 168
def display?
false
end
|
#each_slide_pixbuf ⇒ Object
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
# File 'lib/rabbit/renderer/base.rb', line 136
def each_slide_pixbuf
canvas = offscreen_canvas
previous_index = canvas.current_index
pre_to_pixbuf(canvas.slide_size)
canceled = false
canvas.slides.each_with_index do |slide, i|
if !to_pixbufing(i) or !yield(slide, canvas.to_pixbuf(i), i)
canceled = true
break
end
end
post_to_pixbuf(canceled)
canvas.move_to_if_can(previous_index)
canvas.activate("Quit") if canvas != @canvas
end
|
#expand_hole ⇒ Object
242
243
|
# File 'lib/rabbit/renderer/base.rb', line 242
def expand_hole
end
|
#font_families ⇒ Object
99
100
101
102
103
104
|
# File 'lib/rabbit/renderer/base.rb', line 99
def font_families
if @font_families.nil? or @font_families.empty?
@font_families = create_pango_context.families
end
@font_families
end
|
#gl_available? ⇒ Boolean
223
224
225
|
# File 'lib/rabbit/renderer/base.rb', line 223
def gl_available?
@canvas.use_gl? and gl_supported?
end
|
#graffiti_mode? ⇒ Boolean
230
231
232
|
# File 'lib/rabbit/renderer/base.rb', line 230
def graffiti_mode?
false
end
|
#have_graffiti? ⇒ Boolean
234
235
236
|
# File 'lib/rabbit/renderer/base.rb', line 234
def have_graffiti?
false
end
|
#hiding? ⇒ Boolean
213
214
215
|
# File 'lib/rabbit/renderer/base.rb', line 213
def hiding?
@blackout or @whiteout
end
|
#initialize(canvas) ⇒ Object
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/rabbit/renderer/base.rb', line 51
def initialize(canvas)
super()
@canvas = canvas
@font_families = nil
@base_width = nil
@base_height = nil
@paper_width = nil
@paper_height = nil
@slides_per_page = 1
@margin_left = nil
@margin_right = nil
@margin_top = nil
@margin_bottom = nil
@page_margin_left = nil
@page_margin_right = nil
@page_margin_top = nil
@page_margin_bottom = nil
@whiteout = false
@blackout = false
@list_id = 0
@adjustment_x = 0
@adjustment_y = 0
@progress_foreground = nil
@progress_background = nil
@graffiti_color = nil
@graffiti_line_width = nil
@draw_scaled_image = true
clean
init_dpi
init_gl_parameters
end
|
#narrow_hole ⇒ Object
245
246
|
# File 'lib/rabbit/renderer/base.rb', line 245
def narrow_hole
end
|
#offscreen_canvas ⇒ Object
152
153
154
155
156
157
158
|
# File 'lib/rabbit/renderer/base.rb', line 152
def offscreen_canvas
if offscreen_renderer?
@canvas
else
make_canvas_with_offscreen_renderer
end
end
|
#post_init_gui ⇒ Object
227
228
|
# File 'lib/rabbit/renderer/base.rb', line 227
def post_init_gui
end
|
#post_terminal ⇒ Object
273
274
|
# File 'lib/rabbit/renderer/base.rb', line 273
def post_terminal
end
|
#pre_terminal ⇒ Object
270
271
|
# File 'lib/rabbit/renderer/base.rb', line 270
def pre_terminal
end
|
#print(&block) ⇒ Object
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# File 'lib/rabbit/renderer/base.rb', line 106
def print(&block)
if printable?
do_print(&block)
else
canvas = make_canvas_with_printable_renderer
pre_print(canvas.slide_size)
canceled = false
canvas.print do |i|
result = printing(i)
canceled = !result
result
end
post_print(canceled)
canvas.activate("Quit")
end
end
|
#printable? ⇒ Boolean
164
165
166
|
# File 'lib/rabbit/renderer/base.rb', line 164
def printable?
false
end
|
#redraw ⇒ Object
123
124
|
# File 'lib/rabbit/renderer/base.rb', line 123
def redraw
end
|
#reset_adjustment ⇒ Object
131
132
133
134
|
# File 'lib/rabbit/renderer/base.rb', line 131
def reset_adjustment
@adjustment_x = 0
@adjustment_y = 0
end
|
#search_slide(forward = true) ⇒ Object
248
249
|
# File 'lib/rabbit/renderer/base.rb', line 248
def search_slide(forward=true)
end
|
#searching? ⇒ Boolean
254
255
256
|
# File 'lib/rabbit/renderer/base.rb', line 254
def searching?
false
end
|
#setup_event(area) ⇒ Object
176
177
|
# File 'lib/rabbit/renderer/base.rb', line 176
def setup_event(area)
end
|
#stop_slide_search ⇒ Object
251
252
|
# File 'lib/rabbit/renderer/base.rb', line 251
def stop_slide_search
end
|
#toggle_blackout ⇒ Object
208
209
210
211
|
# File 'lib/rabbit/renderer/base.rb', line 208
def toggle_blackout
@blackout = !@blackout
@whiteout = false
end
|
#toggle_info_window ⇒ Object
217
218
|
# File 'lib/rabbit/renderer/base.rb', line 217
def toggle_info_window
end
|
#toggle_spotlight ⇒ Object
220
221
|
# File 'lib/rabbit/renderer/base.rb', line 220
def toggle_spotlight
end
|
#toggle_whiteout ⇒ Object
203
204
205
206
|
# File 'lib/rabbit/renderer/base.rb', line 203
def toggle_whiteout
@blackout = false
@whiteout = !@whiteout
end
|
#whiteouting? ⇒ Boolean
195
196
197
|
# File 'lib/rabbit/renderer/base.rb', line 195
def whiteouting?
@whiteout
end
|