~ubuntu-branches/debian/wheezy/cuneiform/wheezy

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/rfrmt/h/rfrmtfile.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-07-10 17:58:10 UTC
  • Revision ID: james.westby@ubuntu.com-20090710175810-rqc89d2i3tki9m89
Tags: upstream-0.7.0+dfsg
Import upstream version 0.7.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 1993-2008, Cognitive Technologies
 
3
All rights reserved.
 
4
 
 
5
����������� ��������� ��������������� � ������������� ��� � ���� ��������� ����,
 
6
��� � � �������� �����, � ����������� ��� ���, ��� ���������� ��������� �������:
 
7
 
 
8
      * ��� ��������� ��������������� ��������� ���� ������ ���������� ���������
 
9
        ���� ����������� �� ��������� �����, ���� ������ ������� � �����������
 
10
        ����� �� ��������.
 
11
      * ��� ��������� ��������������� ��������� ���� � ������������ �/��� �
 
12
        ������ ����������, ������������ ��� ���������������, ������ �����������
 
13
        ��������� ���� ���������� �� ��������� �����, ���� ������ ������� �
 
14
        ����������� ����� �� ��������.
 
15
      * �� �������� Cognitive Technologies, �� ����� �� ����������� �� �����
 
16
        ���� ������������ � �������� �������� ��������� �/��� �����������
 
17
        ���������, ���������� �� ���� ��, ��� ���������������� �����������
 
18
        ����������.
 
19
 
 
20
��� ��������� ������������� ����������� ��������� ���� �/��� ������� ������ "���
 
21
��� ����" ��� ������-���� ���� ��������, ���������� ���� ��� ���������������,
 
22
������� �������� ������������ �������� � ����������� ��� ���������� ����, �� ��
 
23
������������� ���. �� �������� ��������� ���� � �� ���� ������ ����, �������
 
24
����� �������� �/��� �������� �������������� ���������, �� � ���� ������ ��
 
25
��Ѩ� ���������������, ������� ����� �����, ���������, ����������� ���
 
26
������������� ������, ��������� � �������������� ��� ���������� ����������
 
27
������������� ������������� ��������� (������� ������ ������, ��� ������,
 
28
������� ���������, ��� ������ �/��� ������ �������, ���������� ��-�� ��������
 
29
������� ��� �/��� ������ ��������� �������� ��������� � ������� �����������,
 
30
�� �� ������������� ����� ��������), �� �� ������������� ���, ���� ���� �����
 
31
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
 
32
 
 
33
Redistribution and use in source and binary forms, with or without modification,
 
34
are permitted provided that the following conditions are met:
 
35
 
 
36
    * Redistributions of source code must retain the above copyright notice,
 
37
      this list of conditions and the following disclaimer.
 
38
    * Redistributions in binary form must reproduce the above copyright notice,
 
39
      this list of conditions and the following disclaimer in the documentation
 
40
      and/or other materials provided with the distribution.
 
41
    * Neither the name of the Cognitive Technologies nor the names of its
 
42
      contributors may be used to endorse or promote products derived from this
 
43
      software without specific prior written permission.
 
44
 
 
45
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 
46
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
47
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
48
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
 
49
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
50
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 
51
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 
52
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 
53
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
54
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
55
*/
 
56
 
 
57
// ============================================================================
 
58
// Written by Shahverdiev  Alik
 
59
// This file cration date: 10.18.98
 
60
//
 
61
// frmtfile.h
 
62
//
 
63
// ============================================================================
 
64
 
 
65
#ifndef __frmtfile_h__
 
66
#define __frmtfile_h__
 
67
#include <stdio.h>
 
68
#include "cstrdefs.h"
 
69
 
 
70
BOOL CreateInternalFileForFormatter(FILE *fpInternalFileName);
 
71
BOOL CheckComingLine( CSTR_line* Comingline );
 
72
BOOL CheckLineForFilling( CSTR_line* Comingline );
 
73
 
 
74
//BOOL CheckRect(InternalRect* Inner);
 
75
 
 
76
/////////////////////////////////////////////////////////////////////////////
 
77
 
 
78
class CFragment;
 
79
class CFString;
 
80
class CWord;
 
81
class CChar;
 
82
 
 
83
class CRtfString;
 
84
 
 
85
struct PageElementCount
 
86
{
 
87
 WORD  Frags;
 
88
 WORD  Strings;
 
89
 WORD  Words;
 
90
 WORD  Chars;
 
91
};
 
92
 
 
93
typedef struct tagInternalRect {
 
94
 Int16 left;
 
95
 Int16 top;
 
96
 Int16 right;
 
97
 Int16 bottom;
 
98
 } InternalRect;
 
99
 
 
100
 
 
101
void VCopyRect(InternalRect* InnerR, RECT* OuterR);
 
102
BOOL CheckRect(InternalRect* Inner);
 
103
 
 
104
 
 
105
/////////////////////////////////////////////////////////////////////////////
 
106
// Page class
 
