Compare commits

..

27 Commits

Author SHA1 Message Date
9bd225b837 Merge branch 'Issue-28-new-gui-features' into dev 2019-09-28 23:20:14 +02:00
00d6710922 Doxygen error fixes 2019-09-28 23:16:48 +02:00
67b8dc2443 Doxygen fix 2019-09-28 23:16:48 +02:00
6eaf86dc1c Fix doxygen configuartion to handle __attribute__ correctly 2019-09-28 23:16:48 +02:00
1de96f501c Checked renderers for memory leaks 2019-09-28 23:16:48 +02:00
01e61a79fd Integrate cell selector to main gui class 2019-09-28 23:16:48 +02:00
dc30950df5 Tree store for cell selection moved to GUI file 2019-09-28 23:16:48 +02:00
23775b079a Code improvements 2019-09-28 23:16:48 +02:00
a65295fbeb remove now unneeded mapping parser completely 2019-09-28 23:16:48 +02:00
9245d68da1 LayerSelector: Use Layer Settings for CSV export. This makes the mapping parser unnecessary. It can be removed 2019-09-28 23:16:48 +02:00
0a04f2fed4 LayerSettings: Fix bug in CSV export function 2019-09-28 23:16:48 +02:00
62388e4053 Remove code from mapping parser that implements csv read. Use LayerSettings class instead. 2019-09-28 23:16:48 +02:00
c365c89908 LayerSelector: Make import of layer information from CSV independed from mapping-parser code. Use LayerSettings class instead. 2019-09-28 23:16:48 +02:00
f20826ccf7 LayerSettings: Fix layer_settings_load_from_csv()
* Add stacked position to layer settings
* Check if layer_settings instance is valid
2019-09-28 23:16:48 +02:00
94ef879a94 Refactoring: rename progress update func of output renderer to gds_output_renderer_update_async_progress() 2019-09-28 23:16:48 +02:00
977547d91d Enable status upgrades from Cairo renderer to activity bar. 2019-09-28 23:16:48 +02:00
0dc91c14de Add project entry to libversion CMAKE 2019-09-28 23:16:48 +02:00
5ec7832ac4 Cairo Renderer: Add function that reads a line from a file descriptor (pipe) 2019-09-28 23:16:48 +02:00
52fb07bea6 Add warning for fallthrough to switch-case 2019-09-28 23:16:48 +02:00
eefe0df984 Remove warning about wrong bounding box calculation. Still wrong but the warning is annoying and problems are negligible. 2019-09-28 23:16:48 +02:00
e3e39a80ee Move compiler flags up in CMAKE, so they apply also for included subprojects 2019-09-28 23:16:48 +02:00
7cbde0f30a Fixup round for doxygen 2019-09-28 22:57:31 +02:00
00d7691bda Code improvements 2019-09-28 20:46:41 +02:00
b8a02912b0 Merge branch 'master' into Issue-28-new-gui-features 2019-09-25 19:14:42 +02:00
e703d4427a Update image of GUI in documentation 2019-09-25 19:14:06 +02:00
f9e16fa4d7 Merge branch 'dev' into Issue-28-new-gui-features 2019-09-25 18:54:21 +02:00
cd3ef452f1 Merge branch 'master' into Issue-28-new-gui-features 2019-09-25 18:49:38 +02:00
17 changed files with 207 additions and 285 deletions

View File

