Interface

Gtk-4.0GtkColorChooserInterface

Interface for implementing ColorChooser. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_add_palette(
        orientation: Gtk.Orientation,
        colors_per_line: number,
        colors?: Gdk.RGBA[],
    ): void;
    vfunc_color_activated(color: Gdk.RGBA): void;
    vfunc_get_rgba(): Gdk.RGBA;
    vfunc_set_rgba(color: Gdk.RGBA): void;
}

Hierarchy (View Summary)

Index

Methods

  • Adds a palette to the color chooser.

    If orientation is horizontal, the colors are grouped in rows, with colors_per_line colors in each row. If horizontal is false, the colors are grouped in columns instead.

    The default color palette of Gtk.ColorChooserWidget has 45 colors, organized in columns of 5 colors (this includes some grays).

    The layout of the color chooser widget works best when the palettes have 9-10 columns.

    Calling this function for the first time has the side effect of removing the default color palette from the color chooser.

    If colors is null, removes all previously added palettes.

    Parameters

    Returns void