add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / pango / pangomm / fontset.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _PANGOMM_FONTSET_H
4 #define _PANGOMM_FONTSET_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* fontset.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 #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>
35
36
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _PangoFontset PangoFontset;
39 typedef struct _PangoFontsetClass PangoFontsetClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
42
43 namespace Pango
44 { class Fontset_Class; } // namespace Pango
45 namespace Pango
46 {
47
48 /** A Pango::Fontset is used to represent a set of fonts.
49  */
50
51 class Fontset : public Glib::Object
52 {
53   
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55
56 public:
57   typedef Fontset CppObjectType;
58   typedef Fontset_Class CppClassType;
59   typedef PangoFontset BaseObjectType;
60   typedef PangoFontsetClass BaseClassType;
61
62 private:  friend class Fontset_Class;
63   static CppClassType fontset_class_;
64
65 private:
66   // noncopyable
67   Fontset(const Fontset&);
68   Fontset& operator=(const Fontset&);
69
70 protected:
71   explicit Fontset(const Glib::ConstructParams& construct_params);
72   explicit Fontset(PangoFontset* castitem);
73
74 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
75
76 public:
77   virtual ~Fontset();
78
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80   static GType get_type()      G_GNUC_CONST;
81   static GType get_base_type() G_GNUC_CONST;
82 #endif
83
84   ///Provides access to the underlying C GObject.
85   PangoFontset*       gobj()       { return reinterpret_cast<PangoFontset*>(gobject_); }
86
87   ///Provides access to the underlying C GObject.
88   const PangoFontset* gobj() const { return reinterpret_cast<PangoFontset*>(gobject_); }
89
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();
92
93 private:
94
95
96 public:
97   
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
101    * with the font.
102    */
103   Glib::RefPtr<Font> get_font(guint wc) const;
104   
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.
108    */
109   FontMetrics get_metrics() const;
110
111   /** For instance,
112    * bool on_foreach(const Glib::RefPtr<Pango::Font>& font);
113    */
114   typedef sigc::slot< bool, const Glib::RefPtr<Font>& > ForeachSlot;
115
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.
118    *
119    * @since-1.4
120    *
121    * @param slot Callback function
122    */
123   void foreach(const ForeachSlot& slot);
124   
125
126 public:
127
128 public:
129   //C++ methods used to invoke GTK+ virtual functions:
130 #ifdef GLIBMM_VFUNCS_ENABLED
131 #endif //GLIBMM_VFUNCS_ENABLED
132
133 protected:
134   //GTK+ Virtual Functions (override these to change behaviour):
135 #ifdef GLIBMM_VFUNCS_ENABLED
136 #endif //GLIBMM_VFUNCS_ENABLED
137
138   //Default Signal Handlers::
139 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
140 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
141
142
143 };
144
145 } /* namespace Pango */
146
147
148 namespace Glib
149 {
150   /** A Glib::wrap() method for this object.
151    * 
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.
155    *
156    * @relates Pango::Fontset
157    */
158   Glib::RefPtr<Pango::Fontset> wrap(PangoFontset* object, bool take_copy = false);
159 }
160
161
162 #endif /* _PANGOMM_FONTSET_H */
163