atomes 1.1.16
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
workspace.c File Reference

Implementation of the workspace tree view
Associated callbacks. More...

#include "global.h"
#include "callbacks.h"
#include "interface.h"
#include "project.h"
#include "glwindow.h"
+ Include dependency graph for workspace.c:

Go to the source code of this file.

Functions

void workinfo (project *this_proj, int i)
 display information about a workspace menu item for a project
 
GtkWidget * work_menu (int p, int c)
 create the workspace popup menu
 
void add_project (GtkTreeStore *store, int i)
 add project to the GtkTreeStore of the workspace
 
G_MODULE_EXPORT void activate_project (GtkWidget *widg, gpointer data)
 activate a project
 
int find_calc_by_path (GtkTreeView *treeview, GtkTreePath *path)
 find the calculation using the GtkTreePath in the GtkTreeView
 
int find_proj_by_path (GtkTreePath *path)
 find the project id using the GtkTreePath
 
G_MODULE_EXPORT void workspace_ondc (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
 do something after Double Click in the workspace tree
 
void correct_this_window_title (GtkWidget *win, gchar *str)
 use new title for GtkWindow, providing it exists
 
G_MODULE_EXPORT void change_project_name (GtkWidget *wid, gpointer edata)
 change project name
 
void workspace_menu (GtkWidget *tree, gpointer event, double x, double y)
 popup the workspace contextual menu in workspace tree view
 
G_MODULE_EXPORT gboolean on_workspace_button_event (GtkWidget *widget, GdkEventButton *event, gpointer data)
 GTK3 button event on workspace to display contextual menu.
 
void workspace_set_visible (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 
GtkWidget * create_workspace_tree ()
 create the workspace tree store
 
void create_workspace ()
 create the workspace
 
void add_project_to_workspace ()
 add project(s) to the workspace tree
 
void remove_project_from_workspace (int id)
 remove project from workspace
 

Variables

GdkPixbuf * pix = NULL
 
GtkWidget * img = NULL
 
GtkWidget * hbox = NULL
 
GtkWidget * vbox = NULL
 
GtkWidget * lab = NULL
 
GtkWidget * lap = NULL
 
GtkWidget * eap = NULL
 
gchar * labtmp = NULL
 
gchar * laptmp = NULL
 
GtkWidget * worktree = NULL
 
GtkTreeStore * workstore = NULL
 
GtkTreeIter worklevel
 
GtkTreeIter * piter = NULL
 
GtkTreeIter * witer = NULL
 
GtkTreePath ** prpath = NULL
 
GtkTreePath * wpath = NULL
 
GdkPixbuf * wpix = NULL
 
gchar * wchar = NULL
 
int projects_in_workspace = 0
 
char * work_menu_items [NITEMS-2]
 

Detailed Description

Implementation of the workspace tree view
Associated callbacks.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file workspace.c.

Function Documentation

◆ activate_project()

G_MODULE_EXPORT void activate_project ( GtkWidget * widg,
gpointer data )

activate a project

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 191 of file workspace.c.

◆ add_project()

void add_project ( GtkTreeStore * store,
int i )

add project to the GtkTreeStore of the workspace

Parameters
storethe GtkTreeStore
ithe id of the project to add

Definition at line 114 of file workspace.c.

◆ add_project_to_workspace()

void add_project_to_workspace ( )

add project(s) to the workspace tree

Definition at line 594 of file workspace.c.

◆ change_project_name()

G_MODULE_EXPORT void change_project_name ( GtkWidget * wid,
gpointer edata )

change project name

Parameters
widthe GtkWidgent sending the signal
edatathe associated data pointer

Definition at line 357 of file workspace.c.

◆ correct_this_window_title()

void correct_this_window_title ( GtkWidget * win,
gchar * str )

use new title for GtkWindow, providing it exists

Parameters
winthe GtkWindow
strthe new title

Definition at line 337 of file workspace.c.

◆ create_workspace()

void create_workspace ( )

create the workspace

Definition at line 580 of file workspace.c.

◆ create_workspace_tree()

GtkWidget * create_workspace_tree ( )

create the workspace tree store

Definition at line 530 of file workspace.c.

◆ find_calc_by_path()

int find_calc_by_path ( GtkTreeView * treeview,
GtkTreePath * path )

find the calculation using the GtkTreePath in the GtkTreeView

Parameters
treeviewthe GtkTreeView
paththe GtkTreePath

Definition at line 214 of file workspace.c.

◆ find_proj_by_path()

int find_proj_by_path ( GtkTreePath * path)

find the project id using the GtkTreePath

Parameters
paththe GtkTreePath

Definition at line 235 of file workspace.c.

◆ on_workspace_button_event()

G_MODULE_EXPORT gboolean on_workspace_button_event ( GtkWidget * widget,
GdkEventButton * event,
gpointer data )

GTK3 button event on workspace to display contextual menu.

Parameters
widgetthe GtkWidget sending the signal
eventthe associated GtkButton
datathe associated data pointer

Definition at line 506 of file workspace.c.

◆ remove_project_from_workspace()

void remove_project_from_workspace ( int id)

remove project from workspace

Parameters
idthe id of the project to be remove

Definition at line 650 of file workspace.c.

◆ work_menu()

GtkWidget * work_menu ( int p,
int c )
extern

create the workspace popup menu

Parameters
pproject id, or -1
ccalculation id, or -1

Definition at line 202 of file work_menu.c.

◆ workinfo()

void workinfo ( project * this_proj,
int i )
extern

display information about a workspace menu item for a project

Parameters
this_projthe target project
ithe properties to display from the menu

Definition at line 59 of file workinfo.c.

◆ workspace_menu()

void workspace_menu ( GtkWidget * tree,
gpointer event,
double x,
double y )

popup the workspace contextual menu in workspace tree view

Parameters
treethe GtkTreeView
eventthe event
xx position
yy position

Definition at line 453 of file workspace.c.

◆ workspace_ondc()

G_MODULE_EXPORT void workspace_ondc ( GtkTreeView * treeview,
GtkTreePath * path,
GtkTreeViewColumn * col,
gpointer data )

do something after Double Click in the workspace tree

  • DC on a project name: activate this project
  • DC elsewhere: display related information
Parameters
treeviewthe GtkTreeView
paththe GtkTreePath
colthe GtkTreeViewColumn
datathe associated data pointer

Definition at line 262 of file workspace.c.

◆ workspace_set_visible()

void workspace_set_visible ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

Definition at line 516 of file workspace.c.

Variable Documentation

◆ eap

GtkWidget* eap = NULL

Definition at line 75 of file workspace.c.

◆ hbox

GtkWidget* hbox = NULL

Definition at line 71 of file workspace.c.

◆ img

GtkWidget* img = NULL

Definition at line 70 of file workspace.c.

◆ lab

GtkWidget* lab = NULL

Definition at line 73 of file workspace.c.

◆ labtmp

gchar* labtmp = NULL

Definition at line 76 of file workspace.c.

◆ lap

GtkWidget* lap = NULL

Definition at line 74 of file workspace.c.

◆ laptmp

gchar* laptmp = NULL

Definition at line 77 of file workspace.c.

◆ piter

GtkTreeIter* piter = NULL

Definition at line 81 of file workspace.c.

◆ pix

GdkPixbuf* pix = NULL

Definition at line 69 of file workspace.c.

◆ projects_in_workspace

int projects_in_workspace = 0

Definition at line 87 of file workspace.c.

◆ prpath

GtkTreePath** prpath = NULL

Definition at line 83 of file workspace.c.

◆ vbox

GtkWidget* vbox = NULL

Definition at line 72 of file workspace.c.

◆ wchar

gchar* wchar = NULL

Definition at line 86 of file workspace.c.

◆ witer

GtkTreeIter* witer = NULL

Definition at line 82 of file workspace.c.

◆ work_menu_items

char* work_menu_items[NITEMS-2]
Initial value:
= {"Workspace ",
"Settings ",
"Visualization ",
"Analysis ",
"g(r)/G(r) ",
"S(q) from g(r) ",
"S(q) from Debye equation ",
"g(r) from FFT[S(q) Debye]",
"Bonding information ",
"Angle distribution ",
"Ring statistics ",
"Chain statistics ",
"Spherical harmonics ",
"Mean Square Displacement "}

Definition at line 89 of file workspace.c.

◆ worklevel

GtkTreeIter worklevel

Definition at line 80 of file workspace.c.

◆ workstore

GtkTreeStore* workstore = NULL

Definition at line 79 of file workspace.c.

◆ worktree

GtkWidget* worktree = NULL

Definition at line 78 of file workspace.c.

◆ wpath

GtkTreePath* wpath = NULL

Definition at line 84 of file workspace.c.

◆ wpix

GdkPixbuf* wpix = NULL

Definition at line 85 of file workspace.c.