GDS-Render v1.2.1
|
Data Structures | |
struct | _LayerSelector |
Macros | |
#define | TYPE_LAYER_SELECTOR (layer_selector_get_type()) |
Enumerations | |
enum | layer_selector_sort_algo { LAYER_SELECTOR_SORT_DOWN = 0 , LAYER_SELECTOR_SORT_UP } |
Defines how to sort the layer selector list box. More... | |
Functions | |
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (LayerSelector, layer_selector, LAYER, SELECTOR, GObject) |
LayerSelector * | layer_selector_new (GtkListBox *list_box) |
layer_selector_new More... | |
void | layer_selector_generate_layer_widgets (LayerSelector *selector, GList *libs) |
Generate layer widgets in in the LayerSelector instance. More... | |
void | layer_selector_set_load_mapping_button (LayerSelector *selector, GtkWidget *button, GtkWindow *main_window) |
Supply button for loading the layer mapping. More... | |
void | layer_selector_set_save_mapping_button (LayerSelector *selector, GtkWidget *button, GtkWindow *main_window) |
Supply button for saving the layer mapping. More... | |
LayerSettings * | layer_selector_export_rendered_layer_info (LayerSelector *selector) |
Get a list of all layers that shall be exported when rendering the cells. More... | |
void | layer_selector_force_sort (LayerSelector *selector, enum layer_selector_sort_algo sort_function) |
Force the layer selector list to be sorted according to sort_function . More... | |
void | layer_selector_select_all_layers (LayerSelector *layer_selector, gboolean select) |
Set 'export' value of all layers in the LayerSelector to the supplied select value. More... | |
void | layer_selector_auto_color_layers (LayerSelector *layer_selector, ColorPalette *palette, double global_alpha) |
Apply colors from palette to all layers. Aditionally set alpha. More... | |
void | layer_selector_auto_name_layers (LayerSelector *layer_selector, gboolean overwrite) |
Auto name all layers in the layer selector. More... | |
gboolean | layer_selector_contains_elements (LayerSelector *layer_selector) |
Check if the given layer selector contains layer elements. More... | |
size_t | layer_selector_num_of_named_elements (LayerSelector *layer_selector) |
Get number of layer elements that are named. More... | |
static void | sel_layer_element_drag_begin (GtkWidget *widget, GdkDragContext *context, gpointer data) |
static void | sel_layer_element_drag_end (GtkWidget *widget, GdkDragContext *context, gpointer data) |
static void | sel_layer_element_drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, gpointer data) |
static GtkListBoxRow * | layer_selector_get_last_row (GtkListBox *list) |
static GtkListBoxRow * | layer_selector_get_row_before (GtkListBox *list, GtkListBoxRow *row) |
static GtkListBoxRow * | layer_selector_get_row_after (GtkListBox *list, GtkListBoxRow *row) |
static void | layer_selector_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint32 time, gpointer data) |
static gboolean | layer_selector_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time) |
static void | layer_selector_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time) |
static void | layer_selector_dispose (GObject *self) |
static void | layer_selector_class_init (LayerSelectorClass *klass) |
static void | layer_selector_setup_dnd (LayerSelector *self) |
static void | layer_selector_init (LayerSelector *self) |
static void | layer_selector_clear_widgets (LayerSelector *self) |
static gboolean | layer_selector_check_if_layer_widget_exists (LayerSelector *self, int layer) |
Check if a specific layer element with the given layer number is present in the layer selector. More... | |
static void | sel_layer_element_setup_dnd_callbacks (LayerSelector *self, LayerElement *element) |
Setup the necessary drag and drop callbacks of layer elements. More... | |
static void | layer_selector_analyze_cell_layers (LayerSelector *self, struct gds_cell *cell) |
Analyze cell layers and append detected layers to layer selector self . More... | |
static gint | layer_selector_sort_func (GtkListBoxRow *row1, GtkListBoxRow *row2, gpointer unused) |
sort_func Sort callback for list box More... | |
static LayerElement * | layer_selector_find_layer_element_in_list (GList *el_list, int layer) |
Find LayerElement in list with specified layer number. More... | |
static void | layer_selector_load_layer_mapping_from_file (LayerSelector *self, const gchar *file_name) |
Load the layer mapping from a CSV formatted file. More... | |
static void | layer_selector_load_mapping_clicked (GtkWidget *button, gpointer user_data) |
Callback for Load Mapping Button. More... | |
static void | layer_selector_save_layer_mapping_data (LayerSelector *self, const gchar *file_name) |
Save layer mapping of selector self to a file. More... | |
static void | layer_selector_save_mapping_clicked (GtkWidget *button, gpointer user_data) |
Callback for Save Layer Mapping Button. More... | |
Variables | |
static const char * | dnd_additional_css |
This objects implements the layer selector and displays the layers in a list box. It uses LayerElement objects to display the individual layers inside the list box.
#define TYPE_LAYER_SELECTOR (layer_selector_get_type()) |
Definition at line 43 of file layer-selector.h.
Defines how to sort the layer selector list box.
Enumerator | |
---|---|
LAYER_SELECTOR_SORT_DOWN | |
LAYER_SELECTOR_SORT_UP |
Definition at line 48 of file layer-selector.h.
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | LayerSelector | , |
layer_selector | , | ||
LAYER | , | ||
SELECTOR | , | ||
GObject | |||
) |
|
static |
Analyze cell
layers and append detected layers to layer selector self
.
self | LayerSelector instance |
cell | Cell to analyze |
Definition at line 497 of file layer-selector.c.
void layer_selector_auto_color_layers | ( | LayerSelector * | layer_selector, |
ColorPalette * | palette, | ||
double | global_alpha | ||
) |
Apply colors from palette to all layers. Aditionally set alpha.
layer_selector | LayerSelector object |
palette | Color palette to use |
global_alpha | Additional alpha value that is applied to all layers. Must be > 0 |
Definition at line 816 of file layer-selector.c.
void layer_selector_auto_name_layers | ( | LayerSelector * | layer_selector, |
gboolean | overwrite | ||
) |
Auto name all layers in the layer selector.
This functions sets the name of the layer equal to its number. The overwrite
parameter specifies if already set layer names are overwritten.
layer_selector | LayerSelector |
overwrite | Overwrite existing layer names |
Definition at line 854 of file layer-selector.c.
|
static |
Check if a specific layer element with the given layer number is present in the layer selector.
self | LayerSelector instance |
layer | Layer number to check for |
Definition at line 449 of file layer-selector.c.
|
static |
|
static |
gboolean layer_selector_contains_elements | ( | LayerSelector * | layer_selector | ) |
Check if the given layer selector contains layer elements.
This function checks whether there are elements present. If an invalid object pointer layer_selector
is passed, the function returns FALSE
[in] | layer_selector | Selector to check |
Definition at line 884 of file layer-selector.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 198 of file layer-selector.c.
LayerSettings * layer_selector_export_rendered_layer_info | ( | LayerSelector * | selector | ) |
Get a list of all layers that shall be exported when rendering the cells.
selector | Layer selector instance |
Definition at line 388 of file layer-selector.c.
|
static |
Find LayerElement in list with specified layer number.
el_list | List with elements of type LayerElement |
layer | Layer number |
Definition at line 578 of file layer-selector.c.
void layer_selector_force_sort | ( | LayerSelector * | selector, |
enum layer_selector_sort_algo | sort_function | ||
) |
Force the layer selector list to be sorted according to sort_function
.
selector | LayerSelector instance |
sort_function | The sorting method (up or down sorting) |
Definition at line 779 of file layer-selector.c.
void layer_selector_generate_layer_widgets | ( | LayerSelector * | selector, |
GList * | libs | ||
) |
Generate layer widgets in in the LayerSelector instance.
selector | LayerSelector instance |
libs | The libraries to add |
Definition at line 549 of file layer-selector.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 361 of file layer-selector.c.
|
static |
Load the layer mapping from a CSV formatted file.
This function imports the layer specification from a file (see Layer Mapping File Specification). The layer ordering defined in the file is kept. All layers present in the current loaded library, which are not present in the layer mapping file are appended at the end of the layer selector list.
self | LayerSelector instance |
file_name | File name to load from |
Definition at line 602 of file layer-selector.c.
|
static |
Callback for Load Mapping Button.
button | |
user_data |
Definition at line 685 of file layer-selector.c.
LayerSelector * layer_selector_new | ( | GtkListBox * | list_box | ) |
layer_selector_new
list_box | The associated list box, the content is displayed in |
Definition at line 373 of file layer-selector.c.
size_t layer_selector_num_of_named_elements | ( | LayerSelector * | layer_selector | ) |
Get number of layer elements that are named.
[in] | layer_selector | Layer selector |
Definition at line 899 of file layer-selector.c.
|
static |
Save layer mapping of selector self
to a file.
self | LayerSelector instance |
file_name | File name to save to |
Definition at line 714 of file layer-selector.c.
|
static |
Callback for Save Layer Mapping Button.
button | |
user_data |
Definition at line 731 of file layer-selector.c.
void layer_selector_select_all_layers | ( | LayerSelector * | layer_selector, |
gboolean | select | ||
) |
Set 'export' value of all layers in the LayerSelector to the supplied select value.
layer_selector | LayerSelector object |
select |
Definition at line 796 of file layer-selector.c.
void layer_selector_set_load_mapping_button | ( | LayerSelector * | selector, |
GtkWidget * | button, | ||
GtkWindow * | main_window | ||
) |
Supply button for loading the layer mapping.
selector | LayerSelector instance |
button | Load button. Will be referenced |
main_window | Parent window for dialogs. Will be referenced |
Definition at line 755 of file layer-selector.c.
void layer_selector_set_save_mapping_button | ( | LayerSelector * | selector, |
GtkWidget * | button, | ||
GtkWindow * | main_window | ||
) |
Supply button for saving the layer mapping.
selector | LayerSelector instance |
button | Save button. Will be refeneced |
main_window | Parent window for dialogs. Will be referenced |
Definition at line 767 of file layer-selector.c.
|
static |
Definition at line 350 of file layer-selector.c.
|
static |
sort_func Sort callback for list box
row1 | |
row2 | |
unused |
Definition at line 525 of file layer-selector.c.
|
static |
|
static |
|
static |
|
static |
Setup the necessary drag and drop callbacks of layer elements.
self | LayerSelector instance. Used to get the DnD target entry. |
element | LayerElement instance to set the callbacks |
Definition at line 476 of file layer-selector.c.
|
static |
Definition at line 279 of file layer-selector.c.