2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _PANGOMM_FONTSET_H
4 #define _PANGOMM_FONTSET_H
12 * Copyright 2001 The gtkmm Development Team
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Library General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Library General Public License for more details.
24 * You should have received a copy of the GNU Library General Public
25 * License along with this library; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <glibmm/object.h>
30 #include <pangomm/language.h>
31 #include <pangomm/font.h>
32 #include <pangomm/fontmetrics.h>
33 #include <pango/pango-fontset.h>
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _PangoFontset PangoFontset;
38 typedef struct _PangoFontsetClass PangoFontsetClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
43 { class Fontset_Class; } // namespace Pango
47 /** A Pango::Fontset is used to represent a set of fonts.
50 class Fontset : public Glib::Object
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56 typedef Fontset CppObjectType;
57 typedef Fontset_Class CppClassType;
58 typedef PangoFontset BaseObjectType;
59 typedef PangoFontsetClass BaseClassType;
61 private: friend class Fontset_Class;
62 static CppClassType fontset_class_;
66 Fontset(const Fontset&);
67 Fontset& operator=(const Fontset&);
70 explicit Fontset(const Glib::ConstructParams& construct_params);
71 explicit Fontset(PangoFontset* castitem);
73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79 static GType get_type() G_GNUC_CONST;
80 static GType get_base_type() G_GNUC_CONST;
83 ///Provides access to the underlying C GObject.
84 PangoFontset* gobj() { return reinterpret_cast<PangoFontset*>(gobject_); }
86 ///Provides access to the underlying C GObject.
87 const PangoFontset* gobj() const { return reinterpret_cast<PangoFontset*>(gobject_); }
89 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
90 PangoFontset* gobj_copy();
97 /** Returns the font in the fontset that contains the best glyph for the
98 * unicode character wc.
99 * @param wc A unicode character.
100 * @return A Pango::Font. The caller must call g_object_unref when finished
103 Glib::RefPtr<Font> get_font(guint wc) const;
105 /** Get overall metric information for the fonts in the fontset.
106 * @return A Pango::FontMetrics object. The caller must call pango_font_metrics_unref()
107 * when finished using the object.
109 FontMetrics get_metrics() const;
112 * bool on_foreach(const Glib::RefPtr<Pango::Font>& font);
114 typedef sigc::slot< bool, const Glib::RefPtr<Font>& > ForeachSlot;
116 /** Iterates through all the fonts in a fontset, calling @a slot for
117 * each one. If @a slot returns true, that stops the iteration.
121 * @param slot Callback function
123 void foreach(const ForeachSlot& slot);
129 //C++ methods used to invoke GTK+ virtual functions:
132 //GTK+ Virtual Functions (override these to change behaviour):
134 //Default Signal Handlers::
139 } /* namespace Pango */
144 /** @relates Pango::Fontset
145 * @param object The C instance
146 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
147 * @result A C++ instance that wraps this C instance.
149 Glib::RefPtr<Pango::Fontset> wrap(PangoFontset* object, bool take_copy = false);
153 #endif /* _PANGOMM_FONTSET_H */