Sha256: 78a848477d0ea26ae78097ca84fe9e88eb8f141b4b4fc409e355fd95c3eefa9c
Contents?: true
Size: 1002 Bytes
Versions: 9
Compression:
Stored size: 1002 Bytes
Contents
require 'rabbit/renderer/engine' require 'rabbit/renderer/display/drawing-area-primitive' module Rabbit module Renderer module Display class DrawingAreaViewOnly include Renderer::Engine::Cairo include DrawingAreaPrimitive def attach_to(window, container=nil, &block) super add_widgets_to_container(@container, &block) widget.show end def detach widget.hide unless @window.destroyed? remove_widgets_from_container(@container) end super end private def init_color super init_engine_color end def add_widgets_to_container(container, &block) if block_given? yield(container, @area) else container.add(@area) end end def remove_widgets_from_container(container) container.remove(@area) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems