1 /**********************************************************************************************************
2 Copyright (c) 2002-2013 Abdul-Rahman Allouche. All rights reserved
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
5 documentation files (the Gabedit), to deal in the Software without restriction, including without limitation
6 the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7 and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8 
9   The above copyright notice and this permission notice shall be included in all copies or substantial portions
10   of the Software.
11 
12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
13 TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
14 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
15 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
16 DEALINGS IN THE SOFTWARE.
17 ************************************************************************************************************/
18 
19 #ifndef __GABEDIT_UTILSINTERFACE_H__
20 #define __GABEDIT_UTILSINTERFACE_H__
21 
22 void create_popup_win(gchar* label);
23 void init_child(GtkWidget *widget, GabeditSignalFunc func,gchar *buttonlabel);
24 void add_child(GtkWidget *widget,GtkWidget *childwidget,GabeditSignalFunc func,gchar *buttonlabel);
25 void delete_child(GtkWidget *childwidget);
26 void delete_all_children(GtkWidget *widget);
27 void destroy_children(GtkWidget *widget);
28 GtkWidget *create_pixmap(GtkWidget *widget, gchar **data);
29 GdkPixmap *get_pixmap(GtkWidget  *widget,gushort red,gushort green,gushort blue);
30 GtkWidget *create_hbox_pixmap_color(GtkWidget *widget,gushort red,gushort green,gushort blue);
31 GtkWidget *create_button_pixmap_color(GtkWidget *widget,gushort red,gushort green,gushort blue);
32 GtkWidget *create_radio_button_pixmap(GtkWidget *widget, gchar **data,gchar *string,GtkWidget *oldbutton);
33 void set_icon_default();
34 void set_icone(GtkWidget* widget);
35 void data_modify(gboolean mod);
36 GtkWidget *create_label_with_pixmap(GtkWidget *Win,gchar *string,gchar *type);
37 GtkWidget *create_button(GtkWidget *Win,gchar *string);
38 void exit_all(GtkWidget *widget, gchar *data);
39 void change_label_onglet();
40 void change_all_labels();
41 void select_all();
42 void destroy( GtkWidget *, gpointer);
43 void Cancel_YesNo(GtkWidget *widget, gpointer   data, GabeditSignalFunc func);
44 void get_doc(gchar *);
45 void charge_doc(GtkWidget* wid, gpointer data);
46 void inserrer_doc(void);
47 void show_doc(GabeditFileChooser *, gint response_id);
48 void insert_doc(GabeditFileChooser *, gint response_id);
49 void save_as_doc(void);
50 void save_doc(void);
51 void enreg_selec_doc(GabeditFileChooser *, gint response_id);
52 void desole();
53 void change_insert();
54 void new_doc_molpro();
55 void new_doc_gauss();
56 void new_doc_orca();
57 void new_doc_qchem();
58 void insert_doc_gauss();
59 gchar* get_license();
60 void new_psicode(GtkWidget *widget, gchar *data);
61 void show_about();
62 void show_version();
63 void show_homepage();
64 void  create_label_hbox(GtkWidget *,gchar *,gint );
65 GtkWidget *create_hbox(GtkWidget *);
66 GtkWidget *create_vbox(GtkWidget *);
67 GtkWidget *create_frame(GtkWidget *,GtkWidget *,gchar *);
68 GtkWidget *create_text(GtkWidget *,GtkWidget *,gboolean );
69 void  gtk_combo_box_entry_set_popdown_strings(GtkWidget* comboBoxEntry, GList *list);
70 GtkWidget*  create_label_combo_in_table(GtkWidget *table,gchar *tlabel,gchar **tlist,gint nlist, gboolean edit,gint llen,gint elen, gint iligne);
71 GtkWidget*  create_combo_box_entry(gchar **tlist,gint nlist, gboolean edit,gint llen,gint elen);
72 GtkWidget *create_combo_box_entry_liste(GtkWidget* Window,GtkWidget* hbox,gchar *lname,gchar **liste,int n);
73 void view_result();
74 void view_result_end();
75 void get_result();
76 GtkWidget * create_hseparator(GtkWidget *);
77 GtkWidget * create_vseparator(GtkWidget *);
78 GtkWidget *create_label_button(GtkWidget *,GtkWidget *,GtkWidget* ,gchar *,gchar *);
79 void ClearText(GtkWidget *);
80 GtkWidget*  create_vbox_false(GtkWidget *);
81 GtkWidget*  create_hbox_false(GtkWidget *);
82 GtkWidget*  create_hbox_true(GtkWidget *);
83 GtkWidget*  create_label_entry(GtkWidget *,gchar *,gint,gint);
84 GtkWidget*  create_label_combo(GtkWidget *,gchar *, gchar **,gint , gboolean,gint,gint );
85 GtkWidget*  Message(char *message,char *titre,gboolean center);
86 GtkWidget* MessageTxt(gchar *message,gchar *title);
87 void show_forbidden_characters();
88 gboolean variable_name_valid(gchar *);
89 void  cree_p_vbox();
90 GtkWidget *create_checkbutton(GtkWidget *,GtkWidget *,gchar *);
91 void  cree_vboxs_list_text();
92 void goto_end(GtkWidget *current,gpointer data);
93 void goto_end_result(GtkWidget *win,gpointer data);
94 void read_geom_in_gamess_input(gchar *);
95 void read_geom_in_demon_input(gchar *);
96 void read_geom_in_gauss_input(gchar *);
97 void read_geom_in_molcas_input(gchar *);
98 void read_geom_in_molpro_input(gchar *);
99 void read_geom_in_mpqc_input(gchar *);
100 void read_geom_in_nwchem_input(gchar *);
101 void read_geom_in_psicode_input(gchar *);
102 void read_geom_in_orca_input(gchar *);
103 void read_geom_in_qchem_input(gchar *);
104 void read_geom_in_mopac_input(gchar *);
105 GtkWidget *Continue_YesNo(void (*func)(GtkWidget*,gpointer data),gpointer data,gchar *message);
106 void open_file(GtkWidget *widget, gchar *data);
107 void new_molcas(GtkWidget *widget, gchar *data);
108 void new_molpro(GtkWidget *widget, gchar *data);
109 void new_mopac(GtkWidget *widget, gchar *data);
110 void new_mpqc(GtkWidget *widget, gchar *data);
111 void new_demon(GtkWidget *widget, gchar *data);
112 void new_gamess(GtkWidget *widget, gchar *data);
113 void new_firefly(GtkWidget *widget, gchar *data);
114 void new_gauss(GtkWidget *widget, gchar *data);
115 void new_nwchem(GtkWidget *widget, gchar *data);
116 void new_orca(GtkWidget *widget, gchar *data);
117 void new_qchem(GtkWidget *widget, gchar *data);
118 void new_other(GtkWidget *widget, gchar *data);
119 GtkWidget *create_button_pixmap(GtkWidget *widget, gchar **data,gchar *string);
120 GtkWidget *create_hbox_browser(GtkWidget* Wins,GtkWidget* vbox,gchar *tlabel,gchar *deffile,gchar** patterns);
121 GtkWidget*  create_table_browser(GtkWidget *Wins,GtkWidget *vbox);
122 void add_widget_table(GtkWidget *Table,GtkWidget *wid,gushort line,gushort colonne);
123 GtkWidget *add_label_at_table(GtkWidget *Table,gchar *label,gushort line,gushort colonne,GtkJustification just);
124 GtkWidget *add_label_table(GtkWidget *Table, G_CONST_RETURN gchar *label,gushort line,gushort colonne);
125 void set_default_styles();
126 GtkWidget *create_label_pixmap(GtkWidget *widget, gchar **data,gchar *string);
127 GtkWidget* create_text_widget(GtkWidget* box,gchar *title,GtkWidget **frame);
128 void draw_density_orbitals_gamess_or_gauss_or_molcas_or_molpro(GtkWidget *wid,gpointer data);
129 void set_last_directory(G_CONST_RETURN gchar* FileName);
130 GtkWidget* set_dipole_dialog ();
131 gchar* get_last_directory();
132 void fit_windows_position(GtkWidget* parent, GtkWidget* child);
133 void  create_opengl_frame(GtkWidget* Win,GtkWidget *vbox);
134 void read_admp_build_dipole_dipole_autocorrelation_dlg();
135 void read_dipole_build_dipole_dipole_autocorrelation_dlg();
136 GtkWidget* gabedit_dir_button();
137 void  add_cancel_ok_buttons(GtkWidget *Win, GtkWidget *vbox, GCallback myFunc);
138 
139 #endif /* __GABEDIT_UTILSINTERFACE_H__ */
140 
141