+gboolean cfv_scroll_event(GtkWidget *widget, GdkEventScroll *event,
+ gpointer data)
+{
+ ControlFlowData *control_flow_data = (ControlFlowData*)data;
+ unsigned int cell_height =
+ get_cell_height(
+ GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
+ gdouble new;
+
+ switch(event->direction) {
+ case GDK_SCROLL_UP:
+ {
+ new = gtk_adjustment_get_value(control_flow_data->v_adjust)
+ - cell_height;
+ }
+ break;
+ case GDK_SCROLL_DOWN:
+ {
+ new = gtk_adjustment_get_value(control_flow_data->v_adjust)
+ + cell_height;
+ }
+ break;
+ default:
+ return FALSE;
+ }
+ if(new >= control_flow_data->v_adjust->lower &&
+ new <= control_flow_data->v_adjust->upper
+ - control_flow_data->v_adjust->page_size)
+ gtk_adjustment_set_value(control_flow_data->v_adjust, new);
+ return TRUE;
+}
+
+
+/* Toolbar callbacks */
+static void property_button (GtkToolButton *toolbutton,
+ gpointer user_data)
+{
+ ControlFlowData *control_flow_data = (ControlFlowData*)user_data;
+
+ g_printf("CFV Property button clicked\n");
+
+}
+
+/* Toolbar callbacks */
+static void filter_button (GtkToolButton *toolbutton,
+ gpointer user_data)
+{
+ LttvPluginCFV *plugin_cfv = (LttvPluginCFV*)user_data;
+ LttvAttribute *attribute;
+ LttvAttributeValue value;
+ gboolean ret;
+ g_printf("Filter button clicked\n");
+
+ attribute = LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(
+ LTTV_IATTRIBUTE(lttv_global_attributes()),
+ LTTV_VIEWER_CONSTRUCTORS));
+ g_assert(attribute);
+
+ ret = lttv_iattribute_find_by_path(LTTV_IATTRIBUTE(attribute),
+ "guifilter", LTTV_POINTER, &value);
+ g_assert(ret);
+ lttvwindow_viewer_constructor constructor =
+ (lttvwindow_viewer_constructor)*(value.v_pointer);
+ if(constructor) constructor(&plugin_cfv->parent);
+ else g_warning("Filter module not loaded.");
+
+ //FIXME : viewer returned.
+}
+