summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fsdk_baseannot.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
commitb048f791a15f2da781a01eba5b09eb9d389f9c11 (patch)
tree6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /fpdfsdk/include/fsdk_baseannot.h
parentc8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff)
downloadpdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz
clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
Diffstat (limited to 'fpdfsdk/include/fsdk_baseannot.h')
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h263
1 files changed, 133 insertions, 130 deletions
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index dcd295de9f..bfeebeb9f3 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -25,169 +25,172 @@ class CPDF_Matrix;
class CPDF_RenderOptions;
class CFX_RenderDevice;
-#define CFX_IntArray CFX_ArrayTemplate<int>
-
-class CPDFSDK_DateTime
-{
-public:
- CPDFSDK_DateTime();
- CPDFSDK_DateTime(const CFX_ByteString& dtStr);
- CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime);
- CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
-
-
- CPDFSDK_DateTime& operator = (const CPDFSDK_DateTime& datetime);
- CPDFSDK_DateTime& operator = (const FX_SYSTEMTIME& st);
- FX_BOOL operator == (CPDFSDK_DateTime& datetime);
- FX_BOOL operator != (CPDFSDK_DateTime& datetime);
- FX_BOOL operator > (CPDFSDK_DateTime& datetime);
- FX_BOOL operator >= (CPDFSDK_DateTime& datetime);
- FX_BOOL operator < (CPDFSDK_DateTime& datetime);
- FX_BOOL operator <= (CPDFSDK_DateTime& datetime);
- operator time_t();
-
- CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
- CFX_ByteString ToCommonDateTimeString();
- CFX_ByteString ToPDFDateTimeString();
- void ToSystemTime(FX_SYSTEMTIME& st);
- CPDFSDK_DateTime ToGMT();
- CPDFSDK_DateTime& AddDays(short days);
- CPDFSDK_DateTime& AddSeconds(int seconds);
-
- void ResetDateTime();
-
- struct FX_DATETIME
- {
- int16_t year;
- uint8_t month;
- uint8_t day;
- uint8_t hour;
- uint8_t minute;
- uint8_t second;
- int8_t tzHour;
- uint8_t tzMinute;
- }dt;
+#define CFX_IntArray CFX_ArrayTemplate<int>
+
+class CPDFSDK_DateTime {
+ public:
+ CPDFSDK_DateTime();
+ CPDFSDK_DateTime(const CFX_ByteString& dtStr);
+ CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime);
+ CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
+
+ CPDFSDK_DateTime& operator=(const CPDFSDK_DateTime& datetime);
+ CPDFSDK_DateTime& operator=(const FX_SYSTEMTIME& st);
+ FX_BOOL operator==(CPDFSDK_DateTime& datetime);
+ FX_BOOL operator!=(CPDFSDK_DateTime& datetime);
+ FX_BOOL operator>(CPDFSDK_DateTime& datetime);
+ FX_BOOL operator>=(CPDFSDK_DateTime& datetime);
+ FX_BOOL operator<(CPDFSDK_DateTime& datetime);
+ FX_BOOL operator<=(CPDFSDK_DateTime& datetime);
+ operator time_t();
+
+ CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
+ CFX_ByteString ToCommonDateTimeString();
+ CFX_ByteString ToPDFDateTimeString();
+ void ToSystemTime(FX_SYSTEMTIME& st);
+ CPDFSDK_DateTime ToGMT();
+ CPDFSDK_DateTime& AddDays(short days);
+ CPDFSDK_DateTime& AddSeconds(int seconds);
+
+ void ResetDateTime();
+
+ struct FX_DATETIME {
+ int16_t year;
+ uint8_t month;
+ uint8_t day;
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
+ int8_t tzHour;
+ uint8_t tzMinute;
+ } dt;
};
-class CPDFSDK_Annot
-{
-public:
- CPDFSDK_Annot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
- virtual ~CPDFSDK_Annot();
-public:
- virtual FX_FLOAT GetMinWidth() const;
- virtual FX_FLOAT GetMinHeight() const;
- //define layout order to 5.
- virtual int GetLayoutOrder() const { return 5; }
+class CPDFSDK_Annot {
+ public:
+ CPDFSDK_Annot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
+ virtual ~CPDFSDK_Annot();
-public:
- CPDF_Annot* GetPDFAnnot();
+ public:
+ virtual FX_FLOAT GetMinWidth() const;
+ virtual FX_FLOAT GetMinHeight() const;
+ // define layout order to 5.
+ virtual int GetLayoutOrder() const { return 5; }
- void SetPage(CPDFSDK_PageView* pPageView);
- CPDFSDK_PageView* GetPageView();
- FX_DWORD GetFlags();
+ public:
+ CPDF_Annot* GetPDFAnnot();
- // Tab Order
- int GetTabOrder();
- void SetTabOrder(int iTabOrder);
+ void SetPage(CPDFSDK_PageView* pPageView);
+ CPDFSDK_PageView* GetPageView();
+ FX_DWORD GetFlags();
- // Selection
- FX_BOOL IsSelected();
- void SetSelected(FX_BOOL bSelected);
+ // Tab Order
+ int GetTabOrder();
+ void SetTabOrder(int iTabOrder);
- CFX_ByteString GetType() const;
- virtual CFX_ByteString GetSubType() const;
+ // Selection
+ FX_BOOL IsSelected();
+ void SetSelected(FX_BOOL bSelected);
- CPDF_Page* GetPDFPage();
+ CFX_ByteString GetType() const;
+ virtual CFX_ByteString GetSubType() const;
-public:
- CPDF_Dictionary* GetAnnotDict() const;
+ CPDF_Page* GetPDFPage();
- void SetRect(const CPDF_Rect& rect);
- CPDF_Rect GetRect() const;
+ public:
+ CPDF_Dictionary* GetAnnotDict() const;
- void SetContents(const CFX_WideString& sContents);
- CFX_WideString GetContents() const;
+ void SetRect(const CPDF_Rect& rect);
+ CPDF_Rect GetRect() const;
- void SetAnnotName(const CFX_WideString& sName);
- CFX_WideString GetAnnotName() const;
+ void SetContents(const CFX_WideString& sContents);
+ CFX_WideString GetContents() const;
- void SetModifiedDate(const FX_SYSTEMTIME& st);
- FX_SYSTEMTIME GetModifiedDate() const;
+ void SetAnnotName(const CFX_WideString& sName);
+ CFX_WideString GetAnnotName() const;
- void SetFlags(int nFlags);
- int GetFlags() const;
+ void SetModifiedDate(const FX_SYSTEMTIME& st);
+ FX_SYSTEMTIME GetModifiedDate() const;
- void SetAppState(const CFX_ByteString& str);
- CFX_ByteString GetAppState() const;
+ void SetFlags(int nFlags);
+ int GetFlags() const;
- void SetStructParent(int key);
- int GetStructParent() const;
+ void SetAppState(const CFX_ByteString& str);
+ CFX_ByteString GetAppState() const;
- //border
- void SetBorderWidth(int nWidth);
- int GetBorderWidth() const;
+ void SetStructParent(int key);
+ int GetStructParent() const;
- //BBS_SOLID
- //BBS_DASH
- //BBS_BEVELED
- //BBS_INSET
- //BBS_UNDERLINE
+ // border
+ void SetBorderWidth(int nWidth);
+ int GetBorderWidth() const;
- void SetBorderStyle(int nStyle);
- int GetBorderStyle() const;
+ // BBS_SOLID
+ // BBS_DASH
+ // BBS_BEVELED
+ // BBS_INSET
+ // BBS_UNDERLINE
- void SetBorderDash(const CFX_IntArray& array);
- void GetBorderDash(CFX_IntArray& array) const;
+ void SetBorderStyle(int nStyle);
+ int GetBorderStyle() const;
- //The background of the annotation's icon when closed
- //The title bar of the annotation's pop-up window
- //The border of a link annotation
+ void SetBorderDash(const CFX_IntArray& array);
+ void GetBorderDash(CFX_IntArray& array) const;
- void SetColor(FX_COLORREF color);
- void RemoveColor();
- FX_BOOL GetColor(FX_COLORREF& color) const;
+ // The background of the annotation's icon when closed
+ // The title bar of the annotation's pop-up window
+ // The border of a link annotation
- FX_BOOL IsVisible() const;
- //action
+ void SetColor(FX_COLORREF color);
+ void RemoveColor();
+ FX_BOOL GetColor(FX_COLORREF& color) const;
- CPDF_Action GetAction() const;
- void SetAction(const CPDF_Action& a);
- void RemoveAction();
+ FX_BOOL IsVisible() const;
+ // action
- CPDF_AAction GetAAction() const;
- void SetAAction(const CPDF_AAction& aa);
- void RemoveAAction();
+ CPDF_Action GetAction() const;
+ void SetAction(const CPDF_Action& a);
+ void RemoveAction();
- virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
+ CPDF_AAction GetAAction() const;
+ void SetAAction(const CPDF_AAction& aa);
+ void RemoveAAction();
-public:
- FX_BOOL IsAppearanceValid();
- FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
- void DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
- CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOptions);
- void DrawBorder(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
- const CPDF_RenderOptions* pOptions);
+ virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
- void ClearCachedAP();
+ public:
+ FX_BOOL IsAppearanceValid();
+ FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
+ void DrawAppearance(CFX_RenderDevice* pDevice,
+ const CPDF_Matrix* pUser2Device,
+ CPDF_Annot::AppearanceMode mode,
+ const CPDF_RenderOptions* pOptions);
+ void DrawBorder(CFX_RenderDevice* pDevice,
+ const CPDF_Matrix* pUser2Device,
+ const CPDF_RenderOptions* pOptions);
- void WriteAppearance(const CFX_ByteString& sAPType, const CPDF_Rect& rcBBox,
- const CPDF_Matrix& matrix, const CFX_ByteString& sContents,
- const CFX_ByteString& sAPState = "");
+ void ClearCachedAP();
-public:
- virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,CPDF_RenderOptions* pOptions);
-public:
+ void WriteAppearance(const CFX_ByteString& sAPType,
+ const CPDF_Rect& rcBBox,
+ const CPDF_Matrix& matrix,
+ const CFX_ByteString& sContents,
+ const CFX_ByteString& sAPState = "");
+ public:
+ virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
+ CPDF_Matrix* pUser2Device,
+ CPDF_RenderOptions* pOptions);
-private:
- FX_BOOL CreateFormFiller();
-protected:
- CPDF_Annot* m_pAnnot;
- CPDFSDK_PageView* m_pPageView;
- FX_BOOL m_bSelected;
- int m_nTabOrder;
+ public:
+ private:
+ FX_BOOL CreateFormFiller();
+ protected:
+ CPDF_Annot* m_pAnnot;
+ CPDFSDK_PageView* m_pPageView;
+ FX_BOOL m_bSelected;
+ int m_nTabOrder;
};
#endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_