GimpColorProfileComboBox

GimpColorProfileComboBox

Synopsis




                    GimpColorProfileComboBox;
GtkWidget*          gimp_color_profile_combo_box_new    (GtkWidget *dialog,
                                                         const gchar *history);
GtkWidget*          gimp_color_profile_combo_box_new_with_model
                                                        (GtkWidget *dialog,
                                                         GtkTreeModel *model);
void                gimp_color_profile_combo_box_add    (GimpColorProfileComboBox *combo,
                                                         const gchar *filename,
                                                         const gchar *label);
void                gimp_color_profile_combo_box_set_active
                                                        (GimpColorProfileComboBox *combo,
                                                         const gchar *filename,
                                                         const gchar *label);
gchar*              gimp_color_profile_combo_box_get_active
                                                        (GimpColorProfileComboBox *combo);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkComboBox
                                       +----GimpColorProfileComboBox

Implemented Interfaces

GimpColorProfileComboBox implements AtkImplementorIface, GtkCellEditable and GtkCellLayout.

Properties


  "dialog"                   GtkDialog             : Read / Write / Construct Only
  "model"                    GimpColorProfileStore  : Read / Write

Description

Details

GimpColorProfileComboBox

typedef struct _GimpColorProfileComboBox GimpColorProfileComboBox;


gimp_color_profile_combo_box_new ()

GtkWidget*          gimp_color_profile_combo_box_new    (GtkWidget *dialog,
                                                         const gchar *history);

Create a combo-box widget for selecting color profiles. The combo-box is populated from the file specified as history. This filename is typically created using the following code snippet:

 gchar *history = gimp_personal_rc_file ("profilerc");

dialog : a GtkDialog to present when the user selects the "Select color profile from disk..." item
history : filename of the profilerc (or NULL for no history)
Returns : a new GimpColorProfileComboBox.

Since GIMP 2.4


gimp_color_profile_combo_box_new_with_model ()

GtkWidget*          gimp_color_profile_combo_box_new_with_model
                                                        (GtkWidget *dialog,
                                                         GtkTreeModel *model);

This constructor is useful when you want to create several combo-boxes for profile selection that all share the same GimpColorProfileStore. This is for example done in the GIMP Preferences dialog.

See also gimp_color_profile_combo_box_new().

dialog : a GtkDialog to present when the user selects the "Select color profile from disk..." item
model : a GimpColorProfileStore object
Returns : a new GimpColorProfileComboBox.

Since GIMP 2.4


gimp_color_profile_combo_box_add ()

void                gimp_color_profile_combo_box_add    (GimpColorProfileComboBox *combo,
                                                         const gchar *filename,
                                                         const gchar *label);

This function delegates to the underlying GimpColorProfileStore. Please refer to the documentation of gimp_color_profile_store_add() for details.

combo : a GimpColorProfileComboBox
filename : filename of the profile to add (or NULL)
label : label to use for the profile (may only be NULL if filename is NULL)

Since GIMP 2.4


gimp_color_profile_combo_box_set_active ()

void                gimp_color_profile_combo_box_set_active
                                                        (GimpColorProfileComboBox *combo,
                                                         const gchar *filename,
                                                         const gchar *label);

Selects a color profile from the combo and makes it the active item. If the profile is not listed in the combo, then it is added.

combo : a GimpColorProfileComboBox
filename : filename of the profile to select
label : label

Since GIMP 2.4


gimp_color_profile_combo_box_get_active ()

gchar*              gimp_color_profile_combo_box_get_active
                                                        (GimpColorProfileComboBox *combo);

combo : a GimpColorProfileComboBox
Returns : The filename of the currently selected color profile. This is a newly allocated string and should be released using g_free() when it is not any longer needed.

Since GIMP 2.4

Property Details

The "dialog" property

  "dialog"                   GtkDialog             : Read / Write / Construct Only

GtkDialog to present when the user selects the "Select color profile from disk..." item.

Since GIMP 2.4


The "model" property

  "model"                    GimpColorProfileStore  : Read / Write

Overrides the "model" property of the GtkComboBox class. GimpColorProfileComboBox requires the model to be a GimpColorProfileStore.

Since GIMP 2.4