dataentry.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEDBMM_DATAENTRY_H
00004 #define _LIBGNOMEDBMM_DATAENTRY_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- C++ -*- // 
00010 
00011 /* dataentry.hg
00012  * 
00013  * Copyright 2006 libgnomedbmm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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 /* DOXYGEN_SHOULD_SKIP_THIS */
00041 
00042 
00043 namespace Gnome
00044 {
00045 
00046 namespace Db
00047 { class DataEntry_Class; } // namespace Db
00048 
00049 } // namespace Gnome
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   // noncopyable
00073   DataEntry(const DataEntry&);
00074   DataEntry& operator=(const DataEntry&);
00075 
00076 protected:
00077   DataEntry(); // you must derive from this class
00078   explicit DataEntry(GnomeDbDataEntry* castitem);
00079 
00080 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
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   // TODO:
00103   // gnome_db_util_new_data_entry
00104 
00105   // FIXME: Wrap GType to C++ somehow
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; //We rename, adding the get prefix, to make it clearer.
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   //TODO: _WRAP_VFUNC(void set_value(const Gda::Value& value), set_value)
00231   //TODO: _WRAP_VFUNC(Gda::Value get_value() const, get_value)
00232   
00233   //TODO: _WRAP_VFUNC(void set_value_orig(const Gda::Value& value), set_value_orig)
00234   //TODO: _WRAP_VFUNC(const Gda::Value& get_value_orig(), get_value_orig)
00235 
00236   //TODO: _WRAP_VFUNC(void set_value_default(const Gda::Value& value), set_value_default)
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   // _WRAP_VFUNC(Gda::DataHandler& get_handler(), get_handler)
00248   
00249   //TODO: Is this a get method? If so, if should be const, and maybe renamed in the C API:
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   //C++ methods used to invoke GTK+ virtual functions:
00267 #ifdef GLIBMM_VFUNCS_ENABLED
00268 #endif //GLIBMM_VFUNCS_ENABLED
00269 
00270 protected:
00271   //GTK+ Virtual Functions (override these to change behaviour):
00272 #ifdef GLIBMM_VFUNCS_ENABLED
00273 #endif //GLIBMM_VFUNCS_ENABLED
00274 
00275   //Default Signal Handlers::
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 } // namespace Db
00286 
00287 } // namespace Gnome
00288 
00289 
00290 namespace Glib
00291 {
00297   Glib::RefPtr<Gnome::Db::DataEntry> wrap(GnomeDbDataEntry* object, bool take_copy = false);
00298 
00299 } // namespace Glib
00300 
00301 
00302 #endif /* _LIBGNOMEDBMM_DATAENTRY_H */
00303 

Generated on Mon Feb 12 16:48:59 2007 for libgnomedbmm by  doxygen 1.4.7