number-editor.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _HILDON_LIBSMM_NUMBER_EDITOR_H
00004 #define _HILDON_LIBSMM_NUMBER_EDITOR_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* $Id: number-editor.hg,v 1.10 2005/02/15 10:52:44 murrayc Exp $ */
00010 
00011 /* number-editor.h
00012  *
00013  * Copyright (C) 1998-2005 The gtkmm 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/container.h>
00031 
00032 
00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00034 typedef struct _HildonNumberEditor HildonNumberEditor;
00035 typedef struct _HildonNumberEditorClass HildonNumberEditorClass;
00036 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00037 
00038 
00039 namespace Hildon
00040 { class NumberEditor_Class; } // namespace Hildon
00041 namespace Hildon
00042 {
00043 
00044 //Wrap this by hand, because the C enum doesn't have a prefix.
00045 //Keep the sequence the same as the C enum.
00046 //_WRAP_ENUM(NumberEditorErrorType, HildonNumberEditorErrorType)
00047 
00048 enum NumberEditorErrorType
00049 {
00050   ERROR_MAXIMUM_VALUE_EXCEED,
00051   ERROR_MINIMUM_VALUE_EXCEED,
00052   ERROR_ERRONEOUS_VALUE
00053 };
00054 
00060 class NumberEditor : public Gtk::Container
00061 {
00062   public:
00063 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00064   typedef NumberEditor CppObjectType;
00065   typedef NumberEditor_Class CppClassType;
00066   typedef HildonNumberEditor BaseObjectType;
00067   typedef HildonNumberEditorClass BaseClassType;
00068 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00069 
00070   virtual ~NumberEditor();
00071 
00072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00073 
00074 private:
00075   friend class NumberEditor_Class;
00076   static CppClassType numbereditor_class_;
00077 
00078   // noncopyable
00079   NumberEditor(const NumberEditor&);
00080   NumberEditor& operator=(const NumberEditor&);
00081 
00082 protected:
00083   explicit NumberEditor(const Glib::ConstructParams& construct_params);
00084   explicit NumberEditor(HildonNumberEditor* castitem);
00085 
00086 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00087 
00088 public:
00089 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00090   static GType get_type()      G_GNUC_CONST;
00091   static GType get_base_type() G_GNUC_CONST;
00092 #endif
00093 
00095   HildonNumberEditor*       gobj()       { return reinterpret_cast<HildonNumberEditor*>(gobject_); }
00096 
00098   const HildonNumberEditor* gobj() const { return reinterpret_cast<HildonNumberEditor*>(gobject_); }
00099 
00100 
00101 public:
00102   //C++ methods used to invoke GTK+ virtual functions:
00103 #ifdef GLIBMM_VFUNCS_ENABLED
00104 #endif //GLIBMM_VFUNCS_ENABLED
00105 
00106 protected:
00107   //GTK+ Virtual Functions (override these to change behaviour):
00108 #ifdef GLIBMM_VFUNCS_ENABLED
00109 #endif //GLIBMM_VFUNCS_ENABLED
00110 
00111   //Default Signal Handlers::
00112 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00113   virtual bool on_range_error(NumberEditorErrorType type);
00114 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00115 
00116 
00117 private:
00118 
00119 public:
00120   explicit NumberEditor(int min, int max);
00121 
00122   
00127   void set_range(int min, int max);
00128 
00129   
00133   int get_value() const;
00134   
00138   void set_value(int value);
00139 
00140   //TODO: This should probably be wrapped as an exception:
00141   
00142 
00143   Glib::SignalProxy1< bool,NumberEditorErrorType > signal_range_error();
00144 
00145 
00146   #ifdef GLIBMM_PROPERTIES_ENABLED
00147 
00153   Glib::PropertyProxy<int> property_value() ;
00154 #endif //#GLIBMM_PROPERTIES_ENABLED
00155 
00156 #ifdef GLIBMM_PROPERTIES_ENABLED
00157 
00163   Glib::PropertyProxy_ReadOnly<int> property_value() const;
00164 #endif //#GLIBMM_PROPERTIES_ENABLED
00165 
00166 
00167 };
00168 
00169 } // namespace Hildon
00170 
00171 
00172 namespace Glib
00173 {
00179   Hildon::NumberEditor* wrap(HildonNumberEditor* object, bool take_copy = false);
00180 } //namespace Glib
00181 
00182 
00183 #endif /* _HILDON_LIBSMM_NUMBER_EDITOR_H */
00184 

Generated on Wed Nov 8 17:20:41 2006 for hildon-libsmm by  doxygen 1.4.6