00001
00002
00003 #ifndef _LIBGNOMEDBMM_RAWGRID_H
00004 #define _LIBGNOMEDBMM_RAWGRID_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <gtkmm/treeview.h>
00031 #include <gtkmm/menu.h>
00032 #include <libgdamm/datamodel.h>
00033 #include <libgnomedbmm/datawidget.h>
00034
00035
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GnomeDbRawGrid GnomeDbRawGrid;
00038 typedef struct _GnomeDbRawGridClass GnomeDbRawGridClass;
00039 #endif
00040
00041
00042 namespace Gnome
00043 {
00044
00045 namespace Db
00046 { class RawGrid_Class; }
00047
00048 }
00049 namespace Gnome
00050 {
00051
00052 namespace Db
00053 {
00054
00055
00056 class RawGrid : public Gtk::TreeView, public DataWidget
00057 {
00058 public:
00059 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00060 typedef RawGrid CppObjectType;
00061 typedef RawGrid_Class CppClassType;
00062 typedef GnomeDbRawGrid BaseObjectType;
00063 typedef GnomeDbRawGridClass BaseClassType;
00064 #endif
00065
00066 virtual ~RawGrid();
00067
00068 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00069
00070 private:
00071 friend class RawGrid_Class;
00072 static CppClassType rawgrid_class_;
00073
00074
00075 RawGrid(const RawGrid&);
00076 RawGrid& operator=(const RawGrid&);
00077
00078 protected:
00079 explicit RawGrid(const Glib::ConstructParams& construct_params);
00080 explicit RawGrid(GnomeDbRawGrid* castitem);
00081
00082 #endif
00083
00084 public:
00085 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00086 static GType get_type() G_GNUC_CONST;
00087 static GType get_base_type() G_GNUC_CONST;
00088 #endif
00089
00091 GnomeDbRawGrid* gobj() { return reinterpret_cast<GnomeDbRawGrid*>(gobject_); }
00092
00094 const GnomeDbRawGrid* gobj() const { return reinterpret_cast<GnomeDbRawGrid*>(gobject_); }
00095
00096
00097 public:
00098
00099 #ifdef GLIBMM_VFUNCS_ENABLED
00100 #endif //GLIBMM_VFUNCS_ENABLED
00101
00102 protected:
00103
00104 #ifdef GLIBMM_VFUNCS_ENABLED
00105 #endif //GLIBMM_VFUNCS_ENABLED
00106
00107
00108 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00109 virtual void on_double_clicked(int row);
00110 virtual void on_populate_popup(Gtk::Menu* menu);
00111 virtual void on_selection_changed(bool row_selected);
00112 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00113
00114
00115 private:
00116
00117
00118 public:
00119 explicit RawGrid(const Glib::RefPtr<Gda::DataModel>& model);
00120
00121 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00122
00123
00124 struct IntTraits
00125 {
00126 typedef int CppType;
00127 typedef gpointer CType;
00128 typedef gpointer CTypeNonConst;
00129
00130 static CType to_c_type (const CppType& obj) { return GINT_TO_POINTER(obj); }
00131 static CType to_c_type (const CType& obj) { return GINT_TO_POINTER(obj); }
00132 static CppType to_cpp_type (const CType& obj) { return GPOINTER_TO_INT(obj); }
00133 static void release_c_type (const CType&) {}
00134 };
00135 #endif //DOXYGEN_SHOULD_SKIP_THIS
00136
00137 typedef Glib::ListHandle<int, IntTraits> IntListHandle;
00138
00139
00140
00141
00142
00146 RawGrid::IntListHandle get_selection() const;
00147
00148
00151 void set_sample_size(int sample_size);
00152
00155 void set_sample_start(int sample_start);
00156
00157 #ifdef GLIBMM_PROPERTIES_ENABLED
00158
00164 Glib::PropertyProxy<bool> property_global_actions_visible() ;
00165 #endif //#GLIBMM_PROPERTIES_ENABLED
00166
00167 #ifdef GLIBMM_PROPERTIES_ENABLED
00168
00174 Glib::PropertyProxy_ReadOnly<bool> property_global_actions_visible() const;
00175 #endif //#GLIBMM_PROPERTIES_ENABLED
00176
00177 #ifdef GLIBMM_PROPERTIES_ENABLED
00178
00184 Glib::PropertyProxy<bool> property_info_cell_visible() ;
00185 #endif //#GLIBMM_PROPERTIES_ENABLED
00186
00187 #ifdef GLIBMM_PROPERTIES_ENABLED
00188
00194 Glib::PropertyProxy_ReadOnly<bool> property_info_cell_visible() const;
00195 #endif //#GLIBMM_PROPERTIES_ENABLED
00196
00197 #ifdef GLIBMM_PROPERTIES_ENABLED
00198
00204 Glib::PropertyProxy< Glib::RefPtr<Gda::DataModel> > property_model() ;
00205 #endif //#GLIBMM_PROPERTIES_ENABLED
00206
00207 #ifdef GLIBMM_PROPERTIES_ENABLED
00208
00214 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gda::DataModel> > property_model() const;
00215 #endif //#GLIBMM_PROPERTIES_ENABLED
00216
00217
00218
00219
00220
00221
00222
00228 Glib::SignalProxy1< void,int > signal_double_clicked();
00229
00230
00236 Glib::SignalProxy1< void,Gtk::Menu* > signal_populate_popup();
00237
00238
00244 Glib::SignalProxy1< void,bool > signal_selection_changed();
00245
00246
00247 };
00248
00249 }
00250 }
00251
00252
00253 namespace Glib
00254 {
00260 Gnome::Db::RawGrid* wrap(GnomeDbRawGrid* object, bool take_copy = false);
00261 }
00262
00263
00264 #endif
00265