1 /* Lepton EDA Schematic Capture 2 * Copyright (C) 1998-2010 Ales Hvezda 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 20 #ifndef __GSCHEM_DIALOG_H__ 21 #define __GSCHEM_DIALOG_H__ 22 23 24 #define GSCHEM_TYPE_DIALOG (gschem_dialog_get_type()) 25 #define GSCHEM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSCHEM_TYPE_DIALOG, GschemDialog)) 26 #define GSCHEM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_DIALOG, GschemDialogClass)) 27 #define GSCHEM_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSCHEM_TYPE_DIALOG)) 28 #define GSCHEM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_DIALOG, GschemDialogClass)) 29 30 typedef struct _GschemDialogClass GschemDialogClass; 31 typedef struct _GschemDialog GschemDialog; 32 33 34 struct _GschemDialogClass { 35 GtkDialogClass parent_class; 36 37 void (*geometry_save) (GschemDialog *dialog, 38 EdaConfig *cfg, 39 gchar *group_name); 40 void (*geometry_restore) (GschemDialog *dialog, 41 EdaConfig *cfg, 42 gchar *group_name); 43 }; 44 45 struct _GschemDialog { 46 GtkDialog parent_instance; 47 48 gchar *settings_name; 49 GschemToplevel *w_current; 50 }; 51 52 53 GType gschem_dialog_get_type (void); 54 55 GtkWidget* gschem_dialog_new_with_buttons (const gchar *title, GtkWindow *parent, GtkDialogFlags flags, 56 const gchar *settings_name, GschemToplevel *w_current, 57 const gchar *first_button_text, ...); 58 59 60 #endif /* __GSCHEM_DIALOG_H__ */ 61