@ -1,176 +0,0 @@
/*
* GDSII-Converter
* Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
*
* This file is part of GDSII-Converter.
*
* GDSII-Converter is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* GDSII-Converter is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file tree-store.h
* @brief Tree store implementation
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
/**
* @addtogroup GUI
* @{
*/
#include <gds-render/cell-selector/tree-store.h>
#include <gds-render/cell-selector/lib-cell-renderer.h>
#include <gds-render/gds-utils/gds-types.h>
/**
* @brief this function olny allows cells to be selected
* @param selection
* @param model
* @param path
* @param path_currently_selected
* @param data
* @return TRUE if element is selectable, FALSE if not
*/
static gboolean tree_sel_func(GtkTreeSelection *selection,
GtkTreeModel *model,
GtkTreePath *path,
gboolean path_currently_selected,
gpointer data)
{
GtkTreeIter iter;
struct gds_cell *cell;
unsigned int error_level;
gboolean ret = FALSE;
(void)selection;
(void)path_currently_selected;
(void)data;
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get(model, &iter, CELL_SEL_CELL, &cell, CELL_SEL_CELL_ERROR_STATE, &error_level, -1);
/* Allow only rows with _valid_ cell to be selected */
if (cell) {
/* Cell available. Check if it passed the critical checks */
if (!(error_level & LIB_CELL_RENDERER_ERROR_ERR))
ret = TRUE;
}
return ret;
}
/**
* @brief cell_store_filter_visible_func Decides whether an element of the tree model @p model is visible.
* @param model Tree model
* @param iter Current element / iter in Model to check
* @param data Data. Set to static stores variable
* @return TRUE if visible, else FALSE
* @note TODO: Maybe implement Damerau-Levenshtein distance matching
*/
static gboolean cell_store_filter_visible_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
struct tree_stores *stores = (struct tree_stores *)data;
struct gds_cell *cell;
struct gds_library *lib;
gboolean result = FALSE;
const char *search_string;
if (!model || !iter || !stores)
goto exit_filter;
gtk_tree_model_get(model, iter, CELL_SEL_CELL, &cell, CELL_SEL_LIBRARY, &lib, -1);
if (lib) {
result = TRUE;
goto exit_filter;
}
if (!cell)
goto exit_filter;
search_string = gtk_entry_get_text(stores->search_entry);
/* Show all, if field is empty */
if (!strlen(search_string))
result = TRUE;
if (strstr(cell->name, search_string))
result = TRUE;
gtk_tree_view_expand_all(stores->base_tree_view);
exit_filter:
return result;
}
static void change_filter(GtkWidget *entry, gpointer data)
{
struct tree_stores *stores = (struct tree_stores *)data;
(void)entry;
gtk_tree_model_filter_refilter(stores->filter);
}
/**
* @brief Setup a GtkTreeView with the necessary columns
* @param view Tree view to set up
* @param search_entry Entry field for search
* @return Tree stores for storing data inside the GtkTreeView
*/
struct tree_stores *setup_cell_selector(GtkTreeView* view, GtkEntry *search_entry)
{
static struct tree_stores stores;
GtkCellRenderer *render_dates;
GtkCellRenderer *render_cell;
GtkCellRenderer *render_lib;
GtkTreeViewColumn *column;
stores.base_tree_view = view;
stores.search_entry = search_entry;
stores.base_store = gtk_tree_store_new(CELL_SEL_COLUMN_COUNT, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING);
/* Searching */
if (search_entry) {
stores.filter = GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(GTK_TREE_MODEL(stores.base_store), NULL));
gtk_tree_model_filter_set_visible_func (stores.filter,
(GtkTreeModelFilterVisibleFunc)cell_store_filter_visible_func,
&stores, NULL);
g_signal_connect(GTK_SEARCH_ENTRY(search_entry), "search-changed", G_CALLBACK(change_filter), &stores);
}
gtk_tree_view_set_model(view, GTK_TREE_MODEL(stores.filter));
render_dates = gtk_cell_renderer_text_new();
render_cell = lib_cell_renderer_new();
render_lib = lib_cell_renderer_new();
column = gtk_tree_view_column_new_with_attributes("Library", render_lib, "gds-lib", CELL_SEL_LIBRARY, NULL);
gtk_tree_view_append_column(view, column);
column = gtk_tree_view_column_new_with_attributes("Cell", render_cell, "gds-cell", CELL_SEL_CELL,
"error-level", CELL_SEL_CELL_ERROR_STATE, NULL);
gtk_tree_view_append_column(view, column);
column = gtk_tree_view_column_new_with_attributes("Mod. Date", render_dates, "text", CELL_SEL_MODDATE, NULL);
gtk_tree_view_append_column(view, column);
column = gtk_tree_view_column_new_with_attributes("Acc. Date", render_dates, "text", CELL_SEL_ACCESSDATE, NULL);
gtk_tree_view_append_column(view, column);
/* Callback for selection
* This prevents selecting a library */
gtk_tree_selection_set_select_function(gtk_tree_view_get_selection(view), tree_sel_func, NULL, NULL);
return &stores;
}
/** @} */

