96extern G_MODULE_EXPORT
void on_edit_activate (GtkWidget * widg, gpointer data);
97extern G_MODULE_EXPORT
void on_calc_activate (GtkWidget * widg, gpointer data);
100GtkWidget * MainEvent;
108 "S(q) from FFT[g(r)]",
109 "S(q) from Debye equation",
110 "g(r)/G(r) from FFT[S(q)]",
114 "Spherical harmonics",
115 "Mean Squared Displacement",
119 "S(q) from FFT[g(r)]",
120 "S(q) from Debye equation",
121 "g(r)/G(r) from FFT[S(q)]",
123 "Angle distributions",
126 "Spherical harmonics",
127 "Mean Squared Displacement"};
144G_MODULE_EXPORT gboolean pop_menu (GtkWidget * widget, GdkEventButton * event, gpointer data)
146 if (event -> button == 3)
164 atomes_logo = gtk_picture_new_for_filename (PACKAGE_LOGO);
165 gtk_widget_set_size_request (
atomes_logo, 550, -1);
168 atomes_logo = gtk_image_new_from_file (PACKAGE_LOGO);
170 gtk_container_add (GTK_CONTAINER(MainEvent),
atomes_logo);
191 gboolean add = FALSE;
195 gtk_text_view_set_editable (GTK_TEXT_VIEW(
MainView), 0);
199 gtk_text_view_set_buffer (GTK_TEXT_VIEW(
MainView), buffer);
204 gtk_container_add (GTK_CONTAINER(MainEvent),
MainScrol[1]);
227 if (state & GDK_CONTROL_MASK)
348 gchar * name = g_strdup_printf (
"%s", g_action_get_name(G_ACTION(
action)));
349 if (g_strcmp0 (name,
"workspace.open") == 0)
353 else if (g_strcmp0 (name,
"workspace.save") == 0)
357 else if (g_strcmp0 (name,
"workspace.save-as") == 0)
361 else if (g_strcmp0 (name,
"workspace.close") == 0)
365 else if (g_strcmp0 (name,
"project.new") == 0)
369 else if (g_strcmp0 (name,
"project.edit") == 0)
373 else if (g_strcmp0 (name,
"project.active") == 0)
377 else if (g_strcmp0 (name,
"project.compute") == 0)
381 else if (g_strcmp0 (name,
"project.open") == 0)
385 else if (g_strcmp0 (name,
"project.save") == 0)
389 else if (g_strcmp0 (name,
"project.save-as") == 0)
393 else if (g_strcmp0 (name,
"project.close") == 0)
397 else if (g_strcmp0 (name,
"export.isaacs") == 0)
401 else if (g_strcmp0 (name,
"export.coordinates") == 0)
405 else if (g_strcmp0 (name,
"import.isaacs") == 0)
409 else if (g_strcmp0 (name,
"import.coordinates") == 0)
413 else if (g_strcmp0 (name,
"program.quit") == 0)
417 else if (g_strcmp0 (name,
"edit.chemistry") == 0)
421 else if (g_strcmp0 (name,
"edit.periodicity") == 0)
425 else if (g_strcmp0 (name,
"edit.cutoffs") == 0)
429 else if (g_strcmp0 (name,
"analyze.gr") == 0)
433 else if (g_strcmp0 (name,
"analyze.sq") == 0)
437 else if (g_strcmp0 (name,
"analyze.sk") == 0)
441 else if (g_strcmp0 (name,
"analyze.gk") == 0)
445 else if (g_strcmp0 (name,
"analyze.bonds") == 0)
449 else if (g_strcmp0 (name,
"analyze.rings") == 0)
453 else if (g_strcmp0 (name,
"analyze.chains") == 0)
457 else if (g_strcmp0 (name,
"analyze.sp") == 0)
461 else if (g_strcmp0 (name,
"analyze.msd") == 0)
465 else if (g_strcmp0 (name,
"analyze.tool-box") == 0)
469 else if (g_strcmp0 (name,
"help.periodic") == 0)
473 else if (g_strcmp0 (name,
"help.about") == 0)
489 return g_file_icon_new (g_file_new_for_path (icon));
492 return g_themed_icon_new (icon);
515void widget_add_action (GSimpleActionGroup * action_group,
const gchar * act, GCallback handler, gpointer data,
516 gboolean check, gboolean
status, gboolean radio,
const gchar * stat)
519 GVariant * action_state;
522 action_state = g_variant_new_string (stat);
523 action = g_simple_action_new_stateful (act, G_VARIANT_TYPE_STRING, action_state);
527 action_state = g_variant_new_boolean (
status);
528 action = g_simple_action_new_stateful (act, NULL, action_state);
532 action = g_simple_action_new (act, NULL);
534 g_signal_connect (
action,
"activate", handler, data);
535 g_action_map_add_action (G_ACTION_MAP(action_group), G_ACTION(
action));
557 const gchar * custom,
int format,
const gchar * icon,
558 gboolean check, gboolean
status, gboolean radio,
const gchar * rstatus)
565 g_menu_item_set_attribute (item,
"use-markup",
"s",
"TRUE", NULL);
568 g_menu_item_set_attribute (item,
"custom",
"s", custom, NULL);
570 GVariant * cust = g_menu_item_get_attribute_value (item,
"custom", g_variant_type_new(
"s"));
571 if (cust) g_print (
"item :: %s, custom :: %s\n",
label, g_variant_get_string (cust, NULL));
575 if (accel) g_menu_item_set_attribute (item,
"accel",
"s", accel, NULL);
577 if (radio) g_menu_item_set_attribute (item,
"target",
"s", rstatus, NULL);
584 g_menu_item_set_icon (item, gicon);
585 g_object_unref (gicon);
604 GMenuItem * item = g_menu_item_new (
label, NULL);
608 g_menu_item_set_attribute (item,
"use-markup",
"s",
"TRUE", NULL);
609 g_menu_item_set_submenu (item, (GMenuModel *)submenu);
610 g_menu_append_item (menu, item);
633 const gchar * custom,
int format,
const gchar * icon,
634 gboolean check, gboolean
status, gboolean radio,
const gchar * rstatus)
637 g_menu_append_item (menu, item);
638 g_object_unref (item);
651 GMenu * menu = g_menu_new ();
653 str = g_strdup_printf (
"%s.workspace.open", act);
654 append_menu_item (menu,
"Open", (
const gchar *)str,
"<CTRL>W", NULL,
IMG_STOCK,
FOPEN, FALSE, FALSE, FALSE, NULL);
658 str = g_strdup_printf (
"%s.workspace.save", act);
659 append_menu_item (menu,
"Save", (
const gchar *)str, NULL, NULL,
IMG_STOCK,
FSAVE, FALSE, FALSE, FALSE, NULL);
661 str = g_strdup_printf (
"%s.workspace.save-as", act);
662 append_menu_item (menu,
"Save As", (
const gchar *)str,
"<CTRL>S", NULL,
IMG_STOCK,
FSAVEAS, FALSE, FALSE, FALSE, NULL);
664 str = g_strdup_printf (
"%s.workspace.close", act);
665 append_menu_item (menu,
"Close", (
const gchar *)str,
"<CTRL>C", NULL,
IMG_STOCK,
FCLOSE, FALSE, FALSE, FALSE, NULL);
682 gchar * port_action[2]={
"export",
"import"};
683 GMenu * menu = g_menu_new ();
685 str = g_strdup_printf (
"%s.%s.isaacs", act, port_action[port]);
686 append_menu_item (menu,
"ISAACS Project File (*.ipf)", (
const gchar *)str, NULL, NULL,
IMG_FILE, PACKAGE_MOL, FALSE, FALSE, FALSE, NULL);
688 str = g_strdup_printf (
"%s.%s.coordinates", act, port_action[port]);
689 append_menu_item (menu,
"Atomic Coordinates", (
const gchar *)str, NULL, NULL,
IMG_FILE, (port) ? PACKAGE_IMP : PACKAGE_CON, FALSE, FALSE, FALSE, NULL);
706 GMenu * menu = g_menu_new ();
707 gchar * str, * str_n;
712 str = g_strdup_printf (
"%s.project.active", act);
713 append_menu_item (menu,
"Make Active", (
const gchar *)str, NULL, NULL,
IMG_STOCK,
YES, FALSE, FALSE, FALSE, NULL);
718 str = g_strdup_printf (
"%s.project.compute", act);
720 append_menu_item (menu, str_n, (
get_project_by_id(
proj) -> runok[calc]) ? (
const gchar *)str :
"None", NULL, NULL,
IMG_FILE,
graph_img[calc], FALSE, FALSE, FALSE, NULL);
724 str = g_strdup_printf (
"%s.project.edit", act);
725 append_menu_item (menu,
"Edit Name", (
const gchar *)str, NULL, NULL,
IMG_STOCK,
EDITA, FALSE, FALSE, FALSE, NULL);
728 str = g_strdup_printf (
"%s.project.new", act);
729 append_menu_item (menu,
"New", (
const gchar *)str,
"<CTRL>N", NULL,
IMG_STOCK,
FNEW, FALSE, FALSE, FALSE, NULL);
731 str = g_strdup_printf (
"%s.project.open", act);
732 append_menu_item (menu,
"Open", (
const gchar *)str,
"<CTRL>O", NULL,
IMG_STOCK,
FOPEN, FALSE, FALSE, FALSE, NULL);
734 if (! pop_up ||
proj > -1)
736 str = g_strdup_printf (
"%s.project.save", act);
737 append_menu_item (menu,
"Save", (
const gchar *)str, NULL, NULL,
IMG_STOCK,
FSAVE, FALSE, FALSE, FALSE, NULL);
739 str = g_strdup_printf (
"%s.project.save-as", act);
740 append_menu_item (menu,
"Save As", (
const gchar *)str, NULL, NULL,
IMG_STOCK,
FSAVEAS, FALSE, FALSE, FALSE, NULL);
742 str = g_strdup_printf (
"%s.project.close", act);
743 append_menu_item (menu,
"Close", (
const gchar *)str, NULL, NULL,
IMG_STOCK,
FCLOSE, FALSE, FALSE, FALSE, NULL);
759 GMenu * menu = g_menu_new ();
773 GMenu * menu = g_menu_new ();
774 gchar * str = g_strdup_printf (
"%s.program.quit", act);
775 append_menu_item (menu,
"Quit", (
const gchar *)str,
"<CTRL>Q", NULL,
IMG_STOCK,
FEXIT, FALSE, FALSE, FALSE, NULL);
787 GMenu * menu = g_menu_new ();
788 append_menu_item (menu,
"Workspace",
"None", NULL, NULL,
IMG_FILE, PACKAGE_TD, FALSE, FALSE, FALSE, NULL);
802 GMenu * menu = g_menu_new ();
806 append_menu_item (menu, str,
"None", NULL, NULL,
IMG_FILE, PACKAGE_TD, FALSE, FALSE, FALSE, NULL);
811 append_menu_item (menu,
"Project(s)",
"None", NULL, NULL,
IMG_FILE, PACKAGE_TD, FALSE, FALSE, FALSE, NULL);
828 GMenu * menu = g_menu_new ();
833 g_menu_append_section (menu, NULL, (GMenuModel*)
import_section(act));
834 g_menu_append_section (menu, NULL, (GMenuModel*)
quit_section(act));
845 GMenu * menu = g_menu_new ();
846 append_menu_item (menu,
"Chemistry and Physics",
"app.edit.chemistry", NULL, NULL,
IMG_STOCK,
DPROPERTIES, FALSE, FALSE, FALSE, NULL);
847 append_menu_item (menu,
"Box and Periodicity",
"app.edit.periodicity", NULL, NULL,
IMG_STOCK,
DPROPERTIES, FALSE, FALSE, FALSE, NULL);
848 append_menu_item (menu,
"Bond Cutoffs",
"app.edit.cutoffs", NULL, NULL,
IMG_STOCK,
DPROPERTIES, FALSE, FALSE, FALSE, NULL);
859 GMenu * menu = g_menu_new ();
860 append_menu_item (menu,
"Toolboxes",
"app.analyze.tool-box",
"<CTRL>T", NULL,
IMG_STOCK,
PAGE_SETUP, FALSE, FALSE, FALSE, NULL);
871 GMenu * menu = g_menu_new ();
872 append_menu_item (menu,
"g(r) / G(r)",
"app.analyze.gr", NULL, NULL,
IMG_FILE, PACKAGE_GR, FALSE, FALSE, FALSE, NULL);
873 append_menu_item (menu,
"S(q) from FFT[g(r)]",
"app.analyze.sq", NULL, NULL,
IMG_FILE, PACKAGE_SQ, FALSE, FALSE, FALSE, NULL);
874 append_menu_item (menu,
"S(q) from Debye Eq.",
"app.analyze.sk", NULL, NULL,
IMG_FILE, PACKAGE_SQ, FALSE, FALSE, FALSE, NULL);
875 append_menu_item (menu,
"g(r) / G(r) from FFT[S(q)]",
"app.analyze.gk", NULL, NULL,
IMG_FILE, PACKAGE_GR, FALSE, FALSE, FALSE, NULL);
876 append_menu_item (menu,
"Bonds and Angles",
"app.analyze.bonds", NULL, NULL,
IMG_FILE, PACKAGE_BD, FALSE, FALSE, FALSE, NULL);
877 append_menu_item (menu,
"Ring statistics",
"app.analyze.rings", NULL, NULL,
IMG_FILE, PACKAGE_RI, FALSE, FALSE, FALSE, NULL);
878 append_menu_item (menu,
"Chain statistics",
"app.analyze.chains", NULL, NULL,
IMG_FILE, PACKAGE_CH, FALSE, FALSE, FALSE, NULL);
879 append_menu_item (menu,
"Spherical Harmonics",
"app.analyze.sp", NULL, NULL,
IMG_FILE, PACKAGE_SP, FALSE, FALSE, FALSE, NULL);
880 append_menu_item (menu,
"Mean Squared Displacement",
"app.analyze.msd", NULL, NULL,
IMG_FILE, PACKAGE_MS, FALSE, FALSE, FALSE, NULL);
892 GMenu * menu = g_menu_new ();
893 append_menu_item (menu,
"Periodic Table",
"app.help.periodic",
"<CTRL>P", NULL,
IMG_STOCK,
ABOUT, FALSE, FALSE, FALSE, NULL);
894 append_menu_item (menu,
"About",
"app.help.about",
"<CTRL>A", NULL,
IMG_STOCK,
ABOUT, FALSE, FALSE, FALSE, NULL);
906 GMenu * menu = g_menu_new ();
926G_MODULE_EXPORT
void atomes_popup_menu (GtkGesture * gesture,
int n_press,
double x,
double y, gpointer data)
928 if (gtk_gesture_single_get_current_button ((GtkGestureSingle * )gesture) == GDK_BUTTON_SECONDARY)
935 GtkWidget * popover =
work_menu (-1, -1);
937 gtk_popover_set_has_arrow (GTK_POPOVER(popover), FALSE);
938 gtk_popover_set_pointing_to (GTK_POPOVER(popover), & rect);
939 gtk_popover_popup (GTK_POPOVER(popover));
954G_MODULE_EXPORT gboolean on_atomes_pressed (GtkEventControllerKey * self, guint keyval, guint keycode, GdkModifierType state, gpointer data)
971 THETD = gdk_pixbuf_new_from_file (PACKAGE_TD, NULL);
973 gtk_window_set_default_icon (
THETD);
975 THEMO = gdk_pixbuf_new_from_file (PACKAGE_MOL, NULL);
976 THEBD = gdk_pixbuf_new_from_file (PACKAGE_BD, NULL);
977 SETTING = gdk_pixbuf_new_from_file (PACKAGE_PRO, NULL);
978 SETTINGS = gdk_pixbuf_new_from_file (PACKAGE_SET, NULL);
979 OGL = gdk_pixbuf_new_from_file (PACKAGE_OGL, NULL);
980 OGLM = gdk_pixbuf_new_from_file (PACKAGE_OGLM, NULL);
981 OGLC = gdk_pixbuf_new_from_file (PACKAGE_OGLC, NULL);
983 GtkWidget * window = gtk_application_window_new (GTK_APPLICATION(atomes));
984 gtk_window_set_title (GTK_WINDOW(window),
PACKAGE);
985 gtk_window_set_resizable (GTK_WINDOW(window), TRUE);
986 gtk_widget_set_size_request (window, 900, 450);
988 GSimpleAction * main_act[17];
989 main_act[0] = g_simple_action_new (
"workspace.open", NULL);
990 main_act[1] = g_simple_action_new (
"workspace.save", NULL);
991 main_act[2] = g_simple_action_new (
"workspace.save-as", NULL);
992 main_act[3] = g_simple_action_new (
"workspace.close", NULL);
993 main_act[4] = g_simple_action_new (
"project.new", NULL);
994 main_act[5] = g_simple_action_new (
"project.open", NULL);
995 main_act[6] = g_simple_action_new (
"project.save", NULL);
996 main_act[7] = g_simple_action_new (
"project.save-as", NULL);
997 main_act[8] = g_simple_action_new (
"project.close", NULL);
998 main_act[9] = g_simple_action_new (
"export.isaacs", NULL);
999 main_act[10] = g_simple_action_new (
"export.coordinates", NULL);
1000 main_act[11] = g_simple_action_new (
"import.isaacs", NULL);
1001 main_act[12] = g_simple_action_new (
"import.coordinates", NULL);
1002 main_act[13] = g_simple_action_new (
"program.quit", NULL);
1003 main_act[14] = g_simple_action_new (
"analyze.tool-box", NULL);
1004 main_act[15] = g_simple_action_new (
"help.periodic", NULL);
1005 main_act[16] = g_simple_action_new (
"help.about", NULL);
1010 for (i=0; i<17; i++)
add_action (main_act[i]);
1030 for (i=0; i<
NCALCS-3; i++)
1045 gtk_application_set_menubar (GTK_APPLICATION(atomes), G_MENU_MODEL(
atomes_menu_bar()));
1046 gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW(window), TRUE);
1050 MainEvent = gtk_event_box_new ();
1051 gtk_widget_add_events (MainEvent,
1052 GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK |
1053 GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
1054 g_signal_connect(G_OBJECT(MainEvent),
"button_press_event", G_CALLBACK(pop_menu), NULL);
1055 g_signal_connect(G_OBJECT(MainEvent),
"button_release_event", G_CALLBACK(pop_menu), NULL);
1057 add_widget_gesture_and_key_action (window,
"atomes-context-click", G_CALLBACK(atomes_popup_menu), NULL,
1059 "atomes-key-pressed", G_CALLBACK(on_atomes_pressed), NULL,
1060 NULL, NULL, NULL, NULL, NULL, NULL);
1063 GtkWidget * hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
1064 int frame_size[2]={200, 550};
1068 gtk_widget_set_size_request (
MainFrame[i], frame_size[i], -1);
1078 gtk_container_add (GTK_CONTAINER(MainEvent),
MainScrol[i]);
1081 gtk_scrolled_window_set_propagate_natural_height ((GtkScrolledWindow *)
MainScrol[i], TRUE);
1082 gtk_scrolled_window_set_propagate_natural_width ((GtkScrolledWindow *)
MainScrol[i], TRUE);
1087 gtk_paned_set_start_child (GTK_PANED (hpaned),
MainFrame[0]);
1088 gtk_paned_set_resize_start_child (GTK_PANED (hpaned), FALSE);
1089 gtk_paned_set_shrink_start_child (GTK_PANED (hpaned), FALSE);
1090 gtk_paned_set_end_child (GTK_PANED (hpaned),
MainFrame[1]);
1091 gtk_paned_set_resize_end_child (GTK_PANED (hpaned), TRUE);
1092 gtk_paned_set_shrink_end_child (GTK_PANED (hpaned), FALSE);
1094 gtk_paned_pack1 (GTK_PANED (hpaned),
MainFrame[0], FALSE, FALSE);
1095 gtk_paned_pack2 (GTK_PANED (hpaned),
MainFrame[1], FALSE, FALSE);
1111 calc_img[0] = g_strdup_printf (
"%s", PACKAGE_GR);
1112 calc_img[1] = g_strdup_printf (
"%s", PACKAGE_SQ);
1113 calc_img[2] = g_strdup_printf (
"%s", PACKAGE_SQ);
1114 calc_img[3] = g_strdup_printf (
"%s", PACKAGE_GR);
1115 calc_img[4] = g_strdup_printf (
"%s", PACKAGE_AN);
1116 calc_img[5] = g_strdup_printf (
"%s", PACKAGE_RI);
1117 calc_img[6] = g_strdup_printf (
"%s", PACKAGE_CH);
1118 calc_img[7] = g_strdup_printf (
"%s", PACKAGE_SP);
1119 calc_img[8] = g_strdup_printf (
"%s", PACKAGE_MS);
1120 calc_img[9] = g_strdup_printf (
"%s", PACKAGE_BD);
1122 dots[0] = g_strdup_printf (
"%s", PACKAGE_DOTA);
1123 dots[1] = g_strdup_printf (
"%s", PACKAGE_DOTB);
1124 dots[2] = g_strdup_printf (
"%s", PACKAGE_DOTC);
1125 dots[3] = g_strdup_printf (
"%s", PACKAGE_DOTD);
1126 dots[4] = g_strdup_printf (
"%s", PACKAGE_DOTE);
1127 dots[5] = g_strdup_printf (
"%s", PACKAGE_DOTF);
1128 dots[6] = g_strdup_printf (
"%s", PACKAGE_DOTG);
1129 dots[7] = g_strdup_printf (
"%s", PACKAGE_DOTH);
1131 ifield[0] = g_strdup_printf (
"%s", PACKAGE_DFBD);
1132 ifield[1] = g_strdup_printf (
"%s", PACKAGE_DFBD);
1133 ifield[2] = g_strdup_printf (
"%s", PACKAGE_DFAN);
1134 ifield[3] = g_strdup_printf (
"%s", PACKAGE_DFAN);
1135 ifield[4] = g_strdup_printf (
"%s", PACKAGE_DFDI);
1136 ifield[5] = g_strdup_printf (
"%s", PACKAGE_DFDI);
1137 ifield[6] = g_strdup_printf (
"%s", PACKAGE_DFTD);
1138 ifield[7] = g_strdup_printf (
"%s", PACKAGE_DFIN);
1140 bravais_img[0] = g_strdup_printf (
"%s", PACKAGE_SGTC);
1141 bravais_img[1] = g_strdup_printf (
"%s", PACKAGE_SGMP);
1142 bravais_img[2] = g_strdup_printf (
"%s", PACKAGE_SGMI);
1143 bravais_img[3] = g_strdup_printf (
"%s", PACKAGE_SGOP);
1144 bravais_img[4] = g_strdup_printf (
"%s", PACKAGE_SGOI);
1145 bravais_img[5] = g_strdup_printf (
"%s", PACKAGE_SGOC);
1146 bravais_img[6] = g_strdup_printf (
"%s", PACKAGE_SGOF);
1147 bravais_img[7] = g_strdup_printf (
"%s", PACKAGE_SGTP);
1148 bravais_img[8] = g_strdup_printf (
"%s", PACKAGE_SGTI);
1149 bravais_img[9] = g_strdup_printf (
"%s", PACKAGE_SGTR);
1150 bravais_img[10] = g_strdup_printf (
"%s", PACKAGE_SGHP);
1151 bravais_img[11] = g_strdup_printf (
"%s", PACKAGE_SGCP);
1152 bravais_img[12] = g_strdup_printf (
"%s", PACKAGE_SGCI);
1153 bravais_img[13] = g_strdup_printf (
"%s", PACKAGE_SGCF);
G_MODULE_EXPORT void on_close_workspace(GtkWidget *widg, gpointer data)
close the active workspace
G_MODULE_EXPORT void on_open_save_activate(GtkWidget *widg, gpointer data)
open or save an atomes file - prepare the dialog
G_MODULE_EXPORT void on_isaacs_port(GtkWidget *widg, gpointer data)
open or write ISAACS XML file - prepare the dialog
G_MODULE_EXPORT void on_coord_port(GtkWidget *widg, gpointer data)
export or import atomic coordinates: prepare dialog
G_MODULE_EXPORT void on_save_as_activate(GtkWidget *widg, gpointer data)
open or save, choosing a file name
Callback declarations for main window.
G_MODULE_EXPORT void on_close_activate(GtkWidget *widg, gpointer cdata)
signal to close a project
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
gchar * edition_action_names[3]
gchar * analyze_action_names[9]
GSimpleAction * edition_actions[3]
GtkApplication * AtomesApp
GSimpleAction * analyze_actions[9]
Global variable declarations Global convenience function declarations Global data structure defin...
GtkWidget * create_scroll(GtkWidget *box, int dimx, int dimy, int shadow)
create a scroll window
void pop_menu_at_pointer(GtkWidget *widg, GdkEvent *event)
popup a menu at pointer location
void add_gtk_close_event(GtkWidget *widg, GCallback handler, gpointer data)
add a close event signal and callback to a GtkWidget
void text_view_set_monospace(GtkWidget *view)
set the font of a GtkTextView as monospace
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
GMenu * workspace_section(gchar *act, int pop)
create the workspace section
GMenu * quit_section(gchar *act)
create the 'Quit' menu item
G_MODULE_EXPORT void compute_this_prop(GtkWidget *widg, gpointer data)
to compute the 'calc_to_compute'
G_MODULE_EXPORT void on_edit_activate(GtkWidget *widg, gpointer data)
create an edition dialog - prepare the dialog
GMenu * create_analyze_menu()
create atomes 'analyze' menu
GMenu * port_section(gchar *act, int pop, int port)
create the import/export menu items
void remove_edition_actions()
remove all edition actions
GIcon * get_gicon_from_data(int format, const gchar *icon)
GMenu * create_workspace_menu(gchar *act, int pop_up, int proj, int calc)
create atomes 'workspace' menu
gchar * graph_img[NGRAPHS]
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
GtkWidget * curvetbox()
create the curve tool box window
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
GMenu * create_help_menu()
create atomes 'help' menu
gchar * calc_img[NCALCS-2]
void atomes_key_pressed(guint keyval, GdkModifierType state)
main window key actions callbacks
GMenu * workspace_title()
create the 'Workspace' menu item
G_MODULE_EXPORT void leaving_from_menu(GtkWidget *widg, gpointer data)
leaving atomes ?
GMenu * project_title(int pop_up, int proj)
create project title menu item
GMenu * atomes_menu_bar()
create atomes menu bar
GtkWidget * create_main_window(GApplication *atomes)
create the main application window
void remove_edition_and_analyze_actions()
remove all edition and analysis action
void clean_view()
clean the main window
G_MODULE_EXPORT void on_calc_activate(GtkWidget *widg, gpointer data)
create a calculation dialog - prepare the dialog
GtkWidget * work_menu(int p, int c)
create the workspace popup menu
void add_action(GSimpleAction *action)
add action to the main window action map
GMenu * create_edit_menu()
create atomes 'edit' menu
void view_buffer(GtkTextBuffer *buffer)
set a text buffer in the main window or an image
G_MODULE_EXPORT void show_periodic_table(GtkWidget *widg, gpointer data)
show the periodic table of the elements
int get_atom_id_from_periodic_table(atom_search *asearch)
get atom Z from selection in the periodic table
char * graph_name[NGRAPHS]
G_MODULE_EXPORT void atomes_menu_bar_action(GSimpleAction *action, GVariant *parameter, gpointer data)
atomes menu bar actions
GMenuItem * create_gmenu_item(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 menu item
G_MODULE_EXPORT void on_create_new_project(GtkWidget *widg, gpointer data)
create a new project
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
int * object_was_selected[3]
GMenu * import_section(gchar *act)
create the 'Import' submenu
void remove_action(gchar *action_name)
add action from the main window action map
char * calc_name[NCALCS-2]
GMenu * tool_box_section()
create toolboxes menu item
GMenu * project_section(gchar *act, int pop_up, int proj, int calc)
create the project section
G_MODULE_EXPORT void create_about_dialog(GtkWidget *widg, gpointer data)
create the about dialog
G_MODULE_EXPORT gboolean leaving_question(GtkWidget *widget, GdkEvent *event, gpointer data)
Leaving atomes ?
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void add_project_to_workspace()
add project(s) to the workspace tree
G_MODULE_EXPORT void activate_project(GtkWidget *widg, gpointer data)
activate a project
char * work_menu_items[NITEMS-2]
G_MODULE_EXPORT void change_project_name(GtkWidget *wid, gpointer edata)
change project name
Function declarations for workspace managment.