39#define GDK_SYNCHRONIZE
46#include <glib/gi18n.h>
58#include <gdk/gdkkeysyms.h>
59#include <gdk-pixbuf/gdk-pixbuf.h>
61#include <pango/pangoft2.h>
64# include <gtkosxapplication.h>
70# define WIN32_LEAN_AND_MEAN 1
74# define max(a,b) (a>=b?a:b)
75# define min(a,b) (a<=b?a:b)
78# include <OpenGL/glu.h>
81# include <epoxy/glx.h>
152# include <gtk/gtkx.h>
154#define MEDIA_NEXT "media-skip-forward"
155#define MEDIA_PREV "media-skip-backward"
156#define MEDIA_LAST "go-last"
157#define MEDIA_FIRST "go-first"
158#define MEDIA_GOTO "go-jump"
159#define MEDIA_PLAY "media-playback-start"
160#define MEDIA_STOP "media-playback-stop"
161#define MEDIA_LOOP "view-refresh"
162#define MEDIA_ULOOP "edit-cut"
163#define MEDIA_SLOW "view-sort-ascending"
164#define MEDIA_FAST "view-sort-descending"
165#define GO_RIGHT "go-next"
166#define GO_LEFT "go-previous"
168#define GO_DOWN "go-down"
169#define PAGE_SETUP "document-page-setup"
170#define FULLSCREEN "view-fullscreen"
171#define FITBEST "zoom-fit-best"
172#define RECORD "media-record"
174#define EDITA "edit-find-replace"
175#define EDITC "edit-copy"
176#define EDITF "edit-find"
177#define ECUT "edit-cut"
178#define DPROPERTIES "document-properties"
179#define FNEW "document-new"
180#define FOPEN "document-open"
181#define FSAVE "document-save"
182#define FSAVEAS "document-save-as"
183#define FCLOSE "window-close"
184#define FEXIT "application-exit"
185#define LIST_ADD "list-add"
186#define LIST_REM "list-remove"
187#define CANCEL "process-stop"
188#define EXECUTE "system-run"
190#define APPLY "emblem-default"
192#define APPLY "gtk-apply"
194#define DELETEB "edit-delete"
195#define DIAL_ERROR "dialog-error"
196#define AFILE "text-x-generic"
197#define ABOUT "help-about"
202 GTK_RELIEF_NORMAL = 0,
212 GTK_SHADOW_ETCHED_IN = 3,
213 GTK_SHADOW_ETCHED_OUT = 4
244#define ATOM_LIMIT 100000
249#define STEP_LIMIT 10000
253#define ERROR_PROJECT 2
256#define ERROR_ATOM_A 5
257#define ERROR_ATOM_B 6
258#define ERROR_UPDATE 7
259#define ERROR_NO_WAY 8
261#define ERROR_RINGS 10
262#define ERROR_CHAINS 11
307#define DEFAULT_FONT_SIZE 8
308#define DEFAULT_ALPHA 0.75
312extern gchar * PACKAGE_PREFIX;
313extern gchar * PACKAGE_LIB_DIR;
314extern gchar * PACKAGE_DATA_DIR;
315extern gchar * PACKAGE_LOCALE_DIR;
316extern gchar * PACKAGE_IMP;
317extern gchar * PACKAGE_CON;
318extern gchar * PACKAGE_IMG;
319extern gchar * PACKAGE_PDF;
320extern gchar * PACKAGE_SVG;
321extern gchar * PACKAGE_EPS;
322extern gchar * PACKAGE_PNG;
323extern gchar * PACKAGE_JPG;
324extern gchar * PACKAGE_BMP;
325extern gchar * PACKAGE_TIFF;
326extern gchar * PACKAGE_VOID;
327extern gchar * PACKAGE_GR;
328extern gchar * PACKAGE_SQ;
329extern gchar * PACKAGE_BD;
330extern gchar * PACKAGE_AN;
331extern gchar * PACKAGE_RI;
332extern gchar * PACKAGE_CH;
333extern gchar * PACKAGE_SP;
334extern gchar * PACKAGE_MS;
335extern gchar * PACKAGE_TD;
336extern gchar * PACKAGE_MOL;
337extern gchar * PACKAGE_OGL;
338extern gchar * PACKAGE_OGLM;
339extern gchar * PACKAGE_OGLC;
340extern gchar * PACKAGE_PRO;
341extern gchar * PACKAGE_SET;
342extern gchar * PACKAGE_LOGO;
343extern gchar * PACKAGE_LAGPL;
344extern gchar * PACKAGE_LABOUT;
345extern gchar * PACKAGE_DOTA;
346extern gchar * PACKAGE_DOTB;
347extern gchar * PACKAGE_DOTC;
348extern gchar * PACKAGE_DOTD;
349extern gchar * PACKAGE_DOTE;
350extern gchar * PACKAGE_DOTF;
351extern gchar * PACKAGE_DOTG;
352extern gchar * PACKAGE_DOTH;
353extern gchar * PACKAGE_DFBD;
354extern gchar * PACKAGE_DFAN;
355extern gchar * PACKAGE_DFDI;
356extern gchar * PACKAGE_DFTD;
357extern gchar * PACKAGE_DFIN;
358extern gchar * PACKAGE_SGCP;
359extern gchar * PACKAGE_SGCI;
360extern gchar * PACKAGE_SGCF;
361extern gchar * PACKAGE_SGHP;
362extern gchar * PACKAGE_SGTR;
363extern gchar * PACKAGE_SGTI;
364extern gchar * PACKAGE_SGTP;
365extern gchar * PACKAGE_SGOP;
366extern gchar * PACKAGE_SGOI;
367extern gchar * PACKAGE_SGOC;
368extern gchar * PACKAGE_SGOF;
369extern gchar * PACKAGE_SGMP;
370extern gchar * PACKAGE_SGMI;
371extern gchar * PACKAGE_SGTC;
431extern GtkWidget *
pop;
439extern GtkTextTag *
tag;
444extern GdkPixbuf *
THETD;
445extern GdkPixbuf *
THEMO;
446extern GdkPixbuf *
THEBD;
449extern GdkPixbuf *
OGL;
450extern GdkPixbuf *
OGLM;
451extern GdkPixbuf *
OGLC;
452extern GdkPixbuf *
RUN;
1040extern gboolean **
allocdbool (
int xal,
int yal);
1041extern gboolean ***
alloctbool (
int xal,
int yal,
int zal);
1043extern int **
allocdint (
int xal,
int yal);
1044extern int ***
alloctint (
int xal,
int yal,
int zal);
1045extern int ****
allocqint (
int wal,
int xal,
int yal,
int zal);
1048extern float ***
alloctfloat (
int xal,
int yal,
int zal);
1051extern double ***
alloctdouble (
int xal,
int yal,
int zal);
1052extern double ****
allocqdouble (
int wal,
int xal,
int yal,
int zal);
1068extern GtkTextBuffer *
add_buffer (GCallback handler, gpointer data, gchar *
text);
1069extern GtkWidget *
create_text_view (
int dimx,
int dimy,
int edit,
int mono,
1070 GCallback handler, gpointer data, gchar *
text);
1084extern GtkWidget *
dialogmodal (gchar * str, GtkWindow * parent);
1085extern GtkWidget *
message_dialogmodal (gchar * message, gchar * title, GtkMessageType mtype, GtkButtonsType buttons, GtkWidget * parent);
1086extern GtkWidget *
dialog_cancel_apply (gchar * title, GtkWidget * parent, gboolean resiz);
1091 float val,
int pos,
int round,
int size,
1092 GCallback handler, GCallback scroll_handler, gpointer data);
1094 float val,
int pos,
int round,
int size,
1095 GCallback handler, GCallback scroll_handler, gpointer data);
1098extern void add_box_child_end (GtkWidget * widg, GtkWidget * child, gboolean expand, gboolean fill,
int padding);
1099extern void add_box_child_start (
int orientation, GtkWidget * widg, GtkWidget * child, gboolean expand, gboolean fill,
int padding);
1108extern void run_this_gtk_native_dialog (GtkNativeDialog * dial, GCallback handler, gpointer data);
1118extern G_MODULE_EXPORT
void show_hide_atoms (GSimpleAction *
action, GVariant * parameter, gpointer data);
1120extern G_MODULE_EXPORT
void show_hide_coord (GSimpleAction *
action, GVariant * parameter, gpointer data);
1121extern G_MODULE_EXPORT
void show_hide_poly (GSimpleAction *
action, GVariant * parameter, gpointer data);
1122extern G_MODULE_EXPORT
void show_hide_labels (GSimpleAction *
action, GVariant * parameter, gpointer data);
1124extern G_MODULE_EXPORT
void remove_the_atoms (GSimpleAction *
action, GVariant * parameter, gpointer data);
1127extern void add_widget_gesture_and_key_action (GtkWidget * widget,
1128 gchar * cp_name, GCallback cp_handler, gpointer cp_data,
1129 gchar * cr_name, GCallback cr_handler, gpointer cr_data,
1130 gchar * kp_name, GCallback kp_handler, gpointer kp_data,
1131 gchar * mo_name, GCallback mo_handler, gpointer mo_data,
1132 gchar * sc_name, GCallback sc_handler, gpointer sc_data);
1134extern G_MODULE_EXPORT gboolean
hide_this_window (GtkWindow * win, gpointer data);
1135extern GtkFileChooserNative *
create_file_chooser (
const gchar * title, GtkWindow * parent, GtkFileChooserAction act,
const gchar * act_name);
1138extern void update_menu_bar (
glwin * view);
1155extern G_MODULE_EXPORT
void show_hide_coord (GtkWidget * widg, gpointer data);
1156extern G_MODULE_EXPORT
void show_hide_poly (GtkWidget * widg, gpointer data);
1159extern G_MODULE_EXPORT
void remove_the_atoms (GtkWidget * widg, gpointer data);
1166extern G_MODULE_EXPORT gboolean
destroy_this_window (GtkWidget * win, GdkEvent * event, gpointer data);
1167extern G_MODULE_EXPORT gboolean
hide_this_window (GtkWidget * win, GdkEvent * event, gpointer data);
1168extern GtkWidget *
create_file_chooser (
const gchar * title, GtkWindow * parent, GtkFileChooserAction act,
const gchar * act_name);
1174extern GtkWidget *
create_entry (GCallback handler,
int dim,
int cdim, gboolean key_release, gpointer data);
1177extern GtkWidget *
stock_image (
const gchar * stock_id);
1182 int icon_format, gpointer item_icon,
1183 GCallback handler, gpointer data,
1184 gboolean accel, guint key, GdkModifierType mod,
1185 gboolean check, gboolean radio, gboolean
status);
1187extern GtkWidget *
add_advanced_item (GtkWidget * menu, GCallback handler, gpointer data, gboolean accel, guint key, GdkModifierType mod);
1190extern GtkWidget *
color_button (
ColRGBA col, gboolean alpha,
int dimx,
int dimy, GCallback handler, gpointer data);
1191extern GtkWidget *
font_button (gchar * font,
int dimx,
int dimy, GCallback handler, gpointer data);
1192extern GtkWidget *
spin_button (GCallback handler,
double value,
double start,
double end,
double step,
int digits,
int dim, gpointer data);
1193extern GtkWidget *
check_button (gchar *
text,
int dimx,
int dimy, gboolean state, GCallback handler, gpointer data);
1194extern GtkWidget *
radio_button (gchar *
text,
int dimx,
int dimy, gboolean state, GCallback handler, gpointer data);
1195extern GtkWidget *
create_button (gchar *
text,
int image_format, gchar *
image,
int dimx,
int dimy,
int relief, GCallback handler, gpointer data);
1206extern GtkWidget *
abox (GtkWidget * box,
char *
lab,
int vspace);
1207extern GtkWidget *
bbox (GtkWidget * box,
char *
lab);
1208extern GtkWidget *
cbox (GtkWidget * box,
char *
lab);
1209extern GtkWidget *
fbox (GtkWidget * box,
char *
lab);
1210extern GtkWidget *
create_scroll (GtkWidget * box,
int dimx,
int dimy,
int shadow);
1213extern GtkWidget *
create_win (gchar * str, GtkWidget * parent, gboolean modal, gboolean resiz);
1215extern void widget_add_action (GSimpleActionGroup * action_group,
const gchar * act, GCallback handler, gpointer data,
1216 gboolean check, gboolean
status, gboolean radio,
const gchar * stat);
1218 const gchar * custom,
int format,
const gchar * icon,
1219 gboolean check, gboolean
status, gboolean radio,
const gchar * rstatus);
1225extern G_MODULE_EXPORT
void run_destroy_dialog (GtkDialog * dialog, gint response_id, gpointer data);
1237extern double get_calc_time (
struct timespec start,
struct timespec stop);
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
GtkWidget * dialog_cancel_apply(gchar *title, GtkWidget *parent, gboolean resiz)
create a dialog modal offering a choice to apply something or not
int ** allocdint(int xal, int yal)
allocate an int ** pointer
GdkPixbuf * convert_to_pixbuf(cairo_surface_t *surf)
convert cairo surface to GdkPixbuf
void run_this_gtk_dialog(GtkWidget *dial, GCallback handler, gpointer data)
run a GTK (3 and 4) basic GtkDialog
void recreate_all_shaders(glwin *view)
re-initialize all OpenGL shaders
void file_chooser_set_current_folder(GtkFileChooser *chooser)
set current folder in a GtkFilechooser
double **** allocqdouble(int wal, int xal, int yal, int zal)
allocate a double **** pointer
GtkWidget * create_entry(GCallback handler, int dim, int cdim, gboolean key_release, gpointer data)
Create a GtkEntry.
float ** allocdfloat(int xal, int yal)
allocate a float ** pointer
void update_entry_double(GtkEntry *entry, double doubleval)
update the content of a GtkEntry as double
void set_renderer_color(int tocol, GtkCellRenderer *renderer, ColRGBA col)
set the color of a GtkCellRenderer
G_MODULE_EXPORT void show_hide_labels(GtkWidget *widg, gpointer data)
GLfloat ** allocdGLfloat(int xal, int yal)
allocate a GLfloat ** pointer
GtkWidget * create_menu_item_from_widget(GtkWidget *widg, gboolean check, gboolean radio, gboolean status)
ColRGBA gdkrgba_to_rgba(GdkRGBA colgdk)
convert GdkRGBA color to ColRGBA color
GLuint ** allocdgluint(int xal, int yal)
allocate a GLuint ** pointer
GtkWidget * register_button
G_MODULE_EXPORT void show_hide_poly(GtkWidget *widg, gpointer data)
show / hide polyhedra callback - GTK3
double * duplicate_double(int num, double *old_val)
copy a list of double
int * duplicate_int(int num, int *old_val)
copy a list of int
int *** alloctint(int xal, int yal, int zal)
allocate an int *** pointer
GtkWidget * font_button(gchar *font, int dimx, int dimy, GCallback handler, gpointer data)
create a font selection button
void update_chains_menus(glwin *view)
GtkWidget * create_text_view(int dimx, int dimy, int edit, int mono, GCallback handler, gpointer data, gchar *text)
create a GtkTextView and display some text
gchar * edition_action_names[3]
gchar * analyze_action_names[9]
GtkTextBuffer * add_buffer(GCallback handler, gpointer data, gchar *text)
create a GtkTextBuffer
GtkWidget * create_scroll(GtkWidget *box, int dimx, int dimy, int shadow)
create a scroll window
GtkWidget * dialogmodal(gchar *str, GtkWindow *parent)
Create a new dialog modal window.
void set_color_chooser_color(GtkWidget *color_win, ColRGBA col)
set the color of a color selection window
coord_info * active_coord
gboolean is_the_widget_visible(GtkWidget *widg)
test if a GtkWidget exist, then return if it is visible or not
GtkWidget * gtk3_menu_item(GtkWidget *menu, gchar *name, int icon_format, gpointer item_icon, GCallback handler, gpointer data, gboolean accel, guint key, GdkModifierType mod, gboolean check, gboolean radio, gboolean status)
gboolean is_atom_win_active(glwin *view)
is the model edition window visible ?
void resize_this_window(GtkWidget *window, int x, int y)
resize this GtkWindow
GtkWidget * create_win(gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz)
create a new GtkWindow
element_data periodic_table_info[]
ColRGBA get_window_color(GtkWidget *color_win)
get the ColRGBA color from a color selection window
void remove_edition_actions()
remove all edition actions
GtkWidget * add_vbox_to_layout(GtkWidget *layout, int size_x, int size_y)
Insert a vertical GtkBox in a GtkLatout then send back the GtkBox.
gchar * file_chooser_get_file_name(GtkFileChooser *chooser)
get a file name from a GtkFileChooser (single file selected)
G_MODULE_EXPORT void show_hide_coord(GtkWidget *widg, gpointer data)
show/hide coordination callback GTK3
struct timespec start_time
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
chemical_data * active_chem
GdkRGBA colrgba_togtkrgba(ColRGBA col)
convert ColRGBA color to GdkRGBA color
void clean_rings_data(int rid, glwin *view)
clean a ring type data for a glview
GSimpleAction * edition_actions[3]
void opengl_project_changed(int id)
change the OpenGL project
gboolean in_movie_encoding
gboolean * allocbool(int val)
allocate a gboolean * pointer
void update_entry_int(GtkEntry *entry, int intval)
update the content of a GtkEntry as int
G_MODULE_EXPORT gboolean hide_this_window(GtkWidget *win, GdkEvent *event, gpointer data)
hide a GtkWindow
gchar * graph_img[NGRAPHS]
void pop_menu_at_pointer(GtkWidget *widg, GdkEvent *event)
popup a menu at pointer location
gboolean file_chooser_set_file_name(GtkFileChooser *chooser, gchar *filename)
set file name in a GtkFilechooser
void widget_add_action(GSimpleActionGroup *action_group, const gchar *act, GCallback handler, gpointer data, gboolean check, gboolean status, gboolean radio, const gchar *stat)
add an action to an action group
G_MODULE_EXPORT gboolean destroy_this_window(GtkWidget *win, GdkEvent *event, gpointer data)
destroy a GtkWindow
G_MODULE_EXPORT void select_unselect_this_atom(GtkWidget *widg, gpointer data)
select / unselect this atom callback GTK3
gboolean tmp_adv_bonding[2]
GtkWidget * stock_image(const gchar *stock_id)
create a GtkImage for the Gtk database
void append_submenu(GMenu *menu, const gchar *label, GMenu *submenu)
append a GMenuItem with a subenu to a GMenu, and use markup for the GMenuItem
void add_gtk_close_event(GtkWidget *widg, GCallback handler, gpointer data)
add a close event signal and callback to a GtkWidget
GtkWidget * create_vscale(float min, float max, float delta, float val, int pos, int round, int size, GCallback handler, GCallback scroll_handler, gpointer data)
create an vertical scale GtkWidget
void layout_add_widget(GtkWidget *layout, GtkWidget *child, int x_pos, int y_pos)
Add a GtkWidget in a GtkLayout.
GtkWidget * fbox(GtkWidget *box, char *lab)
GMainLoop * Event_loop[5]
gchar * file_chooser_get_current_folder(GtkFileChooser *chooser)
get the current folder for a GtkFileChooser
double ** allocddouble(int xal, int yal)
allocate a double ** pointer
GtkWidget * radio_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a radio button
GtkWidget * spin_button(GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data)
create a spin button
GtkApplication * AtomesApp
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check button
G_MODULE_EXPORT void on_calc_bonds_released(GtkWidget *widg, gpointer data)
compute bonding properties
GtkWidget * add_advanced_item(GtkWidget *menu, GCallback handler, gpointer data, gboolean accel, guint key, GdkModifierType mod)
G_MODULE_EXPORT void label_unlabel_coord(GtkWidget *widg, gpointer data)
label / unlabel a type of coordination callback GTK3
double * allocdouble(int val)
allocate a double * pointer
gchar * calculation_time(gboolean modelv, double ctime)
get calculation time, human readable
GtkWidget * create_button(gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data)
create a simple button
G_MODULE_EXPORT void show_hide_this_atom(GtkWidget *widg, gpointer data)
show / hide this atom callback GTK3
G_MODULE_EXPORT void label_unlabel_atoms(GtkWidget *widg, gpointer data)
label / unlabel a type of atom(s) callback GTK3
GtkWidget * get_top_level(GtkWidget *widg)
get the top level container, window, of a widget
GtkWidget * create_combo()
create a GtkCombox widget, note deprecated in GTK4
void remove_edition_and_analyze_actions()
remove all edition and analysis action
GtkWidget * dialog_get_content_area(GtkWidget *widg)
prepare GtkWidget to insert content in a GtkDialog window
void button_set_image(GtkButton *but, gchar *text, int format, gpointer image)
Add an image to a GtkButton.
gchar ** duplicate_strings(int num, gchar **old_val)
copy a list of strings
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
GtkWidget * cbox(GtkWidget *box, char *lab)
void clean_chains_data(glwin *view)
cleaning the OpenGL data related to chain statistics
float * duplicate_float(int num, float *old_val)
copy a list of float
void add_box_child_start(int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the initial position.
ColRGBA get_button_color(GtkColorChooser *colob)
get the ColRGBA color from a GtkColorChooser button
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
void text_view_set_monospace(GtkWidget *view)
set the font of a GtkTextView as monospace
void add_action(GSimpleAction *action)
add action to the main window action map
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
gboolean * duplicate_bool(int num, gboolean *old_val)
copy a list of gboolean
GtkWidget * new_gtk_window()
create a new GtkWindow
GtkWidget * create_image_from_data(int format, gpointer item_image)
create Gtk image for data
double *** alloctdouble(int xal, int yal, int zal)
allocate a double *** pointer
int * allocint(int val)
allocate an int * pointer
void gtk_label_align(GtkWidget *lab, float ax, float ay)
set text alignment in a GtkLabel
char * coord_files_ext[NCFORMATS+1]
G_MODULE_EXPORT void select_unselect_atoms(GtkWidget *widg, gpointer data)
select / unselect a type of atom(s) callback GTK3
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
G_MODULE_EXPORT void run_destroy_dialog(GtkDialog *dialog, gint response_id, gpointer data)
to destroy a GtkDialog when the dialog emit the closing signal
GtkWidget * create_layout(int x, int y)
create a GtkLayout / GtkFixed widget
GtkWidget * create_menu_item(gboolean add_mnemo, gchar *action)
gboolean *** alloctbool(int xal, int yal, int zal)
allocate a gboolean *** pointer
gboolean ** allocdbool(int xal, int yal)
allocate a gboolean ** pointer
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
GLuint * allocgluint(int val)
allocate a GLuint * pointer
GtkWidget * color_button(ColRGBA col, gboolean alpha, int dimx, int dimy, GCallback handler, gpointer data)
create a color selection button
G_MODULE_EXPORT void select_unselect_coord(GtkWidget *widg, gpointer data)
select / unselect a type of coordination callback GTK3
GtkWidget * create_hscale(float min, float max, float delta, float val, int pos, int round, int size, GCallback handler, GCallback scroll_handler, gpointer data)
create an horizontal scale GtkWidget
GtkWidget * bbox(GtkWidget *box, char *lab)
void add_box_child_end(GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the end position.
void update_entry_text(GtkEntry *entry, gchar *text)
update the content of a GtkEntry as string
void provide_gtk_css(gchar *css)
create a css provider based on the css data
double get_calc_time(struct timespec start, struct timespec stop)
get calculation time in s
char * graph_name[NGRAPHS]
int **** allocqint(int wal, int xal, int yal, int zal)
allocate an int **** pointer
float * allocfloat(int val)
allocate a float * pointer
gchar * prepare_for_title(gchar *init)
prepare a string for a window title, getting rid of all markup
void clean_volumes_data(glwin *view)
clean volume data
G_MODULE_EXPORT void show_hide_the_coord(GtkWidget *widg, gpointer data)
show / hide a type of coordination callback GTK3
struct timespec stop_time
void cutoffsend()
send cutoffs to Fortran90
gboolean in_md_shaders(project *this_proj, int id)
is this shader MD dependent ?
G_MODULE_EXPORT void show_hide_atoms(GtkWidget *widg, gpointer data)
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
void set_image_from_icon_name(GtkWidget *widg, gchar *icon)
set a image from a stock icon name
#define MAXDATC
Number of tabs for the description of the classical calculation.
char * coord_files[NCFORMATS+1]
GtkWidget * message_dialogmodal(gchar *message, gchar *title, GtkMessageType mtype, GtkButtonsType buttons, GtkWidget *parent)
create a modal (cannot be ignored) message window
gboolean cif_use_symmetry_positions
GSimpleAction * analyze_actions[9]
void combo_text_prepend(GtkWidget *combo, gchar *text)
prepend text in GtkComboBox widget
void append_menu_item(GMenu *menu, const gchar *label, const gchar *action, const gchar *accel, const gchar *custom, int format, const gchar *icon, gboolean check, gboolean status, gboolean radio, const gchar *rstatus)
create a menu item, then append it to a menu
G_MODULE_EXPORT void replace_the_atoms(GtkWidget *widg, gpointer data)
replace selected atom(s) callback GTK3
void add_menu_separator(GtkWidget *menu)
GtkWidget * menu_item_new_with_submenu(gchar *name, gboolean active, GtkWidget *sub_menu)
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
ColRGBA * duplicate_color(int num, ColRGBA *col)
duplicate a ColRGBA pointer
GtkWidget * abox(GtkWidget *box, char *lab, int vspace)
box creating routine, to help design faster elements for the GUI
G_MODULE_EXPORT void edit_in_new_project(GtkWidget *widg, gpointer data)
create new project using selection callback GTK3
GtkWidget * create_expander(gchar *name, gchar *file_img)
create GtkExpander
GtkWidget * create_file_chooser(const gchar *title, GtkWindow *parent, GtkFileChooserAction act, const gchar *act_name)
create a GtkFileChooser, utility to select file(s)
#define MAXDATA
Number of tabs for the description of the classical force field.
float *** alloctfloat(int xal, int yal, int zal)
allocate a float *** pointer
GSList * file_chooser_get_file_names(GtkFileChooser *chooser)
create a file list from files selected using a GtkFileChooser
G_MODULE_EXPORT void label_unlabel_this_atom(GtkWidget *widg, gpointer data)
label / unlabel this atom callback GTK3
void initcutoffs(chemical_data *chem, int species)
initialize bond cutoffs
void update_rings_menus(glwin *view)
void destroy_this_native_dialog(GtkNativeDialog *dialog)
destroy a GtkNativeDialog
atomic_object * copied_object
void remove_action(gchar *action_name)
add action from the main window action map
char * calc_name[NCALCS-2]
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
void update_entry_long_double(GtkEntry *entry, double doubleval)
update the content of a GtkEntry as long double
G_MODULE_EXPORT void remove_the_atoms(GtkWidget *widg, gpointer data)
remove selected atom(s) callback GTK3
Variable declarations related the OpenGL window Data structure declarations related the OpenGL wind...
Functions for OpenGL math.
gboolean axis_defaut_title[2]
cairo_surface_t * surface
gchar * axis_title_font[2]
double legend_box_thickness
GSimpleActionGroup * action_group
struct field_external * first_external
struct field_molecule * first_molecule
struct field_nth_body * first_body[5]
gboolean afp[MAXDATC+MAXDATA]
thermostat * ions_thermostat
thermostat * ions_thermostat
thermostat * elec_thermostat
double calc_time[NGRAPHS]
GtkTextBuffer * text_buffer[NITEMS]
classical_field * force_field[2]
chemical_data * chemistry