atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
workspace.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
23/*
24* This file: 'workspace.c'
25*
26* Contains:
27*
28 - Implementation of the workspace tree view
29 - Associated callbacks
30
31*
32* List of functions:
33
34 int find_calc_by_path (GtkTreeView * treeview, GtkTreePath * path);
35 int find_proj_by_path (GtkTreePath * path);
36
37 G_MODULE_EXPORT gboolean on_workspace_button_event (GtkWidget * widget, GdkEventButton * event, gpointer data);
38
39 void add_project (GtkTreeStore * store, int i);
40 void correct_this_window_title (GtkWidget * win, gchar * str);
41 void workspace_menu (GtkWidget * tree, gpointer event, double x, double y);
42 void create_workspace ();
43 void add_project_to_workspace ();
44 void remove_project_from_workspace (int id);
45
46 static void fill_workspace (GtkTreeStore * store);
47
48 G_MODULE_EXPORT void activate_project (GtkWidget * widg, gpointer data);
49 G_MODULE_EXPORT void workspace_ondc (GtkTreeView * treeview,
50 GtkTreePath * path,
51 GtkTreeViewColumn * col,
52 gpointer data);
53 G_MODULE_EXPORT void change_project_name (GtkWidget * wid, gpointer edata);
54 G_MODULE_EXPORT void workspace_popup (GtkGesture * gesture, int n_press, double x, double y, gpointer data);
55
56 GtkWidget * create_workspace_tree ();
57
58*/
59
60#include "global.h"
61#include "callbacks.h"
62#include "interface.h"
63#include "project.h"
64#include "glwindow.h"
65
66extern void workinfo (project * this_proj, int i);
67extern GtkWidget * work_menu (int p, int c);
68
69GdkPixbuf * pix = NULL;
70GtkWidget * img = NULL;
71GtkWidget * hbox = NULL;
72GtkWidget * vbox = NULL;
73GtkWidget * lab = NULL;
74GtkWidget * lap = NULL;
75GtkWidget * eap = NULL;
76gchar * labtmp = NULL;
77gchar * laptmp = NULL;
78GtkWidget * worktree = NULL;
79GtkTreeStore * workstore = NULL;
80GtkTreeIter worklevel;
81GtkTreeIter * piter = NULL;
82GtkTreeIter * witer = NULL;
83GtkTreePath ** prpath = NULL;
84GtkTreePath * wpath = NULL;
85GdkPixbuf * wpix = NULL;
86gchar * wchar = NULL;
88
89char * work_menu_items[NITEMS-2] = {"Workspace ",
90 "Settings ",
91 //"OpenGL - 3D ",
92 "Visualization ",
93 //"Calc. visualization ",
94 "Analysis ",
95 "g(r)/G(r) ",
96 "S(q) from g(r) ",
97 "S(q) from Debye equation ",
98 "g(r) from FFT[S(q) Debye]",
99 "Bonding information ",
100 "Angle distribution ",
101 "Ring statistics ",
102 "Chain statistics ",
103 "Spherical harmonics ",
104 "Mean Square Displacement "};
105
114void add_project (GtkTreeStore * store, int i)
115{
116 int j;
117 gchar * tmp;
118 GtkTreeIter steplevel;
119 GtkTreeIter optslevel;
120 gtk_tree_store_append (store, & piter[i], & worklevel);
121 if (i == activep)
122 {
123 tmp = g_strdup_printf ("<b>%s</b>", active_project -> name);
124 }
125 else
126 {
127 tmp = g_strdup_printf ("%s", get_project_by_id(i) -> name);
128 }
129 gtk_tree_store_set (store, & piter[i], 0, THETD, 1, tmp, 2, -1, -1);
130 prpath[i] = gtk_tree_model_get_path (GTK_TREE_MODEL(store), & piter[i]);
131 g_free (tmp);
132 gtk_tree_store_append (store, & steplevel, & piter[i]);
133 gtk_tree_store_set (store, & steplevel, 0, SETTING, 1, work_menu_items[1], 2, -3, -1);
134 // OpenGL
135 gtk_tree_store_append (store, & steplevel, & piter[i]);
136 gtk_tree_store_set (store, & steplevel, 0, OGLM, 1, work_menu_items[2], 2, -2, -1);
137 //gtk_tree_store_append (store, & optslevel, & steplevel);
138 //gtk_tree_store_set (store, & optslevel, 0, OGLM, 1, work_menu_items[3], 2, -1, -1);
139 //gtk_tree_store_append (store, & optslevel, & steplevel);
140 //gtk_tree_store_set (store, & optslevel, 0, OGLC, 1, work_menu_items[4], 2, -1, -1);
141 // Calculations
142 gtk_tree_store_append (store, & steplevel, & piter[i]);
143 gtk_tree_store_set (store, & steplevel, 0, RUN, 1, work_menu_items[3], 2, -1, -1);
144 for (j=0; j<NCALCS-2; j++)
145 {
146 if (j < NCALCS-3 || get_project_by_id(i) -> steps > 1)
147 {
148 gtk_tree_store_append (store, & optslevel, & steplevel);
149 gtk_tree_store_set (store, & optslevel, 0, gdk_pixbuf_new_from_file(graph_img[j], NULL), 1, work_menu_items[4+j], 2, j, -1);
150 }
151 }
152 gtk_tree_view_expand_to_path (GTK_TREE_VIEW(worktree), gtk_tree_model_get_path(GTK_TREE_MODEL(store), & worklevel));
154}
155
163static void fill_workspace (GtkTreeStore * store)
164{
165 int i;
166
167 gtk_tree_store_append (store, & worklevel, NULL);
168 gtk_tree_store_set (store, & worklevel, 0, THETD, 1, work_menu_items[0], 2, -4, -1);
169
170 if (piter != NULL) g_free (piter);
171 if (prpath != NULL) g_free (prpath);
172 if (nprojects > 0)
173 {
174 piter = g_malloc (nprojects*sizeof*piter);
175 prpath = g_malloc (nprojects*sizeof*prpath);
176 }
177 for (i=0; i<nprojects; i++)
178 {
179 add_project (store, i);
180 }
181}
182
191G_MODULE_EXPORT void activate_project (GtkWidget * widg, gpointer data)
192{
193 int id = GPOINTER_TO_INT (data);
194
195 if (activep < nprojects)
196 {
197 gtk_tree_store_set (workstore, & piter[activep], 1, active_project -> name, -1);
198 }
200
201 gchar * tmp = g_strdup_printf ("<b>%s</b>", active_project -> name);
202 gtk_tree_store_set (workstore, & piter[id], 1, tmp, -1);
203 g_free (tmp);
204}
205
214int find_calc_by_path (GtkTreeView * treeview, GtkTreePath * path)
215{
216 int i;
217 GtkTreeIter iter;
218 GtkTreeModel * model = gtk_tree_view_get_model (treeview);
219 if (gtk_tree_model_get_iter (model, & iter, path))
220 {
221 gtk_tree_model_get (model, & iter, 2, & i, -1);
222 return i;
223 }
224 return -1;
225}
226
227
235int find_proj_by_path (GtkTreePath * path)
236{
237 int i, j;
238
239 i = -1;
240 for (j=0; j<nprojects; j++)
241 {
242 if (gtk_tree_path_compare (prpath[j], path) <= 0) i = j;
243 }
244 return i;
245}
246
262G_MODULE_EXPORT void workspace_ondc (GtkTreeView * treeview,
263 GtkTreePath * path,
264 GtkTreeViewColumn * col,
265 gpointer data)
266{
267 int i, j;
268 GtkTreeModel * model;
269 GtkTreeIter iter;
270 model = gtk_tree_view_get_model (treeview);
271 gboolean was = FALSE;
272#ifdef DEBUG
273 g_debug ("WORKSPACE_ONDC: activep= %d", activep);
274#endif
275 if (gtk_tree_model_get_iter (model, & iter, path))
276 {
277#ifdef DEBUG
278 g_debug ("WORKSPACE_ONDC: in workspace");
279#endif
280 for (i=0; i<nprojects; i++)
281 {
282 if (gtk_tree_path_compare (path, prpath[i]) == 0)
283 {
284 if (i != activep) activate_project (NULL, GINT_TO_POINTER(i));
285 was = TRUE;
286 }
287 }
288 if (! was)
289 {
290#ifdef DEBUG
291 g_debug ("WORKSPACE_ONDC: not an activation");
292#endif
293 if (wpath != NULL && witer != NULL && wchar != NULL)
294 {
295 gtk_tree_store_set (GTK_TREE_STORE(model), witer, 1, wchar, -1);
296 }
297#ifdef DEBUG
298 g_debug ("WORKSPACE_ONDC: saving old data");
299#endif
300 wpath = gtk_tree_path_copy (path);
301 witer = gtk_tree_iter_copy (& iter);
302 gtk_tree_model_get (model, & iter, 1, & wchar, -1);
303#ifdef DEBUG
304 g_debug ("WORKSPACE_ONDC: modifying data");
305#endif
306 gchar * tmp = g_strdup_printf ("<b>%s</b>", wchar);
307 gtk_tree_store_set (GTK_TREE_STORE(model), & iter, 1, tmp, -1);
308 g_free (tmp);
309#ifdef DEBUG
310 g_debug ("WORKSPACE_ONDC: cleaning view");
311 g_debug ("WORKSPACE_ONDC: wchar = %s", wchar);
312#endif
313 gtk_tree_model_get (model, & iter, 2, & i, -1);
314 i += 4;
315#ifdef DEBUG
316 g_debug ("WORKSPACE_ONDC: creating view id= %d", i);
317#endif
319#ifdef DEBUG
320 g_debug ("WORKSPACE_ONDC: for project= %d", j);
321#endif
322 if (j < 0) j = activep;
323 if (i == 2) prep_model (j);
325 }
326 }
327}
328
337void correct_this_window_title (GtkWidget * win, gchar * str)
338{
339 if (win)
340 {
341 if (GTK_IS_WIDGET(win))
342 {
343 gtk_window_set_title (GTK_WINDOW (win), str);
344 }
345 }
346 if (str) g_free (str);
347}
348
357G_MODULE_EXPORT void change_project_name (GtkWidget * wid, gpointer edata)
358{
359 int i, j, k;
360 gchar * tmp;
361 i = GPOINTER_TO_INT (edata);
362 tmp = g_strdup_printf ("Please enter a new name for project N°%d", i);
363 project * this_proj = get_project_by_id(i);
364 tmp = cask(tmp, "Project name", i, this_proj -> name, MainWindow);
365 if (tmp != NULL)
366 {
367 this_proj -> name = g_strdup_printf ("%s", tmp);
368 if (i == activep)
369 {
370 g_free (tmp);
371 tmp = g_strdup_printf ("<b>%s</b>", this_proj -> name);
372 }
373 gtk_tree_store_set (workstore, & piter[i], 1, tmp, -1);
374 g_free (tmp);
375 // Need to update other project windows names !!!
376 gchar * tmp_title = prepare_for_title (this_proj -> name);
377 if (this_proj -> modelgl != NULL)
378 {
379 if (this_proj -> modelgl -> win != NULL)
380 {
381 correct_this_window_title (this_proj -> modelgl -> win, g_strdup_printf ("%s - 3D view - [%s mode]", tmp_title, mode_name[this_proj -> modelgl -> mode]));
382 }
383 gchar * win_title[2]={"Atom(s) configuration", "Clone(s) configuration"};
384 for (j=0; j<2; j++)
385 {
386 if (this_proj -> modelgl -> model_win[j] != NULL)
387 {
388 correct_this_window_title (this_proj -> modelgl -> model_win[j] -> win, g_strdup_printf ("%s - %s", win_title[j], tmp_title));
389 }
390 }
391 if (this_proj -> modelgl -> coord_win != NULL)
392 {
393 correct_this_window_title (this_proj -> modelgl -> coord_win -> win, g_strdup_printf ("Environments configuration - %s", tmp_title));
394 }
395 if (this_proj -> modelgl -> atom_win != NULL)
396 {
397 correct_this_window_title (this_proj -> modelgl -> atom_win -> win, g_strdup_printf ("Model edition - %s", tmp_title));
398 }
399 if (this_proj -> modelgl -> cell_win != NULL)
400 {
401 correct_this_window_title (this_proj -> modelgl -> cell_win -> win, g_strdup_printf ("Cell edition - %s", tmp_title));
402 }
403 if (this_proj -> modelgl -> opengl_win != NULL)
404 {
405 correct_this_window_title (this_proj -> modelgl -> opengl_win -> win, g_strdup_printf ("OpenGL material aspect and light settings - %s", tmp_title));
406 }
407 if (this_proj -> modelgl -> spiner != NULL)
408 {
409 correct_this_window_title (this_proj -> modelgl -> spiner -> win, g_strdup_printf ("%s - spin", tmp_title));
410 }
411 if (this_proj -> modelgl -> player != NULL)
412 {
413 j = this_proj -> modelgl -> anim -> last -> img -> step;
414 correct_this_window_title (this_proj -> modelgl -> player -> win, g_strdup_printf ("%s - player - step %d", tmp_title, j));
415 }
416 if (this_proj -> modelgl -> measure_win != NULL)
417 {
418 correct_this_window_title (this_proj -> modelgl -> measure_win -> win, g_strdup_printf ("%s - measures", tmp_title));
419 }
420 }
421 g_free (tmp_title);
422 for (j=0; j<NGRAPHS; j++)
423 {
424 if (this_proj -> initok[j])
425 {
426 for (k=0; k<this_proj -> numc[j]; k++)
427 {
428 if (this_proj -> curves[j][k] -> window != NULL)
429 {
430 correct_this_window_title (this_proj -> curves[j][k] -> window, g_strdup_printf ("%s - %s", prepare_for_title(this_proj -> name), this_proj -> curves[j][k] -> name));
431 }
432 }
433 }
434 }
435 if (activep == i)
436 {
437 correct_this_window_title (MainWindow, g_strdup_printf ("%s - %s", PACKAGE, prepare_for_title(active_project -> name)));
438 correct_this_window_title (curvetoolbox, g_strdup_printf ("Toolboxes - %s", prepare_for_title(active_project -> name)));
439 }
440 }
441}
442
453void workspace_menu (GtkWidget * tree, gpointer event, double x, double y)
454{
455 GtkWidget * menu;
456 GtkTreePath * mpath;
457 int this_calc = -1;
458 gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(tree), (gint)x, (gint)y, & mpath, NULL, NULL, NULL);
459 if (mpath != NULL)
460 {
461 activew = find_proj_by_path (mpath);
462 this_calc = find_calc_by_path (GTK_TREE_VIEW(tree), mpath);
463 }
464 else
465 {
467 }
468 menu = work_menu (activew, this_calc);
469#ifdef GTK3
470 pop_menu_at_pointer (menu, (GdkEvent *)event);
471#else
472 gtk_widget_set_parent (menu, MainWindow);
473 pop_menu_at_pointer (menu, x, y);
474#endif
475}
476
477#ifdef GTK4
489G_MODULE_EXPORT void workspace_popup (GtkGesture * gesture, int n_press, double x, double y, gpointer data)
490{
491 if (gtk_gesture_single_get_current_button ((GtkGestureSingle * )gesture) == GDK_BUTTON_SECONDARY)
492 {
493 workspace_menu ((GtkWidget *)data, NULL, x, y);
494 }
495}
496#else
506G_MODULE_EXPORT gboolean on_workspace_button_event (GtkWidget * widget, GdkEventButton * event, gpointer data)
507{
508 if (event -> type == GDK_BUTTON_PRESS && event -> button == 3)
509 {
510 workspace_menu (widget, (gpointer)event, event -> x, event -> y);
511 }
512 return FALSE;
513}
514#endif
515
516void workspace_set_visible (GtkTreeViewColumn * col,
517 GtkCellRenderer * renderer,
518 GtkTreeModel * mod,
519 GtkTreeIter * iter,
520 gpointer data)
521{
522 gtk_cell_renderer_set_visible (renderer, FALSE);
523}
524
531{
532 GtkTreeViewColumn * col;
533 GtkCellRenderer * renderer;
534 GtkTreeSelection * workselect;
535
537 workstore = gtk_tree_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
538 fill_workspace (workstore);
539 worktree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(workstore));
540 g_object_unref (workstore);
541
542
543 col = gtk_tree_view_column_new ();
544
545 renderer = gtk_cell_renderer_pixbuf_new ();
546 gtk_tree_view_column_pack_start (col, renderer, FALSE);
547 gtk_tree_view_column_set_attributes (col, renderer, "pixbuf", 0, NULL);
548
549 renderer = gtk_cell_renderer_text_new();
550 gtk_tree_view_column_pack_start (col, renderer, TRUE);
551 gtk_tree_view_column_set_attributes (col, renderer, "markup", 1, NULL);
552
553 renderer = gtk_cell_renderer_text_new ();
554 gtk_tree_view_column_pack_start (col, renderer, TRUE);
555 gtk_tree_view_column_set_attributes (col, renderer, "markup", 2, NULL);
556 gtk_tree_view_column_set_cell_data_func (col, renderer, workspace_set_visible, NULL, NULL);
557
558 gtk_tree_view_append_column(GTK_TREE_VIEW(worktree), col);
559
560 workselect = gtk_tree_view_get_selection (GTK_TREE_VIEW(worktree));
561 gtk_tree_selection_set_mode (workselect, GTK_SELECTION_SINGLE);
562 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(worktree), FALSE);
563 //g_signal_connect (G_OBJECT(workselect), "changed", G_CALLBACK(selework), (gpointer)worktree);
564 g_signal_connect (G_OBJECT(worktree), "row-activated", G_CALLBACK(workspace_ondc), NULL);
565#ifdef GTK3
566 g_signal_connect (G_OBJECT(worktree), "button-press-event", G_CALLBACK(on_workspace_button_event), NULL);
567#else
568 add_widget_gesture_and_key_action (worktree, "workspace-context-click", G_CALLBACK(workspace_popup), (gpointer)worktree,
569 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
570#endif
571 gtk_tree_view_expand_all (GTK_TREE_VIEW(worktree));
572 return worktree;
573}
574
581{
583 lab = NULL;
584 witer = NULL;
585 wpath = NULL;
587}
588
595{
596 if (worktree != NULL && workstore != NULL && nprojects > 0)
597 {
598 int i;
599 if (projects_in_workspace > 0)
600 {
601 GtkTreeIter ** tmpiter;
602 tmpiter = g_malloc (projects_in_workspace*sizeof*tmpiter);
603 for (i=0; i<projects_in_workspace; i++)
604 {
605 tmpiter[i] = gtk_tree_iter_copy (& piter[i]);
606 }
607 if (piter != NULL) g_free (piter);
608 if (prpath != NULL) g_free (prpath);
609 piter = g_malloc ((projects_in_workspace+1)*sizeof*piter);
610 prpath = g_malloc ((projects_in_workspace+1)*sizeof*prpath);
611 for (i=0; i<projects_in_workspace; i++)
612 {
613 piter[i] = * gtk_tree_iter_copy (tmpiter[i]);
614 prpath[i] = gtk_tree_model_get_path (GTK_TREE_MODEL(workstore), & piter[i]);
615 gtk_tree_store_set (workstore, & piter[i], 1, get_project_by_id(i) -> name, -1);
616 }
617 if (tmpiter != NULL) g_free (tmpiter);
618 }
619 else
620 {
621 if (prpath != NULL) g_free (prpath);
622 if (piter != NULL) g_free (piter);
623 piter = g_malloc ((projects_in_workspace+1)*sizeof*piter);
624 prpath = g_malloc ((projects_in_workspace+1)*sizeof*prpath);
625 }
627 newspace = FALSE;
628 }
629 else
630 {
632 }
633 if (nprojects == 0)
634 {
636 }
637 else
638 {
640 }
641}
642
651{
652 int i, j;
653 GtkTreeIter ** tmpiter;
654
655 if (worktree != NULL && workstore != NULL && nprojects > 0)
656 {
657 if (wpath != NULL)
658 {
660 if (i == id)
661 {
662 wpath = NULL;
663 wchar = NULL;
664 }
665 }
666 if (projects_in_workspace > 1)
667 {
668 tmpiter = g_malloc ((projects_in_workspace-1)*sizeof*tmpiter);
669 j = -1;
670 for (i=0; i<projects_in_workspace; i++)
671 {
672 if (i != id)
673 {
674 j++;
675 tmpiter[j] = gtk_tree_iter_copy (& piter[i]);
676 }
677 }
678 gtk_tree_store_remove (workstore, & piter[id]);
679 g_free (piter);
680 g_free (prpath);
682 piter = g_malloc (projects_in_workspace*sizeof*piter);
683 prpath = g_malloc (projects_in_workspace*sizeof*prpath);
684 j = -1;
685 for (i=0; i<projects_in_workspace+1; i++)
686 {
687 if (i != id)
688 {
689 j ++;
690 piter[j] = * gtk_tree_iter_copy (tmpiter[j]);
691 prpath[j] = gtk_tree_model_get_path (GTK_TREE_MODEL(workstore), & piter[j]);
692 gtk_tree_store_set (workstore, & piter[j], 1, get_project_by_id(i) -> name, -1);
693 }
694 }
695 g_free (tmpiter);
696 }
697 else
698 {
699 gtk_tree_store_remove (workstore, & piter[id]);
700 if (prpath != NULL) g_free (prpath);
701 prpath = NULL;
702 if (piter != NULL) g_free (piter);
703 piter = NULL;
706 witer = NULL;
707 wchar = NULL;
708 }
709 }
710}
Callback declarations for main window.
#define PACKAGE
Definition config.h:46
ColRGBA col
Definition d_measures.c:77
GtkTreePath * path
Definition datab.c:103
gboolean newspace
Definition global.c:181
GtkWidget * MainScrol[2]
Definition global.c:220
int activep
Definition global.c:159
int activew
Definition global.c:163
int nprojects
Definition global.c:158
GtkWidget * MainWindow
Definition global.c:214
GdkPixbuf * OGLM
Definition global.c:234
gchar * mode_name[2]
Definition global.c:137
GdkPixbuf * RUN
Definition global.c:236
GdkPixbuf * THETD
Definition global.c:228
GdkPixbuf * SETTING
Definition global.c:231
GtkWidget * curvetoolbox
Definition global.c:218
Global variable declarations Global convenience function declarations Global data structure defin...
struct model model
Data stucture to describe the topology.
Definition global.h:785
gchar * graph_img[NGRAPHS]
Definition gui.c:105
void pop_menu_at_pointer(GtkWidget *widg, GdkEvent *event)
popup a menu at pointer location
Definition gtk-misc.c:2277
#define NGRAPHS
#define NITEMS
Definition global.h:292
@ CONTAINER_SCR
Definition global.h:223
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:186
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
Definition gtk-misc.c:2010
gchar * prepare_for_title(gchar *init)
prepare a string for a window title, getting rid of all markup
Definition tools.c:71
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
Definition gtk-misc.c:206
project * active_project
Definition project.c:47
#define NCALCS
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:169
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
int step
Definition ogl_draw.c:70
void prep_model(int p)
prepare, or display, the OpenGL model window
Definition glwindow.c:1359
Function declarations for the creation of the OpenGL window.
gchar * cask(char *question, char *lab, int id, char *old, GtkWidget *win)
enter a string - prepare the dialog
Definition interface.c:645
Messaging function declarations.
double y
Definition ogl_draw.c:57
double x
Definition ogl_draw.c:57
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void add_project()
void active_project_changed(int id)
change the active project
Definition update_p.c:175
int c
Definition tab-1.c:95
int find_calc_by_path(GtkTreeView *treeview, GtkTreePath *path)
find the calculation using the GtkTreePath in the GtkTreeView
Definition workspace.c:214
gchar * wchar
Definition workspace.c:86
GtkTreePath * wpath
Definition workspace.c:84
void add_project_to_workspace()
add project(s) to the workspace tree
Definition workspace.c:594
GdkPixbuf * pix
Definition workspace.c:69
GtkWidget * hbox
Definition workspace.c:71
void workspace_set_visible(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
Definition workspace.c:516
GtkTreeIter worklevel
Definition workspace.c:80
GtkWidget * img
Definition workspace.c:70
GtkWidget * lap
Definition workspace.c:74
GtkWidget * create_workspace_tree()
create the workspace tree store
Definition workspace.c:530
GtkWidget * vbox
Definition workspace.c:72
void correct_this_window_title(GtkWidget *win, gchar *str)
use new title for GtkWindow, providing it exists
Definition workspace.c:337
int projects_in_workspace
Definition workspace.c:87
GtkWidget * lab
Definition workspace.c:73
void workspace_menu(GtkWidget *tree, gpointer event, double x, double y)
popup the workspace contextual menu in workspace tree view
Definition workspace.c:453
GdkPixbuf * wpix
Definition workspace.c:85
void create_workspace()
create the workspace
Definition workspace.c:580
int find_proj_by_path(GtkTreePath *path)
find the project id using the GtkTreePath
Definition workspace.c:235
GtkWidget * work_menu(int p, int c)
create the workspace popup menu
Definition work_menu.c:202
GtkTreeStore * workstore
Definition workspace.c:79
gchar * laptmp
Definition workspace.c:77
G_MODULE_EXPORT void activate_project(GtkWidget *widg, gpointer data)
activate a project
Definition workspace.c:191
void workinfo(project *this_proj, int i)
display information about a workspace menu item for a project
Definition workinfo.c:59
gchar * labtmp
Definition workspace.c:76
GtkTreeIter * witer
Definition workspace.c:82
char * work_menu_items[NITEMS-2]
Definition workspace.c:89
GtkTreePath ** prpath
Definition workspace.c:83
GtkWidget * worktree
Definition workspace.c:78
G_MODULE_EXPORT void change_project_name(GtkWidget *wid, gpointer edata)
change project name
Definition workspace.c:357
G_MODULE_EXPORT gboolean on_workspace_button_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
GTK3 button event on workspace to display contextual menu.
Definition workspace.c:506
GtkWidget * eap
Definition workspace.c:75
GtkTreeIter * piter
Definition workspace.c:81
G_MODULE_EXPORT void workspace_ondc(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
do something after Double Click in the workspace tree
Definition workspace.c:262
void remove_project_from_workspace()