2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _PANGOMM_FONTFAMILY_H
4 #define _PANGOMM_FONTFAMILY_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.
31 #include <glibmm/object.h>
32 #include <glibmm/arrayhandle.h>
33 #include <pangomm/fontface.h>
34 #include <pango/pango-font.h>
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _PangoFontFamily PangoFontFamily;
39 typedef struct _PangoFontFamilyClass PangoFontFamilyClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 { class FontFamily_Class; } // namespace Pango
48 /** A Pango::FontFamily is used to represent a family of related font faces.
49 * The faces in a family share a common design, but differ in slant, weight, width and other aspects.
52 class FontFamily : public Glib::Object
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58 typedef FontFamily CppObjectType;
59 typedef FontFamily_Class CppClassType;
60 typedef PangoFontFamily BaseObjectType;
61 typedef PangoFontFamilyClass BaseClassType;
63 private: friend class FontFamily_Class;
64 static CppClassType fontfamily_class_;
68 FontFamily(const FontFamily&);
69 FontFamily& operator=(const FontFamily&);
72 explicit FontFamily(const Glib::ConstructParams& construct_params);
73 explicit FontFamily(PangoFontFamily* castitem);
75 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
78 virtual ~FontFamily();
80 #ifndef DOXYGEN_SHOULD_SKIP_THIS
81 static GType get_type() G_GNUC_CONST;
82 static GType get_base_type() G_GNUC_CONST;
85 ///Provides access to the underlying C GObject.
86 PangoFontFamily* gobj() { return reinterpret_cast<PangoFontFamily*>(gobject_); }
88 ///Provides access to the underlying C GObject.
89 const PangoFontFamily* gobj() const { return reinterpret_cast<PangoFontFamily*>(gobject_); }
91 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
92 PangoFontFamily* gobj_copy();
98 /** Lists the different font faces that make up family.
99 * The faces in a family share a common design, but differ in slant, weight, width and other aspects.
100 * @return an array of pointers to Pango::FontFace objects.
102 Glib::ArrayHandle< Glib::RefPtr<FontFace> > list_faces() const;
105 /** Gets the name of the family. The name is unique among all
106 * fonts for the font backend and can be used in a Pango::FontDescription
107 * to specify that a face from this family is desired.
108 * @return The name of the family. This string is owned
109 * by the family object and must not be modified or freed.
111 Glib::ustring get_name() const;
113 /** A monospace font is a font designed for text display where the the
114 * characters form a regular grid. For Western languages this would
115 * mean that the advance width of all characters are the same, but
116 * this categorization also includes Asian fonts which include
117 * double-width characters: characters that occupy two grid cells.
118 * Glib::unichar_iswide() returns a result that indicates whether a
119 * character is typically double-width in a monospace font.
121 * The best way to find out the grid-cell size is to call
122 * pango_font_metrics_get_approximate_digit_width(), since the results
123 * of pango_font_metrics_get_approximate_char_width() may be affected
124 * by double-width characters.
125 * @return <tt>true</tt> if the family is monospace.
129 bool is_monospace() const;
135 //C++ methods used to invoke GTK+ virtual functions:
136 #ifdef GLIBMM_VFUNCS_ENABLED
137 #endif //GLIBMM_VFUNCS_ENABLED
140 //GTK+ Virtual Functions (override these to change behaviour):
141 #ifdef GLIBMM_VFUNCS_ENABLED
142 #endif //GLIBMM_VFUNCS_ENABLED
144 //Default Signal Handlers::
145 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
146 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
152 struct FontFamilyRefPtrTraits
154 typedef Glib::RefPtr<FontFamily> CppType;
155 typedef PangoFontFamily * CType;
156 typedef PangoFontFamily * CTypeNonConst;
158 static CType to_c_type (const CppType& ptr) { return Glib::unwrap (ptr); }
159 static CType to_c_type (CType ptr) { return ptr; }
160 static CppType to_cpp_type (CType ptr) { return FontFamily::wrap_specific_type (ptr); }
161 static void release_c_type (CType ptr) { g_object_unref (ptr); }
170 /** A Glib::wrap() method for this object.
172 * @param object The C instance.
173 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
174 * @result A C++ instance that wraps this C instance.
176 * @relates Pango::FontFamily
178 Glib::RefPtr<Pango::FontFamily> wrap(PangoFontFamily* object, bool take_copy = false);
182 #endif /* _PANGOMM_FONTFAMILY_H */