gds-render/widgets/conv-settings-dialog.h

102 lines
3.1 KiB
C
Raw Normal View History

2018-07-19 15:47:57 +02:00
/*
* 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/>.
*/
2018-07-25 16:44:04 +02:00
/**
* @file conv-settings-dialog.h
* @brief Header file for the Conversion Settings Dialog
* @author Mario.Huettel@gmx.net <mario.huettel@gmx.net>
*/
/**
* @addtogroup Widgets
* @{
*/
2018-07-19 15:47:57 +02:00
#ifndef __CONV_SETTINGS_DIALOG_H__
#define __CONV_SETTINGS_DIALOG_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
2018-07-25 16:44:04 +02:00
/** @brief return type of the RedererSettingsDialog */
enum output_renderer {RENDERER_LATEX_TIKZ, RENDERER_CAIROGRAPHICS_PDF, RENDERER_CAIROGRAPHICS_SVG};
2018-07-19 15:47:57 +02:00
G_DECLARE_FINAL_TYPE(RendererSettingsDialog, renderer_settings_dialog, RENDERER, SETTINGS_DIALOG, GtkDialog)
2018-07-19 15:47:57 +02:00
2018-07-25 16:44:04 +02:00
/**
* @brief Create a new RedererSettingsDialog GObject
* @param parent Parent window
* @return Created dialog object
*/
RendererSettingsDialog *renderer_settings_dialog_new(GtkWindow *parent);
2018-07-19 15:47:57 +02:00
#define RENDERER_TYPE_SETTINGS_DIALOG (renderer_settings_dialog_get_type())
2018-07-25 16:44:04 +02:00
/**
* @brief This struct holds the renderer configuration
*/
struct render_settings {
2018-07-25 16:44:04 +02:00
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 */
};
2018-07-19 15:47:57 +02:00
G_END_DECLS
2018-07-25 16:44:04 +02:00
/**
* @brief Apply settings to dialog
* @param dialog
* @param settings
*/
void renderer_settings_dialog_set_settings(RendererSettingsDialog *dialog, struct render_settings *settings);
2018-07-25 16:44:04 +02:00
/**
* @brief Get the settings configured in the dialog
* @param dialog
* @param settings
*/
void renderer_settings_dialog_get_settings(RendererSettingsDialog *dialog, struct render_settings *settings);
2018-12-22 20:54:02 +01:00
/**
* @brief renderer_settings_dialog_set_cell_width Set width for rendered cell
* @param dialog
* @param width Width in database units
2018-12-22 20:54:02 +01:00
*/
void renderer_settings_dialog_set_cell_width(RendererSettingsDialog *dialog, unsigned int width);
2018-12-22 20:54:02 +01:00
/**
* @brief renderer_settings_dialog_set_cell_height Set height for rendered cell
* @param dialog
* @param height Height in database units
2018-12-22 20:54:02 +01:00
*/
void renderer_settings_dialog_set_cell_height(RendererSettingsDialog *dialog, unsigned int height);
/**
* @brief renderer_settings_dialog_set_database_unit_scale Set database scale
* @param dialog dialog element
* @param unit_in_meters Database unit in meters
*/
void renderer_settings_dialog_set_database_unit_scale(RendererSettingsDialog *dialog, double unit_in_meters);
2018-12-22 20:54:02 +01:00
2018-07-19 15:47:57 +02:00
#endif /* __CONV_SETTINGS_DIALOG_H__ */
2018-07-25 16:44:04 +02:00
/** @} */