From f1e7c461dfabbff6b65a072f24f6711b34159361 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 23 Jul 2015 13:36:00 -0700 Subject: Revert "FX_BOOL considered harmful, part 2." This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9. Reason for revert: build failure. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255693002 . --- fpdfsdk/include/pdfwindow/PWL_Button.h | 6 +- fpdfsdk/include/pdfwindow/PWL_Caret.h | 10 ++-- fpdfsdk/include/pdfwindow/PWL_ComboBox.h | 22 +++---- fpdfsdk/include/pdfwindow/PWL_Edit.h | 52 ++++++++--------- fpdfsdk/include/pdfwindow/PWL_EditCtrl.h | 30 +++++----- fpdfsdk/include/pdfwindow/PWL_FontMap.h | 6 +- fpdfsdk/include/pdfwindow/PWL_Icon.h | 4 +- fpdfsdk/include/pdfwindow/PWL_IconList.h | 28 ++++----- fpdfsdk/include/pdfwindow/PWL_ListBox.h | 26 ++++----- fpdfsdk/include/pdfwindow/PWL_ListCtrl.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Note.h | 64 ++++++++++----------- fpdfsdk/include/pdfwindow/PWL_ScrollBar.h | 26 ++++----- fpdfsdk/include/pdfwindow/PWL_Signature.h | 12 ++-- fpdfsdk/include/pdfwindow/PWL_SpecialButton.h | 20 +++---- fpdfsdk/include/pdfwindow/PWL_Utils.h | 14 ++--- fpdfsdk/include/pdfwindow/PWL_Wnd.h | 82 +++++++++++++-------------- 16 files changed, 202 insertions(+), 202 deletions(-) (limited to 'fpdfsdk/include/pdfwindow') diff --git a/fpdfsdk/include/pdfwindow/PWL_Button.h b/fpdfsdk/include/pdfwindow/PWL_Button.h index 322b9d4366..2bf2eea865 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Button.h +++ b/fpdfsdk/include/pdfwindow/PWL_Button.h @@ -17,11 +17,11 @@ public: virtual CFX_ByteString GetClassName() const; virtual void OnCreate(PWL_CREATEPARAM & cp); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); protected: - bool m_bMouseDown; + FX_BOOL m_bMouseDown; }; #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_BUTTON_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_Caret.h b/fpdfsdk/include/pdfwindow/PWL_Caret.h index 42743657b7..6838bc49e7 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Caret.h +++ b/fpdfsdk/include/pdfwindow/PWL_Caret.h @@ -12,11 +12,11 @@ struct PWL_CARET_INFO { public: - PWL_CARET_INFO() : bVisible(false), ptHead(0,0), ptFoot(0,0) + PWL_CARET_INFO() : bVisible(FALSE), ptHead(0,0), ptFoot(0,0) { } - bool bVisible; + FX_BOOL bVisible; CPDF_Point ptHead; CPDF_Point ptFoot; }; @@ -32,9 +32,9 @@ public: virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream); virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); virtual void InvalidateRect(CPDF_Rect * pRect = NULL); - virtual void SetVisible(bool bVisible) {} + virtual void SetVisible(FX_BOOL bVisible) {} virtual void TimerProc(); - void SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot); + void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot); CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset); void SetInvalidRect(CPDF_Rect rc) {m_rcInvalid = rc;} @@ -42,7 +42,7 @@ private: void GetCaretApp(CFX_ByteTextBuf & sAppStream,const CPDF_Point & ptOffset); CPDF_Rect GetCaretRect() const; - bool m_bFlash; + FX_BOOL m_bFlash; CPDF_Point m_ptHead; CPDF_Point m_ptFoot; FX_FLOAT m_fWidth; diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h index 21d4e4a041..3f8604fb62 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h +++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h @@ -25,10 +25,10 @@ public: virtual ~CPWL_CBListBox(){}; public: - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - bool OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag); - bool OnCharWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag); + FX_BOOL OnKeyDownWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag); + FX_BOOL OnCharWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag); }; #define PWL_COMBOBOX_BUTTON_WIDTH 13 @@ -43,8 +43,8 @@ public: virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream); virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); }; @@ -58,8 +58,8 @@ public: virtual CFX_ByteString GetClassName() const; virtual void OnCreate(PWL_CREATEPARAM & cp); - virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); @@ -71,7 +71,7 @@ public: virtual void SetFocus(); virtual void KillFocus(); - bool IsModified() const; + FX_BOOL IsModified() const; public: void SetFillerNotify(IPWL_Filler_Notify* pNotify); @@ -87,7 +87,7 @@ public: void GetEditSel(int32_t & nStartChar, int32_t & nEndChar ) const; void Clear(); void SelectAll(); - bool IsPopup() const; + FX_BOOL IsPopup() const; void SetSelectText(); @@ -96,14 +96,14 @@ private: void CreateButton(const PWL_CREATEPARAM & cp); void CreateListBox(const PWL_CREATEPARAM & cp); - void SetPopup(bool bPopup); + void SetPopup(FX_BOOL bPopup); private: CPWL_CBEdit* m_pEdit; CPWL_CBButton* m_pButton; CPWL_CBListBox* m_pList; - bool m_bPopup; + FX_BOOL m_bPopup; CPDF_Rect m_rcOldWindow; int32_t m_nPopupWhere; int32_t m_nSelectItem; diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h index 50e1ebee3c..97147a964d 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Edit.h +++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h @@ -21,11 +21,11 @@ public: virtual ~IPWL_Filler_Notify() { } virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, int32_t & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top) - virtual void OnBeforeKeyStroke(bool bEditOrList, void* pPrivateData, int32_t nKeyCode, + virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode, CFX_WideString & strChange, const CFX_WideString& strChangeEx, int nSelStart, int nSelEnd, - bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag) = 0; - virtual void OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, bool & bExit, FX_DWORD nFlag) = 0; + FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag) = 0; + virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) = 0; }; class PWL_CLASS CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify @@ -44,35 +44,35 @@ public: virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream); virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); virtual CPDF_Rect GetFocusRect() const; public: - void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, bool bPaint = true); //0:left 1:right 2:middle - void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, bool bPaint = true); //0:top 1:bottom 2:center + void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle + void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, FX_BOOL bPaint = TRUE); //0:top 1:bottom 2:center void SetCharArray(int32_t nCharArray); void SetLimitChar(int32_t nLimitChar); - void SetHorzScale(int32_t nHorzScale, bool bPaint = true); - void SetCharSpace(FX_FLOAT fCharSpace, bool bPaint = true); + void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE); + void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE); - void SetLineLeading(FX_FLOAT fLineLeading, bool bPaint = true); + void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); - void EnableSpellCheck(bool bEnabled); + void EnableSpellCheck(FX_BOOL bEnabled); - bool CanSelectAll() const; - bool CanClear() const; - bool CanCopy() const; - bool CanCut() const; - bool CanPaste() const; + FX_BOOL CanSelectAll() const; + FX_BOOL CanClear() const; + FX_BOOL CanCopy() const; + FX_BOOL CanCut() const; + FX_BOOL CanPaste() const; virtual void CopyText(); virtual void PasteText(); @@ -85,7 +85,7 @@ public: CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset) const; CFX_ByteString GetSelectAppearanceStream(const CPDF_Point & ptOffset) const; - bool IsTextFull() const; + FX_BOOL IsTextFull() const; static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, int32_t nCharArray); @@ -112,8 +112,8 @@ protected: private: CPVT_WordRange GetSelectWordRange() const; - virtual void ShowVScrollBar(bool bShow); - bool IsVScrollBarVisible() const; + virtual void ShowVScrollBar(FX_BOOL bShow); + FX_BOOL IsVScrollBarVisible() const; void SetParamByFlag(); FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray); @@ -123,15 +123,15 @@ private: CPVT_WordRange GetLatinWordsRange(const CPDF_Point & point) const; CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace & place) const; CPVT_WordRange GetArabicWordsRange(const CPVT_WordPlace & place) const; - CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, bool bLatin, bool bArabic) const; + CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, FX_BOOL bLatin, FX_BOOL bArabic) const; void AjustArabicWords(const CPVT_WordRange& wr); public: - bool IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag); + FX_BOOL IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag); private: IPWL_Filler_Notify* m_pFillerNotify; IPWL_SpellCheck* m_pSpellCheck; - bool m_bFocus; + FX_BOOL m_bFocus; CPDF_Rect m_rcOldWindow; public: void AttachFFLData(void* pData) {m_pFormFiller = pData;} diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h index e5123fd1b9..9b088b1162 100644 --- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h @@ -68,11 +68,11 @@ public: virtual void OnCreate(PWL_CREATEPARAM & cp); virtual void OnCreated(); - virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); @@ -89,7 +89,7 @@ public: CPDF_Rect GetContentRect() const; void GetCaretPos(int32_t& x, int32_t& y) const; - bool IsModified() const; + FX_BOOL IsModified() const; CFX_WideString GetText() const; void SetSel(int32_t nStartChar,int32_t nEndChar); @@ -105,7 +105,7 @@ public: void Paint(); - void EnableRefresh(bool bRefresh); + void EnableRefresh(FX_BOOL bRefresh); CPDF_Point GetScrollPos() const; void SetScrollPos(const CPDF_Point& point); @@ -120,30 +120,30 @@ public: CPDF_Font * GetCaretFont() const; FX_FLOAT GetCaretFontSize() const; - bool CanUndo() const; - bool CanRedo() const; + FX_BOOL CanUndo() const; + FX_BOOL CanRedo() const; void Redo(); void Undo(); void SetReadyToInput(); protected: - virtual void ShowVScrollBar(bool bShow); + virtual void ShowVScrollBar(FX_BOOL bShow); virtual void InsertWord(FX_WORD word, int32_t nCharset); virtual void InsertReturn(); virtual void InsertText(const FX_WCHAR* csText); virtual void SetCursor(); - bool IsWndHorV(); + FX_BOOL IsWndHorV(); void Delete(); void Backspace(); protected: void GetCaretInfo(CPDF_Point & ptHead, CPDF_Point & ptFoot) const; - void SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot); + void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot); - void SetEditCaret(bool bVisible); + void SetEditCaret(FX_BOOL bVisible); protected: virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, @@ -154,7 +154,7 @@ protected: FX_FLOAT fSmallStep, FX_FLOAT fBigStep); virtual void IOnSetScrollPosX(FX_FLOAT fx){} virtual void IOnSetScrollPosY(FX_FLOAT fy); - virtual void IOnSetCaret(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place); + virtual void IOnSetCaret(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place); virtual void IOnCaretChange(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps); virtual void IOnContentChange(const CPDF_Rect& rcContent); virtual void IOnInvalidateRect(CPDF_Rect * pRect); @@ -165,7 +165,7 @@ private: protected: IFX_Edit* m_pEdit; CPWL_Caret* m_pEditCaret; - bool m_bMouseDown; + FX_BOOL m_bMouseDown; IPWL_Edit_Notify* m_pEditNotify; private: diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h index e4bbbf2664..d32cc93078 100644 --- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h +++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h @@ -85,7 +85,7 @@ public: static CFX_ByteString GetDefaultFontByCharset(int32_t nCharset); CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset); - static bool IsStandardFont(const CFX_ByteString& sFontName); + static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName); CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName); CPDF_Font* AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset); @@ -93,12 +93,12 @@ public: protected: virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset); virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias); - bool KnowWord(int32_t nFontIndex, FX_WORD word); + FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word); virtual CPDF_Document* GetDocument(); void Empty(); - int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, bool bFind); + int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind); int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset); int32_t AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, int32_t nCharset = DEFAULT_CHARSET); diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h index b6331b6e09..44a5c0cbaf 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Icon.h +++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h @@ -46,9 +46,9 @@ public: virtual void GetImageOffset(FX_FLOAT & x,FX_FLOAT & y); int32_t GetScaleMethod(); - bool IsProportionalScale(); + FX_BOOL IsProportionalScale(); void GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom); - bool GetFittingBounds(); + FX_BOOL GetFittingBounds(); void SetIconFit(CPDF_IconFit * pIconFit){m_pIconFit = pIconFit;}; diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h index 3c71e57b49..2f6b323773 100644 --- a/fpdfsdk/include/pdfwindow/PWL_IconList.h +++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h @@ -34,8 +34,8 @@ public: virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); virtual void RePosChildWnd(); - void SetSelect(bool bSelected); - bool IsSelected() const; + void SetSelect(FX_BOOL bSelected); + FX_BOOL IsSelected() const; void SetData(void* pData); void SetIcon(int32_t nIconIndex); void SetText(const CFX_WideString& str); @@ -52,7 +52,7 @@ protected: private: int32_t m_nIconIndex; void* m_pData; - bool m_bSelected; + FX_BOOL m_bSelected; CPWL_Label* m_pText; CPWL_Color m_crIcon; }; @@ -66,7 +66,7 @@ public: void SetSelect(int32_t nIndex); int32_t GetSelect() const; void SetNotify(IPWL_IconList_Notify* pNotify); - void EnableNotify(bool bNotify); + void EnableNotify(FX_BOOL bNotify); void SetListData(int32_t nItemIndex, void* pData); void SetListIcon(int32_t nItemIndex, int32_t nIconIndex); void SetListString(int32_t nItemIndex, const CFX_WideString& str); @@ -77,20 +77,20 @@ public: protected: virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); private: CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const; - void SelectItem(int32_t nItemIndex, bool bSelect); + void SelectItem(int32_t nItemIndex, FX_BOOL bSelect); int32_t FindItemIndex(const CPDF_Point& point); - bool m_nSelectIndex; + FX_BOOL m_nSelectIndex; IPWL_IconList_Notify* m_pNotify; - bool m_bEnableNotify; - bool m_bMouseDown; + FX_BOOL m_bEnableNotify; + FX_BOOL m_bMouseDown; int32_t m_nListCount; }; @@ -100,13 +100,13 @@ public: CPWL_IconList(int32_t nListCount); virtual ~CPWL_IconList(); - virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); void SetSelect(int32_t nIndex); void SetTopItem(int32_t nIndex); int32_t GetSelect() const; void SetNotify(IPWL_IconList_Notify* pNotify); - void EnableNotify(bool bNotify); + void EnableNotify(FX_BOOL bNotify); void SetListData(int32_t nItemIndex, void* pData); void SetListIcon(int32_t nItemIndex, int32_t nIconIndex); void SetListString(int32_t nItemIndex, const CFX_WideString& str); diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h index 43d60a2f09..97a4529af9 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h +++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h @@ -29,7 +29,7 @@ public: FX_FLOAT fSmallStep, FX_FLOAT fBigStep); void IOnSetScrollPosX(FX_FLOAT fx){} void IOnSetScrollPosY(FX_FLOAT fy); - void IOnSetCaret(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place); + void IOnSetCaret(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place); void IOnCaretChange(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps); void IOnInvalidateRect(CPDF_Rect * pRect); @@ -49,12 +49,12 @@ public: virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream); virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); virtual void KillFocus(); virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); @@ -64,7 +64,7 @@ public: virtual void SetFontSize(FX_FLOAT fFontSize); virtual FX_FLOAT GetFontSize() const; - void OnNotifySelChanged(bool bKeyDown, bool & bExit , FX_DWORD nFlag); + void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag); void AddString(const FX_WCHAR* string); void SetTopVisibleIndex(int32_t nItemIndex); @@ -73,13 +73,13 @@ public: void Reset(); void Select(int32_t nItemIndex); void SetCaret(int32_t nItemIndex); - void SetHoverSel(bool bHoverSel); + void SetHoverSel(FX_BOOL bHoverSel); int32_t GetCount() const; - bool IsMultipleSel() const; + FX_BOOL IsMultipleSel() const; int32_t GetCaretIndex() const; int32_t GetCurSel() const; - bool IsItemSelected(int32_t nItemIndex) const; + FX_BOOL IsItemSelected(int32_t nItemIndex) const; int32_t GetTopVisibleIndex() const; int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const; CPDF_Rect GetContentRect() const; @@ -91,8 +91,8 @@ public: protected: IFX_List* m_pList; CPWL_List_Notify* m_pListNotify; - bool m_bMouseDown; - bool m_bHoverSel; + FX_BOOL m_bMouseDown; + FX_BOOL m_bHoverSel; IPWL_Filler_Notify* m_pFillerNotify; public: void AttachFFLData(void* pData) {m_pFormFiller = pData;} diff --git a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h index 3beee19230..c107a0cf5e 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h +++ b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h @@ -35,7 +35,7 @@ protected: virtual void DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); private: - void ResetAll(bool bMove,int32_t nStart); + void ResetAll(FX_BOOL bMove,int32_t nStart); CPDF_Rect m_rcContent; CPDF_Point m_ptScroll; diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h index b1e61c4aa4..a60eba30dd 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Note.h +++ b/fpdfsdk/include/pdfwindow/PWL_Note.h @@ -33,8 +33,8 @@ class IPWL_NoteNotify public: virtual ~IPWL_NoteNotify() { } virtual void OnNoteMove(const FX_RECT& rtWin) = 0; - virtual void OnNoteShow(bool bShow) = 0; - virtual void OnNoteActivate(bool bActive) = 0; + virtual void OnNoteShow(FX_BOOL bShow) = 0; + virtual void OnNoteActivate(FX_BOOL bActive) = 0; virtual void OnNoteClose() = 0; virtual void OnItemCreate(IPWL_NoteItem* pItem) = 0; virtual void OnItemDelete(IPWL_NoteItem* pItem) = 0; @@ -107,11 +107,11 @@ public: protected: virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); private: - bool m_bMouseDown; + FX_BOOL m_bMouseDown; }; class CPWL_Note_LBBox : public CPWL_Wnd @@ -140,7 +140,7 @@ public: CPWL_Note_Edit(); virtual ~CPWL_Note_Edit(); - void EnableNotify(bool bEnable) {m_bEnableNotify = bEnable;} + void EnableNotify(FX_BOOL bEnable) {m_bEnableNotify = bEnable;} virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth); FX_FLOAT GetItemLeftMargin(); FX_FLOAT GetItemRightMargin(); @@ -154,9 +154,9 @@ protected: virtual void OnKillFocus(); private: - bool m_bEnableNotify; + FX_BOOL m_bEnableNotify; FX_FLOAT m_fOldItemHeight; - bool m_bSizeChanged; + FX_BOOL m_bSizeChanged; FX_FLOAT m_fOldMin; FX_FLOAT m_fOldMax; }; @@ -188,9 +188,9 @@ public: virtual CFX_ByteString GetClassName() const; virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); - virtual bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); - void SetEditFocus(bool bLast); + void SetEditFocus(FX_BOOL bLast); CPWL_Edit* GetEdit() const; public: @@ -203,8 +203,8 @@ public: IPWL_NoteItem* GetSubItems(int32_t index) const; virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point); - void EnableRead(bool bEnabled); - void EnableModify(bool bEnabled); + void EnableRead(FX_BOOL bEnabled); + void EnableModify(FX_BOOL bEnabled); protected: virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); @@ -231,7 +231,7 @@ public: virtual int32_t CountSubItems() const; virtual IPWL_NoteItem* GetSubItems(int32_t index) const; virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem); - virtual void SetFocus(){SetNoteFocus(false);} + virtual void SetFocus(){SetNoteFocus(FALSE);} virtual IPWL_NoteItem* GetParentItem() const; virtual void* GetPrivateData() const; @@ -240,19 +240,19 @@ public: virtual CFX_WideString GetContents() const; virtual FX_SYSTEMTIME GetDateTime() const; virtual CFX_WideString GetSubjectName() const; - virtual bool IsTopItem() const { return false;} + virtual FX_BOOL IsTopItem() const { return FALSE;} virtual CPWL_Edit* GetEdit() const; public: - virtual bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); - virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); + virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); virtual CFX_ByteString GetClassName() const; virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point); virtual IPWL_NoteItem* GetFocusedNoteItem() const; virtual void ResetSubjectName(int32_t nItemIndex); - void EnableRead(bool bEnabled); - void EnableModify(bool bEnabled); + void EnableRead(FX_BOOL bEnabled); + void EnableModify(FX_BOOL bEnabled); protected: virtual void RePosChildWnd(); @@ -267,7 +267,7 @@ public: CPWL_NoteItem* CreateNoteItem(); CPWL_NoteItem* GetParentNoteItem() const; - void SetNoteFocus(bool bLast); + void SetNoteFocus(FX_BOOL bLast); void OnContentsValidate(); void OnCreateNoteItem(); @@ -289,8 +289,8 @@ private: CFX_WideString m_sAuthor; FX_FLOAT m_fOldItemHeight; - bool m_bSizeChanged; - bool m_bAllowModify; + FX_BOOL m_bSizeChanged; + FX_BOOL m_bAllowModify; }; class PWL_CLASS CPWL_Note : public CPWL_NoteItem @@ -305,17 +305,17 @@ public: virtual CFX_WideString GetAuthorName() const; virtual void SetBkColor(const CPWL_Color& color); virtual void ResetSubjectName(int32_t nItemIndex){} - virtual bool IsTopItem() const {return true;} + virtual FX_BOOL IsTopItem() const {return TRUE;} virtual const CPWL_Note* GetNote() const; virtual IPWL_NoteNotify* GetNoteNotify() const; public: IPWL_NoteItem* Reply(); - void EnableNotify(bool bEnabled); + void EnableNotify(FX_BOOL bEnabled); void SetIconType(int32_t nType); void SetOptionsText(const CFX_WideString& sText); - void EnableRead(bool bEnabled); - void EnableModify(bool bEnabled); + void EnableRead(FX_BOOL bEnabled); + void EnableModify(FX_BOOL bEnabled); CFX_WideString GetReplyString() const; void SetReplyString(const CFX_WideString& string); @@ -326,9 +326,9 @@ public: IPopup_Note* GetPopupNote() const {return m_pPopupNote;} public: - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); protected: virtual void RePosChildWnd(); @@ -336,9 +336,9 @@ protected: virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); - bool ResetScrollBar(); + FX_BOOL ResetScrollBar(); void RePosNoteChildren(); - bool ScrollBarShouldVisible(); + FX_BOOL ScrollBarShouldVisible(); private: CPWL_Label* m_pAuthor; @@ -349,10 +349,10 @@ private: CPWL_ScrollBar* m_pContentsBar; CPWL_Note_Options* m_pOptions; IPWL_NoteNotify* m_pNoteNotify; - bool m_bResizing; + FX_BOOL m_bResizing; PWL_SCROLL_INFO m_OldScrollInfo; CPDF_Rect m_rcCaption; - bool m_bEnalbleNotify; + FX_BOOL m_bEnalbleNotify; IPopup_Note* m_pPopupNote; CFX_WideString m_sReplyString; }; diff --git a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h index 4735922039..0390222545 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h +++ b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h @@ -49,15 +49,15 @@ public: virtual void OnCreate(PWL_CREATEPARAM & cp); virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream); virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); protected: PWL_SCROLLBAR_TYPE m_eScrollBarType; PWL_SBBUTTON_TYPE m_eSBButtonType; - bool m_bMouseDown; + FX_BOOL m_bMouseDown; }; struct PWL_FLOATRANGE @@ -67,7 +67,7 @@ public: PWL_FLOATRANGE(FX_FLOAT min,FX_FLOAT max); void Default(); void Set(FX_FLOAT min,FX_FLOAT max); - bool In(FX_FLOAT x) const; + FX_BOOL In(FX_FLOAT x) const; FX_FLOAT GetWidth() const; FX_FLOAT fMin,fMax; @@ -83,7 +83,7 @@ public: void SetClientWidth(FX_FLOAT width); void SetSmallStep(FX_FLOAT step); void SetBigStep(FX_FLOAT step); - bool SetPos(FX_FLOAT pos); + FX_BOOL SetPos(FX_FLOAT pos); void AddSmall(); void SubSmall(); @@ -110,8 +110,8 @@ public: virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream); virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); @@ -119,12 +119,12 @@ public: FX_FLOAT GetScrollBarWidth() const; PWL_SCROLLBAR_TYPE GetScrollBarType() const {return m_sbType;}; - void SetNotifyForever(bool bForever) {m_bNotifyForever = bForever;} + void SetNotifyForever(FX_BOOL bForever) {m_bNotifyForever = bForever;} protected: void SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClientWidth); void SetScrollPos(FX_FLOAT fPos); - void MovePosButton(bool bRefresh); + void MovePosButton(FX_BOOL bRefresh); void SetScrollStep(FX_FLOAT fBigStep,FX_FLOAT fSmallStep); void NotifyScrollWindow(); CPDF_Rect GetScrollArea() const; @@ -156,9 +156,9 @@ private: CPWL_SBButton* m_pMaxButton; CPWL_SBButton* m_pPosButton; PWL_SCROLL_PRIVATEDATA m_sData; - bool m_bMouseDown; - bool m_bMinOrMax; - bool m_bNotifyForever; + FX_BOOL m_bMouseDown; + FX_BOOL m_bMinOrMax; + FX_BOOL m_bNotifyForever; FX_FLOAT m_nOldPos; FX_FLOAT m_fOldPosButton; }; diff --git a/fpdfsdk/include/pdfwindow/PWL_Signature.h b/fpdfsdk/include/pdfwindow/PWL_Signature.h index c5557d6c6e..c94527772e 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Signature.h +++ b/fpdfsdk/include/pdfwindow/PWL_Signature.h @@ -43,9 +43,9 @@ public: void SetImage(CFX_DIBSource* pImage); void SetImageStream(CPDF_Stream * pStream, const FX_CHAR* sImageAlias); - void SetTextFlag(bool bTextExist); - void SetImageFlag(bool bImageExist); - void SetFoxitFlag(bool bFlagExist); + void SetTextFlag(FX_BOOL bTextExist); + void SetImageFlag(FX_BOOL bImageExist); + void SetFoxitFlag(FX_BOOL bFlagExist); protected: virtual void RePosChildWnd(); @@ -59,9 +59,9 @@ private: CPWL_Label* m_pDescription; CPWL_Signature_Image* m_pImage; - bool m_bTextExist; - bool m_bImageExist; - bool m_bFlagExist; + FX_BOOL m_bTextExist; + FX_BOOL m_bImageExist; + FX_BOOL m_bFlagExist; }; #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_SIGNATURE_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h index 14e576d868..f6659dfb00 100644 --- a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h +++ b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h @@ -26,14 +26,14 @@ public: virtual ~CPWL_CheckBox(); virtual CFX_ByteString GetClassName() const; - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); - void SetCheck(bool bCheck); - bool IsChecked() const; + void SetCheck(FX_BOOL bCheck); + FX_BOOL IsChecked() const; private: - bool m_bChecked; + FX_BOOL m_bChecked; }; class PWL_CLASS CPWL_RadioButton : public CPWL_Button @@ -43,14 +43,14 @@ public: virtual ~CPWL_RadioButton(); virtual CFX_ByteString GetClassName() const; - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); - void SetCheck(bool bCheck); - bool IsChecked() const; + void SetCheck(FX_BOOL bCheck); + FX_BOOL IsChecked() const; private: - bool m_bChecked; + FX_BOOL m_bChecked; }; #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_SPECIALBUTTON_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_Utils.h b/fpdfsdk/include/pdfwindow/PWL_Utils.h index f1e34c9060..2da0f42180 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Utils.h +++ b/fpdfsdk/include/pdfwindow/PWL_Utils.h @@ -109,8 +109,8 @@ class PWL_CLASS CPWL_Utils public: static CPDF_Rect InflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize); static CPDF_Rect DeflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize); - static bool IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2); - static bool ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild); + static FX_BOOL IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2); + static FX_BOOL ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild); static CPDF_Rect ScaleRect(const CPDF_Rect& rcRect,FX_FLOAT fScale); static CPVT_WordRange OverlapWordRange(const CPVT_WordRange& wr1, const CPVT_WordRange& wr2); static CPDF_Rect GetCenterSquare(const CPDF_Rect & rect); @@ -120,10 +120,10 @@ public: static CPDF_Rect OffsetRect(const CPDF_Rect & rect,FX_FLOAT x,FX_FLOAT y); static CPDF_Point OffsetPoint(const CPDF_Point & point,FX_FLOAT x,FX_FLOAT y); static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, int32_t nTransparancy = 255); - static bool IsBlackOrWhite(const CPWL_Color& color); + static FX_BOOL IsBlackOrWhite(const CPWL_Color& color); static CPWL_Color GetReverseColor(const CPWL_Color& color); - static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const bool & bFillOrStroke = true); + static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const FX_BOOL & bFillOrStroke = TRUE); static CFX_ByteString GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT fWidth, const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom, int32_t nStyle, const CPWL_Dash & dash); @@ -149,7 +149,7 @@ public: const CPWL_Color & crText); static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL, - bool bContinuous = true, FX_WORD SubWord = 0); + FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0); static CFX_ByteString GetEditSelAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL); static CFX_ByteString GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellCheck* pSpellCheck, @@ -157,7 +157,7 @@ public: const CPVT_WordRange * pRange = NULL); static CFX_ByteString GetTextAppStream(const CPDF_Rect & rcBBox,IFX_Edit_FontMap * pFontMap, const CFX_WideString & sText, int32_t nAlignmentH, int32_t nAlignmentV, - FX_FLOAT fFontSize, bool bMultiLine, bool bAutoReturn, const CPWL_Color & crText); + FX_FLOAT fFontSize, FX_BOOL bMultiLine, FX_BOOL bAutoReturn, const CPWL_Color & crText); static CFX_ByteString GetDropButtonAppStream(const CPDF_Rect & rcBBox); static void DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,const CPDF_Rect & rect, @@ -175,7 +175,7 @@ public: static void DrawFillArea(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, const CPDF_Point* pPts, int32_t nCount, const FX_COLORREF& color); static void DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, - bool bVertical, bool bHorizontal, CPDF_Rect rect, + FX_BOOL bVertical, FX_BOOL bHorizontal, CPDF_Rect rect, int32_t nTransparancy, int32_t nStartGray, int32_t nEndGray); static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h index 3b1d299dfb..c5b6ca4be1 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h @@ -137,7 +137,7 @@ struct PWL_CLASS CPWL_Color FX_FLOAT fColor1,fColor2,fColor3,fColor4; }; -inline bool operator == (const CPWL_Color &c1, const CPWL_Color &c2) +inline FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2) { return c1.nColorType == c2.nColorType && c1.fColor1 - c2.fColor1 < 0.0001 && c1.fColor1 - c2.fColor1 > -0.0001 && @@ -146,7 +146,7 @@ inline bool operator == (const CPWL_Color &c1, const CPWL_Color &c2) c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001; } -inline bool operator != (const CPWL_Color &c1, const CPWL_Color &c2) +inline FX_BOOL operator != (const CPWL_Color &c1, const CPWL_Color &c2) { return !operator == (c1, c2); } @@ -173,7 +173,7 @@ class IPWL_SpellCheck { public: virtual ~IPWL_SpellCheck() { } - virtual bool CheckWord(const FX_CHAR* sWord) = 0; + virtual FX_BOOL CheckWord(const FX_CHAR* sWord) = 0; virtual void SuggestWords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0; }; @@ -298,25 +298,25 @@ public: void Create(const PWL_CREATEPARAM & cp); virtual CFX_ByteString GetClassName() const; void Destroy(); - void Move(const CPDF_Rect & rcNew,bool bReset,bool bRefresh); + void Move(const CPDF_Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh); virtual void InvalidateRect(CPDF_Rect* pRect = NULL); void GetAppearanceStream(CFX_ByteString & sAppStream); void DrawAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnKeyUp(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag); - virtual bool OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnRButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); - virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnRButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); virtual void SetFocus(); virtual void KillFocus(); @@ -326,7 +326,7 @@ public: virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void SetTextColor(const CPWL_Color & color); virtual void SetTextStrokeColor(const CPWL_Color & color); - virtual void SetVisible(bool bVisible); + virtual void SetVisible(FX_BOOL bVisible); virtual CPDF_Rect GetFocusRect() const; virtual CPWL_Color GetBackgroundColor() const; @@ -338,7 +338,7 @@ public: virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const; virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const; - virtual bool IsModified() const {return false;} + virtual FX_BOOL IsModified() const {return FALSE;} virtual void SetFontSize(FX_FLOAT fFontSize); @@ -356,8 +356,8 @@ public: CPDF_Rect GetClientCenterSquare() const; CPDF_Rect GetWindowCenterSquare() const; int32_t GetBorderWidth() const; - bool IsVisible() const {return m_bVisible;} - bool HasFlag(FX_DWORD dwFlags) const; + FX_BOOL IsVisible() const {return m_bVisible;} + FX_BOOL HasFlag(FX_DWORD dwFlags) const; void AddFlag(FX_DWORD dwFlags); void RemoveFlag(FX_DWORD dwFlags); CPDF_Rect GetClipRect() const; @@ -366,13 +366,13 @@ public: CPWL_Dash GetBorderDash() const; void* GetAttachedData() const; - bool WndHitTest(const CPDF_Point & point) const; - bool ClientHitTest(const CPDF_Point & point) const; - bool IsCaptureMouse() const; + FX_BOOL WndHitTest(const CPDF_Point & point) const; + FX_BOOL ClientHitTest(const CPDF_Point & point) const; + FX_BOOL IsCaptureMouse() const; const CPWL_Wnd* GetFocused() const; - bool IsFocused() const; - bool IsReadOnly() const; + FX_BOOL IsFocused() const; + FX_BOOL IsReadOnly() const; CPWL_ScrollBar* GetVScrollBar() const; IFX_Edit_FontMap* GetFontMap() const; @@ -398,8 +398,8 @@ public: virtual FX_FLOAT GetItemLeftMargin() {return 0;} virtual FX_FLOAT GetItemRightMargin() {return 0;} - void EnableWindow(bool bEnable); - bool IsEnabled(); + void EnableWindow(FX_BOOL bEnable); + FX_BOOL IsEnabled(); virtual void SetCursor(); protected: @@ -422,11 +422,11 @@ protected: virtual void OnEnabled(); virtual void OnDisabled(); - void SetNotifyFlag(bool bNotifying = true){m_bNotifying = bNotifying;}; + void SetNotifyFlag(FX_BOOL bNotifying = TRUE){m_bNotifying = bNotifying;}; - bool IsValid() const; + FX_BOOL IsValid() const; PWL_CREATEPARAM GetCreationParam() const; - bool IsNotifying() const {return m_bNotifying;} + FX_BOOL IsNotifying() const {return m_bNotifying;} void InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew); @@ -434,14 +434,14 @@ protected: FX_RECT PWLtoWnd(const CPDF_Rect & rect) const; FX_HWND GetAttachedHWnd() const; - bool IsWndCaptureMouse(const CPWL_Wnd * pWnd) const; - bool IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const; + FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const; + FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const; const CPWL_Wnd* GetRootWnd() const; - bool IsCTRLpressed(FX_DWORD nFlag) const; - bool IsSHIFTpressed(FX_DWORD nFlag) const; - bool IsALTpressed(FX_DWORD nFlag) const; - bool IsINSERTpressed(FX_DWORD nFlag) const; + FX_BOOL IsCTRLpressed(FX_DWORD nFlag) const; + FX_BOOL IsSHIFTpressed(FX_DWORD nFlag) const; + FX_BOOL IsALTpressed(FX_DWORD nFlag) const; + FX_BOOL IsINSERTpressed(FX_DWORD nFlag) const; private: void AddChild(CPWL_Wnd * pWnd); @@ -467,10 +467,10 @@ private: CPDF_Rect m_rcWindow; CPDF_Rect m_rcClip; - bool m_bCreated; - bool m_bVisible; - bool m_bNotifying; - bool m_bEnabled; + FX_BOOL m_bCreated; + FX_BOOL m_bVisible; + FX_BOOL m_bNotifying; + FX_BOOL m_bEnabled; }; #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ -- cgit v1.2.3