Subversion Repositories Scribus

Rev

Rev 22125 | Rev 23710 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8175 avox 1
/*
2
 For general Scribus (>=1.3.2) copyright and licensing information please refer
3
 to the COPYING file provided with the program. Following this notice may exist
4
 a copyright and/or license notice that predates the release of Scribus 1.3.2
5
 for which a new license (GPL+exception) is in place.
6
 */
7
/***************************************************************************
8
pageitem.cpp  -  description
9
-------------------
10
    begin                : Sat Apr 7 2001
11
    copyright            : (C) 2001 by Franz Schmid
12
    email                : Franz.Schmid@altmuehlnet.de
13
        ***************************************************************************/
14
 
15
/***************************************************************************
16
*                                                                         *
17
*   This program is free software; you can redistribute it and/or modify  *
18
*   it under the terms of the GNU General Public License as published by  *
19
*   the Free Software Foundation; either version 2 of the License, or     *
20
*   (at your option) any later version.                                   *
21
*                                                                         *
22
***************************************************************************/
23
 
24
 
25
#ifndef SPECIALCHARS_H
26
#define SPECIALCHARS_H
27
 
28
 
10223 cbradney 29
#include <QString>
8175 avox 30
#include "scribusapi.h"
31
 
32
class SCRIBUS_API SpecialChars {
33
public:
34
        static QChar OBJECT;
35
        static QChar TAB;
36
        static QChar PARSEP;
37
        static QChar LINEBREAK;
22125 jghali 38
        static QChar OLD_LINEBREAK;
8175 avox 39
        static QChar COLBREAK;
40
        static QChar FRAMEBREAK;
41
        static QChar SHYPHEN;
42
        static QChar OLD_NBHYPHEN;
43
        static QChar OLD_NBSPACE;
44
        static QChar NBHYPHEN;
45
        static QChar NBSPACE;
46
        static QChar ZWNBSPACE;
47
        static QChar ZWSPACE;
21563 jghali 48
        static QChar ZWNJ;                      // break ligatures
49
        static QChar ZWJ;
8175 avox 50
        static QChar PAGENUMBER;
11713 fschmid 51
        static QChar PAGECOUNT;
8175 avox 52
        static QChar BLANK;
53
 
54
        static bool isBreak(QChar c, bool includeColBreak = true);
55
        static bool isBreakingSpace(QChar c);
56
        static bool isExpandingSpace(QChar c);
57
 
17254 fschmid 58
                enum {
59
                        CJK_FENCE_BEGIN = 0x0001,
60
                        CJK_FENCE_END = 0x0002,
61
                        CJK_NOTOP = 0x0003,
62
                        CJK_HYPHEN = 0x0004,
63
                        CJK_DELMITER = 0x0005,
64
                        CJK_MIDPOINT = 0x0006,
65
                        CJK_PERIOD = 0x0007,
66
                        CJK_COMMA = 0x0008,
67
                        CJK_BETWEEN = 0x0009,
68
                        CJK_PREFIX = 0x000a,
69
                        CJK_POSTFIX = 0x000b,
70
                        CJK_SPACE = 0x000c,
71
                        CJK_KANA = 0x000d,
72
                        CJK_KANJI = 0x000e,
73
 
74
                        CJK_CHAR_MASK = 0x00ff,
75
 
76
                        CJK_NOBREAK_BEFORE = 0x0100,
77
                        CJK_NOBREAK_AFTER = 0x0200,
78
                };
79
                static int getCJKAttr(QChar c);
21563 jghali 80
 
81
        static bool isCJK(uint ch);
22017 jghali 82
        static bool isLetterRequiringSpaceAroundCJK(uint ch);
21563 jghali 83
        static bool isIgnorableCodePoint(uint ch);
22127 jghali 84
        static bool isArabicModifierLetter(uint ch);
8175 avox 85
};
86
 
87
#endif