00001 #ifndef Se_Gtk_Data_Included
00002 #define Se_Gtk_Data_Included
00003
00004 #include <gtk/gtk.h>
00005 #include <gdk/gdk.h>
00006
00007 #include "se_data.h"
00008
00009
00010 namespace Se{
00011
00012
00013
00014 class Gtk_Data:public Data{
00015
00016
00017 String update_string;
00018 Update update_type;
00019 bool need_matlab_update;
00020
00021
00022 Object *parent;
00023
00024 GtkWidget *name_entry;
00025 GtkWidget *size_entry;
00026 GtkWidget *data_widget;
00027 int old_size;
00028 GtkWidget *type_entry;
00029 GtkWidget *mode_entry;
00030 GtkWidget *access_entry;
00031 GtkWidget *data_table_window;
00032 GtkWidget *data_table_scrolled_window;
00033 GtkWidget *data_table;
00034 std::vector<GtkWidget *> data_table_names;
00035 std::vector<GtkWidget *> data_table_values;
00036 GtkWidget *accumulation_button;
00037
00038
00039 bool can_accumulate;
00040 bool accumulate;
00041 Gtk_Data *accumulation_data;
00042
00043 public:
00044
00045 Gtk_Data(String name,Type type,Mode mode,Access access,
00046 bool can_accumulate);
00047
00048
00049 void set(void *data,int length);
00050 void add(void *data);
00051
00052
00053 Gtk_Data *get_accumulation_data();
00054 void accumulation();
00055
00056
00057 void print_matlab_name();
00058 void set_parent(Object *the_parent);
00059 void update();
00060 void set_formula(String *the_formula);
00061 String get_matlab_name();
00062 void put_variable();
00063 void put_formula();
00064
00065
00066 guint get_x();
00067 guint get_y();
00068
00069 void build(int x,int y,GtkTable *table);
00070 void build_data(int x,int y,GtkTable *table);
00071 void build_size(int x,int y,GtkTable *table);
00072 void build_name(int x,int y,GtkTable *table);
00073 void build_access(int x,int y,GtkTable *table);
00074 void build_type(int x,int y,GtkTable *table);
00075 void build_mode(int x,int y,GtkTable *table);
00076 void build_data_table();
00077 void build_accumulation(int x,int y, GtkTable *table);
00078
00079 void rebuild();
00080 void rebuild_size();
00081 void rebuild_data();
00082 void rebuild_data_table();
00083
00084
00085 void accumulation_function();
00086 void input_function();
00087
00088 static void data_button_callback(GtkWidget *widget,gpointer data);
00089 static void accumulation_button_callback(GtkWidget *widget,gpointer data);
00090 static void input_callback(GtkWidget *widget,gpointer data);
00091
00092
00093 friend class Gtk_Message;
00094
00095
00096
00097 };
00098
00099
00100
00101
00102
00103 }
00104 #endif