dialog implementation
This commit is contained in:
parent
73ea4d6838
commit
a2bc980c64
@ -9,125 +9,53 @@
|
|||||||
<property name="step_increment">10</property>
|
<property name="step_increment">10</property>
|
||||||
<property name="page_increment">1000</property>
|
<property name="page_increment">1000</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkImage" id="image1">
|
<object class="GtkBox" id="dialog-box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="stock">gtk-save</property>
|
<property name="orientation">vertical</property>
|
||||||
</object>
|
|
||||||
<object class="GtkDialog">
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="title" translatable="yes">Render Options</property>
|
|
||||||
<property name="type_hint">dialog</property>
|
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkRadioButton" id="latex-radio">
|
||||||
</child>
|
<property name="label" translatable="yes">Generate LaTeX/TikZ output</property>
|
||||||
<child internal-child="vbox">
|
<property name="visible">True</property>
|
||||||
<object class="GtkBox">
|
<property name="can_focus">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="active">True</property>
|
||||||
<property name="spacing">2</property>
|
<property name="draw_indicator">True</property>
|
||||||
<child internal-child="action_area">
|
|
||||||
<object class="GtkButtonBox">
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="layout_style">end</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button1">
|
|
||||||
<property name="label" translatable="yes">Cancel</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button2">
|
|
||||||
<property name="label" translatable="yes">Convert</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="image">image1</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">Please select Render Engine and Output Scale</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkRadioButton" id="latex-radio">
|
|
||||||
<property name="label" translatable="yes">Generate laTeX/TikZ Code</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="active">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
<property name="group">cairo-radio</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkRadioButton" id="cairo-radio">
|
|
||||||
<property name="label" translatable="yes">Generate PDF using Cairographics</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="active">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkScale" id="dialog-scale">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">adjustment1</property>
|
|
||||||
<property name="round_digits">0</property>
|
|
||||||
<property name="digits">0</property>
|
|
||||||
<property name="value_pos">left</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkRadioButton" id="cairo-radio">
|
||||||
|
<property name="label" translatable="yes">Render PDF using Cairographics</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<property name="group">latex-radio</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScale">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">adjustment1</property>
|
||||||
|
<property name="round_digits">1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
|
||||||
<action-widget response="-6">button1</action-widget>
|
|
||||||
<action-widget response="-3">button2</action-widget>
|
|
||||||
</action-widgets>
|
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
48
widgets/conv-settings-dialog.c
Normal file
48
widgets/conv-settings-dialog.c
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "conv-settings-dialog.h"
|
||||||
|
|
||||||
|
G_DEFINE_TYPE(RendererSettingsDialog, renderer_settings_dialog, GTK_TYPE_DIALOG)
|
||||||
|
|
||||||
|
static void renderer_settings_dialog_class_init(RendererSettingsDialogClass *klass)
|
||||||
|
{
|
||||||
|
/* No special code needed. Child cells are destroyed automatically due to reference counter */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void renderer_settings_dialog_init(RendererSettingsDialog *self)
|
||||||
|
{
|
||||||
|
GtkBuilder *builder;
|
||||||
|
GtkBox *box;
|
||||||
|
GtkDialog *dialog;
|
||||||
|
|
||||||
|
dialog = &(self->parent);
|
||||||
|
|
||||||
|
builder = gtk_builder_new_from_resource("/dialog.glade");
|
||||||
|
box = GTK_BOX(gtk_builder_get_object(builder, "dialog-box"));
|
||||||
|
gtk_dialog_add_buttons(dialog, "Cancel", GTK_RESPONSE_CANCEL, "OK", GTK_RESPONSE_OK, NULL);
|
||||||
|
gtk_container_add(GTK_CONTAINER(dialog), box);
|
||||||
|
g_object_unref(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkWidget *renderer_settings_dialog_new(void)
|
||||||
|
{
|
||||||
|
return (GtkWidget *) g_object_new(RENDERER_TYPE_SETTINGS_DIALOG, NULL);
|
||||||
|
}
|
39
widgets/conv-settings-dialog.h
Normal file
39
widgets/conv-settings-dialog.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __CONV_SETTINGS_DIALOG_H__
|
||||||
|
#define __CONV_SETTINGS_DIALOG_H__
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
G_DECLARE_FINAL_TYPE(RendererSettingsDialog, renderer_settings_dialog, RENDERER, SETTINGS_DIALOG, GtkDialog)
|
||||||
|
|
||||||
|
GtkWidget *renderer_settings_dialog_new(void);
|
||||||
|
|
||||||
|
struct _RendererSettingsDialog {
|
||||||
|
GtkDialog parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define RENDERER_TYPE_SETTINGS_DIALOG (renderer_settings_dialog_get_type())
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __CONV_SETTINGS_DIALOG_H__ */
|
@ -38,12 +38,12 @@ typedef struct _LayerElementPriv {
|
|||||||
GtkCheckButton *export;
|
GtkCheckButton *export;
|
||||||
} LayerElementPriv;
|
} LayerElementPriv;
|
||||||
|
|
||||||
typedef struct _LayerElement {
|
struct _LayerElement {
|
||||||
/* Inheritance */
|
/* Inheritance */
|
||||||
GtkListBoxRow parent;
|
GtkListBoxRow parent;
|
||||||
/* Custom Elements */
|
/* Custom Elements */
|
||||||
LayerElementPriv priv;
|
LayerElementPriv priv;
|
||||||
} LayerElement;
|
};
|
||||||
|
|
||||||
GtkWidget *layer_element_new(void);
|
GtkWidget *layer_element_new(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user