class RevealerDemo
Revealer¶ ↑
GtkRevealer is a container that animates showing and hiding of its sole child with nice transitions.
Public Class Methods
new(main_window)
click to toggle source
# File gtk3/sample/gtk-demo/revealer.rb, line 11 def initialize(main_window) @builder = Gtk::Builder.new(:resource => "/revealer/revealer.ui") @builder.connect_signals {} @timeout = nil @count = 0 @window = @builder["window"] @window.screen = main_window.screen @window.signal_connect "destroy" do if @timeout GLib::Source.remove(@timeout) @timeout = nil end end end
Public Instance Methods
run()
click to toggle source
# File gtk3/sample/gtk-demo/revealer.rb, line 28 def run if !@window.visible? add_timeout @window.show_all else @window.destroy end @window end