1 // Generated by gmmproc 2.56.0 -- DO NOT MODIFY!
2 #ifndef _ATKMM_RANGE_H
3 #define _ATKMM_RANGE_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /*
10 * Copyright (C) 2015 The atkmm Development Team
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
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 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 */
26
27 #include <glibmm/value.h>
28 #include <atk/atk.h>
29
30
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 extern "C" { typedef struct _AtkRange AtkRange; }
33 #endif
34
35 namespace Atk
36 {
37
38 /** A given range or subrange, to be used with Atk::Value.
39 * This represents the full range of a given component (for example a slider or a range control),
40 * or, to define each individual subrange, this full range is split if available.
41 *
42 * @newin{2,24}
43 */
44 class Range
45 {
46 public:
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48 using CppObjectType = Range;
49 using BaseObjectType = AtkRange;
50 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
51
52 /** Get the GType for this class, for use with the underlying GObject type system.
53 */
54 static GType get_type() G_GNUC_CONST;
55
56 Range();
57
58 explicit Range(AtkRange* gobject, bool make_a_copy = true);
59
60 Range(const Range& other);
61 Range& operator=(const Range& other);
62
63 Range(Range&& other) noexcept;
64 Range& operator=(Range&& other) noexcept;
65
66 ~Range() noexcept;
67
68 void swap(Range& other) noexcept;
69
70 ///Provides access to the underlying C instance.
gobj()71 AtkRange* gobj() { return gobject_; }
72
73 ///Provides access to the underlying C instance.
gobj()74 const AtkRange* gobj() const { return gobject_; }
75
76 ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
77 AtkRange* gobj_copy() const;
78
79 protected:
80 AtkRange* gobject_;
81
82 private:
83
84
85 public:
86
87 Range(double lower_limit, double upper_limit, const Glib::ustring& description);
88
89
90 /** Returns the lower limit of @a range
91 *
92 * @newin{2,12}
93 *
94 * @return The lower limit of @a range.
95 */
96 double get_lower_limit() const;
97
98 /** Returns the upper limit of @a range
99 *
100 * @newin{2,12}
101 *
102 * @return The upper limit of @a range.
103 */
104 double get_upper_limit() const;
105
106 /** Returns the human readable description of @a range
107 *
108 * @newin{2,12}
109 *
110 * @return The human-readable description of @a range.
111 */
112 Glib::ustring _get_description() const;
113
114
115 };
116
117 } // namespace Atk
118
119
120 namespace Atk
121 {
122
123 /** @relates Atk::Range
124 * @param lhs The left-hand side
125 * @param rhs The right-hand side
126 */
swap(Range & lhs,Range & rhs)127 inline void swap(Range& lhs, Range& rhs) noexcept
128 { lhs.swap(rhs); }
129
130 } // namespace Atk
131
132 namespace Glib
133 {
134
135 /** A Glib::wrap() method for this object.
136 *
137 * @param object The C instance.
138 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
139 * @result A C++ instance that wraps this C instance.
140 *
141 * @relates Atk::Range
142 */
143 Atk::Range wrap(AtkRange* object, bool take_copy = false);
144
145 #ifndef DOXYGEN_SHOULD_SKIP_THIS
146 template <>
147 class Value<Atk::Range> : public Glib::Value_Boxed<Atk::Range>
148 {};
149 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
150
151 } // namespace Glib
152
153
154 #endif /* _ATKMM_RANGE_H */
155
156