summaryrefslogtreecommitdiff
path: root/ext/gtk/test9.rb
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-26 09:45:09 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-26 09:45:09 +0000
commit0f07bf41aa4326618dd4b1296f77f6523be5986a (patch)
treea6c8ecf714bf4aec14f9a761241ca227fe0a156f /ext/gtk/test9.rb
parent05da25f297c4d26b6bb454a9649b1dd63a102910 (diff)
This commit was manufactured by cvs2svn to create tag 'v1_1b9_28'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_1b9_28@256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/gtk/test9.rb')
-rw-r--r--ext/gtk/test9.rb95
1 files changed, 0 insertions, 95 deletions
diff --git a/ext/gtk/test9.rb b/ext/gtk/test9.rb
deleted file mode 100644
index 0149718032..0000000000
--- a/ext/gtk/test9.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-require 'gtk'
-
-def create_bbox_window(horizontal, title, pos, spacing, cw, ch, layout)
- window = Gtk::Window::new(Gtk::WINDOW_TOPLEVEL)
- window.set_title(title)
- window.signal_connect("delete_event") do
- window.hide
- window.destroy
- end
- if horizontal
- window.set_usize(550, 60)
- window.set_uposition(150, pos)
- else
- window.set_usize(150, 400)
- window.set_uposition(pos, 200)
- end
- box1 = Gtk::VBox::new(FALSE, 0)
- window.add box1
- box1.show
- if horizontal
- bbox = Gtk::HButtonBox::new()
- else
- bbox = Gtk::VButtonBox::new()
- end
- bbox.set_layout layout
- bbox.set_spacing spacing
- bbox.set_child_size cw, ch
- bbox.show
- box1.border_width 25
- box1.pack_start(bbox, TRUE, TRUE, 0)
- button = Gtk::Button::new("OK")
- bbox.add button
- button.signal_connect("clicked") do
- window.hide
- window.destroy
- end
- button.show
-
- button = Gtk::Button::new("Cancel")
- bbox.add button
- button.signal_connect("clicked") do
- window.hide
- window.destroy
- end
- button.show
-
- button = Gtk::Button::new("Help")
- bbox.add button
- button.show
-
- window.show
-end
-
-def test_hbbox
- create_bbox_window(TRUE, "Spread", 50, 40, 85, 25, Gtk::BUTTONBOX_SPREAD);
- create_bbox_window(TRUE, "Edge", 250, 40, 85, 28, Gtk::BUTTONBOX_EDGE);
- create_bbox_window(TRUE, "Start", 450, 40, 85, 25, Gtk::BUTTONBOX_START);
- create_bbox_window(TRUE, "End", 650, 15, 30, 25, Gtk::BUTTONBOX_END);
-end
-
-def test_vbbox
- create_bbox_window(FALSE, "Spread", 50, 40, 85, 25, Gtk::BUTTONBOX_SPREAD);
- create_bbox_window(FALSE, "Edge", 250, 40, 85, 28, Gtk::BUTTONBOX_EDGE);
- create_bbox_window(FALSE, "Start", 450, 40, 85, 25, Gtk::BUTTONBOX_START);
- create_bbox_window(FALSE, "End", 650, 15, 30, 25, Gtk::BUTTONBOX_END);
-end
-
-window = Gtk::Window::new(Gtk::WINDOW_TOPLEVEL)
-window.signal_connect("delete_event") do
- window.destroy
- exit
-end
-window.set_title("button box")
-window.border_width(20)
-
-bbox = Gtk::HButtonBox::new()
-window.add(bbox)
-bbox.show
-
-button = Gtk::Button::new("Horizontal")
-def button.clicked(*args)
- test_hbbox
-end
-bbox.add button
-button.show
-
-button = Gtk::Button::new("Vertical")
-def button.clicked(*args)
- test_vbbox
-end
-bbox.add button
-button.show
-window.show
-
-Gtk::main()