107
 
 
108
class CFPage //: public CObject
 
109
{
 
110
public:
 
111
  CFPage();
 
112
 ~CFPage();
 
113
 
 
114
  CFragment*       GetFirstFrag();
 
115
  CFragment*       GetNextFrag();
 
116
  void             ProcessingComingLine( CSTR_line* line );
 
117
                void             CreateArray_For_TextFragments( );
 
118
  BOOL             CheckComingLine_For_TextFragments( CSTR_line* line );
 
119
         void             AddString( CSTR_line* line );
 
120
  BOOL              Write();
 
121
 
 
122
  /*CDWordArray*/std::vector<DWORD>      FragmentsArray;
 
123
                PageElementCount Count;
 
124
         WORD             m_wDpi;
 
125
         std::vector<CFragment*>/*CObArray*/            m_arFrags;
 
126
  int                       m_nIndex;
 
127
  int              m_nCurFragNumber;
 
128
  int              m_nPrevFragNumber;
 
129
};
 
130
 
 
131
 
 
132
/////////////////////////////////////////////////////////////////////////////
 
133
// Fragment class
 
134
 
 
135
class CFragment//:public CObject
 
136
{
 
137
public:
 
138
  CFragment();
 
139
 ~CFragment();
 
140
 
 
141
  CFString*      GetFirstString();
 
142
  CFString*      GetNextString();
 
143
  void       AddString( CSTR_line* line , PageElementCount* Count );
 
144
  BOOL       Write();
 
145
 
 
146
  WORD           m_wStringsCount;
 
147
  /*CObArray*/ std::vector<CFString*>    m_arStrings;
 
148
  WORD       m_wIndex;
 
149
  RECT       m_rectFrag;
 
150
  WORD       m_wType;
 
151
  DWORD      m_wUserNumber;
 
152
  DWORD      m_Flags;
 
153
};
 
154
 
 
155
/////////////////////////////////////////////////////////////////////////////
 
156
// String class
 
157
 
 
158
class CFString//:public CObject
 
159
{
 
160
public:
 
161
  CFString();
 
162
 ~CFString();
 
163
 
 
164
  CWord*          GetFirstWord();
 
165
  CWord*          GetNextWord();
 
166
  void                    ExtractWordsFromString( CSTR_line* line ,  PageElementCount* Count );
 
167
  void            ExtractNextWord( CSTR_line* line );
 
168
  BOOL            Write();
 
169
 
 
170
  WORD                m_wWordsCount;
 
171
  /*CObArray*/ std::vector<CWord*>        m_arWords;
 
172
  WORD            m_wIndex;
 
173
  CFragment*      m_Frag;
 
174
  RECT            m_rectString;
 
175
  WORD            m_wType;
 
176
  RECT                m_rectBaseLine;
 
177
  Word32          S_Flags; //NEGA_STR vmk 10-06-2001
 
178
};
 
179
 
 
180
/////////////////////////////////////////////////////////////////////////////
 
181
// Word class
 
182
 
 
183
class CWord//:public CObject
 
184
{
 
185
public:
 
186
  CWord();
 
187
 ~CWord();
 
188
 
 
189
  CChar*          GetFirstChar();
 
190
  CChar*          GetNextChar();
 
191
  void            AddLetter2Word( CSTR_rast* rast , PageElementCount* Count ,BOOL* FlagCapDrop);
 
192
  BOOL             Write();
 
193
 
 
194
  /*CObArray*/std::vector<CChar*>        m_arChars;
 
195
  WORD             m_wCharsCount;
 
196
  WORD             m_wIndex;
 
197
  CFString*       m_String;
 
198
  RECT            m_rectWord;
 
199
  WORD             m_wFontNumber;
 
200
  WORD             m_wFontPointSize;
 
201
};
 
202
 
 
203
/////////////////////////////////////////////////////////////////////////////
 
204
// Char class
 
205
 
 
206
class CChar//:public CObject
 
207
{
 
208
public:
 
209
        CChar();
 
210
        ~CChar();
 
211
        void         AddingLetter( CSTR_rast* rast , int index ,BOOL* FlagCapDrop);
 
212
        BOOL         Write();
 
213
 
 
214
        RECT           m_rectChar;
 
215
        RECT           m_RealRectChar;
 
216
        struct
 
217
        {
 
218
                BYTE       m_bChar;
 
219
                BYTE       m_bProbability;
 
220
        } m_chrVersions[REC_MAX_VERS];//!!! Art
 
221
        BYTE         m_blanguage;
 
222
        BYTE         m_bFlg_spell;
 
223
        BYTE         m_bFlg_spell_nocarrying;
 
224
        BYTE         m_bFlg_cup_drop;
 
225
        WORD         m_wCountAlt;
 
226
        WORD         m_wFontNumber;
 
227
        WORD         m_wIndex;
 
228
 };
 
229
 
 
230
/////////////////////////////////////////////////////////////////////////////
 
231
 
 
232
#endif // __frmtfile_h__