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:
- gds-lib: This property can be used to set a gds_library structure. The renderer will render the name of the library.
- gds-cell: This property can be used to set a gds_cell structure. The renderer will render the name of the cell.
- error-level: Set the error level of the cell/library. This affects the foreground color of hte rendered output.
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.
◆ LIB_CELL_RENDERER_ERROR_ERR
#define LIB_CELL_RENDERER_ERROR_ERR (1U<<1) |
◆ LIB_CELL_RENDERER_ERROR_WARN
#define LIB_CELL_RENDERER_ERROR_WARN (1U<<0) |
◆ TYPE_LIB_CELL_RENDERER
◆ LibCellRenderer
◆ 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.
◆ convert_error_level_to_color()
static void convert_error_level_to_color |
( |
GdkRGBA * |
color, |
|
|
unsigned int |
error_level |
|
) |
| |
|
static |
◆ lib_cell_renderer_class_init()
void lib_cell_renderer_class_init |
( |
LibCellRendererClass * |
klass | ) |
|
◆ lib_cell_renderer_constructed()
static void lib_cell_renderer_constructed |
( |
GObject * |
obj | ) |
|
|
static |
◆ lib_cell_renderer_get_property()
static void lib_cell_renderer_get_property |
( |
GObject * |
object, |
|
|
guint |
param_id, |
|
|
GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
◆ lib_cell_renderer_get_type()
GType lib_cell_renderer_get_type |
( |
void |
| ) |
|
lib_cell_renderer_get_type
- Returns
- GObject Type
◆ lib_cell_renderer_init()
◆ lib_cell_renderer_new()
GtkCellRenderer * lib_cell_renderer_new |
( |
void |
| ) |
|
◆ lib_cell_renderer_set_property()
static void lib_cell_renderer_set_property |
( |
GObject * |
object, |
|
|
guint |
param_id, |
|
|
const GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
◆ properties