Ardour  9.0-pre0-582-g084a23a80d
iconset.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_ICONSET_H
4 #define _GTKMM_ICONSET_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: iconset.hg,v 1.3 2006/07/30 20:49:50 murrayc Exp $ */
11 
12 /* iconset.h
13  *
14  * Copyright(C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software, ) you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation, ) either
19  * version 2.1 of the License, or(at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library, ) if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 //#include <gtkmm/style.h>
32 #include <gdkmm/pixbuf.h>
33 #include <gtkmm/iconsource.h>
34 //#include <gtkmm/widget.h>
35 #include <gtkmm/stockid.h>
36 #include <glibmm/arrayhandle.h>
37 
38 
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 extern "C" { typedef struct _GtkIconSet GtkIconSet; }
41 #endif
42 
43 namespace Gtk
44 {
45 
46 class Style;
47 class Widget;
48 
49 //TODO_API: Is _CLASS_BOXEDTYPE the appropriate thing to use here.
50 //This seems to be reference-counted, not copied.
51 
56 class IconSet
57 {
58  public:
59 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60  typedef IconSet CppObjectType;
61  typedef GtkIconSet BaseObjectType;
62 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
63 
66  static GType get_type() G_GNUC_CONST;
67 
69 
70  explicit IconSet(GtkIconSet* gobject, bool make_a_copy = true);
71 
72  IconSet(const IconSet& other);
73  IconSet& operator=(const IconSet& other);
74 
75  ~IconSet();
76 
77  void swap(IconSet& other);
78 
80  GtkIconSet* gobj() { return gobject_; }
81 
83  const GtkIconSet* gobj() const { return gobject_; }
84 
87 
88 protected:
90 
91 private:
92 
93 
94 public:
95  explicit IconSet(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
96 
97 
102  IconSet copy() const;
103 
104  //Note that we use Gtk::StateType here instead of StateType, because there is an Atk::StateType too, and doxygen gets confused.
105 
126  Glib::RefPtr<Gdk::Pixbuf> render_icon(const Glib::RefPtr<Style>& style, TextDirection direction, Gtk::StateType state, IconSize size, Widget& widget, const Glib::ustring& detail);
127 
128 
157  void add_source(const IconSource& source);
158 
159  Glib::ArrayHandle<IconSize> get_sizes() const;
160 
170  static IconSet lookup_default(const Gtk::StockID& stock_id);
171 
172 
173 };
174 
175 } /* namespace Gtk */
176 
177 
178 namespace Gtk
179 {
180 
185 inline void swap(IconSet& lhs, IconSet& rhs)
186  { lhs.swap(rhs); }
187 
188 } // namespace Gtk
189 
190 namespace Glib
191 {
192 
201 Gtk::IconSet wrap(GtkIconSet* object, bool take_copy = false);
202 
203 #ifndef DOXYGEN_SHOULD_SKIP_THIS
204 template <>
205 class Value<Gtk::IconSet> : public Glib::Value_Boxed<Gtk::IconSet>
206 {};
207 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
208 
209 } // namespace Glib
210 
211 
212 #endif /* _GTKMM_ICONSET_H */
213 
GtkIconSet * gobj()
Provides access to the underlying C instance.
Definition: iconset.h:80
void swap(IconSet &other)
GtkIconSet * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for freeing it....
void swap(IconSet &lhs, IconSet &rhs)
Definition: iconset.h:185
Glib::RefPtr< Gdk::Pixbuf > render_icon(const Glib::RefPtr< Style > &style, TextDirection direction, Gtk::StateType state, IconSize size, Widget &widget, const Glib::ustring &detail)
IconSet copy() const
void add_source(const IconSource &source)
IconSet(const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
Glib::ArrayHandle< IconSize > get_sizes() const
static IconSet lookup_default(const Gtk::StockID &stock_id)
const GtkIconSet * gobj() const
Provides access to the underlying C instance.
Definition: iconset.h:83
GtkIconSet * gobject_
Definition: iconset.h:89
Gtk::IconSet wrap(GtkIconSet *object, bool take_copy=false)
static GType get_type() G_GNUC_CONST
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
struct _GtkIconSet GtkIconSet
Definition: gtkstyle.h:58
Definition: ardour_ui.h:188
Definition: lobject.h:100