View File

@ -2119,7 +2119,7 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
@ -2127,7 +2127,7 @@ MACRO_EXPANSION = NO
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_ONLY_PREDEF = NO
EXPAND_ONLY_PREDEF = YES
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
@ -2159,7 +2159,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED =
PREDEFINED = __attribute__(x)=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The

View File

@ -2,7 +2,7 @@
* @defgroup ExternalRenderer External Shared Object Renderer
* @ingroup GdsOutputRenderer
*
* @subsection ExternalRendererProps Properties
* @section ExternalRendererProps Properties
* This class inherits all properties from its parent @ref GdsOutputRenderer.
* In addition to that, it implements the following properties:
*

View File

@ -9,13 +9,13 @@
* @warning Although the GdsOutputRenderer class provides compatibility for asynchronous rendering,
* the class is not thread safe / re-entrant. Only use it from a signle context. Not even the rendering function called is allowed to modifiy this object.
*
* A allowed function to be called from the async rendering thread is #gds_output_renderer_update_gui_status_from_async and the get functions for the properties.
* A allowed function to be called from the async rendering thread is #gds_output_renderer_update_async_progress and the get functions for the properties.
*
* @note The context that owned the renderer has to ensure that only one rendering is active at a time for a single instance of a renderer.
*
* By default this class implements the following features:
*
* @subsection GdsOutputRendererProps Properties
* @section GdsOutputRendererProps Properties
* Property Name | Description
* -----------------|----------------------------------------------------------------
* layer-settings | LayerSettings object containing the layer rendering information
@ -23,7 +23,7 @@
*
* All these properties have to be set for rendering.
*
* @subsection GdsOutputRendererSignals Signals / Events
* @section GdsOutputRendererSignals Signals / Events
* Signal Name | Description | Callback prototype
* -----------------|-------------------------------------------------|-----------------------------------------------------------
* async-finished | The asynchronous rendering is finished | void callback(GdsOutputRenderer *src, gpointer user_data)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -4,7 +4,7 @@
*
* This is the class implementing the \f$\mbox{\LaTeX}\f$ / TikZ output rendering
* @subsection LaTeXRendererProps Properties
* @section LaTeXRendererProps Properties
* This class inherits all properties from its parent @ref GdsOutputRenderer.
* In addition to that, it implements the following properties:
*

View File

