summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/pdfwindow
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
commit320b2313d19869333ed453af546e61a9fc2b81c9 (patch)
tree25f2eb8a0991ac485ca6354f0d3caf7fd775e732 /fpdfsdk/include/pdfwindow
parent065e9321b84fc0490f3da9099e8840c65e06868d (diff)
downloadpdfium-320b2313d19869333ed453af546e61a9fc2b81c9.tar.xz
FX_BOOL considered harmful, part 2.
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
Diffstat (limited to 'fpdfsdk/include/pdfwindow')
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Button.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Caret.h10
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h22
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h52
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h30
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Icon.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_IconList.h28
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h26
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListCtrl.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h64
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ScrollBar.h26
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Signature.h12
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_SpecialButton.h20
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Utils.h14
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h82
16 files changed, 202 insertions, 202 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_Button.h b/fpdfsdk/include/pdfwindow/PWL_Button.h
index 2bf2eea865..322b9d4366 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 FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(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);
protected:
- FX_BOOL m_bMouseDown;
+ 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 6838bc49e7..42743657b7 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)
{
}
- FX_BOOL bVisible;
+ 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(FX_BOOL bVisible) {}
+ virtual void SetVisible(bool bVisible) {}
virtual void TimerProc();
- void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
+ void SetCaret(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;
- FX_BOOL m_bFlash;
+ 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 3f8604fb62..21d4e4a041 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 FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, 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);
+ bool OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag);
+ bool OnCharWithExit(FX_WORD nChar, 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 FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(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);
};
@@ -58,8 +58,8 @@ public:
virtual CFX_ByteString GetClassName() const;
virtual void OnCreate(PWL_CREATEPARAM & cp);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual 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();
- FX_BOOL IsModified() const;
+ 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();
- FX_BOOL IsPopup() const;
+ bool IsPopup() const;
void SetSelectText();
@@ -96,14 +96,14 @@ private:
void CreateButton(const PWL_CREATEPARAM & cp);
void CreateListBox(const PWL_CREATEPARAM & cp);
- void SetPopup(FX_BOOL bPopup);
+ void SetPopup(bool bPopup);
private:
CPWL_CBEdit* m_pEdit;
CPWL_CBButton* m_pButton;
CPWL_CBListBox* m_pList;
- FX_BOOL m_bPopup;
+ 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 97147a964d..50e1ebee3c 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(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
+ virtual void OnBeforeKeyStroke(bool bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
- 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;
+ bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag) = 0;
+ virtual void OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, 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 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 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 OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
virtual CPDF_Rect GetFocusRect() const;
public:
- 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 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 SetCharArray(int32_t nCharArray);
void SetLimitChar(int32_t nLimitChar);
- void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE);
- void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE);
+ void SetHorzScale(int32_t nHorzScale, bool bPaint = true);
+ void SetCharSpace(FX_FLOAT fCharSpace, bool bPaint = true);
- void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
+ void SetLineLeading(FX_FLOAT fLineLeading, bool bPaint = true);
- void EnableSpellCheck(FX_BOOL bEnabled);
+ void EnableSpellCheck(bool bEnabled);
- FX_BOOL CanSelectAll() const;
- FX_BOOL CanClear() const;
- FX_BOOL CanCopy() const;
- FX_BOOL CanCut() const;
- FX_BOOL CanPaste() const;
+ bool CanSelectAll() const;
+ bool CanClear() const;
+ bool CanCopy() const;
+ bool CanCut() const;
+ 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;
- FX_BOOL IsTextFull() const;
+ 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(FX_BOOL bShow);
- FX_BOOL IsVScrollBarVisible() const;
+ virtual void ShowVScrollBar(bool bShow);
+ 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, FX_BOOL bLatin, FX_BOOL bArabic) const;
+ CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, bool bLatin, bool bArabic) const;
void AjustArabicWords(const CPVT_WordRange& wr);
public:
- FX_BOOL IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag);
+ bool IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag);
private:
IPWL_Filler_Notify* m_pFillerNotify;
IPWL_SpellCheck* m_pSpellCheck;
- FX_BOOL m_bFocus;
+ 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 9b088b1162..e5123fd1b9 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 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 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 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;
- FX_BOOL IsModified() const;
+ bool IsModified() const;
CFX_WideString GetText() const;
void SetSel(int32_t nStartChar,int32_t nEndChar);
@@ -105,7 +105,7 @@ public:
void Paint();
- void EnableRefresh(FX_BOOL bRefresh);
+ void EnableRefresh(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;
- FX_BOOL CanUndo() const;
- FX_BOOL CanRedo() const;
+ bool CanUndo() const;
+ bool CanRedo() const;
void Redo();
void Undo();
void SetReadyToInput();
protected:
- virtual void ShowVScrollBar(FX_BOOL bShow);
+ virtual void ShowVScrollBar(bool bShow);
virtual void InsertWord(FX_WORD word, int32_t nCharset);
virtual void InsertReturn();
virtual void InsertText(const FX_WCHAR* csText);
virtual void SetCursor();
- FX_BOOL IsWndHorV();
+ bool IsWndHorV();
void Delete();
void Backspace();
protected:
void GetCaretInfo(CPDF_Point & ptHead, CPDF_Point & ptFoot) const;
- void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
+ void SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
- void SetEditCaret(FX_BOOL bVisible);
+ void SetEditCaret(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(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
+ virtual void IOnSetCaret(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;
- FX_BOOL m_bMouseDown;
+ 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 d32cc93078..e4bbbf2664 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 FX_BOOL IsStandardFont(const CFX_ByteString& sFontName);
+ static 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);
- FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
+ bool KnowWord(int32_t nFontIndex, FX_WORD word);
virtual CPDF_Document* GetDocument();
void Empty();
- int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind);
+ int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, 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 44a5c0cbaf..b6331b6e09 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();
- FX_BOOL IsProportionalScale();
+ bool IsProportionalScale();
void GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom);
- FX_BOOL GetFittingBounds();
+ 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 2f6b323773..3c71e57b49 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(FX_BOOL bSelected);
- FX_BOOL IsSelected() const;
+ void SetSelect(bool bSelected);
+ 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;
- FX_BOOL m_bSelected;
+ 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(FX_BOOL bNotify);
+ void EnableNotify(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 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);
+ 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);
private:
CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const;
- void SelectItem(int32_t nItemIndex, FX_BOOL bSelect);
+ void SelectItem(int32_t nItemIndex, bool bSelect);
int32_t FindItemIndex(const CPDF_Point& point);
- FX_BOOL m_nSelectIndex;
+ bool m_nSelectIndex;
IPWL_IconList_Notify* m_pNotify;
- FX_BOOL m_bEnableNotify;
- FX_BOOL m_bMouseDown;
+ bool m_bEnableNotify;
+ bool m_bMouseDown;
int32_t m_nListCount;
};
@@ -100,13 +100,13 @@ public:
CPWL_IconList(int32_t nListCount);
virtual ~CPWL_IconList();
- virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
+ virtual 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(FX_BOOL bNotify);
+ void EnableNotify(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 97a4529af9..43d60a2f09 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(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
+ void IOnSetCaret(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 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 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 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(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag);
+ void OnNotifySelChanged(bool bKeyDown, 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(FX_BOOL bHoverSel);
+ void SetHoverSel(bool bHoverSel);
int32_t GetCount() const;
- FX_BOOL IsMultipleSel() const;
+ bool IsMultipleSel() const;
int32_t GetCaretIndex() const;
int32_t GetCurSel() const;
- FX_BOOL IsItemSelected(int32_t nItemIndex) const;
+ 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;
- FX_BOOL m_bMouseDown;
- FX_BOOL m_bHoverSel;
+ bool m_bMouseDown;
+ 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 c107a0cf5e..3beee19230 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(FX_BOOL bMove,int32_t nStart);
+ void ResetAll(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 a60eba30dd..b1e61c4aa4 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(FX_BOOL bShow) = 0;
- virtual void OnNoteActivate(FX_BOOL bActive) = 0;
+ virtual void OnNoteShow(bool bShow) = 0;
+ virtual void OnNoteActivate(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 FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(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);
private:
- FX_BOOL m_bMouseDown;
+ bool m_bMouseDown;
};
class CPWL_Note_LBBox : public CPWL_Wnd
@@ -140,7 +140,7 @@ public:
CPWL_Note_Edit();
virtual ~CPWL_Note_Edit();
- void EnableNotify(FX_BOOL bEnable) {m_bEnableNotify = bEnable;}
+ void EnableNotify(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:
- FX_BOOL m_bEnableNotify;
+ bool m_bEnableNotify;
FX_FLOAT m_fOldItemHeight;
- FX_BOOL m_bSizeChanged;
+ 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 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- void SetEditFocus(FX_BOOL bLast);
+ void SetEditFocus(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(FX_BOOL bEnabled);
- void EnableModify(FX_BOOL bEnabled);
+ void EnableRead(bool bEnabled);
+ void EnableModify(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 FX_BOOL IsTopItem() const { return FALSE;}
+ virtual bool IsTopItem() const { return false;}
virtual CPWL_Edit* GetEdit() const;
public:
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
+ virtual 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(FX_BOOL bEnabled);
- void EnableModify(FX_BOOL bEnabled);
+ void EnableRead(bool bEnabled);
+ void EnableModify(bool bEnabled);
protected:
virtual void RePosChildWnd();
@@ -267,7 +267,7 @@ public:
CPWL_NoteItem* CreateNoteItem();
CPWL_NoteItem* GetParentNoteItem() const;
- void SetNoteFocus(FX_BOOL bLast);
+ void SetNoteFocus(bool bLast);
void OnContentsValidate();
void OnCreateNoteItem();
@@ -289,8 +289,8 @@ private:
CFX_WideString m_sAuthor;
FX_FLOAT m_fOldItemHeight;
- FX_BOOL m_bSizeChanged;
- FX_BOOL m_bAllowModify;
+ bool m_bSizeChanged;
+ 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 FX_BOOL IsTopItem() const {return TRUE;}
+ virtual bool IsTopItem() const {return true;}
virtual const CPWL_Note* GetNote() const;
virtual IPWL_NoteNotify* GetNoteNotify() const;
public:
IPWL_NoteItem* Reply();
- void EnableNotify(FX_BOOL bEnabled);
+ void EnableNotify(bool bEnabled);
void SetIconType(int32_t nType);
void SetOptionsText(const CFX_WideString& sText);
- void EnableRead(FX_BOOL bEnabled);
- void EnableModify(FX_BOOL bEnabled);
+ void EnableRead(bool bEnabled);
+ void EnableModify(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 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);
+ 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);
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);
- FX_BOOL ResetScrollBar();
+ bool ResetScrollBar();
void RePosNoteChildren();
- FX_BOOL ScrollBarShouldVisible();
+ 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;
- FX_BOOL m_bResizing;
+ bool m_bResizing;
PWL_SCROLL_INFO m_OldScrollInfo;
CPDF_Rect m_rcCaption;
- FX_BOOL m_bEnalbleNotify;
+ 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 0390222545..4735922039 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 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 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);
protected:
PWL_SCROLLBAR_TYPE m_eScrollBarType;
PWL_SBBUTTON_TYPE m_eSBButtonType;
- FX_BOOL m_bMouseDown;
+ 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);
- FX_BOOL In(FX_FLOAT x) const;
+ 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);
- FX_BOOL SetPos(FX_FLOAT pos);
+ 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 FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(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 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(FX_BOOL bForever) {m_bNotifyForever = bForever;}
+ void SetNotifyForever(bool bForever) {m_bNotifyForever = bForever;}
protected:
void SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClientWidth);
void SetScrollPos(FX_FLOAT fPos);
- void MovePosButton(FX_BOOL bRefresh);
+ void MovePosButton(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;
- FX_BOOL m_bMouseDown;
- FX_BOOL m_bMinOrMax;
- FX_BOOL m_bNotifyForever;
+ bool m_bMouseDown;
+ bool m_bMinOrMax;
+ 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 c94527772e..c5557d6c6e 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(FX_BOOL bTextExist);
- void SetImageFlag(FX_BOOL bImageExist);
- void SetFoxitFlag(FX_BOOL bFlagExist);
+ void SetTextFlag(bool bTextExist);
+ void SetImageFlag(bool bImageExist);
+ void SetFoxitFlag(bool bFlagExist);
protected:
virtual void RePosChildWnd();
@@ -59,9 +59,9 @@ private:
CPWL_Label* m_pDescription;
CPWL_Signature_Image* m_pImage;
- FX_BOOL m_bTextExist;
- FX_BOOL m_bImageExist;
- FX_BOOL m_bFlagExist;
+ bool m_bTextExist;
+ bool m_bImageExist;
+ 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 f6659dfb00..14e576d868 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 FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
- void SetCheck(FX_BOOL bCheck);
- FX_BOOL IsChecked() const;
+ void SetCheck(bool bCheck);
+ bool IsChecked() const;
private:
- FX_BOOL m_bChecked;
+ 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 FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
- void SetCheck(FX_BOOL bCheck);
- FX_BOOL IsChecked() const;
+ void SetCheck(bool bCheck);
+ bool IsChecked() const;
private:
- FX_BOOL m_bChecked;
+ 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 2da0f42180..f1e34c9060 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 FX_BOOL IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2);
- static FX_BOOL ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild);
+ static bool IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2);
+ static 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 FX_BOOL IsBlackOrWhite(const CPWL_Color& color);
+ static bool IsBlackOrWhite(const CPWL_Color& color);
static CPWL_Color GetReverseColor(const CPWL_Color& color);
- static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const FX_BOOL & bFillOrStroke = TRUE);
+ static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const 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,
- FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0);
+ 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, FX_BOOL bMultiLine, FX_BOOL bAutoReturn, const CPWL_Color & crText);
+ FX_FLOAT fFontSize, bool bMultiLine, 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,
- FX_BOOL bVertical, FX_BOOL bHorizontal, CPDF_Rect rect,
+ bool bVertical, 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 c5b6ca4be1..3b1d299dfb 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 FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2)
+inline 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 FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2)
c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001;
}
-inline FX_BOOL operator != (const CPWL_Color &c1, const CPWL_Color &c2)
+inline 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 FX_BOOL CheckWord(const FX_CHAR* sWord) = 0;
+ virtual 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,FX_BOOL bReset,FX_BOOL bRefresh);
+ void Move(const CPDF_Rect & rcNew,bool bReset,bool bRefresh);
virtual void InvalidateRect(CPDF_Rect* pRect = NULL);
void GetAppearanceStream(CFX_ByteString & sAppStream);
void DrawAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- 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 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 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(FX_BOOL bVisible);
+ virtual void SetVisible(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 FX_BOOL IsModified() const {return FALSE;}
+ virtual 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;
- FX_BOOL IsVisible() const {return m_bVisible;}
- FX_BOOL HasFlag(FX_DWORD dwFlags) const;
+ bool IsVisible() const {return m_bVisible;}
+ 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;
- FX_BOOL WndHitTest(const CPDF_Point & point) const;
- FX_BOOL ClientHitTest(const CPDF_Point & point) const;
- FX_BOOL IsCaptureMouse() const;
+ bool WndHitTest(const CPDF_Point & point) const;
+ bool ClientHitTest(const CPDF_Point & point) const;
+ bool IsCaptureMouse() const;
const CPWL_Wnd* GetFocused() const;
- FX_BOOL IsFocused() const;
- FX_BOOL IsReadOnly() const;
+ bool IsFocused() const;
+ 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(FX_BOOL bEnable);
- FX_BOOL IsEnabled();
+ void EnableWindow(bool bEnable);
+ bool IsEnabled();
virtual void SetCursor();
protected:
@@ -422,11 +422,11 @@ protected:
virtual void OnEnabled();
virtual void OnDisabled();
- void SetNotifyFlag(FX_BOOL bNotifying = TRUE){m_bNotifying = bNotifying;};
+ void SetNotifyFlag(bool bNotifying = true){m_bNotifying = bNotifying;};
- FX_BOOL IsValid() const;
+ bool IsValid() const;
PWL_CREATEPARAM GetCreationParam() const;
- FX_BOOL IsNotifying() const {return m_bNotifying;}
+ 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;
- FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const;
- FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const;
+ bool IsWndCaptureMouse(const CPWL_Wnd * pWnd) const;
+ bool IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const;
const CPWL_Wnd* GetRootWnd() 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;
+ bool IsCTRLpressed(FX_DWORD nFlag) const;
+ bool IsSHIFTpressed(FX_DWORD nFlag) const;
+ bool IsALTpressed(FX_DWORD nFlag) const;
+ 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;
- FX_BOOL m_bCreated;
- FX_BOOL m_bVisible;
- FX_BOOL m_bNotifying;
- FX_BOOL m_bEnabled;
+ bool m_bCreated;
+ bool m_bVisible;
+ bool m_bNotifying;
+ bool m_bEnabled;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_