Sha256: 22ddad7631c293a137e2466f890302342526497b897ca04b4e32e4a8ed29349f

Contents?: true

Size: 724 Bytes

Versions: 36

Compression:

Stored size: 724 Bytes

Contents

# Copyright (c) 2015 Ruby-GNOME2 Project Team
# This program is licenced under the same licence as Ruby-GNOME2.
#
=begin
= Stack

GtkStack is a container that shows a single child at a time,
with nice transitions when the visible child changes.

GtkStackSwitcher adds buttons to control which child is visible.
=end

class StackDemo
  def initialize(main_window)
    builder = Gtk::Builder.new(:resource => "/stack/stack.ui")
    builder.connect_signals {}
    @window = builder["window1"]
    @window.screen = main_window.screen

    @window.signal_connect("destroy") { window.destroyed(window) }
  end

  def run
    if !@window.visible?
      @window.show_all
    else
      @window.destroy
    end
    @window
  end
end

Version data entries

36 entries across 28 versions & 2 rubygems

Version Path
gtk3-3.1.6-x64-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.6-x86-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.6 sample/gtk-demo/stack.rb
gtk3-3.1.5-x64-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.5-x86-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.4-x64-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.4-x86-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.4 sample/gtk-demo/stack.rb
gtk3-3.1.3-x64-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.3-x86-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.3 sample/gtk-demo/stack.rb
gtk3-3.1.2-x64-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.2-x86-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.2 sample/gtk-demo/stack.rb
savant-echo-1.0.4 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/gtk-demo/stack.rb
savant-echo-1.0.4 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/gtk-demo/stack.rb
gtk3-3.1.1-x64-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.1-x86-mingw32 sample/gtk-demo/stack.rb
gtk3-3.1.1 sample/gtk-demo/stack.rb
savant-echo-1.0.1 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/gtk-demo/stack.rb