@ -4,24 +4,24 @@
To use the application on the command line check 'gds-render `--`help'.
Usage:
gds-render [OPTION…] FILE - Convert GDS file <FILE> to graphic
gds-render [OPTION…] FILE - Convert GDS file `<FILE>` to graphic
Help Options:
-h, '--'help Show help options
'--'help-all Show all help options
'--'help-gtk Show GTK+ Options
Application Options:
-v, '--'version Print version
-r, '--'renderer=pdf|svg|tikz|ext Renderer to use
-s, '--'scale=<SCALE> Divide output coordinates by <SCALE>
-o, '--'output-file=PATH Output file path
-m, '--'mapping=PATH Path for Layer Mapping File
-c, '--'cell=NAME Cell to render
-a, '--'tex-standalone Create standalone PDF
-l, '--'tex-layers Create PDF Layers (OCG)
-P, '--'custom-render-lib=PATH Path to a custom shared object, that implements the render_cell_to_file function
'--'display=DISPLAY X display to use
Help Options:
-h, `--`help Show help options
`--`help-all Show all help options
`--`help-gtk Show GTK+ Options
Application Options:
-v, `--`version Print version
-r, `--`renderer=pdf|svg|tikz|ext Renderer to use
-s, `--`scale=`<SCALE>` Divide output coordinates by `<SCALE>`
-o, `--`output-file=PATH Output file path
-m, `--`mapping=PATH Path for Layer Mapping File
-c, `--`cell=NAME Cell to render
-a, `--`tex-standalone Create standalone PDF
-l, `--`tex-layers Create PDF Layers (OCG)
-P, `--`custom-render-lib=PATH Path to a custom shared object, that implements the render_cell_to_file function
`--`display=DISPLAY X display to use
@section gui Graphical User Interface
@ -33,7 +33,7 @@ It is possible to export the layer configurations so they can be used later on.
@image html gui.png
@image latex gui.png
The cell selector on the left shows the GDS Libraries and Cells. The cells are marked green if all references inside the cell could be found. If not all references could be found, the cell is marked orange. This doens't show if child cells have missing childs. Only one level of the hierarchy is checked in order to make it easier to spot an errorneous cell. Cells with missing child cells are still renderable but '--' obviously '--' faulty. If a cell or any sub-cell contains a reference loop, the cell is marked red. In this case it can't be selected for rendering.
The cell selector on the left shows the GDS Libraries and Cells. The cells are marked green if all references inside the cell could be found. If not all references could be found, the cell is marked orange. This doens't show if child cells have missing childs. Only one level of the hierarchy is checked in order to make it easier to spot an errorneous cell. Cells with missing child cells are still renderable but `--` obviously `--` faulty. If a cell or any sub-cell contains a reference loop, the cell is marked red. In this case it can't be selected for rendering.
In the above image the cell is green; so everything is okay.

View File

