ColorSelection


Object Hierarchy:

Gtk.ColorSelection Gtk.ColorSelection Gtk.ColorSelection Gtk.Box Gtk.Box Gtk.Box->Gtk.ColorSelection Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.ColorSelection Atk.Implementor->Gtk.Box Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.ColorSelection Gtk.Buildable->Gtk.Box Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.ColorSelection Gtk.Orientable->Gtk.Box

Description:

[ CCode ( type_id = "gtk_color_selection_get_type ()" ) ]
public class ColorSelection : Box, Implementor, Buildable, Orientable

Example: ColorSelection:

public class Application : Gtk.Window {

public Application () {
// Prepare Gtk.Window:
this.title = "My Gtk.ColorSelection";
this.window_position = Gtk.WindowPosition.CENTER;
this.destroy.connect (Gtk.main_quit);

// The Box:
Gtk.Box box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
this.add (box);

// The ColorChooserWidget:
Gtk.ColorSelection widget = new Gtk.ColorSelection ();
box.add (widget);

// A Button:
Gtk.Button button = new Gtk.Button.with_label ("Print Selection");
box.add (button);

button.clicked.connect (() => {
string rgba = widget.current_rgba.to_string ();
uint alpha = widget.current_alpha;
print ("Selection\n");
print (" %s\n", rgba);
print (" %u\n", alpha);
});
}

public static int main (string[] args) {
Gtk.init (ref args);

Application app = new Application ();
app.show_all ();
Gtk.main ();
return 0;
}
}

valac --pkg gtk+-3.0 Gtk.ColorSelection.vala


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Static methods:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Orientable