InfTextGtkHueChooser

InfTextGtkHueChooser — A GTK+ widget for selecting a hue value

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <libinftextgtk/inf-text-gtk-hue-chooser.h>

                    InfTextGtkHueChooser;
struct              InfTextGtkHueChooserClass;
GtkWidget *         inf_text_gtk_hue_chooser_new        (void);
GtkWidget *         inf_text_gtk_hue_chooser_new_with_hue
                                                        (gdouble hue);
void                inf_text_gtk_hue_chooser_set_hue    (InfTextGtkHueChooser *chooser,
                                                         gdouble hue);
gdouble             inf_text_gtk_hue_chooser_get_hue    (InfTextGtkHueChooser *chooser);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----InfTextGtkHueChooser

Implemented Interfaces

InfTextGtkHueChooser implements AtkImplementorIface and GtkBuildable.

Properties

  "hue"                      gdouble               : Read / Write / Construct

Signals

  "hue-change"                                     : Run Last
  "move"                                           : Action

Description

InfTextGtkHueChooser is a widget which allows the user to select a hue value without selecting also saturation and lightness at the same time. It only presents the hue circle without the inner triangle.

Details

InfTextGtkHueChooser

typedef struct _InfTextGtkHueChooser InfTextGtkHueChooser;

InfTextGtkHueChooser is an opaque data type. You should only access it via the public API functions.


struct InfTextGtkHueChooserClass

struct InfTextGtkHueChooserClass {
  void(*hue_change)(InfTextGtkHueChooser* chooser,
                    gdouble hue);

  void(*move)(InfTextGtkHueChooser* chooser,
              GtkDirectionType direction);
};

This structure contains default signal handlers of the InfTextGtkHueChooser class.

hue_change ()

Default signal handler for the "hue-change" signal.

move ()

Default signal handler for the "move" signal.

inf_text_gtk_hue_chooser_new ()

GtkWidget *         inf_text_gtk_hue_chooser_new        (void);

Creates a new InfTextGtkHueChooser widget with the initial hue set to 0.0 (red).

Returns :

A newly created InfTextGtkHueChooser.

inf_text_gtk_hue_chooser_new_with_hue ()

GtkWidget *         inf_text_gtk_hue_chooser_new_with_hue
                                                        (gdouble hue);

Creates a new InfTextGtkHueChooser widget with the given hue as initial value. hue must be between 0.0 and 1.0.

hue :

Initial hue value

Returns :

A newly created InfTextGtkHueChooser.

inf_text_gtk_hue_chooser_set_hue ()

void                inf_text_gtk_hue_chooser_set_hue    (InfTextGtkHueChooser *chooser,
                                                         gdouble hue);

Sets the current hue value of chooser to hue. hue must be between 0.0 and 1.0.

chooser :

A InfTextGtkHueChooser.

hue :

New hue value.

inf_text_gtk_hue_chooser_get_hue ()

gdouble             inf_text_gtk_hue_chooser_get_hue    (InfTextGtkHueChooser *chooser);

Returns the currently selected hue value of chooser.

chooser :

A InfTextGtkHueChooser.

Returns :

The current hue value, a number between 0.0 and 1.0.

Property Details

The "hue" property

  "hue"                      gdouble               : Read / Write / Construct

The current hue value.

Allowed values: [0,1]

Default value: 0

Signal Details

The "hue-change" signal

void                user_function                      (InfTextGtkHueChooser *chooser,
                                                        gdouble               hue,
                                                        gpointer              user_data)      : Run Last

This signal is emitted whenever the hue value is changed.

chooser :

The InfTextGtkHueChooser emitting the signal.

hue :

The new hue value.

user_data :

user data set when the signal handler was connected.

The "move" signal

void                user_function                      (InfTextGtkHueChooser *chooser,
                                                        GtkDirectionType      direction,
                                                        gpointer              user_data)      : Action

This is an action signal emitted when the selection is moved by the user.

chooser :

The InfTextGtkHueChooser emitting the signal.

direction :

The direction in which the move was mode.

user_data :

user data set when the signal handler was connected.

See Also

InfTextGtkHueChooser