2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _PANGOMM_FONTSET_H
4 #define _PANGOMM_FONTSET_H
13 * Copyright 2001 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <glibmm/object.h>
31 #include <pangomm/language.h>
32 #include <pangomm/font.h>
33 #include <pangomm/fontmetrics.h>
34 #include <pango/pango-fontset.h>
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _PangoFontset PangoFontset;
39 typedef struct _PangoFontsetClass PangoFontsetClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 { class Fontset_Class; } // namespace Pango
48 /** A Pango::Fontset is used to represent a set of fonts.
51 class Fontset : public Glib::Object
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
57 typedef Fontset CppObjectType;
58 typedef Fontset_Class CppClassType;
59 typedef PangoFontset BaseObjectType;
60 typedef PangoFontsetClass BaseClassType;
62 private: friend class Fontset_Class;
63 static CppClassType fontset_class_;
67 Fontset(const Fontset&);
68 Fontset& operator=(const Fontset&);
71 explicit Fontset(const Glib::ConstructParams& construct_params);
72 explicit Fontset(PangoFontset* castitem);
74 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80 static GType get_type() G_GNUC_CONST;
81 static GType get_base_type() G_GNUC_CONST;
84 ///Provides access to the underlying C GObject.
85 PangoFontset* gobj() { return reinterpret_cast<PangoFontset*>(gobject_); }
87 ///Provides access to the underlying C GObject.
88 const PangoFontset* gobj() const { return reinterpret_cast<PangoFontset*>(gobject_); }
90 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
91 PangoFontset* gobj_copy();
98 /** Return value: a Pango::Font. The caller must call g_object_unref when finished
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:
130 #ifdef GLIBMM_VFUNCS_ENABLED
131 #endif //GLIBMM_VFUNCS_ENABLED
134 //GTK+ Virtual Functions (override these to change behaviour):
135 #ifdef GLIBMM_VFUNCS_ENABLED
136 #endif //GLIBMM_VFUNCS_ENABLED
138 //Default Signal Handlers::
139 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
140 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
145 } /* namespace Pango */
150 /** A Glib::wrap() method for this object.
152 * @param object The C instance.
153 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
154 * @result A C++ instance that wraps this C instance.
156 * @relates Pango::Fontset
158 Glib::RefPtr<Pango::Fontset> wrap(PangoFontset* object, bool take_copy = false);
162 #endif /* _PANGOMM_FONTSET_H */