Reference Manual

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

# break.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_BREAK_H
    00025 #define INTI_PANGO_BREAK_H
    00026
    00027 #ifndef INTI_UTF_STRING_H
    00028 #include <inti/utf-string.h>
    00029 #endif
    00030
    00031 #ifndef __PANGO_BREAK_H__
    00032 #include <pango/pango-break.h>
    00033 #endif
    00034
    00035 #ifndef _CPP_VECTOR
    00036 #include <vector>
    00037 #endif
    00038
    00039 namespace Inti {
    00040
    00041 namespace Pango {
    00042
    00043 class Analysis;
    00044
    00049
    00050 class LogAttr
    00051 {
    00052         PangoLogAttr attr_;
    00053
    00054 public:
    00057
    00058         LogAttr();
    00060
    00064
    00065         PangoLogAttr* pango_log_attr() const { return const_cast<PangoLogAttr*>(&attr_); }
    00067
    00068         operator PangoLogAttr* () const;
    00070
    00071         bool is_line_break() const;
    00073
    00074         bool is_mandatory_break() const;
    00076
    00077         bool is_char_break() const;
    00079
    00080         bool is_white() const;
    00082
    00083         bool is_cursor_position() const;
    00086
    00087         bool is_word_start() const;
    00089
    00090         bool is_word_end() const;
    00092
    00093         bool is_sentence_boundary() const;
    00100
    00101         bool is_sentence_start() const;
    00103
    00104         bool is_sentence_end() const;
    00106
    00110
    00111         void set_is_line_break(bool setting);
    00114
    00115         void set_is_mandatory_break(bool setting);
    00118
    00119         void set_is_char_break(bool setting);
    00122
    00123         void set_is_white(bool setting);
    00126
    00127         void set_is_cursor_position(bool setting);
    00131
    00132         void set_is_word_start(bool setting);
    00135
    00136         void set_is_word_end(bool setting);
    00139
    00140         void set_is_sentence_boundary(bool setting);
    00143
    00144         void set_is_sentence_start(bool setting);
    00147
    00148         void set_is_sentence_end(bool setting);
    00151
    00153 };
    00154
    00157
    00158 void break_text(const String& text, const Analysis& analysis, std::vector<LogAttr>& attrs);
    00163
    00164 void find_paragraph_boundary(const String& text, int *paragraph_delimiter_index, int *next_paragraph_start);
    00176
    00177 void get_log_attrs(const String& text, PangoLanguage *language, std::vector<LogAttr>& attrs, int level = -1);
    00189
    00191
    00192 } // namespace Pango
    00193
    00194 } // namespace Inti
    00195
    00196 #endif // INTI_PANGO_BREAK_H
    00197

Main Page - Footer