OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_INCLUDE_FXFA_FXFA_OBJECTACC_H_ | |
8 #define XFA_INCLUDE_FXFA_FXFA_OBJECTACC_H_ | |
9 | |
10 #include "core/fxge/include/fx_dib.h" | |
11 #include "xfa/fxfa/parser/xfa_object.h" | |
12 | |
13 class CXFA_Node; | |
14 class IFX_Locale; | |
15 class CXFA_Margin; | |
16 class CXFA_Caption; | |
17 class CXFA_Para; | |
18 class CXFA_Event; | |
19 class CXFA_Script; | |
20 class CXFA_Value; | |
21 class CXFA_Calculate; | |
22 class CXFA_Line; | |
23 class CXFA_Text; | |
24 class CXFA_ExData; | |
25 class CXFA_Image; | |
26 class CXFA_Validate; | |
27 class CXFA_Bind; | |
28 class CXFA_Assist; | |
29 class CXFA_ToolTip; | |
30 class CXFA_Submit; | |
31 class CXFA_BindItems; | |
32 class CXFA_Stroke; | |
33 class CXFA_Corner; | |
34 class CXFA_Edge; | |
35 class CXFA_Box; | |
36 class CXFA_Arc; | |
37 class CXFA_Border; | |
38 class CXFA_Rectangle; | |
39 class CXFA_WidgetData; | |
40 class CXFA_Occur; | |
41 | |
42 inline FX_BOOL XFA_IsSpace(FX_WCHAR c) { | |
43 return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09); | |
44 } | |
45 inline FX_BOOL XFA_IsDigit(FX_WCHAR c) { | |
46 return c >= '0' && c <= '9'; | |
47 } | |
48 typedef CFX_ArrayTemplate<CXFA_Object*> CXFA_ObjArray; | |
49 | |
50 class CXFA_Data { | |
51 public: | |
52 explicit CXFA_Data(CXFA_Node* pNode) : m_pNode(pNode) {} | |
53 | |
54 operator bool() const { return !!m_pNode; } | |
55 CXFA_Node* GetNode() const { return m_pNode; } | |
56 XFA_ELEMENT GetClassID() const; | |
57 | |
58 protected: | |
59 FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, | |
60 FX_FLOAT& fValue, | |
61 FX_BOOL bUseDefault = FALSE) const; | |
62 FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue); | |
63 | |
64 CXFA_Node* m_pNode; | |
65 }; | |
66 | |
67 class CXFA_Fill : public CXFA_Data { | |
68 public: | |
69 explicit CXFA_Fill(CXFA_Node* pNode); | |
70 ~CXFA_Fill(); | |
71 | |
72 int32_t GetPresence(); | |
73 FX_ARGB GetColor(FX_BOOL bText = FALSE); | |
74 int32_t GetFillType(); | |
75 int32_t GetPattern(FX_ARGB& foreColor); | |
76 int32_t GetStipple(FX_ARGB& stippleColor); | |
77 int32_t GetLinear(FX_ARGB& endColor); | |
78 int32_t GetRadial(FX_ARGB& endColor); | |
79 void SetColor(FX_ARGB color); | |
80 }; | |
81 | |
82 class CXFA_Margin : public CXFA_Data { | |
83 public: | |
84 explicit CXFA_Margin(CXFA_Node* pNode); | |
85 FX_BOOL GetLeftInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const; | |
86 FX_BOOL GetTopInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const; | |
87 FX_BOOL GetRightInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const; | |
88 FX_BOOL GetBottomInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const; | |
89 }; | |
90 | |
91 class CXFA_Font : public CXFA_Data { | |
92 public: | |
93 explicit CXFA_Font(CXFA_Node* pNode); | |
94 | |
95 FX_FLOAT GetBaselineShift(); | |
96 FX_FLOAT GetHorizontalScale(); | |
97 FX_FLOAT GetVerticalScale(); | |
98 FX_FLOAT GetLetterSpacing(); | |
99 int32_t GetLineThrough(); | |
100 int32_t GetUnderline(); | |
101 int32_t GetUnderlinePeriod(); | |
102 FX_FLOAT GetFontSize(); | |
103 void GetTypeface(CFX_WideStringC& wsTypeFace); | |
104 | |
105 FX_BOOL IsBold(); | |
106 FX_BOOL IsItalic(); | |
107 | |
108 FX_ARGB GetColor(); | |
109 void SetColor(FX_ARGB color); | |
110 | |
111 }; | |
112 | |
113 class CXFA_Caption : public CXFA_Data { | |
114 public: | |
115 explicit CXFA_Caption(CXFA_Node* pNode); | |
116 | |
117 int32_t GetPresence(); | |
118 int32_t GetPlacementType(); | |
119 FX_FLOAT GetReserve(); | |
120 CXFA_Margin GetMargin(); | |
121 CXFA_Font GetFont(); | |
122 CXFA_Value GetValue(); | |
123 }; | |
124 | |
125 class CXFA_Para : public CXFA_Data { | |
126 public: | |
127 explicit CXFA_Para(CXFA_Node* pNode); | |
128 | |
129 int32_t GetHorizontalAlign(); | |
130 int32_t GetVerticalAlign(); | |
131 FX_FLOAT GetLineHeight(); | |
132 FX_FLOAT GetMarginLeft(); | |
133 FX_FLOAT GetMarginRight(); | |
134 FX_FLOAT GetSpaceAbove(); | |
135 FX_FLOAT GetSpaceBelow(); | |
136 FX_FLOAT GetTextIndent(); | |
137 }; | |
138 | |
139 enum XFA_TEXTENCODING { | |
140 XFA_TEXTENCODING_None, | |
141 XFA_TEXTENCODING_Big5, | |
142 XFA_TEXTENCODING_FontSpecific, | |
143 XFA_TEXTENCODING_GBK, | |
144 XFA_TEXTENCODING_GB18030, | |
145 XFA_TEXTENCODING_GB2312, | |
146 XFA_TEXTENCODING_ISO8859NN, | |
147 XFA_TEXTENCODING_KSC5601, | |
148 XFA_TEXTENCODING_ShiftJIS, | |
149 XFA_TEXTENCODING_UCS2, | |
150 XFA_TEXTENCODING_UTF16, | |
151 XFA_TEXTENCODING_UTF8 | |
152 }; | |
153 | |
154 class CXFA_Event : public CXFA_Data { | |
155 public: | |
156 explicit CXFA_Event(CXFA_Node* pNode); | |
157 | |
158 int32_t GetActivity(); | |
159 int32_t GetEventType(); | |
160 void GetRef(CFX_WideStringC& wsRef); | |
161 | |
162 | |
163 CXFA_Script GetScript(); | |
164 CXFA_Submit GetSubmit(); | |
165 | |
166 void GetSignDataTarget(CFX_WideString& wsTarget); | |
167 }; | |
168 | |
169 enum XFA_SCRIPTTYPE { | |
170 XFA_SCRIPTTYPE_Formcalc = 0, | |
171 XFA_SCRIPTTYPE_Javascript, | |
172 XFA_SCRIPTTYPE_Unkown, | |
173 }; | |
174 | |
175 class CXFA_Script : public CXFA_Data { | |
176 public: | |
177 explicit CXFA_Script(CXFA_Node* pNode); | |
178 | |
179 XFA_SCRIPTTYPE GetContentType(); | |
180 int32_t GetRunAt(); | |
181 void GetExpression(CFX_WideString& wsExpression); | |
182 }; | |
183 | |
184 class CXFA_Submit : public CXFA_Data { | |
185 public: | |
186 explicit CXFA_Submit(CXFA_Node* pNode); | |
187 | |
188 FX_BOOL IsSubmitEmbedPDF(); | |
189 int32_t GetSubmitFormat(); | |
190 void GetSubmitTarget(CFX_WideStringC& wsTarget); | |
191 void GetSubmitXDPContent(CFX_WideStringC& wsContent); | |
192 }; | |
193 | |
194 class CXFA_Value : public CXFA_Data { | |
195 public: | |
196 explicit CXFA_Value(CXFA_Node* pNode) : CXFA_Data(pNode) {} | |
197 | |
198 XFA_ELEMENT GetChildValueClassID(); | |
199 FX_BOOL GetChildValueContent(CFX_WideString& wsContent); | |
200 CXFA_Arc GetArc(); | |
201 CXFA_Line GetLine(); | |
202 CXFA_Rectangle GetRectangle(); | |
203 CXFA_Text GetText(); | |
204 CXFA_ExData GetExData(); | |
205 CXFA_Image GetImage(); | |
206 }; | |
207 | |
208 class CXFA_Line : public CXFA_Data { | |
209 public: | |
210 explicit CXFA_Line(CXFA_Node* pNode) : CXFA_Data(pNode) {} | |
211 | |
212 int32_t GetHand(); | |
213 FX_BOOL GetSlop(); | |
214 CXFA_Edge GetEdge(); | |
215 }; | |
216 | |
217 class CXFA_Text : public CXFA_Data { | |
218 public: | |
219 explicit CXFA_Text(CXFA_Node* pNode); | |
220 | |
221 void GetContent(CFX_WideString& wsText); | |
222 }; | |
223 | |
224 class CXFA_ExData : public CXFA_Data { | |
225 public: | |
226 explicit CXFA_ExData(CXFA_Node* pNode); | |
227 | |
228 FX_BOOL SetContentType(const CFX_WideString& wsContentType); | |
229 }; | |
230 | |
231 class CXFA_Image : public CXFA_Data { | |
232 public: | |
233 CXFA_Image(CXFA_Node* pNode, FX_BOOL bDefValue); | |
234 | |
235 int32_t GetAspect(); | |
236 FX_BOOL GetContentType(CFX_WideString& wsContentType); | |
237 FX_BOOL GetHref(CFX_WideString& wsHref); | |
238 int32_t GetTransferEncoding(); | |
239 FX_BOOL GetContent(CFX_WideString& wsText); | |
240 FX_BOOL SetContentType(const CFX_WideString& wsContentType); | |
241 FX_BOOL SetHref(const CFX_WideString& wsHref); | |
242 FX_BOOL SetTransferEncoding(int32_t iTransferEncoding); | |
243 | |
244 protected: | |
245 FX_BOOL m_bDefValue; | |
246 }; | |
247 | |
248 class CXFA_Calculate : public CXFA_Data { | |
249 public: | |
250 explicit CXFA_Calculate(CXFA_Node* pNode); | |
251 | |
252 int32_t GetOverride(); | |
253 CXFA_Script GetScript(); | |
254 void GetMessageText(CFX_WideString& wsMessage); | |
255 }; | |
256 | |
257 class CXFA_Validate : public CXFA_Data { | |
258 public: | |
259 explicit CXFA_Validate(CXFA_Node* pNode); | |
260 | |
261 int32_t GetFormatTest(); | |
262 int32_t GetNullTest(); | |
263 FX_BOOL SetNullTest(CFX_WideString wsValue); | |
264 int32_t GetScriptTest(); | |
265 void GetFormatMessageText(CFX_WideString& wsMessage); | |
266 void SetFormatMessageText(CFX_WideString wsMessage); | |
267 void GetNullMessageText(CFX_WideString& wsMessage); | |
268 void SetNullMessageText(CFX_WideString wsMessage); | |
269 void GetScriptMessageText(CFX_WideString& wsMessage); | |
270 void SetScriptMessageText(CFX_WideString wsMessage); | |
271 void GetPicture(CFX_WideString& wsPicture); | |
272 CXFA_Script GetScript(); | |
273 | |
274 protected: | |
275 void GetMessageText(CFX_WideString& wsMessage, | |
276 const CFX_WideStringC& wsMessageType); | |
277 void SetMessageText(CFX_WideString& wsMessage, | |
278 const CFX_WideStringC& wsMessageType); | |
279 FX_BOOL SetTestValue(int32_t iType, | |
280 CFX_WideString& wsValue, | |
281 XFA_ATTRIBUTEENUM eName); | |
282 }; | |
283 | |
284 class CXFA_Bind : public CXFA_Data { | |
285 public: | |
286 explicit CXFA_Bind(CXFA_Node* pNode); | |
287 | |
288 void GetPicture(CFX_WideString& wsPicture); | |
289 }; | |
290 | |
291 class CXFA_Assist : public CXFA_Data { | |
292 public: | |
293 explicit CXFA_Assist(CXFA_Node* pNode); | |
294 | |
295 CXFA_ToolTip GetToolTip(); | |
296 }; | |
297 | |
298 class CXFA_ToolTip : public CXFA_Data { | |
299 public: | |
300 explicit CXFA_ToolTip(CXFA_Node* pNode); | |
301 | |
302 FX_BOOL GetTip(CFX_WideString& wsTip); | |
303 }; | |
304 | |
305 class CXFA_BindItems : public CXFA_Data { | |
306 public: | |
307 explicit CXFA_BindItems(CXFA_Node* pNode); | |
308 | |
309 void GetLabelRef(CFX_WideStringC& wsLabelRef); | |
310 void GetValueRef(CFX_WideStringC& wsValueRef); | |
311 void GetRef(CFX_WideStringC& wsRef); | |
312 FX_BOOL SetConnection(const CFX_WideString& wsConnection); | |
313 }; | |
314 | |
315 #define XFA_STROKE_SAMESTYLE_NoPresence 1 | |
316 #define XFA_STROKE_SAMESTYLE_Corner 2 | |
317 | |
318 class CXFA_Stroke : public CXFA_Data { | |
319 public: | |
320 explicit CXFA_Stroke(CXFA_Node* pNode) : CXFA_Data(pNode) {} | |
321 | |
322 bool IsCorner() const { return GetClassID() == XFA_ELEMENT_Corner; } | |
323 bool IsEdge() const { return GetClassID() == XFA_ELEMENT_Edge; } | |
324 bool IsVisible() const { return GetPresence() == XFA_ATTRIBUTEENUM_Visible; } | |
325 int32_t GetPresence() const; | |
326 int32_t GetCapType() const; | |
327 int32_t GetStrokeType() const; | |
328 FX_FLOAT GetThickness() const; | |
329 CXFA_Measurement GetMSThickness() const; | |
330 void SetMSThickness(CXFA_Measurement msThinkness); | |
331 FX_ARGB GetColor() const; | |
332 void SetColor(FX_ARGB argb); | |
333 int32_t GetJoinType() const; | |
334 FX_BOOL IsInverted() const; | |
335 FX_FLOAT GetRadius() const; | |
336 FX_BOOL SameStyles(CXFA_Stroke stroke, uint32_t dwFlags = 0) const; | |
337 }; | |
338 | |
339 class CXFA_Corner : public CXFA_Stroke { | |
340 public: | |
341 explicit CXFA_Corner(CXFA_Node* pNode) : CXFA_Stroke(pNode) {} | |
342 }; | |
343 | |
344 class CXFA_Edge : public CXFA_Stroke { | |
345 public: | |
346 explicit CXFA_Edge(CXFA_Node* pNode) : CXFA_Stroke(pNode) {} | |
347 }; | |
348 | |
349 typedef CFX_ArrayTemplate<CXFA_Stroke> CXFA_StrokeArray; | |
350 typedef CFX_ArrayTemplate<CXFA_Edge> CXFA_EdgeArray; | |
351 typedef CFX_ArrayTemplate<CXFA_Corner> CXFA_CornerArray; | |
352 | |
353 class CXFA_Box : public CXFA_Data { | |
354 public: | |
355 explicit CXFA_Box(CXFA_Node* pNode) : CXFA_Data(pNode) {} | |
356 | |
357 bool IsArc() const { return GetClassID() == XFA_ELEMENT_Arc; } | |
358 bool IsBorder() const { return GetClassID() == XFA_ELEMENT_Border; } | |
359 bool IsRectangle() const { return GetClassID() == XFA_ELEMENT_Rectangle; } | |
360 int32_t GetHand() const; | |
361 int32_t GetPresence() const; | |
362 int32_t CountEdges() const; | |
363 CXFA_Edge GetEdge(int32_t nIndex = 0) const; | |
364 void GetStrokes(CXFA_StrokeArray& strokes) const; | |
365 FX_BOOL IsCircular() const; | |
366 FX_BOOL GetStartAngle(FX_FLOAT& fStartAngle) const; | |
367 FX_FLOAT GetStartAngle() const { | |
368 FX_FLOAT fStartAngle; | |
369 GetStartAngle(fStartAngle); | |
370 return fStartAngle; | |
371 } | |
372 | |
373 FX_BOOL GetSweepAngle(FX_FLOAT& fSweepAngle) const; | |
374 FX_FLOAT GetSweepAngle() const { | |
375 FX_FLOAT fSweepAngle; | |
376 GetSweepAngle(fSweepAngle); | |
377 return fSweepAngle; | |
378 } | |
379 | |
380 CXFA_Fill GetFill(FX_BOOL bModified = FALSE) const; | |
381 CXFA_Margin GetMargin() const; | |
382 int32_t Get3DStyle(FX_BOOL& bVisible, FX_FLOAT& fThickness) const; | |
383 }; | |
384 | |
385 class CXFA_Arc : public CXFA_Box { | |
386 public: | |
387 explicit CXFA_Arc(CXFA_Node* pNode) : CXFA_Box(pNode) {} | |
388 }; | |
389 | |
390 class CXFA_Border : public CXFA_Box { | |
391 public: | |
392 explicit CXFA_Border(CXFA_Node* pNode) : CXFA_Box(pNode) {} | |
393 }; | |
394 | |
395 class CXFA_Rectangle : public CXFA_Box { | |
396 public: | |
397 explicit CXFA_Rectangle(CXFA_Node* pNode) : CXFA_Box(pNode) {} | |
398 }; | |
399 | |
400 enum XFA_CHECKSTATE { | |
401 XFA_CHECKSTATE_On = 0, | |
402 XFA_CHECKSTATE_Off = 1, | |
403 XFA_CHECKSTATE_Neutral = 2, | |
404 }; | |
405 | |
406 enum XFA_VALUEPICTURE { | |
407 XFA_VALUEPICTURE_Raw = 0, | |
408 XFA_VALUEPICTURE_Display, | |
409 XFA_VALUEPICTURE_Edit, | |
410 XFA_VALUEPICTURE_DataBind, | |
411 }; | |
412 | |
413 class CXFA_WidgetData : public CXFA_Data { | |
414 public: | |
415 explicit CXFA_WidgetData(CXFA_Node* pNode); | |
416 | |
417 CXFA_Node* GetUIChild(); | |
418 XFA_ELEMENT GetUIType(); | |
419 CFX_WideString GetRawValue(); | |
420 int32_t GetAccess(FX_BOOL bTemplate = FALSE); | |
421 int32_t GetRotate(); | |
422 CXFA_Border GetBorder(FX_BOOL bModified = FALSE); | |
423 CXFA_Caption GetCaption(FX_BOOL bModified = FALSE); | |
424 CXFA_Font GetFont(FX_BOOL bModified = FALSE); | |
425 CXFA_Margin GetMargin(FX_BOOL bModified = FALSE); | |
426 CXFA_Para GetPara(FX_BOOL bModified = FALSE); | |
427 void GetEventList(CXFA_NodeArray& events); | |
428 int32_t GetEventByActivity(int32_t iActivity, | |
429 CXFA_NodeArray& events, | |
430 FX_BOOL bIsFormReady = FALSE); | |
431 CXFA_Value GetDefaultValue(FX_BOOL bModified = FALSE); | |
432 CXFA_Value GetFormValue(FX_BOOL bModified = FALSE); | |
433 CXFA_Calculate GetCalculate(FX_BOOL bModified = FALSE); | |
434 CXFA_Validate GetValidate(FX_BOOL bModified = FALSE); | |
435 CXFA_Bind GetBind(FX_BOOL bModified = FALSE); | |
436 CXFA_Assist GetAssist(FX_BOOL bModified = FALSE); | |
437 uint32_t GetRelevantStatus(); | |
438 FX_BOOL GetWidth(FX_FLOAT& fWidth); | |
439 FX_BOOL GetHeight(FX_FLOAT& fHeight); | |
440 FX_BOOL GetMinWidth(FX_FLOAT& fMinWidth); | |
441 FX_BOOL GetMinHeight(FX_FLOAT& fMinHeight); | |
442 FX_BOOL GetMaxWidth(FX_FLOAT& fMaxWidth); | |
443 FX_BOOL GetMaxHeight(FX_FLOAT& fMaxHeight); | |
444 CXFA_Border GetUIBorder(FX_BOOL bModified = FALSE); | |
445 CXFA_Margin GetUIMargin(FX_BOOL bModified = FALSE); | |
446 void GetUIMargin(CFX_RectF& rtUIMargin); | |
447 int32_t GetButtonHighlight(); | |
448 FX_BOOL GetButtonRollover(CFX_WideString& wsRollover, FX_BOOL& bRichText); | |
449 FX_BOOL GetButtonDown(CFX_WideString& wsDown, FX_BOOL& bRichText); | |
450 int32_t GetCheckButtonShape(); | |
451 int32_t GetCheckButtonMark(); | |
452 FX_FLOAT GetCheckButtonSize(); | |
453 FX_BOOL IsAllowNeutral(); | |
454 FX_BOOL IsRadioButton(); | |
455 XFA_CHECKSTATE GetCheckState(); | |
456 void SetCheckState(XFA_CHECKSTATE eCheckState, FX_BOOL bNotify = TRUE); | |
457 CXFA_Node* GetExclGroupNode(); | |
458 CXFA_Node* GetSelectedMember(); | |
459 CXFA_Node* SetSelectedMember(const CFX_WideStringC& wsName, | |
460 FX_BOOL bNotify = TRUE); | |
461 void SetSelectedMemberByValue(const CFX_WideStringC& wsValue, | |
462 FX_BOOL bNotify = TRUE, | |
463 FX_BOOL bScriptModify = FALSE, | |
464 FX_BOOL bSyncData = TRUE); | |
465 CXFA_Node* GetExclGroupFirstMember(); | |
466 CXFA_Node* GetExclGroupNextMember(CXFA_Node* pNode); | |
467 int32_t GetChoiceListCommitOn(); | |
468 FX_BOOL IsChoiceListAllowTextEntry(); | |
469 int32_t GetChoiceListOpen(); | |
470 FX_BOOL IsListBox(); | |
471 int32_t CountChoiceListItems(FX_BOOL bSaveValue = FALSE); | |
472 FX_BOOL GetChoiceListItem(CFX_WideString& wsText, | |
473 int32_t nIndex, | |
474 FX_BOOL bSaveValue = FALSE); | |
475 void GetChoiceListItems(CFX_WideStringArray& wsTextArray, | |
476 FX_BOOL bSaveValue = FALSE); | |
477 int32_t CountSelectedItems(); | |
478 int32_t GetSelectedItem(int32_t nIndex = 0); | |
479 void GetSelectedItems(CFX_Int32Array& iSelArray); | |
480 void GetSelectedItemsValue(CFX_WideStringArray& wsSelTextArray); | |
481 FX_BOOL GetItemState(int32_t nIndex); | |
482 void SetItemState(int32_t nIndex, | |
483 FX_BOOL bSelected, | |
484 FX_BOOL bNotify = FALSE, | |
485 FX_BOOL bScriptModify = FALSE, | |
486 FX_BOOL bSyncData = TRUE); | |
487 void SetSelectdItems(CFX_Int32Array& iSelArray, | |
488 FX_BOOL bNotify = FALSE, | |
489 FX_BOOL bScriptModify = FALSE, | |
490 FX_BOOL bSyncData = TRUE); | |
491 void ClearAllSelections(); | |
492 void InsertItem(const CFX_WideString& wsLabel, | |
493 const CFX_WideString& wsValue, | |
494 int32_t nIndex = -1, | |
495 FX_BOOL bNotify = FALSE); | |
496 void GetItemLabel(const CFX_WideStringC& wsValue, CFX_WideString& wsLabel); | |
497 void GetItemValue(const CFX_WideStringC& wsLabel, CFX_WideString& wsValue); | |
498 FX_BOOL DeleteItem(int32_t nIndex, | |
499 FX_BOOL bNotify = FALSE, | |
500 FX_BOOL bScriptModify = FALSE, | |
501 FX_BOOL bSyncData = TRUE); | |
502 int32_t GetHorizontalScrollPolicy(); | |
503 int32_t GetNumberOfCells(); | |
504 FX_BOOL SetValue(const CFX_WideString& wsValue, XFA_VALUEPICTURE eValueType); | |
505 FX_BOOL GetPictureContent(CFX_WideString& wsPicture, | |
506 XFA_VALUEPICTURE ePicture); | |
507 IFX_Locale* GetLocal(); | |
508 FX_BOOL GetValue(CFX_WideString& wsValue, XFA_VALUEPICTURE eValueType); | |
509 FX_BOOL GetNormalizeDataValue(const CFX_WideStringC& wsValue, | |
510 CFX_WideString& wsNormalizeValue); | |
511 FX_BOOL GetFormatDataValue(const CFX_WideStringC& wsValue, | |
512 CFX_WideString& wsFormatedValue); | |
513 void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput); | |
514 CFX_WideString GetBarcodeType(); | |
515 FX_BOOL GetBarcodeAttribute_CharEncoding(int32_t& val); | |
516 FX_BOOL GetBarcodeAttribute_Checksum(int32_t& val); | |
517 FX_BOOL GetBarcodeAttribute_DataLength(int32_t& val); | |
518 FX_BOOL GetBarcodeAttribute_StartChar(FX_CHAR& val); | |
519 FX_BOOL GetBarcodeAttribute_EndChar(FX_CHAR& val); | |
520 FX_BOOL GetBarcodeAttribute_ECLevel(int32_t& val); | |
521 FX_BOOL GetBarcodeAttribute_ModuleWidth(int32_t& val); | |
522 FX_BOOL GetBarcodeAttribute_ModuleHeight(int32_t& val); | |
523 FX_BOOL GetBarcodeAttribute_PrintChecksum(FX_BOOL& val); | |
524 FX_BOOL GetBarcodeAttribute_TextLocation(int32_t& val); | |
525 FX_BOOL GetBarcodeAttribute_Truncate(FX_BOOL& val); | |
526 FX_BOOL GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val); | |
527 void GetPasswordChar(CFX_WideString& wsPassWord); | |
528 FX_BOOL IsMultiLine(); | |
529 int32_t GetVerticalScrollPolicy(); | |
530 int32_t GetMaxChars(XFA_ELEMENT& eType); | |
531 FX_BOOL GetFracDigits(int32_t& iFracDigits); | |
532 FX_BOOL GetLeadDigits(int32_t& iLeadDigits); | |
533 | |
534 FX_BOOL m_bIsNull; | |
535 FX_BOOL m_bPreNull; | |
536 | |
537 protected: | |
538 void SyncValue(const CFX_WideString& wsValue, FX_BOOL bNotify); | |
539 void InsertListTextItem(CXFA_Node* pItems, | |
540 const CFX_WideStringC& wsText, | |
541 int32_t nIndex = -1); | |
542 void FormatNumStr(const CFX_WideString& wsValue, | |
543 IFX_Locale* pLocale, | |
544 CFX_WideString& wsOutput); | |
545 | |
546 CXFA_Node* m_pUiChildNode; | |
547 XFA_ELEMENT m_eUIType; | |
548 }; | |
549 | |
550 class CXFA_Occur : public CXFA_Data { | |
551 public: | |
552 explicit CXFA_Occur(CXFA_Node* pNode); | |
553 | |
554 int32_t GetMax(); | |
555 int32_t GetMin(); | |
556 FX_BOOL GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit); | |
557 void SetMax(int32_t iMax); | |
558 void SetMin(int32_t iMin); | |
559 }; | |
560 | |
561 #endif // XFA_INCLUDE_FXFA_FXFA_OBJECTACC_H_ | |
OLD | NEW |