|
1 /* |
|
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Header PDRREADR.H |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __PDRREADR_H__ |
|
21 #define __PDRREADR_H__ |
|
22 |
|
23 #include "LEXICAL.H" |
|
24 #include "PDRRECRD.H" |
|
25 #include "READER.H" |
|
26 /** |
|
27 Resource identifiers |
|
28 @internalComponent |
|
29 */ |
|
30 const String IdentResources("Resources"); |
|
31 const String IdentTranslates("Translates"); |
|
32 const String IdentFontInfo("FontInfo"); |
|
33 const String IdentTypefaceFonts("TypefaceFonts"); |
|
34 const String IdentModel("Model"); |
|
35 const String IdentPdrStoreFile("PdrStoreFile"); |
|
36 //const String IdentExtraInfo("ExtraInfo"); |
|
37 /** |
|
38 Resources identifiers |
|
39 @internalComponent |
|
40 */ |
|
41 const String IdentEndResources("EndResources"); |
|
42 |
|
43 /** |
|
44 Translates identifiers |
|
45 @internalComponent |
|
46 */ |
|
47 const String IdentEndTranslates("EndTranslates"); |
|
48 /** |
|
49 Codesection identifiers |
|
50 @internalComponent |
|
51 */ |
|
52 const String IdentEndCodeSection("EndCodeSection"); |
|
53 |
|
54 /** |
|
55 Fontinfo identifiers |
|
56 @internalComponent |
|
57 */ |
|
58 const String IdentEndFontInfo("EndFontInfo"); |
|
59 const String IdentAscent("Ascent"); |
|
60 const String IdentMaxNormalCharWidth("MaxNormalCharWidth"); |
|
61 const String IdentCodeSection("CodeSection"); |
|
62 |
|
63 /** |
|
64 Fontheight identifiers |
|
65 @internalComponent |
|
66 */ |
|
67 const String IdentEndFontHeight("EndFontHeight"); |
|
68 const String IdentHeight("Height"); |
|
69 const String IdentWidthScale("WidthScale"); |
|
70 const String IdentNormal("Normal"); |
|
71 const String IdentBold("Bold"); |
|
72 const String IdentItalic("Italic"); |
|
73 const String IdentBoldItalic("BoldItalic"); |
|
74 const String IdentCommand("Command"); |
|
75 |
|
76 /** |
|
77 Scalable fontheight identifiers |
|
78 @internalComponent |
|
79 */ |
|
80 const String IdentEndScalableFontHeight("EndScalableFontHeight"); |
|
81 const String IdentHeightMin("HeightMin"); |
|
82 const String IdentHeightMax("HeightMax"); |
|
83 const String IdentHeightDelta("HeightDelta"); |
|
84 // uses FontHeight IdentNormal etc |
|
85 /** |
|
86 Typefacefonts identifiers |
|
87 @internalComponent |
|
88 */ |
|
89 const String IdentEndTypefaceFonts("EndTypefaceFonts"); |
|
90 const String IdentTypefaceTranslates("Translates"); |
|
91 const String IdentTypefaceName("Name"); |
|
92 const String IdentProportional("Proportional"); |
|
93 const String IdentSerif("Serif"); |
|
94 const String IdentSymbol("Symbol"); |
|
95 const String IdentFontHeight("FontHeight"); |
|
96 const String IdentScalableFontHeight("ScalableFontHeight"); |
|
97 |
|
98 // Extra info identifiers |
|
99 //const String IdentEndExtraInfo("EndExtraInfo"); |
|
100 /** |
|
101 Model identifiers |
|
102 @internalComponent |
|
103 */ |
|
104 const String IdentEndModel("EndModel"); |
|
105 const String IdentModelName("Name"); |
|
106 const String IdentRequiresPrinterPort("RequiresPrinterPort"); |
|
107 const String IdentModelFlags("Flags"); |
|
108 const String IdentModelUid("Uid"); |
|
109 const String IdentModelResources("Resources"); |
|
110 const String IdentKPixelWidth("KPixelWidth"); |
|
111 const String IdentKPixelHeight("KPixelHeight"); |
|
112 const String IdentPortraitOffset("PortraitOffset"); |
|
113 const String IdentLandscapeOffset("LandscapeOffset"); |
|
114 const String IdentMinMarginLeft("MinMarginLeft"); |
|
115 const String IdentMinMarginRight("MinMarginRight"); |
|
116 const String IdentMinMarginTop("MinMarginTop"); |
|
117 const String IdentMinMarginBottom("MinMarginBottom"); |
|
118 const String IdentDisplayMode("DisplayMode"); |
|
119 const String IdentTypefaceFontss("TypefaceFontss"); |
|
120 const String IdentSpareRecord("SpareRecord"); |
|
121 |
|
122 /** |
|
123 Typefacefontsentry identifiers |
|
124 @internalComponent |
|
125 */ |
|
126 const String IdentEndTypefaceFontss("EndTypefaceFontss"); |
|
127 const String IdentNotInPortrait("NotInPortrait"); |
|
128 const String IdentNotInLandscape("NotInLandscape"); |
|
129 |
|
130 /** |
|
131 Pdrstorefile identifiers |
|
132 @internalComponent |
|
133 */ |
|
134 const String IdentEndPdrStoreFile("EndPdrStoreFile"); |
|
135 const String IdentPDLName("PDLName"); |
|
136 const String IdentPDLUid("PDLUid"); |
|
137 const String IdentModels("Models"); |
|
138 const String IdentEndModels("EndModels"); |
|
139 |
|
140 class PdrReader : public Reader |
|
141 /** |
|
142 @internalComponent |
|
143 */ |
|
144 { |
|
145 public: |
|
146 IMPORT_C PdrReader(); |
|
147 IMPORT_C boolean Read(const String& aFilename); |
|
148 IMPORT_C ~PdrReader(); |
|
149 boolean ReadResources(); |
|
150 boolean ReadTranslates(); |
|
151 boolean ReadCodeSection(int aCode); |
|
152 boolean ReadFontInfo(); |
|
153 boolean ReadStyle(); |
|
154 boolean ReadFontHeight(); |
|
155 boolean ReadScalableFontHeight(); |
|
156 boolean ReadTypefaceFonts(); |
|
157 boolean ReadModel(); |
|
158 boolean ReadPdrStoreFile(); |
|
159 IMPORT_C boolean Store(const String& aFilename); |
|
160 boolean Command(String& aCommand); |
|
161 // boolean ReadExtraInfo(); |
|
162 protected: |
|
163 PdrModelStore iPdrModelStore; |
|
164 PdrStoreFile* iPdrStoreFile; |
|
165 PdrResources* iResources; |
|
166 PdrTranslates* iTranslates; |
|
167 WidthsCodeSection* iCodeSection; |
|
168 FontInfo* iFontInfo; |
|
169 StyleIndex iIndex; |
|
170 PdrFontHeight* iFontHeight; |
|
171 TypefaceFonts* iTypefaceFonts; |
|
172 PrinterModelHeader* iModel; |
|
173 }; |
|
174 |
|
175 #endif |