Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

datamodel.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGDAMM_DATAMODEL_H
00004 #define _LIBGDAMM_DATAMODEL_H
00005 
00006 #include <glibmm.h>
00007 
00008 /* $Id: datamodel.hg,v 1.3 2002/07/20 13:25:14 murrayc Exp $ */
00009 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00010 
00011 /* datamodel.h
00012  *
00013  * Copyright 2001      Free Software Foundation
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 #include <glibmm/object.h>
00031 #include <libgda/gda-data-model.h>
00032 
00033 
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GdaDataModel GdaDataModel;
00036 typedef struct _GdaDataModelClass GdaDataModelClass;
00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00038 
00039 
00040 namespace Gnome
00041 {
00042 
00043 namespace Gda
00044 { class DataModel_Class; } // namespace Gda
00045 
00046 } // namespace Gnome
00047 namespace Gnome
00048 {
00049 
00050 namespace Gda
00051 {
00052 
00053 
00054 class DataModel : public Glib::Object
00055 {
00056   
00057 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00058 
00059 public:
00060   typedef DataModel CppObjectType;
00061   typedef DataModel_Class CppClassType;
00062   typedef GdaDataModel BaseObjectType;
00063   typedef GdaDataModelClass BaseClassType;
00064 
00065 private:  friend class DataModel_Class;
00066   static CppClassType datamodel_class_;
00067 
00068 private:
00069   // noncopyable
00070   DataModel(const DataModel&);
00071   DataModel& operator=(const DataModel&);
00072 
00073 protected:
00074   explicit DataModel(const Glib::ConstructParams& construct_params);
00075   explicit DataModel(GdaDataModel* castitem);
00076 
00077 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00078 
00079 public:
00080   virtual ~DataModel();
00081 
00082 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00083   static GType get_type()      G_GNUC_CONST;
00084   static GType get_base_type() G_GNUC_CONST;
00085 #endif
00086 
00088   GdaDataModel*       gobj()       { return reinterpret_cast<GdaDataModel*>(gobject_); }
00089 
00091   const GdaDataModel* gobj() const { return reinterpret_cast<GdaDataModel*>(gobject_); }
00092 
00093   GdaDataModel* gobj_copy();
00094 
00095 private:
00096 
00097 public:
00098 
00099   
00100   void changed();
00101   
00102   void freeze();
00103   
00104   void thaw();
00105 
00106   
00107   int get_n_rows();
00108   
00109   int get_n_columns();
00110   
00111   GdaFieldAttributes* describe_column(int col);
00112   
00113   Glib::ustring get_column_title(int col);
00114   
00115   void set_column_title(int col, const Glib::ustring& title);
00116   
00117   int get_column_position (const Glib::ustring& title);
00118   
00119   const GdaRow* get_row (int row);
00120   
00121   const GdaValue* get_value_at(int col, int row);
00122 
00123 
00124   bool  is_editable() const;
00125   
00126   const GdaRow* append_row(const GList *values);
00127   
00128   bool remove_row(const GdaRow *row);
00129   
00130   bool update_row(const GdaRow *row);
00131 
00132   
00133   bool is_editing() const;
00134   
00135   bool begin_edit();
00136   
00137   bool cancel_edit();
00138   
00139   bool end_edit();
00140 
00141 
00142   Glib::ustring to_comma_separated();
00143   
00144   Glib::ustring to_tab_separated();
00145   
00146   Glib::ustring to_xml(bool standalone);
00147 
00148   
00149   Glib::ustring get_command_text();
00150   
00151   void set_command_text(const Glib::ustring& txt);
00152   
00153   GdaCommandType get_command_type();
00154   
00155   void set_command_type (GdaCommandType type);
00156 
00157   
00162   Glib::SignalProxy0<void> signal_changed();
00163 
00164 
00165 public:
00166 
00167 public:
00168   //C++ methods used to invoke GTK+ virtual functions:
00169 
00170 protected:
00171   //GTK+ Virtual Functions (override these to change behaviour):
00172   virtual int get_n_rows_vfunc();
00173   virtual int get_n_columns_vfunc();
00174   virtual GdaFieldAttributes* describe_column_vfunc(int col);
00175   virtual const GdaValue* get_value_at_vfunc(int col, int row);
00176 
00177   //Default Signal Handlers::
00178   virtual void on_changed();
00179 
00180 
00181 };
00182 
00183 } // namespace Gda
00184 } // namespace Gnome
00185 
00186 
00187 namespace Glib
00188 {
00190   Glib::RefPtr<Gnome::Gda::DataModel> wrap(GdaDataModel* object, bool take_copy = false);
00191 }
00192 
00193 
00194 #endif /* _LIBGDAMM_DATAMODEL_H */
00195 

Generated on Thu Mar 11 13:59:19 2004 for libgdamm by doxygen 1.3.6-20040222