class Demo::Printing

Constants

Data
HEADER_GAP
HEADER_HEIGHT

Public Class Methods

new() click to toggle source
Calls superclass method Demo::BasicWindow.new
# File gtk2/sample/gtk-demo/printing.rb, line 18
def initialize
  super('Printing')

  button = Gtk::Button.new("Print...")
  button.signal_connect("clicked") do
    begin
      run_print_operation
    rescue
      dialog = Gtk::MessageDialog.new(self, :destroy_with_parent, :error,
                                      :close, $!.message)
      dialog.signal_connect("response") do
        dialog.destroy
        true
      end
      dialog.show
    end
    true
  end
  add(button)
end