@ -35,7 +35,6 @@
#include <gds-render/gds-utils/gds-tree-checker.h>
#include <gds-render/layer/layer-selector.h>
#include <gds-render/widgets/activity-bar.h>
#include <gds-render/cell-selector/tree-store.h>
#include <gds-render/cell-selector/lib-cell-renderer.h>
#include <gds-render/output-renderers/latex-renderer.h>
#include <gds-render/output-renderers/cairo-renderer.h>
@ -43,6 +42,16 @@
#include <gds-render/geometric/cell-geometrics.h>
#include <gds-render/version.h>
/** @brief Columns of selection tree view */
enum cell_store_columns {
CELL_SEL_LIBRARY = 0,
CELL_SEL_CELL,
CELL_SEL_CELL_ERROR_STATE, /**< Used for cell color and selectability */
CELL_SEL_MODDATE,
CELL_SEL_ACCESSDATE,
CELL_SEL_COLUMN_COUNT /**< @brief Not a column. Used to determine count of columns */
};
enum gds_render_gui_signal_sig_ids {SIGNAL_WINDOW_CLOSED = 0, SIGNAL_COUNT};
static guint gds_render_gui_signals[SIGNAL_COUNT];
@ -64,6 +73,7 @@ struct _GdsRenderGui {
GtkWidget *save_layer_button;
GtkWidget *select_all_button;
GtkTreeStore *cell_tree_store;
GtkTreeModelFilter *cell_filter;
GtkWidget *cell_search_entry;
LayerSelector *layer_selector;
GtkTreeView *cell_tree_view;
@ -124,6 +134,151 @@ static GString *generate_string_from_date(struct gds_time_field *date)
return str;
}
/**
* @brief This function only allows valid cells to be selected
* @param selection
* @param model
* @param path
* @param path_currently_selected
* @param data
* @return TRUE if element is selectable, FALSE if not
*/
static gboolean tree_sel_func(GtkTreeSelection *selection,
GtkTreeModel *model,
GtkTreePath *path,
gboolean path_currently_selected,
gpointer data)
{
GtkTreeIter iter;
struct gds_cell *cell;
unsigned int error_level;
gboolean ret = FALSE;
(void)selection;
(void)path_currently_selected;
(void)data;
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get(model, &iter, CELL_SEL_CELL, &cell, CELL_SEL_CELL_ERROR_STATE, &error_level, -1);
/* Allow only rows with _valid_ cell to be selected */
if (cell) {
/* Cell available. Check if it passed the critical checks */
if (!(error_level & LIB_CELL_RENDERER_ERROR_ERR))
ret = TRUE;
}
return ret;
}
/**
* @brief Trigger refiltering of cell filter
* @param entry Unused widget, that emitted the signal
* @param data GdsrenderGui self instance
*/
static void cell_tree_view_change_filter(GtkWidget *entry, gpointer data)
{
GdsRenderGui *self = RENDERER_GUI(data);
(void)entry;
gtk_tree_model_filter_refilter(self->cell_filter);
}
/**
* @brief cell_store_filter_visible_func Decides whether an element of the tree model @p model is visible.
* @param model Tree model
* @param iter Current element / iter in Model to check
* @param data Data. Set to static stores variable
* @return TRUE if visible, else FALSE
* @note TODO: Maybe implement Damerau-Levenshtein distance matching
*/
static gboolean cell_store_filter_visible_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
GdsRenderGui *self;
struct gds_cell *cell;
struct gds_library *lib;
gboolean result = FALSE;
const char *search_string;
self = RENDERER_GUI(data);
g_return_val_if_fail(RENDERER_IS_GUI(self), FALSE);
if (!model || !iter)
goto exit_filter;
gtk_tree_model_get(model, iter, CELL_SEL_CELL, &cell, CELL_SEL_LIBRARY, &lib, -1);
if (lib) {
result = TRUE;
goto exit_filter;
}
if (!cell)
goto exit_filter;
search_string = gtk_entry_get_text(GTK_ENTRY(self->cell_search_entry ));
/* Show all, if field is empty */
if (!strlen(search_string))
result = TRUE;
if (strstr(cell->name, search_string))
result = TRUE;
gtk_tree_view_expand_all(self->cell_tree_view);
exit_filter:
return result;
}
/**
* @brief Setup a GtkTreeView with the necessary columns
* @param self Current GUI object
*/
int gds_render_gui_setup_cell_selector(GdsRenderGui *self)
{
GtkCellRenderer *render_dates;
GtkCellRenderer *render_cell;
GtkCellRenderer *render_lib;
GtkTreeViewColumn *column;
self->cell_tree_store = gtk_tree_store_new(CELL_SEL_COLUMN_COUNT, G_TYPE_POINTER,
G_TYPE_POINTER, G_TYPE_UINT,
G_TYPE_STRING, G_TYPE_STRING);
/* Searching */
self->cell_filter = GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(GTK_TREE_MODEL(self->cell_tree_store), NULL));
gtk_tree_model_filter_set_visible_func(self->cell_filter,
(GtkTreeModelFilterVisibleFunc)cell_store_filter_visible_func,
self, NULL);
g_signal_connect(GTK_SEARCH_ENTRY(self->cell_search_entry), "search-changed",
G_CALLBACK(cell_tree_view_change_filter), self);
gtk_tree_view_set_model(self->cell_tree_view, GTK_TREE_MODEL(self->cell_filter));
render_dates = gtk_cell_renderer_text_new();
render_cell = lib_cell_renderer_new();
render_lib = lib_cell_renderer_new();
column = gtk_tree_view_column_new_with_attributes("Library", render_lib, "gds-lib", CELL_SEL_LIBRARY, NULL);
gtk_tree_view_append_column(self->cell_tree_view, column);
column = gtk_tree_view_column_new_with_attributes("Cell", render_cell, "gds-cell", CELL_SEL_CELL,
"error-level", CELL_SEL_CELL_ERROR_STATE, NULL);
gtk_tree_view_append_column(self->cell_tree_view, column);
column = gtk_tree_view_column_new_with_attributes("Mod. Date", render_dates, "text", CELL_SEL_MODDATE, NULL);
gtk_tree_view_append_column(self->cell_tree_view, column);
column = gtk_tree_view_column_new_with_attributes("Acc. Date", render_dates, "text", CELL_SEL_ACCESSDATE, NULL);
gtk_tree_view_append_column(self->cell_tree_view, column);
/* Callback for selection
* This prevents selecting a library */
gtk_tree_selection_set_select_function(gtk_tree_view_get_selection(self->cell_tree_view), tree_sel_func, NULL, NULL);
return 0;
}
/**
* @brief Callback function of Load GDS button
* @param button
@ -536,6 +691,7 @@ static void gds_render_gui_dispose(GObject *gobject)
g_clear_object(&self->convert_button);
g_clear_object(&self->layer_selector);
g_clear_object(&self->cell_tree_store);
g_clear_object(&self->cell_filter);
g_clear_object(&self->cell_search_entry);
g_clear_object(&self->activity_status_bar);
g_clear_object(&self->palette);
@ -624,7 +780,6 @@ static void gds_render_gui_init(GdsRenderGui *self)
GtkBuilder *main_builder;
GtkWidget *listbox;
GtkHeaderBar *header_bar;
struct tree_stores *cell_selector_stores;
GtkWidget *sort_up_button;
GtkWidget *sort_down_button;
GtkWidget *activity_bar_box;
@ -636,9 +791,7 @@ static void gds_render_gui_init(GdsRenderGui *self)
self->cell_tree_view = GTK_TREE_VIEW(gtk_builder_get_object(main_builder, "cell-tree"));
self->cell_search_entry = GTK_WIDGET(gtk_builder_get_object(main_builder, "cell-search"));
cell_selector_stores = setup_cell_selector(self->cell_tree_view, GTK_ENTRY(self->cell_search_entry));
self->cell_tree_store = cell_selector_stores->base_store;
gds_render_gui_setup_cell_selector(self);
self->main_window = GTK_WINDOW(gtk_builder_get_object(main_builder, "main-window"));
self->open_button = GTK_WIDGET(gtk_builder_get_object(main_builder, "button-load-gds"));
@ -716,10 +869,9 @@ static void gds_render_gui_init(GdsRenderGui *self)
g_object_ref(self->main_window);
g_object_ref(self->cell_tree_view);
g_object_ref(self->convert_button);
g_object_ref(self->layer_selector);
g_object_ref(self->cell_tree_store);
/* g_object_ref(self->layer_selector); <= This is already referenced by the _new() function */
g_object_ref(self->cell_search_entry);
g_object_ref(self->palette);
/* g_object_ref(self->palette); */
g_object_ref(self->open_button);
g_object_ref(self->load_layer_button);
g_object_ref(self->save_layer_button);

