2018-05-16 16:27:38 +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-16 16:27:38 +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-07-24 18:47:29 +02:00
|
|
|
/**
|
|
|
|
* @file layer-selector.h
|
|
|
|
* @brief Implementation of the Layer selection list
|
|
|
|
* @author Mario Hüttel <mario.huettel@gmx.net>
|
|
|
|
*/
|
|
|
|
|
2018-05-16 16:20:09 +02:00
|
|
|
#ifndef __LAYER_SELECTOR_H__
|
|
|
|
#define __LAYER_SELECTOR_H__
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <glib.h>
|
2018-07-23 17:00:37 +02:00
|
|
|
#include "mapping-parser.h"
|
2018-05-16 16:20:09 +02:00
|
|
|
|
2019-03-12 19:26:31 +01:00
|
|
|
/**
|
|
|
|
* @brief Defines how to sort the layer selector list box.
|
|
|
|
*/
|
|
|
|
enum layer_selector_sort_algo {LAYER_SELECTOR_SORT_DOWN = 0, LAYER_SELECTOR_SORT_UP};
|
|
|
|
|
2018-07-24 18:47:29 +02:00
|
|
|
/**
|
|
|
|
* @brief Generate layer widgets in \p listbox
|
|
|
|
* @note This clears all previously inserted elements
|
|
|
|
* @param listbox
|
|
|
|
* @param libs The library to add
|
|
|
|
*/
|
2018-05-16 16:20:09 +02:00
|
|
|
void generate_layer_widgets(GtkListBox *listbox, GList *libs);
|
2018-07-24 18:47:29 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Supply button for loading the layer mapping
|
|
|
|
* @param button
|
|
|
|
* @param main_window Parent window for dialogs
|
|
|
|
*/
|
2018-05-17 21:46:14 +02:00
|
|
|
void setup_load_mapping_callback(GtkWidget *button, GtkWindow *main_window);
|
2018-07-24 18:47:29 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Supply button for saving the layer mapping
|
|
|
|
* @param button
|
|
|
|
* @param main_window
|
|
|
|
*/
|
2018-05-17 21:46:14 +02:00
|
|
|
void setup_save_mapping_callback(GtkWidget *button, GtkWindow *main_window);
|
2018-07-24 18:47:29 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief get the layer information present in the listbox of the selector
|
|
|
|
* @return List with layer_info elements
|
|
|
|
*/
|
2018-05-22 16:17:14 +02:00
|
|
|
GList *export_rendered_layer_info();
|
2018-05-16 16:20:09 +02:00
|
|
|
|
2018-07-24 18:47:29 +02:00
|
|
|
/**
|
|
|
|
* @brief Delete a layer_info struct
|
|
|
|
* @param info Struct to be deleted.
|
|
|
|
* @note The layer_info::name Element has to be freed manually
|
|
|
|
*/
|
|
|
|
void delete_layer_info_struct(struct layer_info *info);
|
2018-05-16 16:20:09 +02:00
|
|
|
#endif /* __LAYER_SELECTOR_H__ */
|