1 /* $Id: fontfamily.hg,v 1.2 2004/03/03 01:07:40 murrayc Exp $ */
5 * Copyright 2001 The gtkmm Development Team
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include <glibmm/object.h>
24 #include <glibmm/arrayhandle.h>
25 #include <pangomm/fontface.h>
26 #include <pango/pango-font.h>
29 _PINCLUDE(glibmm/private/object_p.h)
34 /** A Pango::FontFamily is used to represent a family of related font faces.
35 * The faces in a family share a common design, but differ in slant, weight, width and other aspects.
37 class FontFamily : public Glib::Object
39 _CLASS_GOBJECT(FontFamily, PangoFontFamily, PANGO_FONT_FAMILY, Glib::Object, GObject)
40 _IGNORE(pango_font_family_list_faces)
43 /** Lists the different font faces that make up family.
44 * The faces in a family share a common design, but differ in slant, weight, width and other aspects.
45 * @return an array of pointers to Pango::FontFace objects.
47 Glib::ArrayHandle< Glib::RefPtr<FontFace> > list_faces() const;
49 _WRAP_METHOD(Glib::ustring get_name() const, pango_font_family_get_name)
50 _WRAP_METHOD(bool is_monospace() const, pango_font_family_is_monospace)
54 struct FontFamilyRefPtrTraits
56 typedef Glib::RefPtr<FontFamily> CppType;
57 typedef PangoFontFamily * CType;
58 typedef PangoFontFamily * CTypeNonConst;
60 static CType to_c_type (const CppType& ptr) { return Glib::unwrap (ptr); }
61 static CType to_c_type (CType ptr) { return ptr; }
62 static CppType to_cpp_type (CType ptr) { return FontFamily::wrap_specific_type (ptr); }
63 static void release_c_type (CType ptr) { g_object_unref (ptr); }