00001
00002
00003 #ifndef _LIBGNOMEDBMM_DATAENTRY_H
00004 #define _LIBGNOMEDBMM_DATAENTRY_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
00031 #include <libgdamm/dict.h>
00032 #include <libgdamm/value.h>
00033 #include <libgdamm/datahandler.h>
00034
00035 #include <libgnomedb/gnome-db-data-entry.h>
00036
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GnomeDbDataEntry GnomeDbDataEntry;
00039 typedef struct _GnomeDbDataEntryClass GnomeDbDataEntryClass;
00040 #endif
00041
00042
00043 namespace Gnome
00044 {
00045
00046 namespace Db
00047 { class DataEntry_Class; }
00048
00049 }
00050 namespace Gnome
00051 {
00052
00053 namespace Db
00054 {
00055
00056
00057 class DataEntry : public Glib::Interface
00058 {
00059
00060 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00061
00062 public:
00063 typedef DataEntry CppObjectType;
00064 typedef DataEntry_Class CppClassType;
00065 typedef GnomeDbDataEntry BaseObjectType;
00066 typedef GnomeDbDataEntryIface BaseClassType;
00067
00068 private:
00069 friend class DataEntry_Class;
00070 static CppClassType dataentry_class_;
00071
00072
00073 DataEntry(const DataEntry&);
00074 DataEntry& operator=(const DataEntry&);
00075
00076 protected:
00077 DataEntry();
00078 explicit DataEntry(GnomeDbDataEntry* castitem);
00079
00080 #endif
00081
00082 public:
00083 virtual ~DataEntry();
00084
00085 static void add_interface(GType gtype_implementer);
00086
00087 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00088 static GType get_type() G_GNUC_CONST;
00089 static GType get_base_type() G_GNUC_CONST;
00090 #endif
00091
00093 GnomeDbDataEntry* gobj() { return reinterpret_cast<GnomeDbDataEntry*>(gobject_); }
00094
00096 const GnomeDbDataEntry* gobj() const { return reinterpret_cast<GnomeDbDataEntry*>(gobject_); }
00097
00098 private:
00099
00100
00101 protected:
00102
00103
00104
00105
00106
00110 void set_value_type(GType type);
00111
00115 GType get_value_type();
00116
00117
00122 void set_value(const Gda::Value& value);
00123
00131 Gda::Value get_value() const;
00132
00133
00137 void set_value_orig(const Gda::Value& value);
00138
00139
00144 Gda::Value get_value_orig() const;
00145
00146
00149 void set_current_as_orig();
00150
00151
00158 void set_value_default(const Gda::Value& value);
00159
00160
00164 Glib::RefPtr<Gda::DataHandler> get_handler();
00165
00169 Glib::RefPtr<const Gda::DataHandler> get_handler() const;
00170
00171
00175 GdaValueAttribute get_attributes() const;
00176
00182 void set_attributes(GdaValueAttribute attrs, GdaValueAttribute mask);
00183
00184
00188 bool get_expand_in_layout() const;
00189
00192 void set_editable(bool editable = true);
00193
00194 void grab_focus();
00195
00196
00202 Glib::SignalProxy0< void > signal_contents_modified();
00203
00204
00210 Glib::SignalProxy0< void > signal_contents_activated();
00211
00212
00218 Glib::SignalProxy0< void > signal_status_changed();
00219
00220
00221 #ifdef GLIBMM_VFUNCS_ENABLED
00222 virtual void set_value_type_vfunc(GType type);
00223 #endif //GLIBMM_VFUNCS_ENABLED
00224
00225 #ifdef GLIBMM_VFUNCS_ENABLED
00226 virtual GType get_value_type_vfunc();
00227 #endif //GLIBMM_VFUNCS_ENABLED
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238 #ifdef GLIBMM_VFUNCS_ENABLED
00239 virtual void set_attributes_vfunc(GdaValueAttribute attributes, GdaValueAttribute mask);
00240 #endif //GLIBMM_VFUNCS_ENABLED
00241
00242 #ifdef GLIBMM_VFUNCS_ENABLED
00243 virtual GdaValueAttribute get_attributes_vfunc() const;
00244 #endif //GLIBMM_VFUNCS_ENABLED
00245
00246
00247
00248
00249
00250 #ifdef GLIBMM_VFUNCS_ENABLED
00251 virtual bool expand_in_row_vfunc();
00252 #endif //GLIBMM_VFUNCS_ENABLED
00253
00254 #ifdef GLIBMM_VFUNCS_ENABLED
00255 virtual void set_editable_vfunc(bool editable);
00256 #endif //GLIBMM_VFUNCS_ENABLED
00257
00258 #ifdef GLIBMM_VFUNCS_ENABLED
00259 virtual void grab_focus_vfunc();
00260 #endif //GLIBMM_VFUNCS_ENABLED
00261
00262
00263 public:
00264
00265 public:
00266
00267 #ifdef GLIBMM_VFUNCS_ENABLED
00268 #endif //GLIBMM_VFUNCS_ENABLED
00269
00270 protected:
00271
00272 #ifdef GLIBMM_VFUNCS_ENABLED
00273 #endif //GLIBMM_VFUNCS_ENABLED
00274
00275
00276 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00277 virtual void on_contents_modified();
00278 virtual void on_contents_activated();
00279 virtual void on_status_changed();
00280 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00281
00282
00283 };
00284
00285 }
00286
00287 }
00288
00289
00290 namespace Glib
00291 {
00297 Glib::RefPtr<Gnome::Db::DataEntry> wrap(GnomeDbDataEntry* object, bool take_copy = false);
00298
00299 }
00300
00301
00302 #endif
00303