# File gtk2/sample/testgtk/toolbar.rb, line 35 def initialize super("Toolbar test") toolbar = Gtk::Toolbar.new toolbar.append("Horizontal", "Horizontal toolbar layout", "Toolbar/Horizontal", Gtk::Image.new("test.xpm")){ toolbar.orientation = Gtk::ORIENTATION_HORIZONTAL } toolbar.append("Vertical", "Vertical toolbar layout", "Toolbar/Vertical", Gtk::Image.new("test.xpm")){ toolbar.orientation = Gtk::ORIENTATION_VERTICAL } toolbar.append_space toolbar.append("Icons", "Only show toolbar icons", "Toolbar/IconsOnly", Gtk::Image.new("test.xpm")){ toolbar.toolbar_style = Gtk::Toolbar::ICONS } toolbar.append("Text", "Only show toolbar text", "Toolbar/TextOnly", Gtk::Image.new("test.xpm")){ toolbar.toolbar_style = Gtk::Toolbar::TEXT } toolbar.append("Both", "Show toolbar icons and text", "Toolbar/Both", Gtk::Image.new("test.xpm")){ toolbar.toolbar_style = Gtk::Toolbar::BOTH } toolbar.append_space toolbar.append(Gtk::Entry.new, "This is an unusable Gtk::Entry ;)", "Hey don't click me!!!") toolbar.append_space toolbar.append("Enable", "Enable tooltips", nil, Gtk::Image.new("test.xpm")){ toolbar.tooltips = true } toolbar.append("Disable", "Disable tooltips", nil, Gtk::Image.new("test.xpm")){ toolbar.tooltips = false } add(toolbar) end
Generated with the Darkfish Rdoc Generator 2.