00001
00002
00003 #ifndef _HILDON_LIBSMM_NUMBER_EDITOR_H
00004 #define _HILDON_LIBSMM_NUMBER_EDITOR_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
00037
00038
00039 namespace Hildon
00040 { class NumberEditor_Class; }
00041 namespace Hildon
00042 {
00043
00044
00045
00046
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
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
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
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
00103 #ifdef GLIBMM_VFUNCS_ENABLED
00104 #endif //GLIBMM_VFUNCS_ENABLED
00105
00106 protected:
00107
00108 #ifdef GLIBMM_VFUNCS_ENABLED
00109 #endif //GLIBMM_VFUNCS_ENABLED
00110
00111
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
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 }
00170
00171
00172 namespace Glib
00173 {
00179 Hildon::NumberEditor* wrap(HildonNumberEditor* object, bool take_copy = false);
00180 }
00181
00182
00183 #endif
00184