GDS-Render v1.2.1
LibCellRenderer GObject
Collaboration diagram for LibCellRenderer GObject:

Data Structures

struct  _LibCellRenderer
 

Macros

#define TYPE_LIB_CELL_RENDERER   (lib_cell_renderer_get_type())
 
#define LIB_CELL_RENDERER_ERROR_WARN   (1U<<0)
 
#define LIB_CELL_RENDERER_ERROR_ERR   (1U<<1)
 

Typedefs

typedef struct _LibCellRenderer LibCellRenderer
 

Enumerations

enum  { PROP_LIB = 1 , PROP_CELL , PROP_ERROR_LEVEL , PROP_COUNT }
 

Functions

void lib_cell_renderer_init (LibCellRenderer *self)
 
static void lib_cell_renderer_constructed (GObject *obj)
 
static void convert_error_level_to_color (GdkRGBA *color, unsigned int error_level)
 
static void lib_cell_renderer_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec)
 
static void lib_cell_renderer_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec)
 
void lib_cell_renderer_class_init (LibCellRendererClass *klass)
 
GtkCellRenderer * lib_cell_renderer_new (void)
 Create a new renderer for renderering gds_cell and gds_library elements. More...
 
GType lib_cell_renderer_get_type (void)
 lib_cell_renderer_get_type More...
 

Variables

static GParamSpec * properties [PROP_COUNT]
 

Detailed Description

The LibCellRenderer Object is used to render gds_cell and gds_library elements to a GtkTreeView.

The LibCellRenderer class is derived from a GtkCellRendererText and works the same way. The additinal features are three new properties:

Internally the class operates by setting the 'text' property, which is inherited form the base class to the library/cell name (gds_library::name and gds_cell::name fields). The error level (LIB_CELL_RENDERER_ERROR_WARN and LIB_CELL_RENDERER_ERROR_ERR) is translated to the inherited 'foreground-rgba' property.

Macro Definition Documentation

◆ LIB_CELL_RENDERER_ERROR_ERR

#define LIB_CELL_RENDERER_ERROR_ERR   (1U<<1)

Definition at line 45 of file lib-cell-renderer.h.

◆ LIB_CELL_RENDERER_ERROR_WARN

#define LIB_CELL_RENDERER_ERROR_WARN   (1U<<0)

Error levels

Definition at line 44 of file lib-cell-renderer.h.

◆ TYPE_LIB_CELL_RENDERER

#define TYPE_LIB_CELL_RENDERER   (lib_cell_renderer_get_type())

Definition at line 39 of file lib-cell-renderer.h.

Typedef Documentation

◆ LibCellRenderer

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROP_LIB 

Library to display the name of.

PROP_CELL 

Cell to display the name of.

PROP_ERROR_LEVEL 

Error level of cell/library for coloring.

PROP_COUNT 

Sentinel.

Definition at line 36 of file lib-cell-renderer.c.

Function Documentation

◆ convert_error_level_to_color()

static void convert_error_level_to_color ( GdkRGBA *  color,
unsigned int  error_level 
)
static

Definition at line 54 of file lib-cell-renderer.c.

Here is the caller graph for this function:

◆ lib_cell_renderer_class_init()

void lib_cell_renderer_class_init ( LibCellRendererClass *  klass)

Definition at line 129 of file lib-cell-renderer.c.

Here is the call graph for this function:

◆ lib_cell_renderer_constructed()

static void lib_cell_renderer_constructed ( GObject *  obj)
static

Definition at line 49 of file lib-cell-renderer.c.

Here is the caller graph for this function:

◆ lib_cell_renderer_get_property()

static void lib_cell_renderer_get_property ( GObject *  object,
guint  param_id,
GValue *  value,
GParamSpec *  pspec 
)
static

Definition at line 113 of file lib-cell-renderer.c.

Here is the caller graph for this function:

◆ lib_cell_renderer_get_type()

GType lib_cell_renderer_get_type ( void  )

lib_cell_renderer_get_type

Returns
GObject Type

◆ lib_cell_renderer_init()

void lib_cell_renderer_init ( LibCellRenderer self)

Definition at line 43 of file lib-cell-renderer.c.

◆ lib_cell_renderer_new()

GtkCellRenderer * lib_cell_renderer_new ( void  )

Create a new renderer for renderering gds_cell and gds_library elements.

Returns
New renderer object

Definition at line 149 of file lib-cell-renderer.c.

Here is the caller graph for this function:

◆ lib_cell_renderer_set_property()

static void lib_cell_renderer_set_property ( GObject *  object,
guint  param_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

Definition at line 78 of file lib-cell-renderer.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ properties

GParamSpec* properties[PROP_COUNT]
static

Definition at line 127 of file lib-cell-renderer.c.