1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2 #ifndef _GIOMM_MENUATTRIBUTEITER_H
3 #define _GIOMM_MENUATTRIBUTEITER_H
4 
5 #include <giommconfig.h>
6 
7 
8 #include <glibmm/ustring.h>
9 #include <sigc++/sigc++.h>
10 
11 /* Copyright (C) 2012 The giomm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 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  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 
28 #include <glibmm/object.h>
29 
30 
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 using GMenuAttributeIter = struct _GMenuAttributeIter;
33 using GMenuAttributeIterClass = struct _GMenuAttributeIterClass;
34 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
35 
36 
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 namespace Gio
39 { class GIOMM_API MenuAttributeIter_Class; } // namespace Gio
40 #endif //DOXYGEN_SHOULD_SKIP_THIS
41 
42 namespace Gio
43 {
44 
45 /** MenuAttributeIter - A menu attribute iterator.
46  * @newin{2,32}
47  */
48 
49 class GIOMM_API MenuAttributeIter : public Glib::Object
50 {
51 
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 
54 public:
55   using CppObjectType = MenuAttributeIter;
56   using CppClassType = MenuAttributeIter_Class;
57   using BaseObjectType = GMenuAttributeIter;
58   using BaseClassType = GMenuAttributeIterClass;
59 
60   // noncopyable
61   MenuAttributeIter(const MenuAttributeIter&) = delete;
62   MenuAttributeIter& operator=(const MenuAttributeIter&) = delete;
63 
64 private:  friend class MenuAttributeIter_Class;
65   static CppClassType menuattributeiter_class_;
66 
67 protected:
68   explicit MenuAttributeIter(const Glib::ConstructParams& construct_params);
69   explicit MenuAttributeIter(GMenuAttributeIter* castitem);
70 
71 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
72 
73 public:
74 
75   MenuAttributeIter(MenuAttributeIter&& src) noexcept;
76   MenuAttributeIter& operator=(MenuAttributeIter&& src) noexcept;
77 
78   ~MenuAttributeIter() noexcept override;
79 
80   /** Get the GType for this class, for use with the underlying GObject type system.
81    */
82   static GType get_type()      G_GNUC_CONST;
83 
84 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85 
86 
87   static GType get_base_type() G_GNUC_CONST;
88 #endif
89 
90   ///Provides access to the underlying C GObject.
gobj()91   GMenuAttributeIter*       gobj()       { return reinterpret_cast<GMenuAttributeIter*>(gobject_); }
92 
93   ///Provides access to the underlying C GObject.
gobj()94   const GMenuAttributeIter* gobj() const { return reinterpret_cast<GMenuAttributeIter*>(gobject_); }
95 
96   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
97   GMenuAttributeIter* gobj_copy();
98 
99 private:
100 
101 
102 protected:
103   MenuAttributeIter();
104 
105 public:
106 
107   /** This function combines g_menu_attribute_iter_next() with
108    * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().
109    *
110    * First the iterator is advanced to the next (possibly first) attribute.
111    * If that fails, then <tt>false</tt> is returned and there are no other
112    * effects.
113    *
114    * If successful, @a name and @a value are set to the name and value of the
115    * attribute that has just been advanced to.  At this point,
116    * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will
117    * return the same values again.
118    *
119    * The value returned in @a name remains valid for as long as the iterator
120    * remains at the current position.  The value returned in @a value must
121    * be unreffed using Glib::variant_unref() when it is no longer in use.
122    *
123    * @newin{2,32}
124    *
125    * @param out_name The type of the attribute.
126    * @param value The attribute value.
127    * @return <tt>true</tt> on success, or <tt>false</tt> if there is no additional
128    * attribute.
129    */
130 
131   bool get_next(Glib::ustring& out_name, Glib::VariantBase& value);
132 
133 
134   /** Gets the name of the attribute at the current iterator position, as
135    * a string.
136    *
137    * The iterator is not advanced.
138    *
139    * @newin{2,32}
140    *
141    * @return The name of the attribute.
142    */
143   Glib::ustring get_name() const;
144 
145   //TODO: When we can break ABI, remove the method overload and just make it const.
146   //It makes no sense to return const by value.
147 
148   /** Gets the value of the attribute at the current iterator position.
149    *
150    * The iterator is not advanced.
151    *
152    * @newin{2,32}
153    *
154    * @return The value of the current attribute.
155    */
156   Glib::VariantBase get_value();
157 
158   /** Gets the value of the attribute at the current iterator position.
159    *
160    * The iterator is not advanced.
161    *
162    * @newin{2,32}
163    *
164    * @return The value of the current attribute.
165    */
166   const Glib::VariantBase get_value() const;
167 
168 
169   /** Attempts to advance the iterator to the next (possibly first)
170    * attribute.
171    *
172    * <tt>true</tt> is returned on success, or <tt>false</tt> if there are no more
173    * attributes.
174    *
175    * You must call this function when you first acquire the iterator
176    * to advance it to the first attribute (and determine if the first
177    * attribute exists at all).
178    *
179    * @newin{2,32}
180    *
181    * @return <tt>true</tt> on success, or <tt>false</tt> when there are no more attributes.
182    */
183   bool next();
184 
185 
186 public:
187 
188 public:
189   //C++ methods used to invoke GTK+ virtual functions:
190 
191 protected:
192   //GTK+ Virtual Functions (override these to change behaviour):
193 
194   //Default Signal Handlers::
195 
196 
197 };
198 
199 } // namespace Gio
200 
201 
202 namespace Glib
203 {
204   /** A Glib::wrap() method for this object.
205    *
206    * @param object The C instance.
207    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
208    * @result A C++ instance that wraps this C instance.
209    *
210    * @relates Gio::MenuAttributeIter
211    */
212   GIOMM_API
213   Glib::RefPtr<Gio::MenuAttributeIter> wrap(GMenuAttributeIter* object, bool take_copy = false);
214 }
215 
216 
217 #endif /* _GIOMM_MENUATTRIBUTEITER_H */
218 
219