#include <goffice/goffice-config.h>
#include "go-combo-color.h"
#include <goffice/utils/go-marshalers.h>
#include "go-combo-box.h"
#include "go-color-palette.h"
#include <gsf/gsf-impl-utils.h>
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkimage.h>
#include <gtk/gtkwindow.h>
#include <gdk/gdkcolor.h>
Classes | |
struct | _GOComboColor |
struct | GOComboColorClass |
Defines | |
#define | PREVIEW_SIZE 20 |
Enumerations | |
enum | { COLOR_CHANGED, DISPLAY_CUSTOM_DIALOG, LAST_SIGNAL } |
Functions | |
static void | go_combo_color_set_color_internal (GOComboColor *cc, GOColor color, G_GNUC_UNUSED gboolean is_default) |
static void | cb_screen_changed (GOComboColor *cc, G_GNUC_UNUSED GdkScreen *previous_screen) |
static void | emit_color_changed (GOComboColor *cc, GOColor color, gboolean is_custom, gboolean by_user, gboolean is_default) |
static void | cb_preview_clicked (G_GNUC_UNUSED GtkWidget *button, GOComboColor *cc) |
static void | go_combo_color_init (GOComboColor *cc) |
static void | go_combo_color_set_title (GOComboBox *combo, char const *title) |
static void | go_combo_color_class_init (GObjectClass *gobject_class) |
GSF_CLASS (GOComboColor, go_combo_color, go_combo_color_class_init, go_combo_color_init, GO_COMBO_BOX_TYPE) | |
static void | cb_proxy_custom_dialog (G_GNUC_UNUSED GOColorPalette *pal, GtkWidget *dialog, GOComboColor *cc) |
static void | color_table_setup (GOComboColor *cc, char const *no_color_label, GOColorGroup *color_group) |
GOColor | go_combo_color_get_color (GOComboColor *cc, gboolean *is_default) |
void | go_combo_color_set_color_gdk (GOComboColor *cc, GdkColor *color) |
go_combo_color_set_color_gdk : : The combo : The color | |
void | go_combo_color_set_color (GOComboColor *cc, GOColor c) |
go_combo_color_set_color : : a GOComboColor : a GOColor | |
void | go_combo_color_set_instant_apply (GOComboColor *cc, gboolean active) |
go_combo_color_set_instant_apply : : The combo : Whether instant apply should be active or not | |
void | go_combo_color_set_allow_alpha (GOComboColor *cc, gboolean allow_alpha) |
go_combo_color_set_allow_alpha : : GOComboColor : | |
void | go_combo_color_set_color_to_default (GOComboColor *cc) |
go_combo_color_set_color_to_default : : The combo | |
GtkWidget * | go_combo_color_new (GdkPixbuf *icon, char const *no_color_label, GOColor default_color, GOColorGroup *color_group) |
go_combo_color_new : : optionally NULL. | |
Variables | |
static guint | go_combo_color_signals [LAST_SIGNAL] = { 0, } |
static GObjectClass * | go_combo_color_parent_class |
#define PREVIEW_SIZE 20 |
Referenced by go_combo_color_new().
static void cb_preview_clicked | ( | G_GNUC_UNUSED GtkWidget * | button, | |
GOComboColor * | cc | |||
) | [static] |
static void cb_proxy_custom_dialog | ( | G_GNUC_UNUSED GOColorPalette * | pal, | |
GtkWidget * | dialog, | |||
GOComboColor * | cc | |||
) | [static] |
References DISPLAY_CUSTOM_DIALOG, GO_COMBO_BOX, go_combo_box_popup_hide(), and go_combo_color_signals.
Referenced by color_table_setup().
static void cb_screen_changed | ( | GOComboColor * | cc, | |
G_GNUC_UNUSED GdkScreen * | previous_screen | |||
) | [static] |
References _GOComboColor::palette.
Referenced by go_combo_color_init().
static void color_table_setup | ( | GOComboColor * | cc, | |
char const * | no_color_label, | |||
GOColorGroup * | color_group | |||
) | [static] |
References cb_proxy_custom_dialog(), _GOComboColor::default_color, go_color_palette_new(), and _GOComboColor::palette.
Referenced by go_combo_color_new().
static void emit_color_changed | ( | GOComboColor * | cc, | |
GOColor | color, | |||
gboolean | is_custom, | |||
gboolean | by_user, | |||
gboolean | is_default | |||
) | [static] |
References COLOR_CHANGED, GO_COMBO_BOX, go_combo_box_popup_hide(), and go_combo_color_signals.
Referenced by cb_preview_clicked(), and GSF_CLASS().
static void go_combo_color_class_init | ( | GObjectClass * | gobject_class | ) | [static] |
GOColor go_combo_color_get_color | ( | GOComboColor * | cc, | |
gboolean * | is_default | |||
) |
static void go_combo_color_init | ( | GOComboColor * | cc | ) | [static] |
GtkWidget* go_combo_color_new | ( | GdkPixbuf * | icon, | |
char const * | no_color_label, | |||
GOColor | default_color, | |||
GOColorGroup * | color_group | |||
) |
go_combo_color_new : : optionally NULL.
: FIXME
Default constructor. Pass an optional icon and an optional label for the no/auto color button.
References cc, color_table_setup(), _GOComboColor::default_color, go_color_palette_get_current_color(), GO_COMBO_BOX, go_combo_box_construct(), go_combo_color_set_color_internal(), GO_COMBO_COLOR_TYPE, GO_TYPE_COMBO_COLOR, GOColor, _GOComboColor::palette, _GOComboColor::preview_button, _GOComboColor::preview_image, _GOComboColor::preview_is_icon, and PREVIEW_SIZE.
void go_combo_color_set_allow_alpha | ( | GOComboColor * | cc, | |
gboolean | allow_alpha | |||
) |
go_combo_color_set_allow_alpha : : GOComboColor :
go_combo_color_set_allow_alpha : : GOComboColor : Support alpha layer
Should the custom colour selector allow the use of opacity.
References go_color_palette_set_allow_alpha(), and _GOComboColor::palette.
void go_combo_color_set_color | ( | GOComboColor * | cc, | |
GOColor | c | |||
) |
go_combo_color_set_color : : a GOComboColor : a GOColor
go_combo_color_set_color : : GOComboColor : a GOColor
References go_color_palette_set_current_color(), and _GOComboColor::palette.
void go_combo_color_set_color_gdk | ( | GOComboColor * | cc, | |
GdkColor * | color | |||
) |
go_combo_color_set_color_gdk : : The combo : The color
Set the color of the combo to the given color. Causes the color_changed signal to be emitted.
References GDK_TO_UINT, go_color_palette_set_color_to_default(), go_color_palette_set_current_color(), IS_GO_COMBO_COLOR, and _GOComboColor::palette.
static void go_combo_color_set_color_internal | ( | GOComboColor * | cc, | |
GOColor | color, | |||
G_GNUC_UNUSED gboolean | is_default | |||
) | [static] |
References _GOComboColor::preview_image, _GOComboColor::preview_is_icon, RGBA_GREY, and UINT_RGBA_A.
Referenced by go_combo_color_new(), and GSF_CLASS().
void go_combo_color_set_color_to_default | ( | GOComboColor * | cc | ) |
go_combo_color_set_color_to_default : : The combo
go_combo_color_set_color_to_default : : GOComboColor
Set the color of the combo to the default color. Causes the color_changed signal to be emitted.
References go_color_palette_set_color_to_default(), GO_IS_COMBO_COLOR, IS_GO_COMBO_COLOR, and _GOComboColor::palette.
void go_combo_color_set_instant_apply | ( | GOComboColor * | cc, | |
gboolean | active | |||
) |
go_combo_color_set_instant_apply : : The combo : Whether instant apply should be active or not
go_combo_color_set_instant_apply : : GOComboColor : Whether instant apply should be active or not
Turn instant apply behaviour on or off. Instant apply means that pressing the button applies the current color. When off, pressing the button opens the combo.
References GO_IS_COMBO_COLOR, _GOComboColor::instant_apply, and IS_GO_COMBO_COLOR.
static void go_combo_color_set_title | ( | GOComboBox * | combo, | |
char const * | title | |||
) | [static] |
References go_color_palette_set_title(), and GO_COMBO_COLOR.
GSF_CLASS | ( | GOComboColor | , | |
go_combo_color | , | |||
go_combo_color_class_init | , | |||
go_combo_color_init | , | |||
GO_COMBO_BOX_TYPE | ||||
) |
References emit_color_changed(), and go_combo_color_set_color_internal().
GObjectClass* go_combo_color_parent_class [static] |
Referenced by go_combo_color_class_init().
guint go_combo_color_signals[LAST_SIGNAL] = { 0, } [static] |
Referenced by cb_proxy_custom_dialog(), emit_color_changed(), and go_combo_color_class_init().