2018-05-15 22:54:10 +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
|
2018-05-16 16:29:34 +02:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
2018-05-15 22:54:10 +02:00
|
|
|
*
|
|
|
|
* 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-05-15 16:57:08 +02:00
|
|
|
#ifndef __LAYER_ELEMENT_H__
|
|
|
|
#define __LAYER_ELEMENT_H__
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
// #include <gdk/gdk.h>
|
|
|
|
|
|
|
|
#define LAYER_ELEMENT(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, layer_element_get_type(), LayerElement)
|
|
|
|
#define LAYER_ELEMENT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, layer_element_get_type(), LayerElementClass)
|
|
|
|
#define IS_LAYE_RELEMENT(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, layer_element_get_type())
|
|
|
|
|
2018-05-16 16:20:09 +02:00
|
|
|
typedef struct _LayerElementPriv {
|
|
|
|
GtkEntry *name;
|
|
|
|
GtkLabel *layer;
|
|
|
|
int layer_num;
|
|
|
|
GtkColorButton *color;
|
|
|
|
GtkScale *opacity;
|
|
|
|
GtkCheckButton *export;
|
|
|
|
} LayerElementPriv;
|
|
|
|
|
2018-05-15 16:57:08 +02:00
|
|
|
typedef struct _LayerElement {
|
2018-05-16 10:32:00 +02:00
|
|
|
/* Inheritance */
|
|
|
|
GtkBox hbox;
|
|
|
|
/* Custom Elements */
|
2018-05-16 16:20:09 +02:00
|
|
|
LayerElementPriv priv;
|
2018-05-15 16:57:08 +02:00
|
|
|
} LayerElement;
|
|
|
|
|
|
|
|
typedef struct _LayerElementClass {
|
2018-05-16 10:32:00 +02:00
|
|
|
GtkBoxClass parent_class;
|
2018-05-15 16:57:08 +02:00
|
|
|
} LayerElementClass;
|
|
|
|
|
|
|
|
|
|
|
|
GType layer_element_get_type(void);
|
|
|
|
GtkWidget *layer_element_new(void);
|
|
|
|
|
2018-05-16 16:20:09 +02:00
|
|
|
const char *layer_element_get_name(LayerElement *elem);
|
|
|
|
void layer_element_set_name(LayerElement *elem, const char* name);
|
|
|
|
void layer_element_set_layer(LayerElement *elem, int layer);
|
|
|
|
int layer_element_get_layer(LayerElement *elem);
|
|
|
|
void layer_element_set_opacity(LayerElement *elem, int opacity);
|
|
|
|
int layer_element_get_opacity(LayerElement *elem);
|
|
|
|
void layer_element_set_export(LayerElement *elem, gboolean export);
|
|
|
|
gboolean layer_element_get_export(LayerElement *elem);
|
|
|
|
void layer_element_get_color(LayerElement *elem, GdkRGBA *rgba);
|
|
|
|
void layer_element_set_color(LayerElement *elem, GdkRGBA *rgba);
|
|
|
|
|
2018-05-15 16:57:08 +02:00
|
|
|
#endif /* __LAYER_ELEMENT_H__ */
|