2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _PANGOMM_FONTFAMILY_H
4
#define _PANGOMM_FONTFAMILY_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.
30
#include <glibmm/object.h>
31
#include <glibmm/arrayhandle.h>
32
#include <pangomm/fontface.h>
33
#include <pango/pango-font.h>
36
#ifndef DOXYGEN_SHOULD_SKIP_THIS
37
typedef struct _PangoFontFamily PangoFontFamily;
38
typedef struct _PangoFontFamilyClass PangoFontFamilyClass;
39
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
43
{ class FontFamily_Class; } // namespace Pango
47
/** A Pango::FontFamily is used to represent a family of related font faces.
48
* The faces in a family share a common design, but differ in slant, weight, width and other aspects.
51
class FontFamily : public Glib::Object
54
#ifndef DOXYGEN_SHOULD_SKIP_THIS
57
typedef FontFamily CppObjectType;
58
typedef FontFamily_Class CppClassType;
59
typedef PangoFontFamily BaseObjectType;
60
typedef PangoFontFamilyClass BaseClassType;
62
private: friend class FontFamily_Class;
63
static CppClassType fontfamily_class_;
67
FontFamily(const FontFamily&);
68
FontFamily& operator=(const FontFamily&);
71
explicit FontFamily(const Glib::ConstructParams& construct_params);
72
explicit FontFamily(PangoFontFamily* castitem);
74
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
77
virtual ~FontFamily();
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
PangoFontFamily* gobj() { return reinterpret_cast<PangoFontFamily*>(gobject_); }
87
///Provides access to the underlying C GObject.
88
const PangoFontFamily* gobj() const { return reinterpret_cast<PangoFontFamily*>(gobject_); }
90
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
91
PangoFontFamily* gobj_copy();
97
/** Lists the different font faces that make up family.
98
* The faces in a family share a common design, but differ in slant, weight, width and other aspects.
99
* @return an array of pointers to Pango::FontFace objects.
101
Glib::ArrayHandle< Glib::RefPtr<FontFace> > list_faces() const;
104
/** Gets the name of the family. The name is unique among all
105
* fonts for the font backend and can be used in a Pango::FontDescription
106
* to specify that a face from this family is desired.
107
* @return The name of the family. This string is owned
108
* by the family object and must not be modified or freed.
110
Glib::ustring get_name() const;
112
/** A monospace font is a font designed for text display where the the
113
* characters form a regular grid. For Western languages this would
114
* mean that the advance width of all characters are the same, but
115
* this categorization also includes Asian fonts which include
116
* double-width characters: characters that occupy two grid cells.
117
* Glib::unichar_iswide() returns a result that indicates whether a
118
* character is typically double-width in a monospace font.
120
* The best way to find out the grid-cell size is to call
121
* pango_font_metrics_get_approximate_digit_width(), since the results
122
* of pango_font_metrics_get_approximate_char_width() may be affected
123
* by double-width characters.
124
* @return <tt>true</tt> if the family is monospace.
126
bool is_monospace() const;
132
//C++ methods used to invoke GTK+ virtual functions:
135
//GTK+ Virtual Functions (override these to change behaviour):
137
//Default Signal Handlers::
143
struct FontFamilyRefPtrTraits
145
typedef Glib::RefPtr<FontFamily> CppType;
146
typedef PangoFontFamily * CType;
147
typedef PangoFontFamily * CTypeNonConst;
149
static CType to_c_type (const CppType& ptr) { return Glib::unwrap (ptr); }
150
static CType to_c_type (CType ptr) { return ptr; }
151
static CppType to_cpp_type (CType ptr) { return FontFamily::wrap_specific_type (ptr); }
152
static void release_c_type (CType ptr) { g_object_unref (ptr); }
161
/** @relates Pango::FontFamily
162
* @param object The C instance
163
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
164
* @result A C++ instance that wraps this C instance.
166
Glib::RefPtr<Pango::FontFamily> wrap(PangoFontFamily* object, bool take_copy = false);
170
#endif /* _PANGOMM_FONTFAMILY_H */