Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# context.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002-2003 The Inti 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 INTI_PANGO_CONTEXT_H
    00025 #define INTI_PANGO_CONTEXT_H
    00026
    00027 #ifndef INTI_G_OBJECT_H
    00028 #include <inti/glib/object.h>
    00029 #endif
    00030
    00031 #ifndef INTI_PANGO_TYPES_H
    00032 #include <inti/pango/types.h>
    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 Inti {
    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 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 { return (PangoContext*)instance; }
    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> > itemize(const String& text, const AttrList& attrs) const;
    00185
    00186         std::vector<Pointer<Item> > itemize(const String& text, int start_index, int length, const AttrList& attrs,
    00187                                             AttrIterator *cached_iter) const;
    00205
    00209
    00210         void set_colormap(const Gdk::Colormap& colormap);
    00217
    00219 };
    00220
    00221 } // namespace Pango
    00222
    00223 } // namespace Inti
    00224
    00225 #endif // INTI_PANGO_CONTEXT_H
    00226

Main Page - Footer