Main Page - Header
Author: The Inti Development Team

Reference Manual

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

# item.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_ITEM_H
    00025 #define INTI_PANGO_ITEM_H
    00026
    00027 #ifndef INTI_OBJECT_H
    00028 #include <inti/object.h>
    00029 #endif
    00030
    00031 #ifndef __PANGO_ITEM_H__
    00032 #include <pango/pango-item.h>
    00033 #endif
    00034
    00035 #ifndef _CPP_VECTOR
    00036 #include <vector>
    00037 #endif
    00038
    00039 namespace Inti {
    00040
    00041 namespace Pango {
    00042
    00043 class Attribute;
    00044 class Font;
    00045
    00053
    00054 class Analysis
    00055 {
    00056         PangoAnalysis analysis_;
    00057
    00058 public:
    00061
    00062         PangoAnalysis* pango_analysis() const { return const_cast<PangoAnalysis*>(&analysis_); }
    00064
    00065         PangoEngineShape* shape_engine() const;
    00067
    00068         PangoEngineLang* lang_engine() const;
    00070
    00071         Pango::Font *font() const;
    00073
    00074         guint8 level() const;
    00076
    00077         PangoLanguage* language() const;
    00079
    00080         bool extra_attributes(std::vector<Pointer<Attribute> >& attrs) const;
    00084
    00086 };
    00087
    00093 class Item : public ReferencedObject
    00094 {
    00095         PangoItem *item_;
    00096
    00097 public:
    00100
    00101         Item();
    00103
    00104         explicit Item(PangoItem *item, bool copy);
    00114
    00115         Item(const Item& src);
    00118
    00119         ~Item();
    00121
    00122         Item& operator=(const Item& src);
    00125
    00129
    00130         PangoItem* pango_item() const { return (PangoItem*)item_; }
    00132
    00133         operator PangoItem* () const;
    00135
    00136         int offset() const;
    00138
    00139         int length() const;
    00141
    00142         int num_chars() const;
    00144
    00145         const Analysis& analysis() const;
    00147
    00151
    00152         Pointer<Item> split(int split_index, int split_offset);
    00166
    00168 };
    00169
    00172
    00173         std::vector<Pointer<Item> > reorder_items(const std::vector<Pointer<Item> >& logical_items);
    00181
    00183
    00184 } // namespace Pango
    00185
    00186 } // namespace Inti
    00187
    00188 #endif // INTI_PANGO_ITEM_H
    00189

Main Page - Footer