rollback to 3428, before the mysterious removal of libs/* at 3431/3432
[ardour.git] / libs / gtkmm2 / atk / atkmm / value.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _ATKMM_VALUE_H
4 #define _ATKMM_VALUE_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* Copyright (C) 2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
30 extern "C"
31 {
32   typedef struct _AtkValueIface AtkValueIface;
33   typedef struct _AtkValue      AtkValue;
34 }
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 typedef struct _AtkValue AtkValue;
40 typedef struct _AtkValueClass AtkValueClass;
41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
42
43
44 namespace Atk
45 { class Value_Class; } // namespace Atk
46 namespace Atk
47 {
48
49 /** The ATK interface implemented by valuators and components which display or select a value from a bounded range of values.
50  * This should be implemented for components which either display a value from a bounded range, or which allow the user
51  * to specify a value from a bounded range, or both. For instance, most sliders and range controls, as well as dials,
52  * should have Atk::Object representations which implement Atk::Value on the component's behalf. Atk::Values may be
53  * read-only, in which case attempts to alter the value return false to indicate failure.
54  */
55
56 class Value : public Glib::Interface
57 {
58   
59 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60
61 public:
62   typedef Value CppObjectType;
63   typedef Value_Class CppClassType;
64   typedef AtkValue BaseObjectType;
65   typedef AtkValueIface BaseClassType;
66
67 private:
68   friend class Value_Class;
69   static CppClassType value_class_;
70
71   // noncopyable
72   Value(const Value&);
73   Value& operator=(const Value&);
74
75 protected:
76   Value(); // you must derive from this class
77
78 public:
79   // This is public so that C++ wrapper instances can be
80   // created for C instances of unwrapped types.
81   // For instance, if an unexpected C type implements the C interface. 
82   explicit Value(AtkValue* castitem);
83
84 protected:
85 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
86
87 public:
88   virtual ~Value();
89
90   static void add_interface(GType gtype_implementer);
91
92 #ifndef DOXYGEN_SHOULD_SKIP_THIS
93   static GType get_type()      G_GNUC_CONST;
94   static GType get_base_type() G_GNUC_CONST;
95 #endif
96
97   ///Provides access to the underlying C GObject.
98   AtkValue*       gobj()       { return reinterpret_cast<AtkValue*>(gobject_); }
99
100   ///Provides access to the underlying C GObject.  
101   const AtkValue* gobj() const { return reinterpret_cast<AtkValue*>(gobject_); }
102
103 private:
104
105
106 public:
107   
108   /** Gets the value of this object.
109    * @param value A G::Value representing the current accessible value.
110    */
111   void get_current_value(Glib::ValueBase& value) const;
112   
113   /** Gets the maximum value of this object.
114    * @param value A G::Value representing the maximum accessible value.
115    */
116   void get_maximum_value(Glib::ValueBase& value) const;
117   
118   /** Gets the minimum value of this object.
119    * @param value A G::Value representing the minimum accessible value.
120    */
121   void get_minimum_value(Glib::ValueBase& value) const;
122   
123   /** Sets the value of this object.
124    * @param value A G::Value which is the desired new accessible value.
125    * @return <tt>true</tt> if new value is successfully set, <tt>false</tt> otherwise.
126    */
127   bool set_current_value(const Glib::ValueBase& value);
128
129 protected:
130   #ifdef GLIBMM_VFUNCS_ENABLED
131   virtual void get_current_value_vfunc(Glib::ValueBase& value) const;
132 #endif //GLIBMM_VFUNCS_ENABLED
133
134   #ifdef GLIBMM_VFUNCS_ENABLED
135   virtual void get_maximum_value_vfunc(Glib::ValueBase& value) const;
136 #endif //GLIBMM_VFUNCS_ENABLED
137
138   #ifdef GLIBMM_VFUNCS_ENABLED
139   virtual void get_minimum_value_vfunc(Glib::ValueBase& value) const;
140 #endif //GLIBMM_VFUNCS_ENABLED
141
142   #ifdef GLIBMM_VFUNCS_ENABLED
143   virtual bool set_current_value_vfunc(const Glib::ValueBase& value);
144 #endif //GLIBMM_VFUNCS_ENABLED
145
146
147 public:
148
149 public:
150   //C++ methods used to invoke GTK+ virtual functions:
151 #ifdef GLIBMM_VFUNCS_ENABLED
152 #endif //GLIBMM_VFUNCS_ENABLED
153
154 protected:
155   //GTK+ Virtual Functions (override these to change behaviour):
156 #ifdef GLIBMM_VFUNCS_ENABLED
157 #endif //GLIBMM_VFUNCS_ENABLED
158
159   //Default Signal Handlers::
160 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
161 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
162
163
164 };
165
166 } // namespace Atk
167
168
169 namespace Glib
170 {
171   /** A Glib::wrap() method for this object.
172    * 
173    * @param object The C instance.
174    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
175    * @result A C++ instance that wraps this C instance.
176    *
177    * @relates Atk::Value
178    */
179   Glib::RefPtr<Atk::Value> wrap(AtkValue* object, bool take_copy = false);
180
181 } // namespace Glib
182
183
184 #endif /* _ATKMM_VALUE_H */
185