Classes | Defines | Enumerations | Functions | Variables

go-combo-color.c File Reference

#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 Documentation

#define PREVIEW_SIZE   20

Referenced by go_combo_color_new().


Enumeration Type Documentation

anonymous enum
Enumerator:
COLOR_CHANGED 
DISPLAY_CUSTOM_DIALOG 
LAST_SIGNAL 

Function Documentation

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]
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]
static void emit_color_changed ( GOComboColor cc,
GOColor  color,
gboolean  is_custom,
gboolean  by_user,
gboolean  is_default 
) [static]
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 
)
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]
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]
GSF_CLASS ( GOComboColor  ,
go_combo_color  ,
go_combo_color_class_init  ,
go_combo_color_init  ,
GO_COMBO_BOX_TYPE   
)

Variable Documentation

GObjectClass* go_combo_color_parent_class [static]
guint go_combo_color_signals[LAST_SIGNAL] = { 0, } [static]