interval.h
Go to the documentation of this file.00001
00002
00003 #ifndef _CLUTTERMM_INTERVAL_H
00004 #define _CLUTTERMM_INTERVAL_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 #include <glibmm/object.h>
00027 #include <clutter/clutter.h>
00028
00029
00030 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00031 typedef struct _ClutterInterval ClutterInterval;
00032 typedef struct _ClutterIntervalClass ClutterIntervalClass;
00033 #endif
00034
00035
00036 namespace Clutter
00037 { class Interval_Class; }
00038 namespace Clutter
00039 {
00040
00041
00042 class Interval : public Glib::Object
00043 {
00044
00045
00046 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00047
00048 public:
00049 typedef Interval CppObjectType;
00050 typedef Interval_Class CppClassType;
00051 typedef ClutterInterval BaseObjectType;
00052 typedef ClutterIntervalClass BaseClassType;
00053
00054 private: friend class Interval_Class;
00055 static CppClassType interval_class_;
00056
00057 private:
00058
00059 Interval(const Interval&);
00060 Interval& operator=(const Interval&);
00061
00062 protected:
00063 explicit Interval(const Glib::ConstructParams& construct_params);
00064 explicit Interval(ClutterInterval* castitem);
00065
00066 #endif
00067
00068 public:
00069 virtual ~Interval();
00070
00071 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00072 static GType get_type() G_GNUC_CONST;
00073 static GType get_base_type() G_GNUC_CONST;
00074 #endif
00075
00077 ClutterInterval* gobj() { return reinterpret_cast<ClutterInterval*>(gobject_); }
00078
00080 const ClutterInterval* gobj() const { return reinterpret_cast<ClutterInterval*>(gobject_); }
00081
00083 ClutterInterval* gobj_copy();
00084
00085 private:
00086
00087
00088 protected:
00089 Interval(GType type, const Glib::ValueBase& initial, const Glib::ValueBase& final);
00090
00091 public:
00092
00093 template <typename ValueType>
00094 Glib::RefPtr<Interval> static create(const ValueType initial, const ValueType final);
00095 template <typename ValueType>
00096 Glib::RefPtr<Interval> static create_with_values(const Glib::Value<ValueType>& initial, const Glib::Value<ValueType>& final);
00097
00098
00104 Glib::RefPtr<Interval> clone() const;
00105
00111 GType get_value_type() const;
00112
00119 void set_initial_value(const Glib::ValueBase& value);
00120
00130 void get_initial_value(Glib::ValueBase& value) const;
00131
00139 GValue* peek_initial_value();
00140
00147 void set_final_value(const Glib::ValueBase& value);
00148
00158 void get_final_value(Glib::ValueBase& value) const;
00159
00167 GValue* peek_final_value();
00168
00169 void set_interval(const Glib::ValueBase& initial, const Glib::ValueBase& final);
00170 void get_interval(Glib::ValueBase& initial, Glib::ValueBase& final);
00171
00172
00181 bool compute_value(double factor, Glib::ValueBase& value) const;
00182
00190 bool validate(GParamSpec *pspec) const;
00191
00192 #ifdef GLIBMM_PROPERTIES_ENABLED
00193
00199 Glib::PropertyProxy_ReadOnly<GType> property_value_type() const;
00200 #endif //#GLIBMM_PROPERTIES_ENABLED
00201
00202
00203 public:
00204
00205 public:
00206
00207 #ifdef GLIBMM_VFUNCS_ENABLED
00208 #endif //GLIBMM_VFUNCS_ENABLED
00209
00210 protected:
00211
00212 #ifdef GLIBMM_VFUNCS_ENABLED
00213 #endif //GLIBMM_VFUNCS_ENABLED
00214
00215
00216 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00217 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00218
00219
00220 };
00221
00222 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00223 template <typename ValueType>
00224 Glib::RefPtr<Interval> Interval::create(const ValueType initial, const ValueType final)
00225 {
00226 Glib::Value<ValueType> initial_val, final_val;
00227 initial_val.init(Glib::Value<ValueType>::value_type());
00228 final_val.init(Glib::Value<ValueType>::value_type());
00229 initial_val.set(initial);
00230 final_val.set(final);
00231 return create_with_values(initial_val, final_val);
00232 }
00233
00234 template <typename ValueType>
00235 Glib::RefPtr<Interval> Interval::create_with_values(const Glib::Value<ValueType>& initial, const Glib::Value<ValueType>& final)
00236 {
00237 return Glib::RefPtr<Interval>( new Interval(initial.value_type(), initial, final) );
00238 }
00239 #endif
00240 }
00241
00242
00243 namespace Glib
00244 {
00253 Glib::RefPtr<Clutter::Interval> wrap(ClutterInterval* object, bool take_copy = false);
00254 }
00255
00256
00257 #endif
00258