View File

@ -1,57 +0,0 @@
/*
* GDSII-Converter
* Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
*
* This file is part of GDSII-Converter.
*
* GDSII-Converter is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* GDSII-Converter is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file tree-store.h
* @brief Header file for Tree store implementation
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
/**
* @addtogroup GUI
* @{
*/
#ifndef __TREE_STORE_H__
#define __TREE_STORE_H__
#include <gtk/gtk.h>
/** @brief Columns of selection tree view */
enum cell_store_columns {
CELL_SEL_LIBRARY = 0,
CELL_SEL_CELL,
CELL_SEL_CELL_ERROR_STATE, /**< Used for cell color and selectability */
CELL_SEL_MODDATE,
CELL_SEL_ACCESSDATE,
CELL_SEL_COLUMN_COUNT /**< @brief Not a column. Used to determine count of columns */
};
struct tree_stores {
GtkTreeView *base_tree_view;
GtkTreeStore *base_store;
GtkTreeModelFilter *filter;
GtkEntry *search_entry;
};
struct tree_stores *setup_cell_selector(GtkTreeView* view, GtkEntry *search_entry);
#endif /* __TREE_STORE_H__ */
/** @} */

View File

@ -42,16 +42,16 @@
* @param layer_file Layer mapping file
* @param so_path Shared object
* @param tex_standalone Standalone TeX
* @param tec_layers TeX OCR layers
* @param tex_layers TeX OCR layers
* @param scale Scale value
* @return Error code, 0 if successful
*/
int command_line_convert_gds(const char *gds_name,
const char *cell_name,
char **renderers,
char **output_file_names,
const char *layer_file,
const char *so_path,
const char *cell_name,
char **renderers,
char **output_file_names,
const char *layer_file,
const char *so_path,
gboolean tex_standalone,
gboolean tex_layers,
double scale);

