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 <gdk/gdk.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_TYPE_COMBO_BOX)
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, GdkRGBA *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 : : GOComboColor : a GOColor
void go_combo_color_set_instant_apply (GOComboColor *cc, gboolean active)
 go_combo_color_set_instant_apply : : GOComboColor : 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 : Support alpha layer
void go_combo_color_set_color_to_default (GOComboColor *cc)
 go_combo_color_set_color_to_default : : GOComboColor
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 
)

go_combo_color_new : : optionally NULL.

: FIXME : The colour to use a the default : GOColorGroup

Default constructor. Pass an optional icon and an optional label for the no/auto color button.

Returns: The newly constructed combo.

Referenced by EV_UnixToolbar::synthesize().

void go_combo_color_set_allow_alpha ( GOComboColor cc,
gboolean  allow_alpha 
)

go_combo_color_set_allow_alpha : : GOComboColor : Support alpha layer

Should the custom colour selector allow the use of opacity.

void go_combo_color_set_color ( GOComboColor cc,
GOColor  c 
)

go_combo_color_set_color : : GOComboColor : a GOColor

void go_combo_color_set_color_gdk ( GOComboColor cc,
GdkRGBA 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 GO_COLOR_FROM_GDK_RGBA, go_color_palette_set_color_to_default(), go_color_palette_set_current_color(), GO_IS_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 : : GOComboColor

Set the color of the combo to the default color. Causes the color_changed signal to be emitted.

void go_combo_color_set_instant_apply ( GOComboColor cc,
gboolean  active 
)

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.

Referenced by EV_UnixToolbar::synthesize().

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_TYPE_COMBO_BOX   
)

Variable Documentation

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