#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, gboolean is_default) |
| static void | cb_screen_changed (GOComboColor *cc, 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 (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 (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 | ( | GtkWidget * | button, | |
| GOComboColor * | cc | |||
| ) | [static] |
| static void cb_proxy_custom_dialog | ( | 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, | |
| GdkScreen * | previous_screen | |||
| ) | [static] |
| 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 | |||
| ) |
References go_color_palette_get_current_color(), IS_GO_COMBO_COLOR, _GOComboColor::palette, and RGBA_BLACK.
| 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, GOColor, _GOComboColor::palette, _GOComboColor::preview_button, _GOComboColor::preview_image, _GOComboColor::preview_is_icon, and PREVIEW_SIZE.
Referenced by EV_UnixToolbar::synthesize().
| void go_combo_color_set_allow_alpha | ( | GOComboColor * | cc, | |
| gboolean | allow_alpha | |||
| ) |
go_combo_color_set_allow_alpha : : GOComboColor :
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
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, | |||
| 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
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(), 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
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 _GOComboColor::instant_apply, and IS_GO_COMBO_COLOR.
Referenced by EV_UnixToolbar::synthesize().
| static void go_combo_color_set_title | ( | GOComboBox * | combo, | |
| char const * | title | |||
| ) | [static] |
References go_color_palette_set_title(), and GO_COMBO_COLOR.
Referenced by go_combo_color_class_init().
| 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().
1.5.5