GDS-Render v1.2.1
layer-selector.c File Reference

Implementation of the layer selector. More...

#include <glib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <gds-render/layer/layer-selector.h>
#include <gds-render/gds-utils/gds-parser.h>
#include <gds-render/widgets/layer-element.h>
Include dependency graph for layer-selector.c:

Go to the source code of this file.

Data Structures

struct  _LayerSelector
 

Functions

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)
 
LayerSelector * layer_selector_new (GtkListBox *list_box)
 layer_selector_new 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...
 
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...
 
void layer_selector_generate_layer_widgets (LayerSelector *selector, GList *libs)
 Generate layer widgets in in the LayerSelector instance. 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...
 
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...
 
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...
 

Variables

static const char * dnd_additional_css
 

Detailed Description

Implementation of the layer selector.

Author
Mario Hüttel mario.nosp@m..hue.nosp@m.ttel@.nosp@m.gmx..nosp@m.net

Definition in file layer-selector.c.