2 // Generated by gtkmmproc -- DO NOT MODIFY!
10 /* Copyright (C) 2002 The gtkmm Development Team
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 typedef struct _AtkValueIface AtkValueIface;
32 typedef struct _AtkValue AtkValue;
34 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _AtkValue AtkValue;
39 typedef struct _AtkValueClass AtkValueClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 { class Value_Class; } // namespace Atk
48 /** The ATK interface implemented by valuators and components which display or select a value from a bounded range of values.
49 * This should be implemented for components which either display a value from a bounded range, or which allow the user
50 * to specify a value from a bounded range, or both. For instance, most sliders and range controls, as well as dials,
51 * should have Atk::Object representations which implement Atk::Value on the component's behalf. Atk::Values may be
52 * read-only, in which case attempts to alter the value return false to indicate failure.
55 class Value : public Glib::Interface
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61 typedef Value CppObjectType;
62 typedef Value_Class CppClassType;
63 typedef AtkValue BaseObjectType;
64 typedef AtkValueIface BaseClassType;
67 friend class Value_Class;
68 static CppClassType value_class_;
72 Value& operator=(const Value&);
75 Value(); // you must derive from this class
76 explicit Value(AtkValue* castitem);
78 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
83 static void add_interface(GType gtype_implementer);
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86 static GType get_type() G_GNUC_CONST;
87 static GType get_base_type() G_GNUC_CONST;
90 ///Provides access to the underlying C GObject.
91 AtkValue* gobj() { return reinterpret_cast<AtkValue*>(gobject_); }
93 ///Provides access to the underlying C GObject.
94 const AtkValue* gobj() const { return reinterpret_cast<AtkValue*>(gobject_); }
101 /** Gets the value of this object.
102 * @param value A G::Value representing the current accessible value.
104 void get_current_value(Glib::ValueBase& value) const;
106 /** Gets the maximum value of this object.
107 * @param value A G::Value representing the maximum accessible value.
109 void get_maximum_value(Glib::ValueBase& value) const;
111 /** Gets the minimum value of this object.
112 * @param value A G::Value representing the minimum accessible value.
114 void get_minimum_value(Glib::ValueBase& value) const;
116 /** Sets the value of this object.
117 * @param value A G::Value which is the desired new accessible value.
118 * @return <tt>true</tt> if new value is successfully set, <tt>false</tt> otherwise.
120 bool set_current_value(const Glib::ValueBase& value);
123 virtual void get_current_value_vfunc(Glib::ValueBase& value) const;
124 virtual void get_maximum_value_vfunc(Glib::ValueBase& value) const;
125 virtual void get_minimum_value_vfunc(Glib::ValueBase& value) const;
126 virtual bool set_current_value_vfunc(const Glib::ValueBase& value);
132 //C++ methods used to invoke GTK+ virtual functions:
135 //GTK+ Virtual Functions (override these to change behaviour):
137 //Default Signal Handlers::
147 /** @relates Atk::Value
148 * @param object The C instance
149 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
150 * @result A C++ instance that wraps this C instance.
152 Glib::RefPtr<Atk::Value> wrap(AtkValue* object, bool take_copy = false);
156 #endif /* _ATKMM_VALUE_H */