basicform.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEDBMM_BASICFORM_H
00004 #define _LIBGNOMEDBMM_BASICFORM_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- C++ -*- // 
00010 
00011 /* basicform.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/box.h>
00031 #include <libgdamm/parameterlist.h>
00032 
00033 #include <libgnomedb/gnome-db-basic-form.h>
00034 
00035 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GnomeDbBasicForm GnomeDbBasicForm;
00038 typedef struct _GnomeDbBasicFormClass GnomeDbBasicFormClass;
00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00040 
00041 
00042 namespace Gnome
00043 {
00044 
00045 namespace Db
00046 { class BasicForm_Class; } // namespace Db
00047 
00048 } // namespace Gnome
00049 namespace Gnome
00050 {
00051 
00052 namespace Db
00053 {
00054 
00055 
00056 class BasicForm : public Gtk::VBox
00057 {
00058   public:
00059 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00060   typedef BasicForm CppObjectType;
00061   typedef BasicForm_Class CppClassType;
00062   typedef GnomeDbBasicForm BaseObjectType;
00063   typedef GnomeDbBasicFormClass BaseClassType;
00064 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00065 
00066   virtual ~BasicForm();
00067 
00068 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00069 
00070 private:
00071   friend class BasicForm_Class;
00072   static CppClassType basicform_class_;
00073 
00074   // noncopyable
00075   BasicForm(const BasicForm&);
00076   BasicForm& operator=(const BasicForm&);
00077 
00078 protected:
00079   explicit BasicForm(const Glib::ConstructParams& construct_params);
00080   explicit BasicForm(GnomeDbBasicForm* castitem);
00081 
00082 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
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   GnomeDbBasicForm*       gobj()       { return reinterpret_cast<GnomeDbBasicForm*>(gobject_); }
00092 
00094   const GnomeDbBasicForm* gobj() const { return reinterpret_cast<GnomeDbBasicForm*>(gobject_); }
00095 
00096 
00097 public:
00098   //C++ methods used to invoke GTK+ virtual functions:
00099 #ifdef GLIBMM_VFUNCS_ENABLED
00100 #endif //GLIBMM_VFUNCS_ENABLED
00101 
00102 protected:
00103   //GTK+ Virtual Functions (override these to change behaviour):
00104 #ifdef GLIBMM_VFUNCS_ENABLED
00105 #endif //GLIBMM_VFUNCS_ENABLED
00106 
00107   //Default Signal Handlers::
00108 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00109   virtual void on_param_changed(const Glib::RefPtr<Gda::Parameter>& param, bool is_user_modif);
00110   virtual void on_activated();
00111 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00112 
00113 
00114 private:
00115 
00116 
00117   // This has nothing to do with this class.
00118   
00119 public:
00120   explicit BasicForm(const Glib::RefPtr<Gda::ParameterList>& data_set);
00121 
00122   // TODO: We currently do not wray this constructor because the C class has no
00123   // properties corresponding to the additional arguments but puts all into
00124   // a GnomeDbFormLayoutSpec struct. IMHO they should split the layout-spec
00125   // property into four separate properties. This way they could even make
00126   // that whole layout-spec thing private. armin.
00127   //_WRAP_CTOR(BasicForm(const Glib::RefPtr<Gda::ParameterList>& data_set, const std::string& glade_file, const Glib::ustring& root_element, const Glib::ustring& form_prefix), gnome_db_basic_form_new_custom)
00128 
00129   // This returns a GtkDialog rather than a GnomeDbBasicForm, so it cannot be
00130   // a constructor of this class. We could wrap it as a static method that
00131   // returns an auto_ptr to a new'ed Gtk::Dialog or something, but it also
00132   // should be easy enough to live without in C++. armin.
00133   
00134 
00140   void set_current_as_orig();
00141   
00145   bool is_valid() const;
00146 
00147   //TODO: This is odd - it returns something from a set() function.
00148   //If this is really what it's meant to do, a const version might not make sense.
00149   // This is a get_*() function that returns a set (represented by a
00150   // Gda::ParameterList). armin.
00151   
00155   Glib::RefPtr<Gda::ParameterList> get_data_set();
00156   
00160   Glib::RefPtr<const Gda::ParameterList> get_data_set() const;
00161 
00162   
00165   bool has_been_changed() const;
00166   
00167   void show_entry_actions(bool show_actions = true);
00168   
00172   void reset();
00173   
00179   void entry_show(const Glib::RefPtr<Gda::Parameter>& param, bool show);
00180   
00188   void set_entries_auto_default(bool auto_default = true);
00189   
00192   void set_entries_default();
00193 
00194   
00200   void entry_set_editable(const Glib::RefPtr<const Gda::Parameter>& param, bool editable = true);
00201   
00202   void entry_grab_focus(const Glib::RefPtr<const Gda::Parameter>& parameter);
00203   
00204   
00209   Gtk::Widget* get_entry_widget(const Glib::RefPtr<const Gda::Parameter>& param);
00210   
00215   const Gtk::Widget* get_entry_widget(const Glib::RefPtr<const Gda::Parameter>& param) const;
00216  
00217   
00222   Gtk::Widget* get_label_widget(const Glib::RefPtr<const Gda::Parameter>& param);
00223   
00228   const Gtk::Widget* get_label_widget(const Glib::RefPtr<const Gda::Parameter>& param) const;
00229 
00230   #ifdef GLIBMM_PROPERTIES_ENABLED
00231 
00237   Glib::PropertyProxy<bool> property_entries_auto_default() ;
00238 #endif //#GLIBMM_PROPERTIES_ENABLED
00239 
00240 #ifdef GLIBMM_PROPERTIES_ENABLED
00241 
00247   Glib::PropertyProxy_ReadOnly<bool> property_entries_auto_default() const;
00248 #endif //#GLIBMM_PROPERTIES_ENABLED
00249 
00250   #ifdef GLIBMM_PROPERTIES_ENABLED
00251 
00257   Glib::PropertyProxy<bool> property_headers_sensitive() ;
00258 #endif //#GLIBMM_PROPERTIES_ENABLED
00259 
00260 #ifdef GLIBMM_PROPERTIES_ENABLED
00261 
00267   Glib::PropertyProxy_ReadOnly<bool> property_headers_sensitive() const;
00268 #endif //#GLIBMM_PROPERTIES_ENABLED
00269 
00270 
00271   // TODO: This requires us to wrap GnomeDbFormLayoutSpec. However, this is
00272   // just a plain struct that it is not even registered with the gobject type
00273   // system. I guess it is not of that much use anyway. armin.
00274   #ifdef GLIBMM_PROPERTIES_ENABLED
00275 
00281   Glib::PropertyProxy_WriteOnly<GnomeDbFormLayoutSpec*> property_layout_spec() ;
00282 #endif //#GLIBMM_PROPERTIES_ENABLED
00283 
00284 
00285   #ifdef GLIBMM_PROPERTIES_ENABLED
00286 
00292   Glib::PropertyProxy< Glib::RefPtr<Gda::ParameterList> > property_paramlist() ;
00293 #endif //#GLIBMM_PROPERTIES_ENABLED
00294 
00295 #ifdef GLIBMM_PROPERTIES_ENABLED
00296 
00302   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gda::ParameterList> > property_paramlist() const;
00303 #endif //#GLIBMM_PROPERTIES_ENABLED
00304 
00305   #ifdef GLIBMM_PROPERTIES_ENABLED
00306 
00312   Glib::PropertyProxy<bool> property_show_actions() ;
00313 #endif //#GLIBMM_PROPERTIES_ENABLED
00314 
00315 #ifdef GLIBMM_PROPERTIES_ENABLED
00316 
00322   Glib::PropertyProxy_ReadOnly<bool> property_show_actions() const;
00323 #endif //#GLIBMM_PROPERTIES_ENABLED
00324 
00325 
00331   Glib::SignalProxy2< void,const Glib::RefPtr<Gda::Parameter>&,bool > signal_param_changed();
00332 
00333   
00339   Glib::SignalProxy0< void > signal_activated();
00340   
00341 
00342 };
00343 
00344 } // namespace Db
00345 } // namespace Gnome
00346 
00347 
00348 namespace Glib
00349 {
00355   Gnome::Db::BasicForm* wrap(GnomeDbBasicForm* object, bool take_copy = false);
00356 } //namespace Glib
00357 
00358 
00359 #endif /* _LIBGNOMEDBMM_BASICFORM_H */
00360 

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