View File

@ -18,8 +18,8 @@
*/
/**
* @file layer-info.h
* @brief LayerSettings class heade file
* @file layer-settings.h
* @brief LayerSettings class header file
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
@ -96,8 +96,12 @@ int layer_settings_remove_layer(LayerSettings *settings, int layer);
GList *layer_settings_get_layer_info_list(LayerSettings *settings);
/**
* @brief Write layer settings to a CSV file
* @param path
* @brief Write layer settings to a CSV file.
*
* This function writes the layer settings to a CSV file according to the
* layer mapping specification (@ref lmf-spec)
* @param settings LayerSettings object
* @param path Output path for CSV file.
* @return 0 if successful
*/
int layer_settings_to_csv(LayerSettings *settings, const char *path);

View File

@ -17,7 +17,7 @@
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file cairo-output.h
* @file cairo-renderer.h
* @brief Header File for Cairo output renderer
* @author Mario Hüttel <mario.huettel@gmx.net>
*/

View File

@ -18,7 +18,7 @@
*/
/**
* @file latex-output.h
* @file latex-renderer.h
* @brief LaTeX output renderer
* @author Mario Hüttel <mario.huettel@gmx.net>
*/

View File

@ -18,7 +18,7 @@
*/
/**
* @file layer-info.c
* @file layer-settings.c
* @brief Implementation of the LayerSettings class
* @author Mario Hüttel <mario.huettel@gmx.net>
*/

2
main.c
View File

@ -183,7 +183,6 @@ static void gapp_activate(GApplication *app, gpointer user_data)
*/
static int start_gui(int argc, char **argv)
{
GtkApplication *gapp;
int app_status;
static struct application_data appdata = {
@ -289,7 +288,6 @@ int main(int argc, char **argv)
scale = 1;
}
/* Get gds name */
gds_name = argv[1];

View File

@ -17,7 +17,7 @@
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file cairo-output.c
* @file cairo-renderer.c
* @brief Output renderer for Cairo PDF export
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
@ -220,6 +220,7 @@ static int read_line_from_fd(int fd, char *buff, size_t buff_size)
/**
* @brief Render \p cell to a PDF file specified by \p pdf_file
* @param renderer The current renderer this function is running from
* @param cell Toplevel cell to @ref Cairo-Renderer
* @param layer_infos List of layer information. Specifies color and layer stacking
* @param pdf_file PDF output file. Set to NULL if no PDF file has to be generated

View File

@ -18,7 +18,7 @@
*/
/**
* @file latex-output.c
* @file latex-renderer.c
* @brief LaTeX Output Renderer
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
@ -35,7 +35,7 @@
/**
* @brief Struct representing the LaTeX-Renderer object.
*
* This struct holds the LaTeX renderer internal data. It is only used inside the @ref LatexRenderer class.
* This struct holds the LaTeX renderer internal data. It is only used inside the @ref LaTeX-Renderer class.
*/
struct _LatexRenderer {
GdsOutputRenderer parent;