combo.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEDBMM_COMBO_H
00004 #define _LIBGNOMEDBMM_COMBO_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- C++ -*- // 
00010 
00011 /* combo.h
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 #include <gtkmm/combobox.h>
00031 #include <libgdamm/datamodel.h>
00032 
00033 
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GnomeDbCombo GnomeDbCombo;
00036 typedef struct _GnomeDbComboClass GnomeDbComboClass;
00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00038 
00039 
00040 namespace Gnome
00041 {
00042 
00043 namespace Db
00044 { class Combo_Class; } // namespace Db
00045 
00046 } // namespace Gnome
00047 namespace Gnome
00048 {
00049 
00050 namespace Db
00051 {
00052 
00053 class Combo : public Gtk::ComboBox
00054 {
00055   public:
00056 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00057   typedef Combo CppObjectType;
00058   typedef Combo_Class CppClassType;
00059   typedef GnomeDbCombo BaseObjectType;
00060   typedef GnomeDbComboClass BaseClassType;
00061 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00062 
00063   virtual ~Combo();
00064 
00065 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00066 
00067 private:
00068   friend class Combo_Class;
00069   static CppClassType combo_class_;
00070 
00071   // noncopyable
00072   Combo(const Combo&);
00073   Combo& operator=(const Combo&);
00074 
00075 protected:
00076   explicit Combo(const Glib::ConstructParams& construct_params);
00077   explicit Combo(GnomeDbCombo* castitem);
00078 
00079 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00080 
00081 public:
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   GnomeDbCombo*       gobj()       { return reinterpret_cast<GnomeDbCombo*>(gobject_); }
00089 
00091   const GnomeDbCombo* gobj() const { return reinterpret_cast<GnomeDbCombo*>(gobject_); }
00092 
00093 
00094 public:
00095   //C++ methods used to invoke GTK+ virtual functions:
00096 #ifdef GLIBMM_VFUNCS_ENABLED
00097 #endif //GLIBMM_VFUNCS_ENABLED
00098 
00099 protected:
00100   //GTK+ Virtual Functions (override these to change behaviour):
00101 #ifdef GLIBMM_VFUNCS_ENABLED
00102 #endif //GLIBMM_VFUNCS_ENABLED
00103 
00104   //Default Signal Handlers::
00105 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00106 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00107 
00108 
00109 private:
00110 
00111 public:
00112   Combo();
00113 
00114   // Need to hand-code this because the C version also takes int n_cols which
00115   // is not required in C++.
00116   explicit Combo(const Glib::RefPtr<Gda::DataModel>& model, const Glib::ArrayHandle<int>& cols_index);
00117 
00118    // We own the list, but not the GValues in it.
00119    
00120 
00121   void set_model(const Glib::RefPtr<Gda::DataModel>& model, const Glib::ArrayHandle<int>& cols_index);
00122   
00126   Glib::RefPtr<Gda::DataModel> get_model();
00127   
00131   Glib::RefPtr<const Gda::DataModel> get_model() const;
00132   
00140   bool set_values(const Glib::SListHandle<Gda::Value>& values);
00141 
00142   //TODO: Check that the ownership is correct:
00143   
00151   Glib::SListHandle<Gda::Value> get_values() const;
00152   
00165   bool set_values(const Glib::SListHandle<Gda::Value>& values, const Glib::ArrayHandle<int>& cols_index);
00166 
00167   
00168   //TODO: Check that the ownership is correct:
00169   Glib::SListHandle<Gda::Value> get_values(const Glib::ArrayHandle<int>& cols_index) const;
00170 
00171   
00175   void add_undef_choice(bool add_undef_choice = true);
00176   
00179   bool undef_selected() const;
00180 
00181   #ifdef GLIBMM_PROPERTIES_ENABLED
00182 
00188   Glib::PropertyProxy< Glib::RefPtr<Gda::DataModel> > property_model() ;
00189 #endif //#GLIBMM_PROPERTIES_ENABLED
00190 
00191 #ifdef GLIBMM_PROPERTIES_ENABLED
00192 
00198   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gda::DataModel> > property_model() const;
00199 #endif //#GLIBMM_PROPERTIES_ENABLED
00200 
00201 
00202 };
00203 
00204 } // namespace Db
00205 } // namespace Gnome
00206 
00207 
00208 namespace Glib
00209 {
00215   Gnome::Db::Combo* wrap(GnomeDbCombo* object, bool take_copy = false);
00216 } //namespace Glib
00217 
00218 
00219 #endif /* _LIBGNOMEDBMM_COMBO_H */
00220 

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