GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

context.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_PANGO_CONTEXT_HH 00025 #define GFC_PANGO_CONTEXT_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_PANGO_TYPES_HH 00032 #include <gfc/pango/types.hh> 00033 #endif 00034 00035 #ifndef __PANGO_CONTEXT_H__ 00036 #include <pango/pango-context.h> 00037 #endif 00038 00039 #ifndef _CPP_VECTOR 00040 #include <vector> 00041 #endif 00042 00043 namespace GFC { 00044 00045 namespace Gdk { 00046 class Colormap; 00047 class Screen; 00048 } 00049 00050 namespace Pango { 00051 00052 class AttrList; 00053 class AttrIterator; 00054 class Font; 00055 class FontDescription; 00056 class FontFamily; 00057 class FontMap; 00058 class Fontset; 00059 class FontMetrics; 00060 class Item; 00061 00066 00067 class Context : public G::Object 00068 { 00069 friend class G::Object; 00070 00071 Context(const Context&); 00072 Context& operator=(const Context&); 00073 00074 protected: 00077 00078 explicit Context(PangoContext *context, bool owns_reference = true); 00085 00087 00088 public: 00091 00092 virtual ~Context(); 00094 00096 00097 static Pointer<Pango::Context> get(const Gdk::Screen *screen = 0); 00105 00108 00109 PangoContext* pango_context() const; 00111 00112 operator PangoContext* () const; 00114 00115 Pointer<FontMetrics> get_metrics(const FontDescription& desc, PangoLanguage *language) const; 00131 00132 Pointer<FontDescription> get_font_description() const; 00135 00136 PangoLanguage* get_language() const; 00139 00140 Direction get_base_dir() const; 00143 00147 00148 bool list_families(std::vector<FontFamily*>& families) const; 00152 00153 Font* load_font(const FontDescription& desc) const; 00157 00158 Fontset* load_fontset(const FontDescription& desc, PangoLanguage *language) const; 00163 00164 void set_font_description(const FontDescription& desc); 00167 00168 void set_language(PangoLanguage *language); 00171 00172 void set_base_dir(Direction direction); 00175 00176 std::vector<Pointer<Item> > 00177 itemize(const String& text, const AttrList& attrs, AttrIterator *cached_iter = 0) const; 00193 00194 std::vector<Pointer<Item> > 00195 itemize(const char *text, int start_index, int length, const AttrList& attrs, AttrIterator *cached_iter = 0) const; 00213 00214 std::vector<Pointer<Item> > 00215 itemize(Direction direction, const String& text, const AttrList& attrs, AttrIterator *cached_iter = 0) const; 00224 00225 std::vector<Pointer<Item> > 00226 itemize(Direction direction, const char *text, int start_index, int length, const AttrList& attrs, AttrIterator *cached_iter = 0) const; 00237 00241 00242 void set_colormap(const Gdk::Colormap& colormap); 00249 00251 }; 00252 00253 } // namespace Pango 00254 00255 } // namespace GFC 00256 00257 #include <gfc/pango/inline/context.inl> 00258 00259 #endif // GFC_PANGO_CONTEXT_HH 00260

Generated on Tue Aug 24 00:34:30 2004 for GFC-UI by doxygen 1.3.8