Sha256: 4fb41fa197fa211755a1383f260fcef3a65c16be0277bf624851fc930b318ea7

Contents?: true

Size: 796 Bytes

Versions: 38

Compression:

Stored size: 796 Bytes

Contents

=begin

  colorselect.rb - a part of testgtk.c rewritten in Ruby/GTK2

  Copyright (C) 2002-2005 Ruby-GNOME2 Project
  $Id: colorselect.rb,v 1.5 2005/07/17 16:55:27 mutoh Exp $
=end

require 'sample'

class ColorSelectionSample < Gtk::ColorSelectionDialog
  include Sample
  extend SampleClass

  def initialize
    super(:title => "color selection dialog")
    @destroyed = false
    signal_connect("destroy"){destroy}

    color_selection.set_has_opacity_control(true)
    set_window_position(:mouse) # Gtk::Window::Position::MOUSE

    color_selection.signal_connect("color_changed"){
      color_selection.current_color
    }
    ok_button.signal_connect("clicked"){
      puts color_selection.current_color
      destroy
    }
    cancel_button.signal_connect("clicked"){destroy}
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
gtk3-2.2.5-x64-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.5-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.5 sample/testgtk/colorselect.rb
gtk3-2.2.4-x64-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.4-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.4 sample/testgtk/colorselect.rb
gtk3-2.2.3-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.3 sample/testgtk/colorselect.rb
gtk3-2.2.2-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.2 sample/testgtk/colorselect.rb
gtk3-2.2.1-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.1 sample/testgtk/colorselect.rb
gtk3-2.2.0-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.2.0 sample/testgtk/colorselect.rb
gtk3-2.1.0-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.1.0 sample/testgtk/colorselect.rb
gtk3-2.0.3-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.0.3 sample/testgtk/colorselect.rb
gtk3-2.0.2-x86-mingw32 sample/testgtk/colorselect.rb
gtk3-2.0.2 sample/testgtk/colorselect.rb