class ToolpaletteDemo
Tool Palette¶ ↑
A tool palette widget shows groups of toolbar items as a grid of icons or a list of names.
Public Class Methods
new(main_window)
click to toggle source
# File gtk3/sample/gtk-demo/toolpalette.rb, line 11 def initialize(main_window) @window = Gtk::Window.new(:toplevel) @window.screen = main_window.screen @window.title = "Tool Palette" @window.set_default_size(200, 600) @canvas_items = [] # Add widgets to control the ToolPalette appearance @box = Gtk::Box.new(:vertical, 6) @box.margin = 6 @window.add(@box) create_orientation_combobox create_style_combobox # Add hbox. @hbox = Gtk::Box.new(:horizontal, 5) @box.pack_start(@hbox, :expand => true, :fill => true, :padding => 0) create_and_fill_the_toolpalette add_comboboxes_signals # Notebook create_and_fill_the_notebook end
Public Instance Methods
run()
click to toggle source
# File gtk3/sample/gtk-demo/toolpalette.rb, line 37 def run if !@window.visible? @window.show_all else @window.destroy end @window end