Module: Rabbit::Element::Base
- Included in:
- ContainerElement, Image, IndexThumbnail, PopplerPage, TextRenderer, WaitTag
- Defined in:
- lib/rabbit/element/base.rb,
lib/rabbit/element/base/draw-hook.rb
Defined Under Namespace
Modules: DrawHook
Instance Attribute Summary collapse
-
#base_h ⇒ Object
readonly
Returns the value of attribute base_h.
-
#base_w ⇒ Object
readonly
Returns the value of attribute base_w.
-
#base_x ⇒ Object
readonly
Returns the value of attribute base_x.
-
#base_y ⇒ Object
readonly
Returns the value of attribute base_y.
-
#default_margin_bottom ⇒ Object
Returns the value of attribute default_margin_bottom.
-
#default_margin_left ⇒ Object
Returns the value of attribute default_margin_left.
-
#default_margin_right ⇒ Object
Returns the value of attribute default_margin_right.
-
#default_margin_top ⇒ Object
Returns the value of attribute default_margin_top.
-
#default_padding_bottom ⇒ Object
Returns the value of attribute default_padding_bottom.
-
#default_padding_left ⇒ Object
Returns the value of attribute default_padding_left.
-
#default_padding_right ⇒ Object
Returns the value of attribute default_padding_right.
-
#default_padding_top ⇒ Object
Returns the value of attribute default_padding_top.
-
#default_visible ⇒ Object
Returns the value of attribute default_visible.
-
#h ⇒ Object
readonly
Returns the value of attribute h.
-
#horizontal_centering ⇒ Object
Returns the value of attribute horizontal_centering.
-
#margin_bottom ⇒ Object
Returns the value of attribute margin_bottom.
-
#margin_left ⇒ Object
Returns the value of attribute margin_left.
-
#margin_right ⇒ Object
Returns the value of attribute margin_right.
-
#margin_top ⇒ Object
Returns the value of attribute margin_top.
-
#padding_bottom ⇒ Object
Returns the value of attribute padding_bottom.
-
#padding_left ⇒ Object
Returns the value of attribute padding_left.
-
#padding_right ⇒ Object
Returns the value of attribute padding_right.
-
#padding_top ⇒ Object
Returns the value of attribute padding_top.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#ph ⇒ Object
readonly
Returns the value of attribute ph.
-
#pw ⇒ Object
readonly
Returns the value of attribute pw.
-
#px ⇒ Object
readonly
Returns the value of attribute px.
-
#py ⇒ Object
readonly
Returns the value of attribute py.
-
#real_simulation ⇒ Object
readonly
Returns the value of attribute real_simulation.
-
#user_property ⇒ Object
readonly
Returns the value of attribute user_property.
-
#vertical_centering ⇒ Object
Returns the value of attribute vertical_centering.
-
#w ⇒ Object
readonly
Returns the value of attribute w.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, value) ⇒ Object
- #add_default_prop(name, value) ⇒ Object
- #adjust_x_centering(x, w) ⇒ Object
- #adjust_y_margin(y, h) ⇒ Object
- #adjust_y_padding(y, h) ⇒ Object
- #available_w ⇒ Object
- #centering_adjusted_height ⇒ Object
- #centering_adjusted_width ⇒ Object
- #clear_margin ⇒ Object
- #clear_padding ⇒ Object
- #clear_theme ⇒ Object
- #clone ⇒ Object
- #compile(canvas, x, y, w, h) ⇒ Object
- #compile_for_horizontal_centering(canvas, x, y, w, h) ⇒ Object
- #compile_horizontal(canvas, x, y, w, h) ⇒ Object
- #default_prop ⇒ Object
- #dirty! ⇒ Object
- #dirty? ⇒ Boolean
- #do_horizontal_centering(canvas, x, y, w, h) ⇒ Object
- #do_horizontal_centering? ⇒ Boolean
- #do_vertical_centering? ⇒ Boolean
- #draw(simulation = false) ⇒ Object
- #font(props) ⇒ Object
- #have_wait_tag? ⇒ Boolean
- #height ⇒ Object
- #hide(&block) ⇒ Object
- #if_dirty ⇒ Object
- #init_default_margin ⇒ Object
- #init_default_padding ⇒ Object
- #init_default_visible ⇒ Object
- #initialize ⇒ Object
- #inline_element? ⇒ Boolean
- #inspect(verbose = false) ⇒ Object
- #margin_set(*values) ⇒ Object
- #margin_with(params) ⇒ Object
- #match?(pattern) ⇒ Boolean
- #next_element ⇒ Object
- #padding_set(*values) ⇒ Object
- #padding_with(params) ⇒ Object
- #previous_element ⇒ Object
- #prop_delete(name) ⇒ Object (also: #__prop_delete__)
- #prop_get(name) ⇒ Object (also: #__prop_get__)
- #prop_set(name, *values) ⇒ Object (also: #__prop_set__)
- #prop_value(name) ⇒ Object
- #restore_x_margin(x, w) ⇒ Object
- #restore_x_padding(x, w) ⇒ Object
- #setup_margin(x, y, w, h) ⇒ Object
- #setup_padding(x, y, w, h) ⇒ Object
- #show(&block) ⇒ Object
- #slide ⇒ Object
- #substitute_newline ⇒ Object
- #substitute_text ⇒ Object
- #text_renderer? ⇒ Boolean
- #visible? ⇒ Boolean
- #wait(*args, &block) ⇒ Object
- #width ⇒ Object
Methods included from DrawHook
#clear_draw_procs, def_draw_hook, def_draw_hooks
Methods included from Utils
arg_list, collect_classes_under_module, collect_modules_under_module, collect_under_module, combination, compute_bottom_y, compute_left_x, compute_right_x, compute_top_y, corresponding_class_under_module, corresponding_module_under_module, corresponding_objects, drawable_to_pixbuf, ensure_time, events_pending_available?, extract_four_way, find_path_in_load_path, init_by_constants_as_default_value, move_to, move_to_bottom_left, move_to_bottom_right, move_to_top_left, move_to_top_right, parse_four_way, process_pending_events, process_pending_events_proc, quartz?, require_files_under_directory_in_load_path, require_safe, split_number_to_minute_and_second, stringify_hash_key, support_console_input?, support_console_output?, syntax_highlighting_debug?, time, to_class_name, unescape_title, windows?
Instance Attribute Details
#base_h ⇒ Object (readonly)
Returns the value of attribute base_h.
17 18 19 |
# File 'lib/rabbit/element/base.rb', line 17 def base_h @base_h end |
#base_w ⇒ Object (readonly)
Returns the value of attribute base_w.
17 18 19 |
# File 'lib/rabbit/element/base.rb', line 17 def base_w @base_w end |
#base_x ⇒ Object (readonly)
Returns the value of attribute base_x.
17 18 19 |
# File 'lib/rabbit/element/base.rb', line 17 def base_x @base_x end |
#base_y ⇒ Object (readonly)
Returns the value of attribute base_y.
17 18 19 |
# File 'lib/rabbit/element/base.rb', line 17 def base_y @base_y end |
#default_margin_bottom ⇒ Object
Returns the value of attribute default_margin_bottom.
29 30 31 |
# File 'lib/rabbit/element/base.rb', line 29 def default_margin_bottom @default_margin_bottom end |
#default_margin_left ⇒ Object
Returns the value of attribute default_margin_left.
28 29 30 |
# File 'lib/rabbit/element/base.rb', line 28 def default_margin_left @default_margin_left end |
#default_margin_right ⇒ Object
Returns the value of attribute default_margin_right.
28 29 30 |
# File 'lib/rabbit/element/base.rb', line 28 def default_margin_right @default_margin_right end |
#default_margin_top ⇒ Object
Returns the value of attribute default_margin_top.
29 30 31 |
# File 'lib/rabbit/element/base.rb', line 29 def default_margin_top @default_margin_top end |
#default_padding_bottom ⇒ Object
Returns the value of attribute default_padding_bottom.
32 33 34 |
# File 'lib/rabbit/element/base.rb', line 32 def default_padding_bottom @default_padding_bottom end |
#default_padding_left ⇒ Object
Returns the value of attribute default_padding_left.
31 32 33 |
# File 'lib/rabbit/element/base.rb', line 31 def default_padding_left @default_padding_left end |
#default_padding_right ⇒ Object
Returns the value of attribute default_padding_right.
31 32 33 |
# File 'lib/rabbit/element/base.rb', line 31 def default_padding_right @default_padding_right end |
#default_padding_top ⇒ Object
Returns the value of attribute default_padding_top.
32 33 34 |
# File 'lib/rabbit/element/base.rb', line 32 def default_padding_top @default_padding_top end |
#default_visible ⇒ Object
Returns the value of attribute default_visible.
34 35 36 |
# File 'lib/rabbit/element/base.rb', line 34 def default_visible @default_visible end |
#h ⇒ Object (readonly)
Returns the value of attribute h.
14 15 16 |
# File 'lib/rabbit/element/base.rb', line 14 def h @h end |
#horizontal_centering ⇒ Object
Returns the value of attribute horizontal_centering.
18 19 20 |
# File 'lib/rabbit/element/base.rb', line 18 def horizontal_centering @horizontal_centering end |
#margin_bottom ⇒ Object
Returns the value of attribute margin_bottom.
23 24 25 |
# File 'lib/rabbit/element/base.rb', line 23 def margin_bottom @margin_bottom end |
#margin_left ⇒ Object
Returns the value of attribute margin_left.
22 23 24 |
# File 'lib/rabbit/element/base.rb', line 22 def margin_left @margin_left end |
#margin_right ⇒ Object
Returns the value of attribute margin_right.
22 23 24 |
# File 'lib/rabbit/element/base.rb', line 22 def margin_right @margin_right end |
#margin_top ⇒ Object
Returns the value of attribute margin_top.
23 24 25 |
# File 'lib/rabbit/element/base.rb', line 23 def margin_top @margin_top end |
#padding_bottom ⇒ Object
Returns the value of attribute padding_bottom.
26 27 28 |
# File 'lib/rabbit/element/base.rb', line 26 def padding_bottom @padding_bottom end |
#padding_left ⇒ Object
Returns the value of attribute padding_left.
25 26 27 |
# File 'lib/rabbit/element/base.rb', line 25 def padding_left @padding_left end |
#padding_right ⇒ Object
Returns the value of attribute padding_right.
25 26 27 |
# File 'lib/rabbit/element/base.rb', line 25 def padding_right @padding_right end |
#padding_top ⇒ Object
Returns the value of attribute padding_top.
26 27 28 |
# File 'lib/rabbit/element/base.rb', line 26 def padding_top @padding_top end |
#parent ⇒ Object
Returns the value of attribute parent.
36 37 38 |
# File 'lib/rabbit/element/base.rb', line 36 def parent @parent end |
#ph ⇒ Object (readonly)
Returns the value of attribute ph.
15 16 17 |
# File 'lib/rabbit/element/base.rb', line 15 def ph @ph end |
#pw ⇒ Object (readonly)
Returns the value of attribute pw.
15 16 17 |
# File 'lib/rabbit/element/base.rb', line 15 def pw @pw end |
#px ⇒ Object (readonly)
Returns the value of attribute px.
15 16 17 |
# File 'lib/rabbit/element/base.rb', line 15 def px @px end |
#py ⇒ Object (readonly)
Returns the value of attribute py.
15 16 17 |
# File 'lib/rabbit/element/base.rb', line 15 def py @py end |
#real_simulation ⇒ Object (readonly)
Returns the value of attribute real_simulation.
36 37 38 |
# File 'lib/rabbit/element/base.rb', line 36 def real_simulation @real_simulation end |
#user_property ⇒ Object
Returns the value of attribute user_property.
20 21 22 |
# File 'lib/rabbit/element/base.rb', line 20 def user_property @user_property end |
#vertical_centering ⇒ Object
Returns the value of attribute vertical_centering.
18 19 20 |
# File 'lib/rabbit/element/base.rb', line 18 def vertical_centering @vertical_centering end |
#w ⇒ Object (readonly)
Returns the value of attribute w.
14 15 16 |
# File 'lib/rabbit/element/base.rb', line 14 def w @w end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
14 15 16 |
# File 'lib/rabbit/element/base.rb', line 14 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
14 15 16 |
# File 'lib/rabbit/element/base.rb', line 14 def y @y end |
Instance Method Details
#[](name) ⇒ Object
377 378 379 |
# File 'lib/rabbit/element/base.rb', line 377 def [](name) @user_property[name] end |
#[]=(name, value) ⇒ Object
381 382 383 |
# File 'lib/rabbit/element/base.rb', line 381 def []=(name, value) @user_property[name] = value end |
#add_default_prop(name, value) ⇒ Object
136 137 138 139 |
# File 'lib/rabbit/element/base.rb', line 136 def add_default_prop(name, value) name = normalize_property_name(name) @default_prop[name] = make_prop_value(name, value) end |
#adjust_x_centering(x, w) ⇒ Object
205 206 207 208 209 |
# File 'lib/rabbit/element/base.rb', line 205 def adjust_x_centering(x, w) x -= centering_adjusted_width w += centering_adjusted_width [x, w] end |
#adjust_y_margin(y, h) ⇒ Object
225 226 227 228 229 |
# File 'lib/rabbit/element/base.rb', line 225 def adjust_y_margin(y, h) y += @margin_bottom h -= @margin_bottom [y, h] end |
#adjust_y_padding(y, h) ⇒ Object
211 212 213 214 215 |
# File 'lib/rabbit/element/base.rb', line 211 def adjust_y_padding(y, h) y -= @padding_top h += @padding_top + @padding_bottom [y, h] end |
#available_w ⇒ Object
301 302 303 |
# File 'lib/rabbit/element/base.rb', line 301 def available_w @w - @padding_left - @padding_right end |
#centering_adjusted_height ⇒ Object
317 318 319 |
# File 'lib/rabbit/element/base.rb', line 317 def centering_adjusted_height @centering_adjusted_height || 0 end |
#centering_adjusted_width ⇒ Object
313 314 315 |
# File 'lib/rabbit/element/base.rb', line 313 def centering_adjusted_width @centering_adjusted_width || 0 end |
#clear_margin ⇒ Object
256 257 258 259 260 261 |
# File 'lib/rabbit/element/base.rb', line 256 def clear_margin @margin_left = @default_margin_left @margin_right = @default_margin_right @margin_top = @default_margin_top @margin_bottom = @default_margin_bottom end |
#clear_padding ⇒ Object
249 250 251 252 253 254 |
# File 'lib/rabbit/element/base.rb', line 249 def clear_padding @padding_left = @default_padding_left @padding_right = @default_padding_right @padding_top = @default_padding_top @padding_bottom = @default_padding_bottom end |
#clear_theme ⇒ Object
170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/rabbit/element/base.rb', line 170 def clear_theme @slide = nil @visible = @default_visible @real_simulation = true @width = @height = nil @centering_adjusted_width = nil @centering_adjusted_height = nil @horizontal_centering = @vertical_centering = false @prop = default_prop clear_margin clear_padding clear_draw_procs dirty! end |
#clone ⇒ Object
330 331 332 333 334 335 |
# File 'lib/rabbit/element/base.rb', line 330 def clone obj = super obj.user_property = @user_property.clone obj.prop = @prop.clone obj end |
#compile(canvas, x, y, w, h) ⇒ Object
89 90 91 92 93 94 95 96 97 |
# File 'lib/rabbit/element/base.rb', line 89 def compile(canvas, x, y, w, h) @base_x, @base_y, @base_w, @base_h = x, y, w, h @px, @py, @pw, @ph = @x, @y, @w, @h x, y, w, h = setup_margin(x, y, w, h) @canvas, @x, @y, @w, @h = canvas, x, y, w, h if [@px, @py, @pw, @ph] != [@x, @y, @w, @h] dirty! end end |
#compile_for_horizontal_centering(canvas, x, y, w, h) ⇒ Object
99 100 101 |
# File 'lib/rabbit/element/base.rb', line 99 def compile_for_horizontal_centering(canvas, x, y, w, h) compile(canvas, x, y, w, h) end |
#compile_horizontal(canvas, x, y, w, h) ⇒ Object
103 104 105 106 107 |
# File 'lib/rabbit/element/base.rb', line 103 def compile_horizontal(canvas, x, y, w, h) if do_horizontal_centering? do_horizontal_centering(canvas, x, y, w, h) end end |
#default_prop ⇒ Object
337 338 339 |
# File 'lib/rabbit/element/base.rb', line 337 def default_prop @default_prop.dup end |
#dirty! ⇒ Object
73 74 75 |
# File 'lib/rabbit/element/base.rb', line 73 def dirty! @dirty = true end |
#dirty? ⇒ Boolean
77 78 79 |
# File 'lib/rabbit/element/base.rb', line 77 def dirty? @dirty end |
#do_horizontal_centering(canvas, x, y, w, h) ⇒ Object
290 291 |
# File 'lib/rabbit/element/base.rb', line 290 def do_horizontal_centering(canvas, x, y, w, h) end |
#do_horizontal_centering? ⇒ Boolean
270 271 272 273 |
# File 'lib/rabbit/element/base.rb', line 270 def do_horizontal_centering? @horizontal_centering or (parent and parent.do_horizontal_centering?) end |
#do_vertical_centering? ⇒ Boolean
275 276 277 278 |
# File 'lib/rabbit/element/base.rb', line 275 def do_vertical_centering? @vertical_centering or (parent and parent.do_horizontal_centering?) end |
#draw(simulation = false) ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/rabbit/element/base.rb', line 62 def draw(simulation=false) x, y, w, h = setup_padding(@x, @y, @w, @h) x, y, w, h = _draw(@canvas, x, y, w, h, simulation) x, w = restore_x_padding(x, w) x, w = restore_x_margin(x, w) x, w = adjust_x_centering(x, w) y, h = adjust_y_padding(y, h) y, h = adjust_y_margin(y, h) [x, y, w, h] end |
#font(props) ⇒ Object
141 142 143 144 145 146 147 148 149 150 |
# File 'lib/rabbit/element/base.rb', line 141 def font(props) props.each do |key, value| key, value = normalize_font_property(key, value) if value prop_set(key, value) else prop_delete(key) end end end |
#have_wait_tag? ⇒ Boolean
85 86 87 |
# File 'lib/rabbit/element/base.rb', line 85 def have_wait_tag? false end |
#height ⇒ Object
309 310 311 |
# File 'lib/rabbit/element/base.rb', line 309 def height @height + @padding_top + @padding_bottom end |
#hide(&block) ⇒ Object
373 374 375 |
# File 'lib/rabbit/element/base.rb', line 373 def hide(&block) change_visible(false, &block) end |
#if_dirty ⇒ Object
263 264 265 266 267 268 |
# File 'lib/rabbit/element/base.rb', line 263 def if_dirty if dirty? yield @dirty = false end end |
#init_default_margin ⇒ Object
238 239 240 241 242 243 |
# File 'lib/rabbit/element/base.rb', line 238 def init_default_margin @default_margin_left = 0 @default_margin_right = 0 @default_margin_top = 0 @default_margin_bottom = 0 end |
#init_default_padding ⇒ Object
231 232 233 234 235 236 |
# File 'lib/rabbit/element/base.rb', line 231 def init_default_padding @default_padding_left = 0 @default_padding_right = 0 @default_padding_top = 0 @default_padding_bottom = 0 end |
#init_default_visible ⇒ Object
245 246 247 |
# File 'lib/rabbit/element/base.rb', line 245 def init_default_visible @default_visible = !have_wait_tag? end |
#initialize ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/rabbit/element/base.rb', line 38 def initialize @x = @y = @w = @h = nil @parent = nil @user_property = {} @default_prop = {} init_default_padding init_default_margin init_default_visible clear_theme end |
#inline_element? ⇒ Boolean
152 153 154 |
# File 'lib/rabbit/element/base.rb', line 152 def inline_element? true end |
#inspect(verbose = false) ⇒ Object
321 322 323 324 325 326 327 328 |
# File 'lib/rabbit/element/base.rb', line 321 def inspect(verbose=false) if verbose self_info = super() else self_info = "<#{self.class.name}>" end self_info end |
#margin_set(*values) ⇒ Object
345 346 347 348 349 350 351 |
# File 'lib/rabbit/element/base.rb', line 345 def margin_set(*values) top, right, bottom, left = parse_four_way(*values) @margin_top = top if top @margin_right = right if right @margin_bottom = bottom if bottom @margin_left = left if left end |
#margin_with(params) ⇒ Object
353 354 355 |
# File 'lib/rabbit/element/base.rb', line 353 def margin_with(params) margin_set(params) end |
#match?(pattern) ⇒ Boolean
341 342 343 |
# File 'lib/rabbit/element/base.rb', line 341 def match?(pattern) pattern === text end |
#next_element ⇒ Object
297 298 299 |
# File 'lib/rabbit/element/base.rb', line 297 def next_element sibling_element(1) end |
#padding_set(*values) ⇒ Object
357 358 359 360 361 362 363 |
# File 'lib/rabbit/element/base.rb', line 357 def padding_set(*values) top, right, bottom, left = parse_four_way(*values) @padding_top = top if top @padding_right = right if right @padding_bottom = bottom if bottom @padding_left = left if left end |
#padding_with(params) ⇒ Object
365 366 367 |
# File 'lib/rabbit/element/base.rb', line 365 def padding_with(params) padding_set(params) end |
#previous_element ⇒ Object
293 294 295 |
# File 'lib/rabbit/element/base.rb', line 293 def previous_element sibling_element(-1) end |
#prop_delete(name) ⇒ Object Also known as: __prop_delete__
129 130 131 132 133 |
# File 'lib/rabbit/element/base.rb', line 129 def prop_delete(name) name = normalize_property_name(name) @prop.delete(name) dirty! end |
#prop_get(name) ⇒ Object Also known as: __prop_get__
116 117 118 119 |
# File 'lib/rabbit/element/base.rb', line 116 def prop_get(name) name = normalize_property_name(name) @prop[name] end |
#prop_set(name, *values) ⇒ Object Also known as: __prop_set__
109 110 111 112 113 |
# File 'lib/rabbit/element/base.rb', line 109 def prop_set(name, *values) name = normalize_property_name(name) @prop[name] = make_prop_value(name, *values) dirty! end |
#prop_value(name) ⇒ Object
122 123 124 125 126 127 |
# File 'lib/rabbit/element/base.rb', line 122 def prop_value(name) name = normalize_property_name(name) value = @prop[name] value = value.value if value.respond_to?(:value) value end |
#restore_x_margin(x, w) ⇒ Object
199 200 201 202 203 |
# File 'lib/rabbit/element/base.rb', line 199 def restore_x_margin(x, w) x -= @margin_left w += @margin_left + @margin_right [x, w] end |
#restore_x_padding(x, w) ⇒ Object
193 194 195 196 197 |
# File 'lib/rabbit/element/base.rb', line 193 def restore_x_padding(x, w) x -= @padding_left w += @padding_left + @padding_right [x, w] end |
#setup_margin(x, y, w, h) ⇒ Object
217 218 219 220 221 222 223 |
# File 'lib/rabbit/element/base.rb', line 217 def setup_margin(x, y, w, h) x += @margin_left y += @margin_top w -= @margin_left + @margin_right h -= @margin_top + @margin_bottom [x, y, w, h] end |
#setup_padding(x, y, w, h) ⇒ Object
185 186 187 188 189 190 191 |
# File 'lib/rabbit/element/base.rb', line 185 def setup_padding(x, y, w, h) x += @padding_left y += @padding_top w -= @padding_left + @padding_right h -= @padding_top + @padding_bottom [x, y, w, h] end |
#show(&block) ⇒ Object
369 370 371 |
# File 'lib/rabbit/element/base.rb', line 369 def show(&block) change_visible(true, &block) end |
#slide ⇒ Object
58 59 60 |
# File 'lib/rabbit/element/base.rb', line 58 def @slide ||= end |
#substitute_newline ⇒ Object
164 165 166 167 168 |
# File 'lib/rabbit/element/base.rb', line 164 def substitute_newline substitute_text do |text| text.gsub(/(\\)?\\n/) {$1 ? "\\n" : "\n"} end end |
#substitute_text ⇒ Object
160 161 162 |
# File 'lib/rabbit/element/base.rb', line 160 def substitute_text false end |
#text_renderer? ⇒ Boolean
156 157 158 |
# File 'lib/rabbit/element/base.rb', line 156 def text_renderer? false end |
#visible? ⇒ Boolean
54 55 56 |
# File 'lib/rabbit/element/base.rb', line 54 def visible? @visible end |
#wait(*args, &block) ⇒ Object
81 82 83 |
# File 'lib/rabbit/element/base.rb', line 81 def wait(*args, &block) .register_wait_proc(self, *args, &block) if end |
#width ⇒ Object
305 306 307 |
# File 'lib/rabbit/element/base.rb', line 305 def width @width + @padding_left + @padding_right end |