pcb 4.1.1
An interactive printed circuit board layout editor.
|
Implementation of GtkCellRenderer for layer visibility toggler. More...
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include "gtkhid.h"
#include "gui.h"
#include "ghid-cell-renderer-visibility.h"
Go to the source code of this file.
Data Structures | |
struct | _GHidCellRendererVisibility |
struct | _GHidCellRendererVisibilityClass |
Enumerations | |
enum | { TOGGLED, LAST_SIGNAL } |
enum | { PROP_ACTIVE = 1, PROP_COLOR } |
Functions | |
static void | ghid_cell_renderer_visibility_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) |
Calculates the window area the renderer will use. | |
static void | ghid_cell_renderer_visibility_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags) |
Actually renders the swatch. | |
static gint | ghid_cell_renderer_visibility_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *background_area, GdkRectangle *cell_area, GtkCellRendererState flags) |
Toggless the swatch. | |
static void | ghid_cell_renderer_visibility_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec) |
static void | ghid_cell_renderer_visibility_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) |
static void | ghid_cell_renderer_visibility_init (GHidCellRendererVisibility *ls) |
static void | ghid_cell_renderer_visibility_class_init (GHidCellRendererVisibilityClass *klass) |
GType | ghid_cell_renderer_visibility_get_type (void) |
GtkCellRenderer * | ghid_cell_renderer_visibility_new (void) |
Variables | |
static guint | toggle_cell_signals [LAST_SIGNAL] = { 0 } |
Implementation of GtkCellRenderer for layer visibility toggler.
For details on the functions implemented here, see the Gtk documentation for the GtkCellRenderer object, which defines the interface we are implementing.
Definition in file ghid-cell-renderer-visibility.c.
anonymous enum |
Definition at line 20 of file ghid-cell-renderer-visibility.c.
anonymous enum |
Definition at line 26 of file ghid-cell-renderer-visibility.c.
static gint ghid_cell_renderer_visibility_activate | ( | GtkCellRenderer * | cell, |
GdkEvent * | event, | ||
GtkWidget * | widget, | ||
const gchar * | path, | ||
GdkRectangle * | background_area, | ||
GdkRectangle * | cell_area, | ||
GtkCellRendererState | flags | ||
) | [static] |
Toggless the swatch.
Definition at line 188 of file ghid-cell-renderer-visibility.c.
References toggle_cell_signals, TOGGLED, and TRUE.
Referenced by ghid_cell_renderer_visibility_class_init().
static void ghid_cell_renderer_visibility_class_init | ( | GHidCellRendererVisibilityClass * | klass | ) | [static] |
GHidCellRendererVisibility::toggled: : the object which received the signal : string representation of #GtkTreePath describing the event location
The ::toggled signal is emitted when the cell is toggled.
Definition at line 251 of file ghid-cell-renderer-visibility.c.
References _, FALSE, ghid_cell_renderer_visibility_activate(), ghid_cell_renderer_visibility_get_property(), ghid_cell_renderer_visibility_get_size(), ghid_cell_renderer_visibility_render(), ghid_cell_renderer_visibility_set_property(), PROP_ACTIVE, PROP_COLOR, toggle_cell_signals, and TOGGLED.
Referenced by ghid_cell_renderer_visibility_get_type().
static void ghid_cell_renderer_visibility_get_property | ( | GObject * | object, |
guint | param_id, | ||
GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
Definition at line 202 of file ghid-cell-renderer-visibility.c.
References _GHidCellRendererVisibility::active, _GHidCellRendererVisibility::color, GHID_CELL_RENDERER_VISIBILITY, PROP_ACTIVE, and PROP_COLOR.
Referenced by ghid_cell_renderer_visibility_class_init().
static void ghid_cell_renderer_visibility_get_size | ( | GtkCellRenderer * | cell, |
GtkWidget * | widget, | ||
GdkRectangle * | cell_area, | ||
gint * | x_offset, | ||
gint * | y_offset, | ||
gint * | width, | ||
gint * | height | ||
) | [static] |
Calculates the window area the renderer will use.
Definition at line 52 of file ghid-cell-renderer-visibility.c.
References MAX, style, and VISIBILITY_TOGGLE_SIZE.
Referenced by ghid_cell_renderer_visibility_class_init(), and ghid_cell_renderer_visibility_render().
GType ghid_cell_renderer_visibility_get_type | ( | void | ) |
Definition at line 298 of file ghid-cell-renderer-visibility.c.
References ghid_cell_renderer_visibility_class_init(), and ghid_cell_renderer_visibility_init().
static void ghid_cell_renderer_visibility_init | ( | GHidCellRendererVisibility * | ls | ) | [static] |
Definition at line 245 of file ghid-cell-renderer-visibility.c.
Referenced by ghid_cell_renderer_visibility_get_type().
GtkCellRenderer* ghid_cell_renderer_visibility_new | ( | void | ) |
Definition at line 327 of file ghid-cell-renderer-visibility.c.
References _GHidCellRendererVisibility::active, FALSE, and GHID_CELL_RENDERER_VISIBILITY_TYPE.
Referenced by ghid_layer_selector_init().
static void ghid_cell_renderer_visibility_render | ( | GtkCellRenderer * | cell, |
GdkWindow * | window, | ||
GtkWidget * | widget, | ||
GdkRectangle * | background_area, | ||
GdkRectangle * | cell_area, | ||
GdkRectangle * | expose_area, | ||
GtkCellRendererState | flags | ||
) | [static] |
Actually renders the swatch.
Definition at line 93 of file ghid-cell-renderer-visibility.c.
References _GHidCellRendererVisibility::active, _GHidCellRendererVisibility::color, GHID_CELL_RENDERER_VISIBILITY, and ghid_cell_renderer_visibility_get_size().
Referenced by ghid_cell_renderer_visibility_class_init().
static void ghid_cell_renderer_visibility_set_property | ( | GObject * | object, |
guint | param_id, | ||
const GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
Definition at line 222 of file ghid-cell-renderer-visibility.c.
References _GHidCellRendererVisibility::active, _GHidCellRendererVisibility::color, GHID_CELL_RENDERER_VISIBILITY, PROP_ACTIVE, and PROP_COLOR.
Referenced by ghid_cell_renderer_visibility_class_init().
guint toggle_cell_signals[LAST_SIGNAL] = { 0 } [static] |
Definition at line 24 of file ghid-cell-renderer-visibility.c.
Referenced by ghid_cell_renderer_visibility_activate(), and ghid_cell_renderer_visibility_class_init().