89 GtkTreeIter calc_level, curve_level;
98 gtk_window_set_resizable (GTK_WINDOW (
curvetoolbox), TRUE);
104 gtk_window_set_resizable (GTK_WINDOW (
curvetoolbox), FALSE);
126 gtk_tree_store_append (
tool_model, & calc_level, NULL);
129 gtk_tree_store_set (
tool_model, & calc_level, 0, -1, 1, -1, 2,
img, 3,
graph_name[i], -1);
131 GdkPixbuf *
pix = gtk_image_get_pixbuf(
img);
132 gtk_tree_store_set (
tool_model, & calc_level, 0, -1, 1, -1, 2,
pix, 3,
graph_name[i], -1);
135 gtk_image_clear (
img);
144 gtk_tree_store_append (
tool_model, & curve_level, & calc_level);
146 str = g_strdup_printf (
"%s",
active_project -> curves[i][j] -> name);
154 gtk_tree_store_set (
tool_model, & curve_level, 0, i, 1, j, 3, str, 4,
status, -1);
179 GtkCellRenderer * renderer,
185 i = GPOINTER_TO_INT(data);
186 gtk_tree_model_get (mod, iter, 0, & j, -1);
187 gboolean vis = ((j < 0 && i == 2) || (j > -1 && i == 0)) ? FALSE : TRUE;
188 gtk_cell_renderer_set_visible (renderer, vis);
191 gtk_cell_renderer_set_sensitive (renderer, FALSE);
197 gtk_tree_model_get (mod, iter, 1, & k, -1);
203 gtk_cell_renderer_set_sensitive (renderer, TRUE);
219 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
220 gtk_tree_model_get_iter (GTK_TREE_MODEL(
tool_model), & iter,
path);
221 if (calc ==
SP || calc ==
MS)
224 gtk_tree_model_get (GTK_TREE_MODEL(
tool_model), & iter, 0, & i, -1);
225 gtk_tree_model_get (GTK_TREE_MODEL(
tool_model), & iter, 1, & j, -1);
226 if (i == calc && j == curve) gtk_tree_store_set (
tool_model, & iter, 4, 0, -1);
230 gtk_tree_store_set (
tool_model, & iter, 4, 0, -1);
245 gchar * string_path, gpointer data)
249 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
250 gtk_tree_model_get_iter (GTK_TREE_MODEL(
tool_model), & iter,
path);
251 gtk_tree_model_get (GTK_TREE_MODEL(
tool_model), & iter, 0, & i, -1);
252 gtk_tree_model_get (GTK_TREE_MODEL(
tool_model), & iter, 1, & j, -1);
253 gtk_tree_model_get (GTK_TREE_MODEL(
tool_model), & iter, 4, & k, -1);
273 gtk_tree_store_set (
tool_model, & iter, 4, ! k, -1);
283 GtkTreeViewColumn * tool_col[3];
284 GtkCellRenderer * tool_cell[3];
285 gchar *
ctitle[3]={
"Logo",
"Name",
"Button"};
286 gchar * ctype[3]={
"pixbuf",
"text",
"active"};
287 GType coltype[5]= {G_TYPE_INT, G_TYPE_INT, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_BOOLEAN};
288 tool_model = gtk_tree_store_newv (5, coltype);
297 tool_cell[i] = gtk_cell_renderer_pixbuf_new ();
300 tool_cell[i] = gtk_cell_renderer_text_new ();
303 tool_cell[i] = gtk_cell_renderer_toggle_new ();
307 tool_col[i] = gtk_tree_view_column_new_with_attributes (
ctitle[i], tool_cell[i], ctype[i], i+2, NULL);
308 gtk_tree_view_append_column(GTK_TREE_VIEW(
tool_tree), tool_col[i]);
309 gtk_tree_view_column_set_alignment (tool_col[i], 0.5);
310 gtk_tree_view_column_set_cell_data_func (tool_col[i], tool_cell[i],
tool_set_visible, GINT_TO_POINTER(i), NULL);
312 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(
tool_tree), FALSE);
326 gtk_widget_set_size_request (ctbox, 300, 210);
328 gtk_widget_set_size_request (ctbox, 300, 240);
330 graph_img[0] = g_strdup_printf (
"%s", PACKAGE_GR);
331 graph_img[1] = g_strdup_printf (
"%s", PACKAGE_SQ);
332 graph_img[2] = g_strdup_printf (
"%s", PACKAGE_SQ);
333 graph_img[3] = g_strdup_printf (
"%s", PACKAGE_GR);
334 graph_img[4] = g_strdup_printf (
"%s", PACKAGE_BD);
335 graph_img[5] = g_strdup_printf (
"%s", PACKAGE_AN);
336 graph_img[6] = g_strdup_printf (
"%s", PACKAGE_RI);
337 graph_img[7] = g_strdup_printf (
"%s", PACKAGE_CH);
338 graph_img[8] = g_strdup_printf (
"%s", PACKAGE_SP);
339 graph_img[9] = g_strdup_printf (
"%s", PACKAGE_MS);
Callback declarations for main window.
gchar * ctitle[MAXDATA][12]
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
GtkWidget * create_win(gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz)
create a new GtkWindow
G_MODULE_EXPORT gboolean hide_this_window(GtkWidget *win, GdkEvent *event, gpointer data)
hide a GtkWindow
gchar * graph_img[NGRAPHS]
void add_gtk_close_event(GtkWidget *widg, GCallback handler, gpointer data)
add a close event signal and callback to a GtkWidget
char * graph_name[NGRAPHS]
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
gboolean append(atom_search *asearch, project *this_proj, int i, int j)
test if the atom 'i' of species 'j' must be added to the tree store or not
Function declarations for workspace managment.