add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / pango / pangomm / fontfamily.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _PANGOMM_FONTFAMILY_H
4 #define _PANGOMM_FONTFAMILY_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* fontfamily.h
12  * 
13  * Copyright 2001      The gtkmm Development Team
14  *
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.
19  *
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.
24  *
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.
28  */
29
30
31 #include <glibmm/object.h>
32 #include <glibmm/arrayhandle.h>
33 #include <pangomm/fontface.h>
34 #include <pango/pango-font.h>
35
36
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _PangoFontFamily PangoFontFamily;
39 typedef struct _PangoFontFamilyClass PangoFontFamilyClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
42
43 namespace Pango
44 { class FontFamily_Class; } // namespace Pango
45 namespace Pango
46 {
47
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.
50  */
51
52 class FontFamily : public Glib::Object
53 {
54    
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56
57 public:
58   typedef FontFamily CppObjectType;
59   typedef FontFamily_Class CppClassType;
60   typedef PangoFontFamily BaseObjectType;
61   typedef PangoFontFamilyClass BaseClassType;
62
63 private:  friend class FontFamily_Class;
64   static CppClassType fontfamily_class_;
65
66 private:
67   // noncopyable
68   FontFamily(const FontFamily&);
69   FontFamily& operator=(const FontFamily&);
70
71 protected:
72   explicit FontFamily(const Glib::ConstructParams& construct_params);
73   explicit FontFamily(PangoFontFamily* castitem);
74
75 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
76
77 public:
78   virtual ~FontFamily();
79
80 #ifndef DOXYGEN_SHOULD_SKIP_THIS
81   static GType get_type()      G_GNUC_CONST;
82   static GType get_base_type() G_GNUC_CONST;
83 #endif
84
85   ///Provides access to the underlying C GObject.
86   PangoFontFamily*       gobj()       { return reinterpret_cast<PangoFontFamily*>(gobject_); }
87
88   ///Provides access to the underlying C GObject.
89   const PangoFontFamily* gobj() const { return reinterpret_cast<PangoFontFamily*>(gobject_); }
90
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();
93
94 private:
95
96    
97 public:
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.
101    */
102   Glib::ArrayHandle< Glib::RefPtr<FontFace> > list_faces() const;
103
104   
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.
110    */
111   Glib::ustring get_name() const;
112   
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.
120    * 
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.
126    * 
127    * Since: 1.4.
128    */
129   bool is_monospace() const;
130
131
132 public:
133
134 public:
135   //C++ methods used to invoke GTK+ virtual functions:
136 #ifdef GLIBMM_VFUNCS_ENABLED
137 #endif //GLIBMM_VFUNCS_ENABLED
138
139 protected:
140   //GTK+ Virtual Functions (override these to change behaviour):
141 #ifdef GLIBMM_VFUNCS_ENABLED
142 #endif //GLIBMM_VFUNCS_ENABLED
143
144   //Default Signal Handlers::
145 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
146 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
147
148
149 };
150
151 /*
152 struct FontFamilyRefPtrTraits
153 {
154   typedef Glib::RefPtr<FontFamily> CppType;
155   typedef PangoFontFamily *        CType;
156   typedef PangoFontFamily *        CTypeNonConst;
157
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);                        }
162 };
163 */
164
165 } // namespace Pango
166
167
168 namespace Glib
169 {
170   /** A Glib::wrap() method for this object.
171    * 
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.
175    *
176    * @relates Pango::FontFamily
177    */
178   Glib::RefPtr<Pango::FontFamily> wrap(PangoFontFamily* object, bool take_copy = false);
179 }
180
181
182 #endif /* _PANGOMM_FONTFAMILY_H */
183