diff --git a/doxygen/Doxyconfig b/doxygen/Doxyconfig index ebbbe73..a14140f 100644 --- a/doxygen/Doxyconfig +++ b/doxygen/Doxyconfig @@ -51,7 +51,7 @@ PROJECT_BRIEF = # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = /home/mari/projects/cpp/gds-render/icon/gds-render.svg # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is diff --git a/doxygen/additional-pages.dox b/doxygen/additional-pages.dox new file mode 100644 index 0000000..e69de29 diff --git a/doxygen/main-application.h b/doxygen/main-application.dox similarity index 100% rename from doxygen/main-application.h rename to doxygen/main-application.dox diff --git a/doxygen/main-page.dox b/doxygen/main-page.dox new file mode 100644 index 0000000..01ff97c --- /dev/null +++ b/doxygen/main-page.dox @@ -0,0 +1,47 @@ +/** + +@mainpage +This programm converts GDS layout files to + +- PDF Files using the @ref Cairo-Renderer +- Latex code (TikZ) using the @ref LaTeX-Renderer + +See the @subpage usage page for details + + + +@page usage Usage +@section cmd Command Line Interface +To use the application on the command line check 'gds-render --help'. + +Application options: +- -t, --tikz Output TikZ code +- -p, --pdf Output PDF document +- -s, --scale= Divide output coordinates by +- -o, --tex-output=PATH Optional path for TeX file +- -O, --pdf-output=PATH Optional path for PDF file +- -m, --mapping=PATH Path for Layer Mapping File +- -c, --cell=NAME Cell to render +- -a, --tex-standalone Configure TeX Code standalone +- -l, --tex-layers configure TeX code to create PDF Layers (OCG) + +@section gui Graphical User Interface + +The graphical user interface (GUI) can be used to Open GDS Files, configure the layer rendering (colors, order, transparency etc.) and convert cells. + +It is possible to export the layer configurations so theycan be used later on. Even in the @ref cmd + + + + + + + + + + + + + + +*/ diff --git a/doxygen/widgets.dox b/doxygen/widgets.dox new file mode 100644 index 0000000..6c8101c --- /dev/null +++ b/doxygen/widgets.dox @@ -0,0 +1,6 @@ +/* This file only contains help information for doxygen */ + +/** + * @defgroup Widgets Custom GTK Widgets + * + */ diff --git a/gds-parser/gds-parser.c b/gds-parser/gds-parser.c index fdab210..8553b69 100644 --- a/gds-parser/gds-parser.c +++ b/gds-parser/gds-parser.c @@ -23,8 +23,8 @@ /** - * @file gds_parser.h - * @brief Header file for the GDS-Parser + * @file gds-parser.c + * @brief Implementation of the GDS-Parser * @author Mario Hüttel * * What's missing? - A lot: diff --git a/gds-parser/gds-parser.h b/gds-parser/gds-parser.h index d8cf3c9..5e3c542 100644 --- a/gds-parser/gds-parser.h +++ b/gds-parser/gds-parser.h @@ -18,7 +18,7 @@ */ /** - * @file gds_parser.h + * @file gds-parser.h * @brief Header file for the GDS-Parser * @author Mario Hüttel */ diff --git a/tree-renderer/tree-store.c b/tree-renderer/tree-store.c index aae8af0..7f56c8f 100644 --- a/tree-renderer/tree-store.c +++ b/tree-renderer/tree-store.c @@ -1,7 +1,46 @@ +/* + * GDSII-Converter + * Copyright (C) 2018 Mario Hüttel + * + * 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 . + */ + +/** + * @file tree-store.h + * @brief Tree store implementation + * @author Mario Hüttel + */ + +/** + * @addtogroup MainApplication + * @{ + */ + #include "tree-store.h" #include "lib-cell-renderer.h" #include "../gds-parser/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, @@ -21,6 +60,11 @@ static gboolean tree_sel_func(GtkTreeSelection *selection, return FALSE; } +/** + * @brief Setup a GtkTreeView with the necessary columns + * @param view Tree view to set up + * @return TreeStore for storing data inside the GtkTreeView + */ GtkTreeStore *setup_cell_selector(GtkTreeView* view) { GtkTreeStore *cell_store; @@ -77,3 +121,4 @@ GtkTreeStore *setup_cell_selector(GtkTreeView* view) return cell_store; } +/** @} */ diff --git a/tree-renderer/tree-store.h b/tree-renderer/tree-store.h index af16a76..ac02af3 100644 --- a/tree-renderer/tree-store.h +++ b/tree-renderer/tree-store.h @@ -1,16 +1,49 @@ +/* + * GDSII-Converter + * Copyright (C) 2018 Mario Hüttel + * + * 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 . + */ + +/** + * @file tree-store.h + * @brief Header file for Tree store implementation + * @author Mario Hüttel + */ + +/** + * @addtogroup MainApplication + * @{ + */ + #ifndef __TREE_STORE_H__ #define __TREE_STORE_H__ #include +/** @brief Columns of selection tree view */ enum cell_store_columns { CELL_SEL_LIBRARY = 0, CELL_SEL_CELL, CELL_SEL_MODDATE, CELL_SEL_ACCESSDATE, - CELL_SEL_COLUMN_COUNT + CELL_SEL_COLUMN_COUNT /**< Not a column. Used to determine count of coumns **/ }; GtkTreeStore *setup_cell_selector(GtkTreeView* view); #endif /* __TREE_STORE_H__ */ + +/** @} */ diff --git a/widgets/conv-settings-dialog.c b/widgets/conv-settings-dialog.c index f8c4a2f..c553684 100644 --- a/widgets/conv-settings-dialog.c +++ b/widgets/conv-settings-dialog.c @@ -17,6 +17,17 @@ * along with GDSII-Converter. If not, see . */ +/** + * @file conv-settings-dilaog.c + * @brief Implementation of the setting dialog + * @author Mario Hüttel + */ + +/** + * @addtogroup Widgets + * @{ + */ + #include "conv-settings-dialog.h" struct _RendererSettingsDialog { @@ -126,3 +137,5 @@ void renderer_settings_dialog_set_settings(RendererSettingsDialog *dialog, struc break; } } + +/** @} */ diff --git a/widgets/conv-settings-dialog.h b/widgets/conv-settings-dialog.h index 7c21c83..ef5f6f0 100644 --- a/widgets/conv-settings-dialog.h +++ b/widgets/conv-settings-dialog.h @@ -17,6 +17,17 @@ * along with GDSII-Converter. If not, see . */ +/** + * @file conv-settings-dialog.h + * @brief Header file for the Conversion Settings Dialog + * @author Mario.Huettel@gmx.net + */ + +/** + * @addtogroup Widgets + * @{ + */ + #ifndef __CONV_SETTINGS_DIALOG_H__ #define __CONV_SETTINGS_DIALOG_H__ @@ -24,25 +35,46 @@ G_BEGIN_DECLS +/** @brief return type of the RedererSettingsDialog */ enum output_renderer {RENDERER_LATEX_TIKZ, RENDERER_CAIROGRAPHICS}; G_DECLARE_FINAL_TYPE(RendererSettingsDialog, renderer_settings_dialog, RENDERER, SETTINGS_DIALOG, GtkDialog) +/** + * @brief Create a new RedererSettingsDialog GObject + * @param parent Parent window + * @return Created dialog object + */ RendererSettingsDialog *renderer_settings_dialog_new(GtkWindow *parent); #define RENDERER_TYPE_SETTINGS_DIALOG (renderer_settings_dialog_get_type()) +/** + * @brief This struct holds the renderer configuration + */ struct render_settings { - double scale; - enum output_renderer renderer; - gboolean tex_pdf_layers; - gboolean tex_standalone; + double scale; /**< @brief Scale image down by this factor. @note Used to keep image in bound of maximum coordinate limit */ + enum output_renderer renderer; /**< The renderer to use */ + gboolean tex_pdf_layers; /**< Create OCG layers when rendering with TikZ */ + gboolean tex_standalone; /**< Create a standalone compile TeX file */ }; G_END_DECLS - +/** + * @brief Apply settings to dialog + * @param dialog + * @param settings + */ void renderer_settings_dialog_set_settings(RendererSettingsDialog *dialog, struct render_settings *settings); + +/** + * @brief Get the settings configured in the dialog + * @param dialog + * @param settings + */ void renderer_settings_dialog_get_settings(RendererSettingsDialog *dialog, struct render_settings *settings); #endif /* __CONV_SETTINGS_DIALOG_H__ */ + +/** @} */ diff --git a/widgets/layer-element.c b/widgets/layer-element.c index b219a4d..5a4ae60 100644 --- a/widgets/layer-element.c +++ b/widgets/layer-element.c @@ -17,6 +17,17 @@ * along with GDSII-Converter. If not, see . */ +/** + * @file layer-element.c + * @brief Omplementation of the layer element used for configuring layer colors etc. + * @author Mario Hüttel + */ + +/** + * @addtogroup Widgets + * @{ + */ + #include "layer-element.h" G_DEFINE_TYPE(LayerElement, layer_element, GTK_TYPE_LIST_BOX_ROW) @@ -187,3 +198,5 @@ void layer_element_set_color(LayerElement *elem, GdkRGBA *rgba) { gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(elem->priv.color), rgba); } + +/** @} */ diff --git a/widgets/layer-element.h b/widgets/layer-element.h index 7434ffb..f793b74 100644 --- a/widgets/layer-element.h +++ b/widgets/layer-element.h @@ -17,6 +17,17 @@ * along with GDSII-Converter. If not, see . */ +/** + * @file layer-element.h + * @brief Omplementation of the layer element used for configuring layer colors etc. + * @author Mario Hüttel + */ + +/** + * @addtogroup Widgets + * @{ + */ + #ifndef __LAYER_ELEMENT_H__ #define __LAYER_ELEMENT_H__ @@ -45,17 +56,70 @@ struct _LayerElement { LayerElementPriv priv; }; +/** + * @brief Create new layer element object + * @return new object + */ GtkWidget *layer_element_new(void); +/** + * @brief get name of the layer + * @param elem Layer element + * @return Name. Must not be changed, freed or anything else. + */ const char *layer_element_get_name(LayerElement *elem); + +/** + * @brief layer_element_set_name + * @param elem set the name of the layer + * @param name Name. Can be freed after call to this function + */ void layer_element_set_name(LayerElement *elem, const char* name); + +/** + * @brief Set layer number for this layer + * @param elem Layer element + * @param layer Layer number + */ void layer_element_set_layer(LayerElement *elem, int layer); + +/** + * @brief Get layer number + * @param elem Layer Element + * @return Number of this layer + */ int layer_element_get_layer(LayerElement *elem); + +/** + * @brief Set export flag for this layer + * @param elem Layer Element + * @param export flag + */ void layer_element_set_export(LayerElement *elem, gboolean export); + +/** + * @brief Get export flag of layer + * @param elem Layer Element + * @return + */ gboolean layer_element_get_export(LayerElement *elem); + +/** + * @brief Get color of layer + * @param elem Layer Element + * @param rgba RGBA color + */ void layer_element_get_color(LayerElement *elem, GdkRGBA *rgba); + +/** + * @brief Set color of layer + * @param elem Layer Element + * @param rgba RGBA color + */ void layer_element_set_color(LayerElement *elem, GdkRGBA *rgba); G_END_DECLS #endif /* __LAYER_ELEMENT_H__ */ + +/** @} */