Doxygen documentation

This commit is contained in:
Mario Hüttel 2018-07-25 16:44:04 +02:00
parent 8f9531d63f
commit a56bec272b
13 changed files with 263 additions and 10 deletions

View File

@ -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

View File

47
doxygen/main-page.dox Normal file
View File

@ -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=<SCALE> Divide output coordinates by <SCALE>
- -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
*/

6
doxygen/widgets.dox Normal file
View File

@ -0,0 +1,6 @@
/* This file only contains help information for doxygen */
/**
* @defgroup Widgets Custom GTK Widgets
*
*/

View File

@ -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 <mario.huettel@gmx.net>
*
* What's missing? - A lot:

View File

@ -18,7 +18,7 @@
*/
/**
* @file gds_parser.h
* @file gds-parser.h
* @brief Header file for the GDS-Parser
* @author Mario Hüttel <mario.huettel@gmx.net>
*/

View File

@ -1,7 +1,46 @@
/*
* 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 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;
}
/** @} */

View File

@ -1,16 +1,49 @@
/*
* 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 MainApplication
* @{
*/
#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_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__ */
/** @} */

View File

@ -17,6 +17,17 @@
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file conv-settings-dilaog.c
* @brief Implementation of the setting dialog
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
/**
* @addtogroup Widgets
* @{
*/
#include "conv-settings-dialog.h"
struct _RendererSettingsDialog {
@ -126,3 +137,5 @@ void renderer_settings_dialog_set_settings(RendererSettingsDialog *dialog, struc
break;
}
}
/** @} */

View File

@ -17,6 +17,17 @@
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file conv-settings-dialog.h
* @brief Header file for the Conversion Settings Dialog
* @author Mario.Huettel@gmx.net <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__ */
/** @} */

View File

@ -17,6 +17,17 @@
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file layer-element.c
* @brief Omplementation of the layer element used for configuring layer colors etc.
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
/**
* @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);
}
/** @} */

View File

@ -17,6 +17,17 @@
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file layer-element.h
* @brief Omplementation of the layer element used for configuring layer colors etc.
* @author Mario Hüttel <mario.huettel@gmx.net>
*/
/**
* @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__ */
/** @} */