00001
00002
00003
00004
00005
00006 #ifndef H_PDFTRON_PDF_CPPWRAP_WIDGET
00007 #define H_PDFTRON_PDF_CPPWRAP_WIDGET
00008
00009 #include <PDF/Annot.h>
00010
00011 namespace pdftron {
00012 namespace PDF {
00013 namespace Annots {
00014
00015
00020 class Widget : public Annot
00021 {
00022 public:
00023
00029 Widget(SDF::Obj d = 0);
00030
00036 Widget(const Annot& ann) : Annot(ann.GetSDFObj()) {}
00037
00047 static Widget Create(SDF::SDFDoc& doc, const Rect& pos, Field field);
00048
00053 Field GetField() const;
00054
00058 enum HighlightingMode
00059 {
00060 e_none,
00061 e_invert,
00062 e_outline,
00063 e_push,
00064 e_toggle
00065 };
00066
00075 HighlightingMode GetHighlightingMode() const;
00076
00086 void SetHighlightingMode(HighlightingMode mode=e_invert);
00087
00094 Action GetAction() const;
00095
00103 void SetAction(const Action& action);
00104
00113 SDF::Obj GetTriggerAction() const;
00114
00124 void SetTriggerAction(SDF::Obj action);
00125
00141 int GetRotation() const;
00142
00153 void SetRotation(int rot);
00154
00163 int GetBorderColorCompNum() const;
00164
00172 ColorPt GetBorderColor() const;
00173
00181 void SetBorderColor(const ColorPt& c, int CompNum);
00182
00191 int GetBackgroundColorCompNum() const;
00192
00200 ColorPt GetBackgroundColor() const;
00201
00209 void SetBackgroundColor(const ColorPt& c, int CompNum);
00210
00224 UString GetStaticCaptionText() const;
00225
00240 void SetStaticCaptionText(const UString& ct);
00241
00249 UString GetRolloverCaptionText() const;
00250
00259 void SetRolloverCaptionText(const UString& ct);
00260
00268 UString GetMouseDownCaptionText() const;
00269
00278 void SetMouseDownCaptionText(const UString& ct);
00279
00289 SDF::Obj GetStaticIcon() const;
00290
00301 void SetStaticIcon(SDF::Obj ic);
00302
00313 SDF::Obj GetRolloverIcon() const;
00314
00326 void SetRolloverIcon(SDF::Obj ic);
00327
00337 SDF::Obj GetMouseDownIcon() const;
00338
00349 void SetMouseDownIcon(SDF::Obj ic);
00350
00351
00365 enum IconCaptionRelation
00366 {
00367 e_NoIcon,
00368 e_NoCaption,
00369 e_CBelowI,
00370 e_CAboveI,
00371 e_CRightILeft,
00372 e_CLeftIRight,
00373 e_COverlayI
00374 };
00375
00383 IconCaptionRelation GetIconCaptionRelation() const;
00384
00394 void SetIconCaptionRelation(IconCaptionRelation icr);
00395
00408 enum ScaleCondition
00409 {
00410 e_Always,
00411 e_WhenBigger,
00412 e_WhenSmaller,
00413 e_Never
00414 };
00415
00423 ScaleCondition GetScaleCondition() const;
00424
00432 void SetScaleCondition(ScaleCondition sd);
00433
00449 enum ScaleType
00450 {
00451 e_Anamorphic,
00452 e_Proportional
00453 };
00454
00462 ScaleType GetScaleType() const;
00463
00472 void SetScaleType(ScaleType st);
00473
00474
00487 double GetHIconLeftOver() const;
00488
00502 void SetHIconLeftOver(double hl);
00503
00519 double GetVIconLeftOver() const;
00520
00537 void SetVIconLeftOver(double vl);
00538
00549 bool GetFitFull() const;
00550
00561 void SetFitFull(bool ff);
00562
00564 Widget(TRN_Annot widget);
00566
00567 };
00568 };
00569 };
00570 };
00571 #include <Impl/Widget.inl>
00572 #endif