lib/rabbit/renderer/base.rb in rabbit-0.9.1 vs lib/rabbit/renderer/base.rb in rabbit-0.9.2
- old
+ new
@@ -63,11 +63,10 @@
@progress_background = nil
@graffiti_color = nil
@graffiti_line_width = nil
@draw_scaled_image = true
clean
- init_hook_procs
init_dpi
init_gl_parameters
end
def page_margin_left
@@ -174,50 +173,10 @@
nil
end
end.compact.join(" ")
end
- def call_hook_procs(procs, *args)
- procs.any? {|proc| proc.call(*args)}
- end
-
- def add_motion_notify_hook(hook=Proc.new)
- @motion_notify_hook_procs << hook
- end
-
- def clear_motion_notify_hook
- @motion_notify_hook_procs.clear
- end
-
- def add_scroll_hook(hook=Proc.new)
- @scroll_hook_procs << hook
- end
-
- def clear_scroll_hook
- @scroll_hook_procs.clear
- end
-
- def add_button_press_hook(hook=Proc.new)
- @button_press_hook_procs << hook
- end
-
- def clear_button_press_hook
- @button_press_hook_procs.clear
- end
-
- def add_button_release_hook(hook=Proc.new)
- @button_release_hook_procs << hook
- end
-
- def clear_button_release_hook
- @button_release_hook_procs.clear
- end
-
- def clear_hooks
- init_hook_procs
- end
-
def clean
dirty_count_clean
end
def clean_if_dirty
@@ -450,16 +409,9 @@
def not_support_method(name)
format = _("%s does not support: %s")
msg = format % [self.class.name, name]
@canvas.logger.warn(msg)
- end
-
- def init_hook_procs
- @motion_notify_hook_procs = []
- @scroll_hook_procs = []
- @button_press_hook_procs = []
- @button_release_hook_procs = []
end
def init_dpi
@x_dpi = 72
@y_dpi = 72