summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:36:00 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:36:00 -0700
commitf1e7c461dfabbff6b65a072f24f6711b34159361 (patch)
tree3b0bb772a59669f06b86824a444fd06642592d4b /fpdfsdk/src/pdfwindow
parent320b2313d19869333ed453af546e61a9fc2b81c9 (diff)
downloadpdfium-f1e7c461dfabbff6b65a072f24f6711b34159361.tar.xz
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 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Button.cpp14
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Caret.cpp22
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp100
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp228
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp108
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp18
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Icon.cpp8
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_IconList.cpp60
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Label.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp80
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp8
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp194
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp94
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Signature.cpp20
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp36
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Utils.cpp104
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Wnd.cpp94
17 files changed, 595 insertions, 595 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Button.cpp b/fpdfsdk/src/pdfwindow/PWL_Button.cpp
index 1712bd24fc..84962285c4 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Button.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Button.cpp
@@ -12,7 +12,7 @@
/* ------------------------------- CPWL_Button ---------------------------------- */
CPWL_Button::CPWL_Button() :
- m_bMouseDown(false)
+ m_bMouseDown(FALSE)
{
}
@@ -31,23 +31,23 @@ void CPWL_Button::OnCreate(PWL_CREATEPARAM & cp)
cp.eCursorType = FXCT_HAND;
}
-bool CPWL_Button::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Button::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point, nFlag);
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
- return true;
+ return TRUE;
}
-bool CPWL_Button::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Button::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point, nFlag);
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Caret.cpp b/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
index deccf06449..84a8b3d186 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
@@ -16,7 +16,7 @@
//////////////////////////////////////////////////////////////////////
CPWL_Caret::CPWL_Caret() :
- m_bFlash(false),
+ m_bFlash(FALSE),
m_ptHead(0,0),
m_ptFoot(0,0),
m_fWidth(0.4f),
@@ -135,7 +135,7 @@ CPDF_Rect CPWL_Caret::GetCaretRect() const
m_ptHead.y);
}
-void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
+void CPWL_Caret::SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
{
if (bVisible)
{
@@ -147,9 +147,9 @@ void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_P
m_ptHead = ptHead;
m_ptFoot = ptFoot;
- m_bFlash = true;
- //Move(GetCaretRect(),false,true);
- Move(m_rcInvalid, false, true);
+ m_bFlash = TRUE;
+ //Move(GetCaretRect(),FALSE,TRUE);
+ Move(m_rcInvalid, FALSE, TRUE);
}
}
else
@@ -160,11 +160,11 @@ void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_P
EndTimer();
BeginTimer(PWL_CARET_FLASHINTERVAL);
- CPWL_Wnd::SetVisible(true);
- m_bFlash = true;
+ CPWL_Wnd::SetVisible(TRUE);
+ m_bFlash = TRUE;
- //Move(GetCaretRect(),false,true);
- Move(m_rcInvalid, false, true);
+ //Move(GetCaretRect(),FALSE,TRUE);
+ Move(m_rcInvalid, FALSE, TRUE);
}
}
else
@@ -172,11 +172,11 @@ void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_P
m_ptHead = CPDF_Point(0, 0);
m_ptFoot = CPDF_Point(0, 0);
- m_bFlash = false;
+ m_bFlash = FALSE;
if (IsVisible())
{
EndTimer();
- CPWL_Wnd::SetVisible(false);
+ CPWL_Wnd::SetVisible(FALSE);
}
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index 6c5dd5516e..f5c8a815d4 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -22,14 +22,14 @@
/* ---------------------------- CPWL_CBListBox ---------------------------- */
-bool CPWL_CBListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CBListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
if (m_bMouseDown)
{
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
if (ClientHitTest(point))
{
@@ -38,23 +38,23 @@ bool CPWL_CBListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
pParent->OnNotify(this,PNM_LBUTTONUP,0,PWL_MAKEDWORD(point.x,point.y));
}
- bool bExit = false;
- OnNotifySelChanged(false,bExit, nFlag);
- if (bExit) return false;
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(FALSE,bExit, nFlag);
+ if (bExit) return FALSE;
}
}
- return true;
+ return TRUE;
}
-bool CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag)
+FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag)
{
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
switch (nChar)
{
default:
- return false;
+ return FALSE;
case FWL_VKEY_Up:
case FWL_VKEY_Down:
case FWL_VKEY_Home:
@@ -88,25 +88,25 @@ bool CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFl
break;
}
- OnNotifySelChanged(true,bExit, nFlag);
+ OnNotifySelChanged(TRUE,bExit, nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_CBListBox::OnCharWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag)
+FX_BOOL CPWL_CBListBox::OnCharWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag)
{
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
- if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return false;
+ if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return FALSE;
if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetParentWindow())
{
pComboBox->SetSelectText();
}
- OnNotifySelChanged(true,bExit,nFlag);
+ OnNotifySelChanged(TRUE,bExit,nFlag);
- return true;
+ return TRUE;
}
/* ---------------------------- CPWL_CBButton ---------------------------- */
@@ -177,7 +177,7 @@ void CPWL_CBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
}
}
-bool CPWL_CBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -188,16 +188,16 @@ bool CPWL_CBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
pParent->OnNotify(this,PNM_LBUTTONDOWN,0,PWL_MAKEDWORD(point.x,point.y));
}
- return true;
+ return TRUE;
}
-bool CPWL_CBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point, nFlag);
ReleaseCapture();
- return true;
+ return TRUE;
}
/* ---------------------------- CPWL_ComboBox ---------------------------- */
@@ -205,7 +205,7 @@ bool CPWL_CBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
CPWL_ComboBox::CPWL_ComboBox() : m_pEdit(NULL),
m_pButton(NULL),
m_pList(NULL),
- m_bPopup(false),
+ m_bPopup(FALSE),
m_nPopupWhere(0),
m_nSelectItem(-1),
m_pFillerNotify(NULL)
@@ -231,7 +231,7 @@ void CPWL_ComboBox::SetFocus()
void CPWL_ComboBox::KillFocus()
{
- SetPopup(false);
+ SetPopup(FALSE);
CPWL_Wnd::KillFocus();
}
@@ -439,15 +439,15 @@ void CPWL_ComboBox::RePosChildWnd()
}
if (m_pButton)
- m_pButton->Move(rcButton,true,false);
+ m_pButton->Move(rcButton,TRUE,FALSE);
if (m_pEdit)
- m_pEdit->Move(rcEdit,true,false);
+ m_pEdit->Move(rcEdit,TRUE,FALSE);
if (m_pList)
{
- m_pList->SetVisible(true);
- m_pList->Move(rcList,true,false);
+ m_pList->SetVisible(TRUE);
+ m_pList->Move(rcList,TRUE,FALSE);
m_pList->ScrollToListItem(m_nSelectItem);
}
}
@@ -461,7 +461,7 @@ void CPWL_ComboBox::RePosChildWnd()
rcButton.left = rcClient.left;
if (m_pButton)
- m_pButton->Move(rcButton,true,false);
+ m_pButton->Move(rcButton,TRUE,FALSE);
CPDF_Rect rcEdit = rcClient;
rcEdit.right = rcButton.left - 1.0f;
@@ -473,10 +473,10 @@ void CPWL_ComboBox::RePosChildWnd()
rcEdit.right = rcEdit.left;
if (m_pEdit)
- m_pEdit->Move(rcEdit,true,false);
+ m_pEdit->Move(rcEdit,TRUE,FALSE);
if (m_pList)
- m_pList->SetVisible(false);
+ m_pList->SetVisible(FALSE);
}
}
@@ -491,7 +491,7 @@ CPDF_Rect CPWL_ComboBox::GetFocusRect() const
return CPDF_Rect();
}
-void CPWL_ComboBox::SetPopup(bool bPopup)
+void CPWL_ComboBox::SetPopup(FX_BOOL bPopup)
{
if (!m_pList) return;
if (bPopup == m_bPopup) return;
@@ -528,21 +528,21 @@ void CPWL_ComboBox::SetPopup(bool bPopup)
}
m_nPopupWhere = nWhere;
- Move(rcWindow, true, true);
+ Move(rcWindow, TRUE, TRUE);
}
}
}
else
{
m_bPopup = bPopup;
- Move(m_rcOldWindow, true, true);
+ Move(m_rcOldWindow, TRUE, TRUE);
}
}
-bool CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
- if (!m_pList) return false;
- if (!m_pEdit) return false;
+ if (!m_pList) return FALSE;
+ if (!m_pEdit) return FALSE;
m_nSelectItem = -1;
@@ -551,47 +551,47 @@ bool CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
case FWL_VKEY_Up:
if (m_pList->GetCurSel() > 0)
{
- bool bExit = false;
+ FX_BOOL bExit = FALSE;
if (m_pList->OnKeyDownWithExit(nChar,bExit,nFlag))
{
- if (bExit) return false;
+ if (bExit) return FALSE;
SetSelectText();
}
}
- return true;
+ return TRUE;
case FWL_VKEY_Down:
if (m_pList->GetCurSel() < m_pList->GetCount() - 1)
{
- bool bExit = false;
+ FX_BOOL bExit = FALSE;
if (m_pList->OnKeyDownWithExit(nChar,bExit,nFlag))
{
- if (bExit) return false;
+ if (bExit) return FALSE;
SetSelectText();
}
}
- return true;
+ return TRUE;
}
if (HasFlag(PCBS_ALLOWCUSTOMTEXT))
return m_pEdit->OnKeyDown(nChar,nFlag);
- return false;
+ return FALSE;
}
-bool CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
if (!m_pList)
- return false;
+ return FALSE;
if (!m_pEdit)
- return false;
+ return FALSE;
m_nSelectItem = -1;
if (HasFlag(PCBS_ALLOWCUSTOMTEXT))
return m_pEdit->OnChar(nChar,nFlag);
- bool bExit = false;
- return m_pList->OnCharWithExit(nChar,bExit,nFlag) ? bExit : false;
+ FX_BOOL bExit = FALSE;
+ return m_pList->OnCharWithExit(nChar,bExit,nFlag) ? bExit : FALSE;
}
void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -613,7 +613,7 @@ void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
SetSelectText();
SelectAll();
m_pEdit->SetFocus();
- SetPopup(false);
+ SetPopup(FALSE);
return;
}
}
@@ -622,7 +622,7 @@ void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
CPWL_Wnd::OnNotify(pWnd,msg,wParam,lParam);
}
-bool CPWL_ComboBox::IsPopup() const
+FX_BOOL CPWL_ComboBox::IsPopup() const
{
return m_bPopup;
}
@@ -637,7 +637,7 @@ void CPWL_ComboBox::SetSelectText()
m_nSelectItem = m_pList->GetCurSel();
}
-bool CPWL_ComboBox::IsModified() const
+FX_BOOL CPWL_ComboBox::IsModified() const
{
return m_pEdit->IsModified();
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 303ae963f4..58d8a79da1 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -19,14 +19,14 @@
CPWL_Edit::CPWL_Edit() : m_pFillerNotify(NULL),
m_pSpellCheck(NULL),
- m_bFocus(false)
+ m_bFocus(FALSE)
{
m_pFormFiller = NULL;
}
CPWL_Edit::~CPWL_Edit()
{
- ASSERT(m_bFocus == false);
+ ASSERT(m_bFocus == FALSE);
}
CFX_ByteString CPWL_Edit::GetClassName() const
@@ -49,7 +49,7 @@ void CPWL_Edit::SetText(const FX_WCHAR* csText)
if (CXML_Element * pXML = CXML_Element::Parse(sValue.c_str(), sValue.GetLength()))
{
int32_t nCount = pXML->CountChildren();
- bool bFirst = true;
+ FX_BOOL bFirst = TRUE;
swText.Empty();
@@ -67,7 +67,7 @@ void CPWL_Edit::SetText(const FX_WCHAR* csText)
swSection += pSubElement->GetContent(j);
}
- if (bFirst)bFirst = false;
+ if (bFirst)bFirst = FALSE;
else
swText += FWL_VKEY_Return;
swText += swSection;
@@ -90,7 +90,7 @@ void CPWL_Edit::RePosChildWnd()
rcWindow.bottom,
rcWindow.right + PWL_SCROLLBAR_WIDTH,
rcWindow.top);
- pVSB->Move(rcVScroll, true, false);
+ pVSB->Move(rcVScroll, TRUE, FALSE);
}
if (m_pEditCaret && !HasFlag(PES_TEXTOVERFLOW))
@@ -114,39 +114,39 @@ CPDF_Rect CPWL_Edit::GetClientRect() const
return rcClient;
}
-void CPWL_Edit::SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat, bool bPaint/* = true*/)
+void CPWL_Edit::SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetAlignmentH((int32_t)nFormat, bPaint);
}
-void CPWL_Edit::SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat, bool bPaint/* = true*/)
+void CPWL_Edit::SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetAlignmentV((int32_t)nFormat, bPaint);
}
-bool CPWL_Edit::CanSelectAll() const
+FX_BOOL CPWL_Edit::CanSelectAll() const
{
return GetSelectWordRange() != m_pEdit->GetWholeWordRange();
}
-bool CPWL_Edit::CanClear() const
+FX_BOOL CPWL_Edit::CanClear() const
{
return !IsReadOnly() && m_pEdit->IsSelected();
}
-bool CPWL_Edit::CanCopy() const
+FX_BOOL CPWL_Edit::CanCopy() const
{
return !HasFlag(PES_PASSWORD) && !HasFlag(PES_NOREAD) && m_pEdit->IsSelected();
}
-bool CPWL_Edit::CanCut() const
+FX_BOOL CPWL_Edit::CanCut() const
{
return CanCopy() && !IsReadOnly();
}
-bool CPWL_Edit::CanPaste() const
+FX_BOOL CPWL_Edit::CanPaste() const
{
- if (IsReadOnly()) return false;
+ if (IsReadOnly()) return FALSE;
CFX_WideString swClipboard;
if (IFX_SystemHandler* pSH = GetSystemHandler())
@@ -175,13 +175,13 @@ void CPWL_Edit::PasteText()
if (m_pFillerNotify)
{
- bool bRC = true;
- bool bExit = false;
+ FX_BOOL bRC = TRUE;
+ FX_BOOL bExit = FALSE;
CFX_WideString strChangeEx;
int nSelStart = 0;
int nSelEnd = 0;
GetSel(nSelStart, nSelEnd);
- m_pFillerNotify->OnBeforeKeyStroke(true, GetAttachedData(), 0 , swClipboard, strChangeEx, nSelStart, nSelEnd, true, bRC, bExit, 0);
+ m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), 0 , swClipboard, strChangeEx, nSelStart, nSelEnd, TRUE, bRC, bExit, 0);
if (!bRC) return;
if (bExit) return;
}
@@ -194,8 +194,8 @@ void CPWL_Edit::PasteText()
if (m_pFillerNotify)
{
- bool bExit = false;
- m_pFillerNotify->OnAfterKeyStroke(true, GetAttachedData(), bExit,0);
+ FX_BOOL bExit = FALSE;
+ m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit,0);
if (bExit) return;
}
}
@@ -227,52 +227,52 @@ void CPWL_Edit::OnCreated()
m_rcOldWindow = GetWindowRect();
m_pEdit->SetOprNotify(this);
- m_pEdit->EnableOprNotify(true);
+ m_pEdit->EnableOprNotify(TRUE);
}
void CPWL_Edit::SetParamByFlag()
{
if (HasFlag(PES_RIGHT))
{
- m_pEdit->SetAlignmentH(2, false);
+ m_pEdit->SetAlignmentH(2, FALSE);
}
else if (HasFlag(PES_MIDDLE))
{
- m_pEdit->SetAlignmentH(1, false);
+ m_pEdit->SetAlignmentH(1, FALSE);
}
else
{
- m_pEdit->SetAlignmentH(0, false);
+ m_pEdit->SetAlignmentH(0, FALSE);
}
if (HasFlag(PES_BOTTOM))
{
- m_pEdit->SetAlignmentV(2, false);
+ m_pEdit->SetAlignmentV(2, FALSE);
}
else if (HasFlag(PES_CENTER))
{
- m_pEdit->SetAlignmentV(1, false);
+ m_pEdit->SetAlignmentV(1, FALSE);
}
else
{
- m_pEdit->SetAlignmentV(0, false);
+ m_pEdit->SetAlignmentV(0, FALSE);
}
if (HasFlag(PES_PASSWORD))
{
- m_pEdit->SetPasswordChar('*', false);
+ m_pEdit->SetPasswordChar('*', FALSE);
}
- m_pEdit->SetMultiLine(HasFlag(PES_MULTILINE), false);
- m_pEdit->SetAutoReturn(HasFlag(PES_AUTORETURN), false);
- m_pEdit->SetAutoFontSize(HasFlag(PWS_AUTOFONTSIZE), false);
- m_pEdit->SetAutoScroll(HasFlag(PES_AUTOSCROLL), false);
+ m_pEdit->SetMultiLine(HasFlag(PES_MULTILINE), FALSE);
+ m_pEdit->SetAutoReturn(HasFlag(PES_AUTORETURN), FALSE);
+ m_pEdit->SetAutoFontSize(HasFlag(PWS_AUTOFONTSIZE), FALSE);
+ m_pEdit->SetAutoScroll(HasFlag(PES_AUTOSCROLL), FALSE);
m_pEdit->EnableUndo(HasFlag(PES_UNDO));
if (HasFlag(PES_TEXTOVERFLOW))
{
SetClipRect(CPDF_Rect(0.0f,0.0f,0.0f,0.0f));
- m_pEdit->SetTextOverflow(true, false);
+ m_pEdit->SetTextOverflow(TRUE, FALSE);
}
else
{
@@ -304,7 +304,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
case PBS_SOLID:
{
sLine << "q\n" << GetBorderWidth() << " w\n"
- << CPWL_Utils::GetColorAppStream(GetBorderColor(),false) << " 2 J 0 j\n";
+ << CPWL_Utils::GetColorAppStream(GetBorderColor(),FALSE) << " 2 J 0 j\n";
for (int32_t i=1;i<nCharArray;i++)
{
@@ -320,7 +320,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
case PBS_DASH:
{
sLine << "q\n" << GetBorderWidth() << " w\n"
- << CPWL_Utils::GetColorAppStream(GetBorderColor(),false) << " 2 J 0 j\n"
+ << CPWL_Utils::GetColorAppStream(GetBorderColor(),FALSE) << " 2 J 0 j\n"
<< "[" << GetBorderDash().nDash << " "
<< GetBorderDash().nGap << "] "
<< GetBorderDash().nPhase << " d\n";
@@ -383,7 +383,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
{
CFX_ByteString sSpellCheck = CPWL_Utils::GetSpellCheckAppStream(m_pEdit, m_pSpellCheck, ptOffset, &wrVisible);
if (sSpellCheck.GetLength() > 0)
- sText << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,1,0,0),false) << sSpellCheck;
+ sText << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,1,0,0),FALSE) << sSpellCheck;
}
if (sText.GetLength() > 0)
@@ -487,7 +487,7 @@ IFX_SystemHandler* pSysHandler = GetSystemHandler();
}
}
-bool CPWL_Edit::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -496,16 +496,16 @@ bool CPWL_Edit::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
if (m_bMouseDown)
InvalidateRect();
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
m_pEdit->OnMouseDown(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
-bool CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDblClk(point, nFlag);
@@ -514,7 +514,7 @@ bool CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
m_pEdit->SelectAll();
}
- return true;
+ return TRUE;
}
#define WM_PWLEDIT_UNDO 0x01
@@ -526,16 +526,16 @@ bool CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
#define WM_PWLEDIT_SELECTALL 0x07
#define WM_PWLEDIT_SUGGEST 0x08
-bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (m_bMouseDown) return false;
+ if (m_bMouseDown) return FALSE;
CPWL_Wnd::OnRButtonUp(point, nFlag);
- if (!HasFlag(PES_TEXTOVERFLOW) && !ClientHitTest(point)) return true;
+ if (!HasFlag(PES_TEXTOVERFLOW) && !ClientHitTest(point)) return TRUE;
IFX_SystemHandler* pSH = GetSystemHandler();
- if (!pSH) return false;
+ if (!pSH) return FALSE;
SetFocus();
@@ -543,7 +543,7 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
CFX_WideString swLatin = m_pEdit->GetRangeText(wrLatin);
FX_HMENU hPopup = pSH->CreatePopupMenu();
- if (!hPopup) return false;
+ if (!hPopup) return FALSE;
CFX_ByteStringArray sSuggestWords;
CPDF_Point ptPopup = point;
@@ -587,9 +587,9 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
pSH->AppendMenuItem(hPopup, 0, L"");
if (!m_pEdit->CanUndo())
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_UNDO, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_UNDO, FALSE);
if (!m_pEdit->CanRedo())
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_REDO, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_REDO, FALSE);
}
pSH->AppendMenuItem(hPopup, WM_PWLEDIT_CUT,
@@ -603,32 +603,32 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
CFX_WideString swText = pSH->GetClipboardText(GetAttachedHWnd());
if (swText.IsEmpty())
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, FALSE);
if (!m_pEdit->IsSelected())
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, FALSE);
}
if (IsReadOnly())
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, FALSE);
}
if (HasFlag(PES_PASSWORD))
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, FALSE);
}
if (HasFlag(PES_NOREAD))
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, FALSE);
}
pSH->AppendMenuItem(hPopup, 0, L"");
@@ -637,7 +637,7 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
if (m_pEdit->GetTotalWords() == 0)
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_SELECTALL, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_SELECTALL, FALSE);
}
int32_t x, y;
@@ -699,12 +699,12 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
pSH->DestroyMenu(hPopup);
- return true;
+ return TRUE;
}
void CPWL_Edit::OnSetFocus()
{
- SetEditCaret(true);
+ SetEditCaret(TRUE);
if (!IsReadOnly())
{
@@ -712,15 +712,15 @@ void CPWL_Edit::OnSetFocus()
pFocusHandler->OnSetFocus(this);
}
- m_bFocus = true;
+ m_bFocus = TRUE;
}
void CPWL_Edit::OnKillFocus()
{
- ShowVScrollBar(false);
+ ShowVScrollBar(FALSE);
m_pEdit->SelectNone();
- SetCaret(false, CPDF_Point(0.0f,0.0f), CPDF_Point(0.0f,0.0f));
+ SetCaret(FALSE, CPDF_Point(0.0f,0.0f), CPDF_Point(0.0f,0.0f));
SetCharSet(0);
@@ -730,20 +730,20 @@ void CPWL_Edit::OnKillFocus()
pFocusHandler->OnKillFocus(this);
}
- m_bFocus = false;
+ m_bFocus = FALSE;
}
-void CPWL_Edit::SetHorzScale(int32_t nHorzScale, bool bPaint/* = true*/)
+void CPWL_Edit::SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetHorzScale(nHorzScale, bPaint);
}
-void CPWL_Edit::SetCharSpace(FX_FLOAT fCharSpace, bool bPaint/* = true*/)
+void CPWL_Edit::SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetCharSpace(fCharSpace, bPaint);
}
-void CPWL_Edit::SetLineLeading(FX_FLOAT fLineLeading, bool bPaint/* = true*/)
+void CPWL_Edit::SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetLineLeading(fLineLeading, bPaint);
}
@@ -813,7 +813,7 @@ CPDF_Point CPWL_Edit::GetWordRightBottomPoint(const CPVT_WordPlace& wpWord)
return pt;
}
-bool CPWL_Edit::IsTextFull() const
+FX_BOOL CPWL_Edit::IsTextFull() const
{
return m_pEdit->IsTextFull();
}
@@ -840,7 +840,7 @@ void CPWL_Edit::SetCharArray(int32_t nCharArray)
if (HasFlag(PES_CHARARRAY) && nCharArray > 0)
{
m_pEdit->SetCharArray(nCharArray);
- m_pEdit->SetTextOverflow(true);
+ m_pEdit->SetTextOverflow(TRUE);
if (HasFlag(PWS_AUTOFONTSIZE))
{
@@ -849,7 +849,7 @@ void CPWL_Edit::SetCharArray(int32_t nCharArray)
FX_FLOAT fFontSize = GetCharArrayAutoFontSize(pFontMap->GetPDFFont(0), GetClientRect(), nCharArray);
if (fFontSize > 0.0f)
{
- m_pEdit->SetAutoFontSize(false);
+ m_pEdit->SetAutoFontSize(FALSE);
m_pEdit->SetFontSize(fFontSize);
}
}
@@ -873,7 +873,7 @@ CPDF_Rect CPWL_Edit::GetFocusRect() const
return CPDF_Rect();
}
-void CPWL_Edit::ShowVScrollBar(bool bShow)
+void CPWL_Edit::ShowVScrollBar(FX_BOOL bShow)
{
if (CPWL_ScrollBar * pScroll = GetVScrollBar())
{
@@ -881,35 +881,35 @@ void CPWL_Edit::ShowVScrollBar(bool bShow)
{
if (!pScroll->IsVisible())
{
- pScroll->SetVisible(true);
+ pScroll->SetVisible(TRUE);
CPDF_Rect rcWindow = GetWindowRect();
m_rcOldWindow = rcWindow;
rcWindow.right += PWL_SCROLLBAR_WIDTH;
- Move(rcWindow, true, true);
+ Move(rcWindow, TRUE, TRUE);
}
}
else
{
if (pScroll->IsVisible())
{
- pScroll->SetVisible(false);
- Move(m_rcOldWindow, true, true);
+ pScroll->SetVisible(FALSE);
+ Move(m_rcOldWindow, TRUE, TRUE);
}
}
}
}
-bool CPWL_Edit::IsVScrollBarVisible() const
+FX_BOOL CPWL_Edit::IsVScrollBarVisible() const
{
if (CPWL_ScrollBar * pScroll = GetVScrollBar())
{
return pScroll->IsVisible();
}
- return false;
+ return FALSE;
}
-void CPWL_Edit::EnableSpellCheck(bool bEnabled)
+void CPWL_Edit::EnableSpellCheck(FX_BOOL bEnabled)
{
if (bEnabled)
AddFlag(PES_SPELLCHECK);
@@ -917,16 +917,16 @@ void CPWL_Edit::EnableSpellCheck(bool bEnabled)
RemoveFlag(PES_SPELLCHECK);
}
-bool CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
if (nChar == FWL_VKEY_Delete)
{
if (m_pFillerNotify)
{
- bool bRC = true;
- bool bExit = false;
+ FX_BOOL bRC = TRUE;
+ FX_BOOL bExit = FALSE;
CFX_WideString strChange;
CFX_WideString strChangeEx;
@@ -936,27 +936,27 @@ bool CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
if (nSelStart == nSelEnd)
nSelEnd = nSelStart + 1;
- m_pFillerNotify->OnBeforeKeyStroke(true, GetAttachedData(), FWL_VKEY_Delete, strChange, strChangeEx, nSelStart, nSelEnd, true, bRC, bExit, nFlag);
- if (!bRC) return false;
- if (bExit) return false;
+ m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), FWL_VKEY_Delete, strChange, strChangeEx, nSelStart, nSelEnd, TRUE, bRC, bExit, nFlag);
+ if (!bRC) return FALSE;
+ if (bExit) return FALSE;
}
}
- bool bRet = CPWL_EditCtrl::OnKeyDown(nChar, nFlag);
+ FX_BOOL bRet = CPWL_EditCtrl::OnKeyDown(nChar, nFlag);
if (nChar == FWL_VKEY_Delete)
{
if (m_pFillerNotify)
{
- bool bExit = false;
- m_pFillerNotify->OnAfterKeyStroke(true, GetAttachedData(), bExit,nFlag);
- if (bExit) return false;
+ FX_BOOL bExit = FALSE;
+ m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit,nFlag);
+ if (bExit) return FALSE;
}
}
//In case of implementation swallow the OnKeyDown event.
if(IsProceedtoOnChar(nChar, nFlag))
- return true;
+ return TRUE;
return bRet;
}
@@ -965,11 +965,11 @@ bool CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
*In case of implementation swallow the OnKeyDown event.
*If the event is swallowed, implementation may do other unexpected things, which is not the control means to do.
*/
-bool CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
{
- bool bCtrl = IsCTRLpressed(nFlag);
- bool bAlt = IsALTpressed(nFlag);
+ FX_BOOL bCtrl = IsCTRLpressed(nFlag);
+ FX_BOOL bAlt = IsALTpressed(nFlag);
if(bCtrl && !bAlt)
{
//hot keys for edit control.
@@ -980,7 +980,7 @@ bool CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
case 'X':
case 'A':
case 'Z':
- return true;
+ return TRUE;
default:
break;
}
@@ -992,22 +992,22 @@ bool CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
case FWL_VKEY_Back:
case FWL_VKEY_Return:
case FWL_VKEY_Space:
- return true;
+ return TRUE;
default:
break;
}
- return false;
+ return FALSE;
}
-bool CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
- bool bRC = true;
- bool bExit = false;
+ FX_BOOL bRC = TRUE;
+ FX_BOOL bExit = FALSE;
- bool bCtrl = IsCTRLpressed(nFlag);
+ FX_BOOL bCtrl = IsCTRLpressed(nFlag);
if (!bCtrl)
{
if (m_pFillerNotify)
@@ -1036,12 +1036,12 @@ bool CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
}
CFX_WideString strChangeEx;
- m_pFillerNotify->OnBeforeKeyStroke(true, GetAttachedData(), nKeyCode, swChange, strChangeEx, nSelStart, nSelEnd, true, bRC, bExit, nFlag);
+ m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), nKeyCode, swChange, strChangeEx, nSelStart, nSelEnd, TRUE, bRC, bExit, nFlag);
}
}
- if (!bRC) return true;
- if (bExit) return false;
+ if (!bRC) return TRUE;
+ if (bExit) return FALSE;
if (IFX_Edit_FontMap * pFontMap = GetFontMap())
{
@@ -1052,21 +1052,21 @@ bool CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
SetCharSet(nNewCharSet);
}
}
- bool bRet = CPWL_EditCtrl::OnChar(nChar,nFlag);
+ FX_BOOL bRet = CPWL_EditCtrl::OnChar(nChar,nFlag);
if (!bCtrl)
{
if (m_pFillerNotify)
{
- m_pFillerNotify->OnAfterKeyStroke(true, GetAttachedData(), bExit,nFlag);
- if (bExit) return false;
+ m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit,nFlag);
+ if (bExit) return FALSE;
}
}
return bRet;
}
-bool CPWL_Edit::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
if (HasFlag(PES_MULTILINE))
{
@@ -1082,10 +1082,10 @@ bool CPWL_Edit::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nF
}
SetScrollPos(ptScroll);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void CPWL_Edit::OnInsertReturn(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace)
@@ -1205,22 +1205,22 @@ CPVT_WordRange CPWL_Edit::CombineWordRange(const CPVT_WordRange& wr1, const CPVT
CPVT_WordRange CPWL_Edit::GetLatinWordsRange(const CPDF_Point& point) const
{
- return GetSameWordsRange(m_pEdit->SearchWordPlace(point), true, false);
+ return GetSameWordsRange(m_pEdit->SearchWordPlace(point), TRUE, FALSE);
}
CPVT_WordRange CPWL_Edit::GetLatinWordsRange(const CPVT_WordPlace & place) const
{
- return GetSameWordsRange(place, true, false);
+ return GetSameWordsRange(place, TRUE, FALSE);
}
CPVT_WordRange CPWL_Edit::GetArabicWordsRange(const CPVT_WordPlace & place) const
{
- return GetSameWordsRange(place, false, true);
+ return GetSameWordsRange(place, FALSE, TRUE);
}
#define PWL_ISARABICWORD(word) ((word >= 0x0600 && word <= 0x06FF) || (word >= 0xFB50 && word <= 0xFEFC))
-CPVT_WordRange CPWL_Edit::GetSameWordsRange(const CPVT_WordPlace & place, bool bLatin, bool bArabic) const
+CPVT_WordRange CPWL_Edit::GetSameWordsRange(const CPVT_WordPlace & place, FX_BOOL bLatin, FX_BOOL bArabic) const
{
CPVT_WordRange range;
diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
index 11e1fe7d37..0d14587f66 100644
--- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
@@ -22,7 +22,7 @@
CPWL_EditCtrl::CPWL_EditCtrl() :
m_pEdit(NULL),
m_pEditCaret(NULL),
- m_bMouseDown(false),
+ m_bMouseDown(FALSE),
m_pEditNotify(NULL),
m_nCharSet(DEFAULT_CHARSET),
m_nCodePage(0)
@@ -50,7 +50,7 @@ void CPWL_EditCtrl::OnCreated()
m_pEdit->Initialize();
}
-bool CPWL_EditCtrl::IsWndHorV()
+FX_BOOL CPWL_EditCtrl::IsWndHorV()
{
CPDF_Matrix mt = GetWindowMatrix();
CPDF_Point point1(0,1);
@@ -167,17 +167,17 @@ FX_FLOAT CPWL_EditCtrl::GetFontSize() const
return m_pEdit->GetFontSize();
}
-bool CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
- bool bRet = CPWL_Wnd::OnKeyDown(nChar,nFlag);
+ FX_BOOL bRet = CPWL_Wnd::OnKeyDown(nChar,nFlag);
//FILTER
switch (nChar)
{
default:
- return false;
+ return FALSE;
case FWL_VKEY_Delete:
case FWL_VKEY_Up:
case FWL_VKEY_Down:
@@ -209,35 +209,35 @@ bool CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
case FWL_VKEY_Delete:
Delete();
- return true;
+ return TRUE;
case FWL_VKEY_Insert:
if (IsSHIFTpressed(nFlag))
PasteText();
- return true;
+ return TRUE;
case FWL_VKEY_Up:
- m_pEdit->OnVK_UP(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_UP(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Down:
- m_pEdit->OnVK_DOWN(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_DOWN(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Left:
- m_pEdit->OnVK_LEFT(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_LEFT(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Right:
- m_pEdit->OnVK_RIGHT(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_RIGHT(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Home:
m_pEdit->OnVK_HOME(IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
- return true;
+ return TRUE;
case FWL_VKEY_End:
m_pEdit->OnVK_END(IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
- return true;
+ return TRUE;
case FWL_VKEY_Unknown:
if (!IsSHIFTpressed(nFlag))
Clear();
else
CutText();
- return true;
+ return TRUE;
default:
break;
}
@@ -245,9 +245,9 @@ bool CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
return bRet;
}
-bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
CPWL_Wnd::OnChar(nChar,nFlag);
@@ -256,14 +256,14 @@ bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
case 0x0A:
case 0x1B:
- return false;
+ return FALSE;
default:
break;
}
- bool bCtrl = IsCTRLpressed(nFlag);
- bool bAlt = IsALTpressed(nFlag);
- bool bShift = IsSHIFTpressed(nFlag);
+ FX_BOOL bCtrl = IsCTRLpressed(nFlag);
+ FX_BOOL bAlt = IsALTpressed(nFlag);
+ FX_BOOL bShift = IsSHIFTpressed(nFlag);
FX_WORD word = nChar;
@@ -273,29 +273,29 @@ bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
case 'C' - 'A' + 1:
CopyText();
- return true;
+ return TRUE;
case 'V' - 'A' + 1:
PasteText();
- return true;
+ return TRUE;
case 'X' - 'A' + 1:
CutText();
- return true;
+ return TRUE;
case 'A' - 'A' + 1:
SelectAll();
- return true;
+ return TRUE;
case 'Z' - 'A' + 1:
if (bShift)
Redo();
else
Undo();
- return true;
+ return TRUE;
default:
if (nChar < 32)
- return false;
+ return FALSE;
}
}
- if (IsReadOnly()) return true;
+ if (IsReadOnly()) return TRUE;
if (m_pEdit->IsSelected() && word == FWL_VKEY_Back)
word = FWL_VKEY_Unknown;
@@ -319,10 +319,10 @@ bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
break;
}
- return true;
+ return TRUE;
}
-bool CPWL_EditCtrl::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -331,16 +331,16 @@ bool CPWL_EditCtrl::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
if (m_bMouseDown)
InvalidateRect();
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
m_pEdit->OnMouseDown(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
-bool CPWL_EditCtrl::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
@@ -351,20 +351,20 @@ bool CPWL_EditCtrl::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
SetFocus();
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
- return true;
+ return TRUE;
}
-bool CPWL_EditCtrl::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnMouseMove(point,nFlag);
if (m_bMouseDown)
- m_pEdit->OnMouseMove(point,false,false);
+ m_pEdit->OnMouseMove(point,FALSE,FALSE);
- return true;
+ return TRUE;
}
CPDF_Rect CPWL_EditCtrl::GetContentRect() const
@@ -372,7 +372,7 @@ CPDF_Rect CPWL_EditCtrl::GetContentRect() const
return m_pEdit->GetContentRect();
}
-void CPWL_EditCtrl::SetEditCaret(bool bVisible)
+void CPWL_EditCtrl::SetEditCaret(FX_BOOL bVisible)
{
CPDF_Point ptHead(0,0),ptFoot(0,0);
@@ -418,18 +418,18 @@ void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const
PWLtoWnd(ptHead, x, y);
}
-void CPWL_EditCtrl::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
+void CPWL_EditCtrl::SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
{
if (m_pEditCaret)
{
if (!IsFocused() || m_pEdit->IsSelected())
- bVisible = false;
+ bVisible = FALSE;
m_pEditCaret->SetCaret(bVisible, ptHead, ptFoot);
}
}
-bool CPWL_EditCtrl::IsModified() const
+FX_BOOL CPWL_EditCtrl::IsModified() const
{
return m_pEdit->IsModified();
}
@@ -466,7 +466,7 @@ void CPWL_EditCtrl::Paint()
m_pEdit->Paint();
}
-void CPWL_EditCtrl::EnableRefresh(bool bRefresh)
+void CPWL_EditCtrl::EnableRefresh(FX_BOOL bRefresh)
{
if (m_pEdit)
m_pEdit->EnableRefresh(bRefresh);
@@ -578,7 +578,7 @@ void CPWL_EditCtrl::CutText()
{
}
-void CPWL_EditCtrl::ShowVScrollBar(bool bShow)
+void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow)
{
}
@@ -612,12 +612,12 @@ void CPWL_EditCtrl::Backspace()
m_pEdit->Backspace();
}
-bool CPWL_EditCtrl::CanUndo() const
+FX_BOOL CPWL_EditCtrl::CanUndo() const
{
return !IsReadOnly() && m_pEdit->CanUndo();
}
-bool CPWL_EditCtrl::CanRedo() const
+FX_BOOL CPWL_EditCtrl::CanRedo() const
{
return !IsReadOnly() && m_pEdit->CanRedo();
}
@@ -651,11 +651,11 @@ void CPWL_EditCtrl::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
if (IsFloatBigger(Info.fPlateWidth,Info.fContentMax-Info.fContentMin)
|| IsFloatEqual(Info.fPlateWidth,Info.fContentMax-Info.fContentMin))
{
- ShowVScrollBar(false);
+ ShowVScrollBar(FALSE);
}
else
{
- ShowVScrollBar(true);
+ ShowVScrollBar(TRUE);
}
}
@@ -664,7 +664,7 @@ void CPWL_EditCtrl::IOnSetScrollPosY(FX_FLOAT fy)
OnNotify(this, PNM_SETSCROLLPOS,SBT_VSCROLL, (intptr_t)&fy);
}
-void CPWL_EditCtrl::IOnSetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot, const CPVT_WordPlace& place)
+void CPWL_EditCtrl::IOnSetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot, const CPVT_WordPlace& place)
{
PWL_CARET_INFO cInfo;
cInfo.bVisible = bVisible;
@@ -717,6 +717,6 @@ void CPWL_EditCtrl::SetReadyToInput()
if (m_bMouseDown)
{
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index 2f02973f82..50b321dfac 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -72,7 +72,7 @@ CFX_ByteString CPWL_FontMap::GetPDFFontAlias(int32_t nFontIndex)
return "";
}
-bool CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
+FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
{
if (nFontIndex >=0 && nFontIndex < m_aData.GetSize())
{
@@ -82,7 +82,7 @@ bool CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
}
}
- return false;
+ return FALSE;
}
int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t nFontIndex)
@@ -106,13 +106,13 @@ int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t n
}
}
- int32_t nNewFontIndex = GetFontIndex(GetNativeFontName(nCharset), nCharset, true);
+ int32_t nNewFontIndex = GetFontIndex(GetNativeFontName(nCharset), nCharset, TRUE);
if (nNewFontIndex >= 0)
{
if (KnowWord(nNewFontIndex, word))
return nNewFontIndex;
}
- nNewFontIndex = GetFontIndex("Arial Unicode MS", DEFAULT_CHARSET, false);
+ nNewFontIndex = GetFontIndex("Arial Unicode MS", DEFAULT_CHARSET, FALSE);
if (nNewFontIndex >= 0)
{
if (KnowWord(nNewFontIndex, word))
@@ -189,7 +189,7 @@ void CPWL_FontMap::Initial(const FX_CHAR* fontname)
if (sFontName.IsEmpty())
sFontName = DEFAULT_FONT_NAME;
- GetFontIndex(sFontName, ANSI_CHARSET, false);
+ GetFontIndex(sFontName, ANSI_CHARSET, FALSE);
}
@@ -206,15 +206,15 @@ const char* g_sDEStandardFontName[] = {"Courier", "Courier-Bold", "Courier-BoldO
"Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic",
"Symbol", "ZapfDingbats"};
-bool CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
+FX_BOOL CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
{
for (int32_t i=0; i<14; i++)
{
if (sFontName == g_sDEStandardFontName[i])
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, int32_t nCharset)
@@ -234,7 +234,7 @@ int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, int32_t nCharset
return -1;
}
-int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, bool bFind)
+int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind)
{
int32_t nFontIndex = FindFont(EncodeFontAlias(sFontName, nCharset), nCharset);
if (nFontIndex >= 0)
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
index 85c4bc06c9..71174dfb0a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
@@ -145,12 +145,12 @@ int32_t CPWL_Icon::GetScaleMethod()
return 0;
}
-bool CPWL_Icon::IsProportionalScale()
+FX_BOOL CPWL_Icon::IsProportionalScale()
{
if (m_pIconFit)
return m_pIconFit->IsProportionalScale();
- return false;
+ return FALSE;
}
void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom)
@@ -175,12 +175,12 @@ void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom)
}
}
-bool CPWL_Icon::GetFittingBounds()
+FX_BOOL CPWL_Icon::GetFittingBounds()
{
if (m_pIconFit)
return m_pIconFit->GetFittingBounds();
- return false;
+ return FALSE;
}
void CPWL_Icon::GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale)
diff --git a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
index ecbb0fd3c0..157eba633d 100644
--- a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
@@ -22,7 +22,7 @@
CPWL_IconList_Item::CPWL_IconList_Item() :
m_nIconIndex(-1),
m_pData(NULL),
- m_bSelected(false),
+ m_bSelected(FALSE),
m_pText(NULL)
{
}
@@ -67,7 +67,7 @@ void CPWL_IconList_Item::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matr
m_crIcon, m_pText->GetTextColor(), GetTransparency());
}
-void CPWL_IconList_Item::SetSelect(bool bSelected)
+void CPWL_IconList_Item::SetSelect(FX_BOOL bSelected)
{
m_bSelected = bSelected;
@@ -78,7 +78,7 @@ void CPWL_IconList_Item::SetSelect(bool bSelected)
}
-bool CPWL_IconList_Item::IsSelected() const
+FX_BOOL CPWL_IconList_Item::IsSelected() const
{
return m_bSelected;
}
@@ -121,7 +121,7 @@ void CPWL_IconList_Item::RePosChildWnd()
rcClient.left += (PWL_IconList_ITEM_ICON_LEFTMARGIN + PWL_IconList_ITEM_WIDTH + PWL_IconList_ITEM_ICON_LEFTMARGIN);
- m_pText->Move(rcClient, true, false);
+ m_pText->Move(rcClient, TRUE, FALSE);
}
void CPWL_IconList_Item::SetIconFillColor(const CPWL_Color& color)
@@ -151,8 +151,8 @@ void CPWL_IconList_Item::OnDisabled()
CPWL_IconList_Content::CPWL_IconList_Content(int32_t nListCount) :
m_nSelectIndex(-1),
m_pNotify(NULL),
- m_bEnableNotify(true),
- m_bMouseDown(false),
+ m_bEnableNotify(TRUE),
+ m_bMouseDown(FALSE),
m_nListCount(nListCount)
{
}
@@ -192,29 +192,29 @@ void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM & cp)
}
}
-bool CPWL_IconList_Content::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
SetFocus();
SetCapture();
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
int32_t nItemIndex = FindItemIndex(point);
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
- return true;
+ return TRUE;
}
-bool CPWL_IconList_Content::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
ReleaseCapture();
- return true;
+ return TRUE;
}
-bool CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
if (m_bMouseDown)
{
@@ -223,10 +223,10 @@ bool CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag
ScrollToItem(nItemIndex);
}
- return true;
+ return TRUE;
}
-bool CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
switch (nChar)
{
@@ -237,7 +237,7 @@ bool CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
- return true;
+ return TRUE;
case FWL_VKEY_Down:
if (m_nSelectIndex < m_nListCount-1)
{
@@ -245,10 +245,10 @@ bool CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32_t CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
@@ -307,8 +307,8 @@ void CPWL_IconList_Content::SetSelect(int32_t nIndex)
{
if (m_nSelectIndex != nIndex)
{
- SelectItem(m_nSelectIndex, false);
- SelectItem(nIndex, true);
+ SelectItem(m_nSelectIndex, FALSE);
+ SelectItem(nIndex, TRUE);
m_nSelectIndex = nIndex;
if (IPWL_IconList_Notify* pNotify = GetNotify())
@@ -333,12 +333,12 @@ void CPWL_IconList_Content::SetNotify(IPWL_IconList_Notify* pNotify)
m_pNotify = pNotify;
}
-void CPWL_IconList_Content::EnableNotify(bool bNotify)
+void CPWL_IconList_Content::EnableNotify(FX_BOOL bNotify)
{
m_bEnableNotify = bNotify;
}
-void CPWL_IconList_Content::SelectItem(int32_t nItemIndex, bool bSelect)
+void CPWL_IconList_Content::SelectItem(int32_t nItemIndex, FX_BOOL bSelect)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
{
@@ -423,7 +423,7 @@ void CPWL_IconList::RePosChildWnd()
CPWL_Wnd::RePosChildWnd();
if (m_pListContent)
- m_pListContent->Move(GetClientRect(), true, false);
+ m_pListContent->Move(GetClientRect(), TRUE, FALSE);
}
void CPWL_IconList::CreateChildWnd(const PWL_CREATEPARAM & cp)
@@ -442,7 +442,7 @@ void CPWL_IconList::OnCreated()
{
pScrollBar->RemoveFlag(PWS_AUTOTRANSPARENT);
pScrollBar->SetTransparency(255);
- pScrollBar->SetNotifyForever(true);
+ pScrollBar->SetNotifyForever(TRUE);
}
}
@@ -463,7 +463,7 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
{
if (!pScrollBar->IsVisible())
{
- pScrollBar->SetVisible(true);
+ pScrollBar->SetVisible(TRUE);
RePosChildWnd();
}
else
@@ -474,7 +474,7 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
{
if (pScrollBar->IsVisible())
{
- pScrollBar->SetVisible(false);
+ pScrollBar->SetVisible(FALSE);
RePosChildWnd();
}
@@ -522,7 +522,7 @@ void CPWL_IconList::SetNotify(IPWL_IconList_Notify* pNotify)
m_pListContent->SetNotify(pNotify);
}
-void CPWL_IconList::EnableNotify(bool bNotify)
+void CPWL_IconList::EnableNotify(FX_BOOL bNotify)
{
m_pListContent->EnableNotify(bNotify);
}
@@ -552,7 +552,7 @@ void CPWL_IconList::SetIconFillColor(const CPWL_Color& color)
m_pListContent->SetIconFillColor(color);
}
-bool CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
CPDF_Point ptScroll = m_pListContent->GetScrollPos();
CPDF_Rect rcScroll = m_pListContent->GetScrollArea();
@@ -583,10 +583,10 @@ bool CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWOR
if (CPWL_ScrollBar* pScrollBar = GetVScrollBar())
pScrollBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
index 3e231d5244..e1780c69a8 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
@@ -39,7 +39,7 @@ void CPWL_Label::OnCreated()
if (HasFlag(PES_TEXTOVERFLOW))
{
SetClipRect(CPDF_Rect(0.0f,0.0f,0.0f,0.0f));
- m_pEdit->SetTextOverflow(true);
+ m_pEdit->SetTextOverflow(TRUE);
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index d0e9cc6dfd..48fb409b7b 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -49,7 +49,7 @@ void CPWL_List_Notify::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
{
if (pScroll->IsVisible())
{
- pScroll->SetVisible(false);
+ pScroll->SetVisible(FALSE);
m_pList->RePosChildWnd();
}
}
@@ -57,7 +57,7 @@ void CPWL_List_Notify::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
{
if (!pScroll->IsVisible())
{
- pScroll->SetVisible(true);
+ pScroll->SetVisible(TRUE);
m_pList->RePosChildWnd();
}
}
@@ -79,8 +79,8 @@ void CPWL_List_Notify::IOnInvalidateRect(CPDF_Rect * pRect)
CPWL_ListBox::CPWL_ListBox() :
m_pList(NULL),
m_pListNotify(NULL),
- m_bMouseDown(false),
- m_bHoverSel(false),
+ m_bMouseDown(FALSE),
+ m_bHoverSel(FALSE),
m_pFillerNotify(NULL)
{
m_pList = IFX_List::NewList();
@@ -229,16 +229,16 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pU
}
}
-bool CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
CPWL_Wnd::OnKeyDown(nChar, nFlag);
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
switch (nChar)
{
default:
- return false;
+ return FALSE;
case FWL_VKEY_Up:
case FWL_VKEY_Down:
case FWL_VKEY_Home:
@@ -272,33 +272,33 @@ bool CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
break;
}
- bool bExit = false;
- OnNotifySelChanged(true,bExit,nFlag);
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(TRUE,bExit,nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
CPWL_Wnd::OnChar(nChar,nFlag);
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
- if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return false;
+ if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return FALSE;
- bool bExit = false;
- OnNotifySelChanged(true,bExit, nFlag);
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(TRUE,bExit, nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_ListBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
if (ClientHitTest(point))
{
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetFocus();
SetCapture();
@@ -306,31 +306,31 @@ bool CPWL_ListBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
m_pList->OnMouseDown(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
-bool CPWL_ListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
if (m_bMouseDown)
{
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
- bool bExit = false;
- OnNotifySelChanged(false,bExit,nFlag);
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(FALSE,bExit,nFlag);
- return true;
+ return TRUE;
}
-void CPWL_ListBox::SetHoverSel(bool bHoverSel)
+void CPWL_ListBox::SetHoverSel(FX_BOOL bHoverSel)
{
m_bHoverSel = bHoverSel;
}
-bool CPWL_ListBox::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnMouseMove(point, nFlag);
@@ -346,7 +346,7 @@ bool CPWL_ListBox::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
m_pList->OnMouseMove(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
void CPWL_ListBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -405,19 +405,19 @@ void CPWL_ListBox::RePosChildWnd()
m_pList->SetPlateRect(GetListRect());
}
-void CPWL_ListBox::OnNotifySelChanged(bool bKeyDown, bool & bExit, FX_DWORD nFlag)
+void CPWL_ListBox::OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit, FX_DWORD nFlag)
{
if (m_pFillerNotify)
{
- bool bRC = true;
+ FX_BOOL bRC = TRUE;
CFX_WideString swChange = GetText();
CFX_WideString strChangeEx;
int nSelStart = 0;
int nSelEnd = swChange.GetLength();
- m_pFillerNotify->OnBeforeKeyStroke(false, GetAttachedData(), 0, swChange, strChangeEx, nSelStart, nSelEnd, bKeyDown, bRC, bExit, nFlag);
+ m_pFillerNotify->OnBeforeKeyStroke(FALSE, GetAttachedData(), 0, swChange, strChangeEx, nSelStart, nSelEnd, bKeyDown, bRC, bExit, nFlag);
if (bExit) return;
- m_pFillerNotify->OnAfterKeyStroke(false, GetAttachedData(), bExit,nFlag);
+ m_pFillerNotify->OnAfterKeyStroke(FALSE, GetAttachedData(), bExit,nFlag);
}
}
@@ -498,12 +498,12 @@ void CPWL_ListBox::Reset()
m_pList->Cancel();
}
-bool CPWL_ListBox::IsMultipleSel() const
+FX_BOOL CPWL_ListBox::IsMultipleSel() const
{
if (m_pList)
return m_pList->IsMultipleSel();
- return false;
+ return FALSE;
}
int32_t CPWL_ListBox::GetCaretIndex() const
@@ -522,12 +522,12 @@ int32_t CPWL_ListBox::GetCurSel() const
return -1;
}
-bool CPWL_ListBox::IsItemSelected(int32_t nItemIndex) const
+FX_BOOL CPWL_ListBox::IsItemSelected(int32_t nItemIndex) const
{
if (m_pList)
return m_pList->IsItemSelected(nItemIndex);
- return false;
+ return FALSE;
}
int32_t CPWL_ListBox::GetTopVisibleIndex() const
@@ -578,9 +578,9 @@ CPDF_Rect CPWL_ListBox::GetListRect() const
return CPWL_Utils::DeflateRect(GetWindowRect(),(FX_FLOAT)(GetBorderWidth()+GetInnerBorderWidth()));
}
-bool CPWL_ListBox::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
if (zDelta < 0)
{
@@ -591,8 +591,8 @@ bool CPWL_ListBox::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD
m_pList->OnVK_UP(IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- bool bExit = false;
- OnNotifySelChanged(false,bExit, nFlag);
- return true;
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(FALSE,bExit, nFlag);
+ return TRUE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
index d2deacb4d2..3077e6293f 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
@@ -52,7 +52,7 @@ CPDF_Rect CPWL_ListCtrl::GetScrollArea() const
void CPWL_ListCtrl::ResetFace()
{
- ResetAll(false, 0);
+ ResetAll(FALSE, 0);
}
void CPWL_ListCtrl::ResetContent(int32_t nStart)
@@ -60,7 +60,7 @@ void CPWL_ListCtrl::ResetContent(int32_t nStart)
if (nStart < 0)
nStart = 0;
if (nStart >= 0 && nStart < m_aChildren.GetSize())
- ResetAll(true, nStart);
+ ResetAll(TRUE, nStart);
}
FX_FLOAT CPWL_ListCtrl::GetContentsHeight(FX_FLOAT fLimitWidth)
@@ -91,7 +91,7 @@ FX_FLOAT CPWL_ListCtrl::GetContentsHeight(FX_FLOAT fLimitWidth)
return fRet;
}
-void CPWL_ListCtrl::ResetAll(bool bMove, int32_t nStart)
+void CPWL_ListCtrl::ResetAll(FX_BOOL bMove, int32_t nStart)
{
CPDF_Rect rcClient = GetClientRect();
@@ -119,7 +119,7 @@ void CPWL_ListCtrl::ResetAll(bool bMove, int32_t nStart)
if (bMove)
{
FX_FLOAT fItemHeight = pChild->GetItemHeight(fWidth - fLeft - fRight);
- pChild->Move(CPDF_Rect(fLeft, fy-fItemHeight, fWidth - fRight, fy), true, false);
+ pChild->Move(CPDF_Rect(fLeft, fy-fItemHeight, fWidth - fRight, fy), TRUE, FALSE);
fy -= fItemHeight;
fy -= m_fItemSpace;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index f3c5816c8d..7ed1115a82 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -60,13 +60,13 @@ void CPWL_Note_Options::RePosChildWnd()
if (rcClient.Width() > 15.0f)
{
rcClient.right -= 15.0f;
- m_pText->Move(rcClient, true, false);
- m_pText->SetVisible(true);
+ m_pText->Move(rcClient, TRUE, FALSE);
+ m_pText->SetVisible(TRUE);
}
else
{
- m_pText->Move(CPDF_Rect(0,0,0,0), true, false);
- m_pText->SetVisible(false);
+ m_pText->Move(CPDF_Rect(0,0,0,0), TRUE, FALSE);
+ m_pText->SetVisible(FALSE);
}
}
}
@@ -122,9 +122,9 @@ CPDF_Rect CPWL_Note_Options::GetContentRect() const
/* ------------------------------- CPWL_Note_Edit ------------------------------ */
-CPWL_Note_Edit::CPWL_Note_Edit() : m_bEnableNotify(true),
+CPWL_Note_Edit::CPWL_Note_Edit() : m_bEnableNotify(TRUE),
m_fOldItemHeight(0.0f),
- m_bSizeChanged(false),
+ m_bSizeChanged(FALSE),
m_fOldMin(0.0f),
m_fOldMax(0.0f)
{
@@ -136,33 +136,33 @@ CPWL_Note_Edit::~CPWL_Note_Edit()
void CPWL_Note_Edit::RePosChildWnd()
{
- m_bEnableNotify = false;
+ m_bEnableNotify = FALSE;
CPWL_Edit::RePosChildWnd();
- m_bEnableNotify = true;
+ m_bEnableNotify = TRUE;
m_fOldItemHeight = GetContentRect().Height();
}
void CPWL_Note_Edit::SetText(const FX_WCHAR* csText)
{
- m_bEnableNotify = false;
+ m_bEnableNotify = FALSE;
CPWL_Edit::SetText(csText);
- m_bEnableNotify = true;
+ m_bEnableNotify = TRUE;
m_fOldItemHeight = GetContentRect().Height();
}
void CPWL_Note_Edit::OnSetFocus()
{
- m_bEnableNotify = false;
+ m_bEnableNotify = FALSE;
CPWL_Edit::OnSetFocus();
- m_bEnableNotify = true;
+ m_bEnableNotify = TRUE;
- EnableSpellCheck(true);
+ EnableSpellCheck(TRUE);
}
void CPWL_Note_Edit::OnKillFocus()
{
- EnableSpellCheck(false);
+ EnableSpellCheck(FALSE);
if (CPWL_Wnd* pParent = GetParentWindow())
{
@@ -193,7 +193,7 @@ void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, int
if (!IsFloatEqual(pInfo->fContentMax, m_fOldMax) ||
!IsFloatEqual(pInfo->fContentMin, m_fOldMin))
{
- m_bSizeChanged = true;
+ m_bSizeChanged = TRUE;
if (CPWL_Wnd * pParent = GetParentWindow())
{
pParent->OnNotify(this, PNM_NOTEEDITCHANGED, 0, 0);
@@ -218,7 +218,7 @@ void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, int
if (PWL_CARET_INFO * pInfo = (PWL_CARET_INFO*)wParam)
{
PWL_CARET_INFO newInfo = *pInfo;
- newInfo.bVisible = true;
+ newInfo.bVisible = TRUE;
newInfo.ptHead = ChildToParent(pInfo->ptHead);
newInfo.ptFoot = ChildToParent(pInfo->ptFoot);
@@ -239,18 +239,18 @@ FX_FLOAT CPWL_Note_Edit::GetItemHeight(FX_FLOAT fLimitWidth)
if (!m_bSizeChanged)
return m_fOldItemHeight;
- m_bSizeChanged = false;
+ m_bSizeChanged = FALSE;
- EnableNotify(false);
- EnableRefresh(false);
- m_pEdit->EnableNotify(false);
+ EnableNotify(FALSE);
+ EnableRefresh(FALSE);
+ m_pEdit->EnableNotify(FALSE);
- Move(CPDF_Rect(0,0,fLimitWidth,0), true, false);
+ Move(CPDF_Rect(0,0,fLimitWidth,0), TRUE, FALSE);
FX_FLOAT fRet = GetContentRect().Height();
- m_pEdit->EnableNotify(true);
- EnableNotify(true);
- EnableRefresh(true);
+ m_pEdit->EnableNotify(TRUE);
+ EnableNotify(TRUE);
+ EnableRefresh(TRUE);
return fRet;
}
@@ -349,7 +349,7 @@ void CPWL_Note_Icon::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix*
/* --------------------------------- CPWL_Note_CloseBox ---------------------------------- */
-CPWL_Note_CloseBox::CPWL_Note_CloseBox() : m_bMouseDown(false)
+CPWL_Note_CloseBox::CPWL_Note_CloseBox() : m_bMouseDown(FALSE)
{
}
@@ -387,19 +387,19 @@ void CPWL_Note_CloseBox::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matr
0, CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), FXFILL_ALTERNATE);
}
-bool CPWL_Note_CloseBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note_CloseBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
SetBorderStyle(PBS_INSET);
InvalidateRect(NULL);
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
return CPWL_Button::OnLButtonDown(point,nFlag);
}
-bool CPWL_Note_CloseBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note_CloseBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
SetBorderStyle(PBS_BEVELED);
InvalidateRect(NULL);
@@ -429,18 +429,18 @@ void CPWL_Note_Contents::CreateChildWnd(const PWL_CREATEPARAM & cp)
ecp.pParentWnd = this;
ecp.dwFlags = PWS_VISIBLE | PWS_CHILD | PES_MULTILINE | PES_AUTORETURN | PES_TEXTOVERFLOW | PES_UNDO | PES_SPELLCHECK;
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
m_pEdit->Create(ecp);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
}
void CPWL_Note_Contents::SetText(const CFX_WideString& sText)
{
if (m_pEdit)
{
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
m_pEdit->SetText(sText.c_str());
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
OnNotify(m_pEdit, PNM_NOTEEDITCHANGED, 0, 0);
}
}
@@ -551,9 +551,9 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
int32_t nIndex = GetItemIndex(pWnd);
if (nIndex < 0) nIndex = 0;
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
ResetContent(nIndex);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
for (int32_t i=nIndex+1, sz=m_aChildren.GetSize(); i<sz; i++)
{
@@ -576,7 +576,7 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
if (PWL_CARET_INFO * pInfo = (PWL_CARET_INFO*)wParam)
{
PWL_CARET_INFO newInfo = *pInfo;
- newInfo.bVisible = true;
+ newInfo.bVisible = TRUE;
newInfo.ptHead = ChildToParent(pInfo->ptHead);
newInfo.ptFoot = ChildToParent(pInfo->ptFoot);
@@ -588,9 +588,9 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
return;
case PNM_NOTERESET:
{
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
ResetContent(0);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
for (int32_t i=1, sz=m_aChildren.GetSize(); i<sz; i++)
{
@@ -598,9 +598,9 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
pChild->OnNotify(this, PNM_NOTERESET, 0, 0);
}
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
ResetContent(0);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
}
return;
}
@@ -608,19 +608,19 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
}
-bool CPWL_Note_Contents::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note_Contents::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (CPWL_Wnd::OnLButtonDown(point,nFlag)) return true;
+ if (CPWL_Wnd::OnLButtonDown(point,nFlag)) return TRUE;
if (!m_pEdit->IsFocused())
{
m_pEdit->SetFocus();
}
- return true;
+ return TRUE;
}
-void CPWL_Note_Contents::SetEditFocus(bool bLast)
+void CPWL_Note_Contents::SetEditFocus(FX_BOOL bLast)
{
if (!m_pEdit->IsFocused())
{
@@ -634,7 +634,7 @@ CPWL_Edit* CPWL_Note_Contents::GetEdit() const
return m_pEdit;
}
-void CPWL_Note_Contents::EnableModify(bool bEnabled)
+void CPWL_Note_Contents::EnableModify(FX_BOOL bEnabled)
{
if (!bEnabled)
m_pEdit->AddFlag(PWS_READONLY);
@@ -654,7 +654,7 @@ void CPWL_Note_Contents::EnableModify(bool bEnabled)
}
}
-void CPWL_Note_Contents::EnableRead(bool bEnabled)
+void CPWL_Note_Contents::EnableRead(FX_BOOL bEnabled)
{
if (!bEnabled)
m_pEdit->AddFlag(PES_NOREAD);
@@ -683,8 +683,8 @@ CPWL_NoteItem::CPWL_NoteItem() :
m_pPrivateData(NULL),
m_sAuthor(L""),
m_fOldItemHeight(0.0f),
- m_bSizeChanged(false),
- m_bAllowModify(true)
+ m_bSizeChanged(FALSE),
+ m_bAllowModify(TRUE)
{
}
@@ -748,7 +748,7 @@ void CPWL_NoteItem::RePosChildWnd()
rcSubject.right = PWL_MIN(rcSubject.left + m_pSubject->GetContentRect().Width() + 1.0f, rcClient.right);
rcSubject.bottom = rcSubject.top - m_pSubject->GetContentRect().Height();
rcSubject.Normalize();
- m_pSubject->Move(rcSubject, true, false);
+ m_pSubject->Move(rcSubject, TRUE, FALSE);
m_pSubject->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcSubject));
CPDF_Rect rcDate = rcClient;
@@ -756,7 +756,7 @@ void CPWL_NoteItem::RePosChildWnd()
rcDate.left = PWL_MAX(rcDate.right - m_pDateTime->GetContentRect().Width() - 1.0f, rcSubject.right);
rcDate.bottom = rcDate.top - m_pDateTime->GetContentRect().Height();
rcDate.Normalize();
- m_pDateTime->Move(rcDate, true, false);
+ m_pDateTime->Move(rcDate, TRUE, FALSE);
m_pDateTime->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcDate));
CPDF_Rect rcContents = rcClient;
@@ -765,7 +765,7 @@ void CPWL_NoteItem::RePosChildWnd()
rcContents.top = rcDate.bottom - POPUP_ITEM_HEAD_BOTTOM;
rcContents.bottom += POPUP_ITEM_BOTTOMWIDTH;
rcContents.Normalize();
- m_pContents->Move(rcContents, true, false);
+ m_pContents->Move(rcContents, TRUE, FALSE);
m_pContents->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcContents));
}
@@ -1038,7 +1038,7 @@ FX_FLOAT CPWL_NoteItem::GetItemHeight(FX_FLOAT fLimitWidth)
if (!m_bSizeChanged)
return m_fOldItemHeight;
- m_bSizeChanged = false;
+ m_bSizeChanged = FALSE;
ASSERT(m_pSubject != NULL);
ASSERT(m_pDateTime != NULL);
@@ -1066,26 +1066,26 @@ FX_FLOAT CPWL_NoteItem::GetItemRightMargin()
return POPUP_ITEM_SIDEMARGIN;
}
-bool CPWL_NoteItem::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
+FX_BOOL CPWL_NoteItem::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
{
if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point)))
{
- SetNoteFocus(false);
+ SetNoteFocus(FALSE);
}
CPWL_Wnd::OnLButtonDown(point,nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_NoteItem::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_NoteItem::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point)))
{
- SetNoteFocus(false);
+ SetNoteFocus(FALSE);
PopupNoteItemMenu(point);
- return true;
+ return TRUE;
}
return CPWL_Wnd::OnRButtonUp(point,nFlag);
@@ -1096,7 +1096,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
switch (msg)
{
case PNM_NOTEEDITCHANGED:
- m_bSizeChanged = true;
+ m_bSizeChanged = TRUE;
if (CPWL_Wnd* pParent = GetParentWindow())
{
@@ -1107,7 +1107,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
if (PWL_CARET_INFO * pInfo = (PWL_CARET_INFO*)wParam)
{
PWL_CARET_INFO newInfo = *pInfo;
- newInfo.bVisible = true;
+ newInfo.bVisible = TRUE;
newInfo.ptHead = ChildToParent(pInfo->ptHead);
newInfo.ptFoot = ChildToParent(pInfo->ptFoot);
@@ -1118,7 +1118,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
}
return;
case PNM_NOTERESET:
- m_bSizeChanged = true;
+ m_bSizeChanged = TRUE;
m_pContents->OnNotify(this, PNM_NOTERESET, 0, 0);
return;
@@ -1178,18 +1178,18 @@ void CPWL_NoteItem::OnContentsValidate()
}
}
-void CPWL_NoteItem::SetNoteFocus(bool bLast)
+void CPWL_NoteItem::SetNoteFocus(FX_BOOL bLast)
{
m_pContents->SetEditFocus(bLast);
}
-void CPWL_NoteItem::EnableModify(bool bEnabled)
+void CPWL_NoteItem::EnableModify(FX_BOOL bEnabled)
{
m_pContents->EnableModify(bEnabled);
m_bAllowModify = bEnabled;
}
-void CPWL_NoteItem::EnableRead(bool bEnabled)
+void CPWL_NoteItem::EnableRead(FX_BOOL bEnabled)
{
m_pContents->EnableRead(bEnabled);
}
@@ -1205,9 +1205,9 @@ CPWL_Note::CPWL_Note(IPopup_Note* pPopupNote, IPWL_NoteNotify* pNoteNotify, IPWL
m_pContentsBar(NULL),
m_pOptions(NULL),
m_pNoteNotify(pNoteNotify),
- m_bResizing(false),
+ m_bResizing(FALSE),
m_rcCaption(0,0,0,0),
- m_bEnalbleNotify(true),
+ m_bEnalbleNotify(TRUE),
m_pPopupNote(pPopupNote)
{
}
@@ -1221,7 +1221,7 @@ IPWL_NoteItem* CPWL_Note::Reply()
return CreateNoteItem();
}
-void CPWL_Note::EnableNotify(bool bEnabled)
+void CPWL_Note::EnableNotify(FX_BOOL bEnabled)
{
m_bEnalbleNotify = bEnabled;
}
@@ -1243,19 +1243,19 @@ void CPWL_Note::RePosChildWnd()
}
}
-bool CPWL_Note::ResetScrollBar()
+FX_BOOL CPWL_Note::ResetScrollBar()
{
- bool bScrollChanged = false;
+ FX_BOOL bScrollChanged = FALSE;
if (ScrollBarShouldVisible())
{
if (!m_pContentsBar->IsVisible())
{
- m_pContentsBar->SetVisible(true);
+ m_pContentsBar->SetVisible(TRUE);
if (m_pContentsBar->IsVisible())
{
m_pContentsBar->InvalidateRect(NULL);
- bScrollChanged = true;
+ bScrollChanged = TRUE;
}
}
}
@@ -1263,10 +1263,10 @@ bool CPWL_Note::ResetScrollBar()
{
if (m_pContentsBar->IsVisible())
{
- m_pContentsBar->SetVisible(false);
+ m_pContentsBar->SetVisible(FALSE);
m_pContentsBar->InvalidateRect(NULL);
- bScrollChanged = true;
+ bScrollChanged = TRUE;
}
}
@@ -1277,7 +1277,7 @@ bool CPWL_Note::ResetScrollBar()
rcContents.right = rcNote.right - 3.0f;
if (m_pContentsBar->IsVisible())
rcContents.right -= PWL_SCROLLBAR_WIDTH;
- m_pContents->Move(rcContents, true, true);
+ m_pContents->Move(rcContents, TRUE, TRUE);
m_pContents->SetScrollPos(CPDF_Point(0.0f,0.0f));
m_pContents->InvalidateRect(NULL);
}
@@ -1285,7 +1285,7 @@ bool CPWL_Note::ResetScrollBar()
return bScrollChanged;
}
-bool CPWL_Note::ScrollBarShouldVisible()
+FX_BOOL CPWL_Note::ScrollBarShouldVisible()
{
CPDF_Rect rcContentsFact = m_pContents->GetScrollArea();
CPDF_Rect rcContentsClient = m_pContents->GetClientRect();
@@ -1305,7 +1305,7 @@ void CPWL_Note::RePosNoteChildren()
{
if (m_bResizing) return;
- m_bResizing = true;
+ m_bResizing = TRUE;
if (IsValid())
{
@@ -1327,7 +1327,7 @@ void CPWL_Note::RePosNoteChildren()
rcIcon.right = rcIcon.left + 14.0f;
rcIcon.bottom = rcIcon.top - 14.0f;
rcIcon.Normalize();
- m_pIcon->Move(rcIcon, true, false);
+ m_pIcon->Move(rcIcon, TRUE, FALSE);
m_pIcon->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcIcon));
CPDF_Rect rcCloseBox = rcClient;
@@ -1336,7 +1336,7 @@ void CPWL_Note::RePosNoteChildren()
rcCloseBox.left = rcCloseBox.right - 14.0f;
rcCloseBox.bottom = rcCloseBox.top - 14.0f;
rcCloseBox.Normalize();
- m_pCloseBox->Move(rcCloseBox, true, false);
+ m_pCloseBox->Move(rcCloseBox, TRUE, FALSE);
m_pCloseBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcCloseBox));
CPDF_Rect rcDate = rcClient;
@@ -1345,7 +1345,7 @@ void CPWL_Note::RePosNoteChildren()
rcDate.top = rcClient.top - 2.0f;
rcDate.bottom = rcDate.top - m_pDateTime->GetContentRect().Height();
rcDate.Normalize();
- m_pDateTime->Move(rcDate, true, false);
+ m_pDateTime->Move(rcDate, TRUE, FALSE);
m_pDateTime->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcDate));
CPDF_Rect rcSubject = rcClient;
@@ -1354,7 +1354,7 @@ void CPWL_Note::RePosNoteChildren()
rcSubject.right = PWL_MIN(rcSubject.left + m_pSubject->GetContentRect().Width() + 1.0f, rcDate.left - 1.0f);
rcSubject.bottom = rcSubject.top - m_pSubject->GetContentRect().Height();
rcSubject.Normalize();
- m_pSubject->Move(rcSubject, true, false);
+ m_pSubject->Move(rcSubject, TRUE, FALSE);
m_pSubject->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcSubject));
CPDF_Rect rcOptions = rcClient;
@@ -1362,7 +1362,7 @@ void CPWL_Note::RePosNoteChildren()
rcOptions.top = rcSubject.bottom - 4.0f;
rcOptions.bottom = rcOptions.top - m_pOptions->GetContentRect().Height();
rcOptions.Normalize();
- m_pOptions->Move(rcOptions, true, false);
+ m_pOptions->Move(rcOptions, TRUE, FALSE);
m_pOptions->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcOptions));
CPDF_Rect rcAuthor = rcClient;
@@ -1371,21 +1371,21 @@ void CPWL_Note::RePosNoteChildren()
rcAuthor.right = PWL_MIN(rcSubject.left + m_pAuthor->GetContentRect().Width() + 1.0f, rcOptions.left - 1.0f);
rcAuthor.bottom = rcAuthor.top - m_pAuthor->GetContentRect().Height();
rcAuthor.Normalize();
- m_pAuthor->Move(rcAuthor, true, false);
+ m_pAuthor->Move(rcAuthor, TRUE, FALSE);
m_pAuthor->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcAuthor));
CPDF_Rect rcLBBox = rcClient;
rcLBBox.top = rcLBBox.bottom + 7.0f;
rcLBBox.right = rcLBBox.left + 7.0f;
rcLBBox.Normalize();
- m_pLBBox->Move(rcLBBox, true, false);
+ m_pLBBox->Move(rcLBBox, TRUE, FALSE);
m_pLBBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcLBBox));
CPDF_Rect rcRBBox = rcClient;
rcRBBox.top = rcRBBox.bottom + 7.0f;
rcRBBox.left = rcRBBox.right - 7.0f;
rcRBBox.Normalize();
- m_pRBBox->Move(rcRBBox, true, false);
+ m_pRBBox->Move(rcRBBox, TRUE, FALSE);
m_pRBBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcRBBox));
CPDF_Rect rcContents = rcClient;
@@ -1396,20 +1396,20 @@ void CPWL_Note::RePosNoteChildren()
rcContents.right -= PWL_SCROLLBAR_WIDTH;
rcContents.bottom += 14.0f;
rcContents.Normalize();
- m_pContents->Move(rcContents, false, false);
+ m_pContents->Move(rcContents, FALSE, FALSE);
m_pContents->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcContents));
CPDF_Rect rcContentsBar = rcContents;
rcContentsBar.right = rcClient.right - 3.0f;
rcContentsBar.left = rcContentsBar.right - PWL_SCROLLBAR_WIDTH;
rcContentsBar.Normalize();
- m_pContentsBar->Move(rcContentsBar, true, false);
+ m_pContentsBar->Move(rcContentsBar, TRUE, FALSE);
m_rcCaption = rcClient;
m_rcCaption.bottom = rcContents.top;
}
- m_bResizing = false;
+ m_bResizing = FALSE;
}
//0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close / 5-options
@@ -1507,7 +1507,7 @@ void CPWL_Note::CreateChildWnd(const PWL_CREATEPARAM & cp)
scp.sBackgroundColor = CPWL_Color(COLORTYPE_RGB, 240/255.0f, 240/255.0f, 240/255.0f);
scp.dwFlags = PWS_CHILD | PWS_VISIBLE | PWS_BACKGROUND;
m_pContentsBar->Create(scp);
- m_pContentsBar->SetNotifyForever(true);
+ m_pContentsBar->SetNotifyForever(TRUE);
}
void CPWL_Note::SetSubjectName(const CFX_WideString& sName)
@@ -1538,7 +1538,7 @@ CFX_WideString CPWL_Note::GetAuthorName() const
return L"";
}
-bool CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
CPDF_Point ptScroll = m_pContents->GetScrollPos();
CPDF_Rect rcScroll = m_pContents->GetScrollArea();
@@ -1566,11 +1566,11 @@ bool CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nF
m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (intptr_t)&ptNew.y);
m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -1591,7 +1591,7 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t
if (FXSYS_memcmp(&m_OldScrollInfo, &sInfo, sizeof(PWL_SCROLL_INFO)) != 0)
{
- bool bScrollChanged = false;
+ FX_BOOL bScrollChanged = FALSE;
if (lParam < 3) //·ÀÖ¹ËÀÑ­»· mantis:15759
{
@@ -1704,7 +1704,7 @@ void CPWL_Note::SetBkColor(const CPWL_Color& color)
m_pRBBox->SetTextColor(sTextColor);
}
-bool CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
{
if (m_pOptions->WndHitTest(m_pOptions->ParentToChild(point)))
{
@@ -1717,14 +1717,14 @@ bool CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
KillFocus();
pNotify->OnPopupMenu(x, y);
- return true;
+ return TRUE;
}
}
return CPWL_Wnd::OnLButtonDown(point,nFlag);
}
-bool CPWL_Note::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
return CPWL_Wnd::OnRButtonUp(point,nFlag);
}
@@ -1748,12 +1748,12 @@ void CPWL_Note::SetIconType(int32_t nType)
m_pIcon->SetIconType(nType);
}
-void CPWL_Note::EnableModify(bool bEnabled)
+void CPWL_Note::EnableModify(FX_BOOL bEnabled)
{
m_pContents->EnableModify(bEnabled);
}
-void CPWL_Note::EnableRead(bool bEnabled)
+void CPWL_Note::EnableRead(FX_BOOL bEnabled)
{
m_pContents->EnableRead(bEnabled);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
index 4287bc2753..6d61705222 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
@@ -47,7 +47,7 @@ void PWL_FLOATRANGE::Set(FX_FLOAT min,FX_FLOAT max)
}
}
-bool PWL_FLOATRANGE::In(FX_FLOAT x) const
+FX_BOOL PWL_FLOATRANGE::In(FX_FLOAT x) const
{
return (IsFloatBigger(x,fMin) || IsFloatEqual(x, fMin)) &&
(IsFloatSmaller(x, fMax) || IsFloatEqual(x, fMax));
@@ -99,14 +99,14 @@ void PWL_SCROLL_PRIVATEDATA::SetBigStep(FX_FLOAT step)
fBigStep = step;
}
-bool PWL_SCROLL_PRIVATEDATA::SetPos(FX_FLOAT pos)
+FX_BOOL PWL_SCROLL_PRIVATEDATA::SetPos(FX_FLOAT pos)
{
if (ScrollRange.In(pos))
{
fScrollPos = pos;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void PWL_SCROLL_PRIVATEDATA::AddSmall()
@@ -140,7 +140,7 @@ CPWL_SBButton::CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,PWL_SBBUTTON_TYPE
m_eScrollBarType = eScrollBarType;
m_eSBButtonType = eButtonType;
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
CPWL_SBButton::~CPWL_SBButton()
@@ -359,7 +359,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
rcDraw = CPWL_Utils::DeflateRect(rectWnd,1.0f);
if (IsEnabled())
- CPWL_Utils::DrawShadow(pDevice, pUser2Device, true, false, rcDraw, nTransparancy, 80, 220);
+ CPWL_Utils::DrawShadow(pDevice, pUser2Device, TRUE, FALSE, rcDraw, nTransparancy, 80, 220);
else
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcDraw, ArgbEncode(255,255,255,255));
@@ -402,7 +402,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
//draw background
rcDraw = CPWL_Utils::DeflateRect(rectWnd,1.0f);
if (IsEnabled())
- CPWL_Utils::DrawShadow(pDevice, pUser2Device, true, false, rcDraw, nTransparancy, 80, 220);
+ CPWL_Utils::DrawShadow(pDevice, pUser2Device, TRUE, FALSE, rcDraw, nTransparancy, 80, 220);
else
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcDraw, ArgbEncode(255,255,255,255));
@@ -565,33 +565,33 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
}
}
-bool CPWL_SBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_SBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
if (CPWL_Wnd * pParent = GetParentWindow())
pParent->OnNotify(this,PNM_LBUTTONDOWN,0,(intptr_t)&point);
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
- return true;
+ return TRUE;
}
-bool CPWL_SBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_SBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
if (CPWL_Wnd * pParent = GetParentWindow())
pParent->OnNotify(this,PNM_LBUTTONUP,0,(intptr_t)&point);
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
ReleaseCapture();
- return true;
+ return TRUE;
}
-bool CPWL_SBButton::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_SBButton::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnMouseMove(point,nFlag);
@@ -603,12 +603,12 @@ bool CPWL_SBButton::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
if (m_bMouseDown && (m_eSBButtonType == PSBT_MIN || m_eSBButtonType == PSBT_MAX))
{
if (!pParent->OnNotify(this,PNM_LBUTTONDOWN,nFlags,(intptr_t)&point))
- return false;
+ return FALSE;
}
*/
}
- return true;
+ return TRUE;
}
/* ------------------------------- CPWL_ScrollBar ---------------------------------- */
@@ -618,9 +618,9 @@ CPWL_ScrollBar::CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType):
m_pMinButton(NULL),
m_pMaxButton(NULL),
m_pPosButton(NULL),
- m_bMouseDown(false),
- m_bMinOrMax(false),
- m_bNotifyForever(true)
+ m_bMouseDown(FALSE),
+ m_bMinOrMax(FALSE),
+ m_bNotifyForever(TRUE)
{
}
@@ -665,7 +665,7 @@ void CPWL_ScrollBar::RePosChildWnd()
rcMaxButton = CPDF_Rect(rcClient.right - fBWidth,rcClient.bottom,
rcClient.right,rcClient.top);
}
- else SetVisible(false);
+ else SetVisible(FALSE);
}
break;
case SBT_VSCROLL:
@@ -687,16 +687,16 @@ void CPWL_ScrollBar::RePosChildWnd()
rcMaxButton = CPDF_Rect(rcClient.left,rcClient.bottom,
rcClient.right,rcClient.bottom + fBWidth);
}
- else SetVisible(false);
+ else SetVisible(FALSE);
}
break;
}
if (m_pMinButton)
- m_pMinButton->Move(rcMinButton, true, false);
+ m_pMinButton->Move(rcMinButton, TRUE, FALSE);
if (m_pMaxButton)
- m_pMaxButton->Move(rcMaxButton, true, false);
- MovePosButton(false);
+ m_pMaxButton->Move(rcMaxButton, TRUE, FALSE);
+ MovePosButton(FALSE);
}
void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
@@ -708,7 +708,7 @@ void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
CFX_ByteTextBuf sButton;
sButton << "q\n";
- sButton << "0 w\n" << CPWL_Utils::GetColorAppStream(GetBackgroundColor(),true);
+ sButton << "0 w\n" << CPWL_Utils::GetColorAppStream(GetBackgroundColor(),TRUE);
sButton << rectWnd.left << " " << rectWnd.bottom << " "
<< rectWnd.right - rectWnd.left << " " << rectWnd.top - rectWnd.bottom << " re b Q\n";
@@ -734,7 +734,7 @@ void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix*
}
}
-bool CPWL_ScrollBar::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -777,22 +777,22 @@ bool CPWL_ScrollBar::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
if (rcMinArea.Contains(point.x,point.y))
{
m_sData.SubBig();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
}
if (rcMaxArea.Contains(point.x,point.y))
{
m_sData.AddBig();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
}
}
- return true;
+ return TRUE;
}
-bool CPWL_ScrollBar::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ScrollBar::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
@@ -806,9 +806,9 @@ bool CPWL_ScrollBar::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
}
EndTimer();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
- return true;
+ return TRUE;
}
void CPWL_ScrollBar::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -922,7 +922,7 @@ void CPWL_ScrollBar::CreateButtons(const PWL_CREATEPARAM & cp)
if (!m_pPosButton)
{
m_pPosButton = new CPWL_SBButton(m_sbType,PSBT_POS);
- m_pPosButton->SetVisible(false);
+ m_pPosButton->SetVisible(FALSE);
m_pPosButton->Create(scp);
}
}
@@ -943,12 +943,12 @@ void CPWL_ScrollBar::SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClient
if (IsFloatSmaller(m_sData.ScrollRange.GetWidth(), 0.0f))
{
- m_pPosButton->SetVisible(false);
+ m_pPosButton->SetVisible(FALSE);
}
else
{
- m_pPosButton->SetVisible(true);
- MovePosButton(true);
+ m_pPosButton->SetVisible(TRUE);
+ MovePosButton(TRUE);
}
}
}
@@ -960,7 +960,7 @@ void CPWL_ScrollBar::SetScrollPos(FX_FLOAT fPos)
m_sData.SetPos(fPos);
if (!IsFloatEqual(m_sData.fScrollPos, fOldPos))
- MovePosButton(true);
+ MovePosButton(TRUE);
}
void CPWL_ScrollBar::SetScrollStep(FX_FLOAT fBigStep,FX_FLOAT fSmallStep)
@@ -969,7 +969,7 @@ void CPWL_ScrollBar::SetScrollStep(FX_FLOAT fBigStep,FX_FLOAT fSmallStep)
m_sData.SetSmallStep(fSmallStep);
}
-void CPWL_ScrollBar::MovePosButton(bool bRefresh)
+void CPWL_ScrollBar::MovePosButton(FX_BOOL bRefresh)
{
ASSERT (m_pPosButton != NULL);
ASSERT (m_pMinButton != NULL);
@@ -1031,17 +1031,17 @@ void CPWL_ScrollBar::MovePosButton(bool bRefresh)
break;
}
- m_pPosButton->Move(rcPosButton,true,bRefresh);
+ m_pPosButton->Move(rcPosButton,TRUE,bRefresh);
}
}
void CPWL_ScrollBar::OnMinButtonLBDown(const CPDF_Point & point)
{
m_sData.SubSmall();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
- m_bMinOrMax = true;
+ m_bMinOrMax = TRUE;
EndTimer();
BeginTimer(100);
@@ -1058,10 +1058,10 @@ void CPWL_ScrollBar::OnMinButtonMouseMove(const CPDF_Point & point)
void CPWL_ScrollBar::OnMaxButtonLBDown(const CPDF_Point & point)
{
m_sData.AddSmall();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
- m_bMinOrMax = false;
+ m_bMinOrMax = FALSE;
EndTimer();
BeginTimer(100);
@@ -1077,7 +1077,7 @@ void CPWL_ScrollBar::OnMaxButtonMouseMove(const CPDF_Point & point)
void CPWL_ScrollBar::OnPosButtonLBDown(const CPDF_Point & point)
{
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
if (m_pPosButton)
{
@@ -1104,7 +1104,7 @@ void CPWL_ScrollBar::OnPosButtonLBUp(const CPDF_Point & point)
if (!m_bNotifyForever)
NotifyScrollWindow();
}
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
void CPWL_ScrollBar::OnPosButtonMouseMove(const CPDF_Point & point)
@@ -1163,7 +1163,7 @@ void CPWL_ScrollBar::OnPosButtonMouseMove(const CPDF_Point & point)
if (!IsFloatEqual(fOldScrollPos, m_sData.fScrollPos))
{
- MovePosButton(true);
+ MovePosButton(TRUE);
if (m_bNotifyForever)
NotifyScrollWindow();
@@ -1297,7 +1297,7 @@ void CPWL_ScrollBar::TimerProc()
if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0)
{
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
index 23be71a29d..76b2bd333a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
@@ -70,9 +70,9 @@ CPWL_Signature::CPWL_Signature() :
m_pText(NULL),
m_pDescription(NULL),
m_pImage(NULL),
- m_bTextExist(true),
- m_bImageExist(false),
- m_bFlagExist(true)
+ m_bTextExist(TRUE),
+ m_bImageExist(FALSE),
+ m_bFlagExist(TRUE)
{
}
@@ -80,21 +80,21 @@ CPWL_Signature::~CPWL_Signature()
{
}
-void CPWL_Signature::SetTextFlag(bool bTextExist)
+void CPWL_Signature::SetTextFlag(FX_BOOL bTextExist)
{
m_bTextExist = bTextExist;
RePosChildWnd();
}
-void CPWL_Signature::SetImageFlag(bool bImageExist)
+void CPWL_Signature::SetImageFlag(FX_BOOL bImageExist)
{
m_bImageExist = bImageExist;
RePosChildWnd();
}
-void CPWL_Signature::SetFoxitFlag(bool bFlagExist)
+void CPWL_Signature::SetFoxitFlag(FX_BOOL bFlagExist)
{
m_bFlagExist = bFlagExist;
}
@@ -135,7 +135,7 @@ void CPWL_Signature::RePosChildWnd()
CPDF_Rect rcText = rcClient;
CPDF_Rect rcDescription = rcClient;
- bool bTextVisible = m_bTextExist && m_pText->GetText().GetLength() > 0;
+ FX_BOOL bTextVisible = m_bTextExist && m_pText->GetText().GetLength() > 0;
if ((bTextVisible || m_bImageExist) &&
m_pDescription->GetText().GetLength() > 0)
@@ -155,9 +155,9 @@ void CPWL_Signature::RePosChildWnd()
m_pText->SetVisible(bTextVisible);
m_pImage->SetVisible(m_bImageExist);
- m_pText->Move(rcText, true, false);
- m_pImage->Move(rcText, true, false);
- m_pDescription->Move(rcDescription, true, false);
+ m_pText->Move(rcText, TRUE, FALSE);
+ m_pImage->Move(rcText, TRUE, FALSE);
+ m_pDescription->Move(rcDescription, TRUE, FALSE);
}
void CPWL_Signature::CreateChildWnd(const PWL_CREATEPARAM & cp)
diff --git a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
index 7bb38c4bfe..90fa8f880d 100644
--- a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
@@ -32,7 +32,7 @@ CPDF_Rect CPWL_PushButton::GetFocusRect() const
/* --------------------------- CPWL_CheckBox ---------------------------- */
-CPWL_CheckBox::CPWL_CheckBox() : m_bChecked(false)
+CPWL_CheckBox::CPWL_CheckBox() : m_bChecked(FALSE)
{
}
@@ -45,33 +45,33 @@ CFX_ByteString CPWL_CheckBox::GetClassName() const
return "CPWL_CheckBox";
}
-void CPWL_CheckBox::SetCheck(bool bCheck)
+void CPWL_CheckBox::SetCheck(FX_BOOL bCheck)
{
m_bChecked = bCheck;
}
-bool CPWL_CheckBox::IsChecked() const
+FX_BOOL CPWL_CheckBox::IsChecked() const
{
return m_bChecked;
}
-bool CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (IsReadOnly()) return false;
+ if (IsReadOnly()) return FALSE;
SetCheck(!IsChecked());
- return true;
+ return TRUE;
}
-bool CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
SetCheck(!IsChecked());
- return true;
+ return TRUE;
}
/* --------------------------- CPWL_RadioButton ---------------------------- */
-CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(false)
+CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(FALSE)
{
}
@@ -84,27 +84,27 @@ CFX_ByteString CPWL_RadioButton::GetClassName() const
return "CPWL_RadioButton";
}
-bool CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (IsReadOnly()) return false;
+ if (IsReadOnly()) return FALSE;
- SetCheck(true);
- return true;
+ SetCheck(TRUE);
+ return TRUE;
}
-void CPWL_RadioButton::SetCheck(bool bCheck)
+void CPWL_RadioButton::SetCheck(FX_BOOL bCheck)
{
m_bChecked = bCheck;
}
-bool CPWL_RadioButton::IsChecked() const
+FX_BOOL CPWL_RadioButton::IsChecked() const
{
return m_bChecked;
}
-bool CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
- SetCheck(true);
- return true;
+ SetCheck(TRUE);
+ return TRUE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
index 4e4ac94238..b9ba7661af 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
@@ -87,13 +87,13 @@ CPDF_Rect CPWL_Utils::OffsetRect(const CPDF_Rect & rect,FX_FLOAT x,FX_FLOAT y)
rect.right + x,rect.top + y);
}
-bool CPWL_Utils::ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild)
+FX_BOOL CPWL_Utils::ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild)
{
return rcChild.left >= rcParent.left && rcChild.bottom >= rcParent.bottom &&
rcChild.right <= rcParent.right && rcChild.top <= rcParent.top;
}
-bool CPWL_Utils::IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2)
+FX_BOOL CPWL_Utils::IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2)
{
FX_FLOAT left = rect1.left > rect2.left ? rect1.left : rect2.left;
FX_FLOAT right = rect1.right < rect2.right ? rect1.right : rect2.right;
@@ -420,7 +420,7 @@ CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CPDF_Rect & rect,const CPW
{
CFX_ByteTextBuf sAppStream;
- CFX_ByteString sColor = GetColorAppStream(color,true);
+ CFX_ByteString sColor = GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << sColor;
@@ -435,7 +435,7 @@ CFX_ByteString CPWL_Utils::GetCircleFillAppStream(const CPDF_Rect & rect,const C
{
CFX_ByteTextBuf sAppStream;
- CFX_ByteString sColor = GetColorAppStream(color,true);
+ CFX_ByteString sColor = GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << sColor << CPWL_Utils::GetAP_Circle(rect) << "f\nQ\n";
@@ -458,7 +458,7 @@ CPDF_Rect CPWL_Utils::GetCenterSquare(const CPDF_Rect & rect)
}
CFX_ByteString CPWL_Utils::GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange,
- bool bContinuous, FX_WORD SubWord)
+ FX_BOOL bContinuous, FX_WORD SubWord)
{
return IFX_Edit::GetEditAppearanceStream(pEdit,ptOffset,pRange,bContinuous,SubWord);
}
@@ -498,7 +498,7 @@ static CFX_ByteString GetWordSpellCheckAppearanceStream(IFX_Edit_Iterator* pIter
FX_FLOAT fY = 0.0f;
FX_FLOAT fStep = 0.0f;
- bool bBreak = false;
+ FX_BOOL bBreak = FALSE;
if (pIterator)
{
@@ -538,7 +538,7 @@ static CFX_ByteString GetWordSpellCheckAppearanceStream(IFX_Edit_Iterator* pIter
fEndX = word.ptWord.x + word.fWidth;
}
- bBreak = true;
+ bBreak = TRUE;
}
else
{
@@ -569,7 +569,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
{
pIterator->SetAt(pRange->BeginPos);
- bool bLatinWord = false;
+ FX_BOOL bLatinWord = FALSE;
CPVT_WordPlace wpWordStart;
CFX_ByteString sWord;
@@ -587,7 +587,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
if (!bLatinWord)
{
wpWordStart = place;
- bLatinWord = true;
+ bLatinWord = TRUE;
}
sWord += (char)word.Word;
@@ -602,7 +602,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
sRet << GetWordSpellCheckAppearanceStream(pIterator,ptOffset,CPVT_WordRange(wpWordStart,oldplace));
pIterator->SetAt(place);
}
- bLatinWord = false;
+ bLatinWord = FALSE;
}
sWord.Empty();
@@ -614,7 +614,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
{
if (!pSpellCheck->CheckWord(sWord))
sRet << GetWordSpellCheckAppearanceStream(pIterator,ptOffset,CPVT_WordRange(wpWordStart,oldplace));
- bLatinWord = false;
+ bLatinWord = FALSE;
sWord.Empty();
}
}
@@ -625,7 +625,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
if (!pSpellCheck->CheckWord(sWord))
sRet << GetWordSpellCheckAppearanceStream(pIterator,ptOffset,CPVT_WordRange(wpWordStart,oldplace));
- bLatinWord = false;
+ bLatinWord = FALSE;
sWord.Empty();
}
}
@@ -636,7 +636,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
CFX_ByteString CPWL_Utils::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)
{
CFX_ByteTextBuf sRet;
@@ -649,7 +649,7 @@ CFX_ByteString CPWL_Utils::GetTextAppStream(const CPDF_Rect & rcBBox,IFX_Edit_Fo
pEdit->SetMultiLine(bMultiLine);
pEdit->SetAutoReturn(bAutoReturn);
if (IsFloatZero(fFontSize))
- pEdit->SetAutoFontSize(true);
+ pEdit->SetAutoFontSize(TRUE);
else
pEdit->SetFontSize(fFontSize);
@@ -683,10 +683,10 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect & rcBBox,
pEdit->SetFontMap(pFontMap);
pEdit->SetAlignmentH(1);
pEdit->SetAlignmentV(1);
- pEdit->SetMultiLine(false);
- pEdit->SetAutoReturn(false);
+ pEdit->SetMultiLine(FALSE);
+ pEdit->SetAutoReturn(FALSE);
if (IsFloatZero(fFontSize))
- pEdit->SetAutoFontSize(true);
+ pEdit->SetAutoFontSize(TRUE);
else
pEdit->SetFontSize(fFontSize);
@@ -892,7 +892,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect & rcBBox,
if (!rcIcon.IsEmpty())
{
- Icon.Move(rcIcon, false, false);
+ Icon.Move(rcIcon, FALSE, FALSE);
sTemp << Icon.GetImageAppStream();
}
@@ -923,7 +923,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect & rcBBox,
return "";
}
-CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color & color,const bool & bFillOrStroke)
+CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color & color,const FX_BOOL & bFillOrStroke)
{
CFX_ByteTextBuf sColorStream;
@@ -967,7 +967,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
{
default:
case PBS_SOLID:
- sColor = CPWL_Utils::GetColorAppStream(color,true);
+ sColor = CPWL_Utils::GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -978,7 +978,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
}
break;
case PBS_DASH:
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -992,7 +992,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
break;
case PBS_BEVELED:
case PBS_INSET:
- sColor = CPWL_Utils::GetColorAppStream(crLeftTop,true);
+ sColor = CPWL_Utils::GetColorAppStream(crLeftTop,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1004,7 +1004,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
sAppStream << fLeft + fHalfWidth * 2 << " " << fBottom + fHalfWidth * 2 << " l f\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crRightBottom,true);
+ sColor = CPWL_Utils::GetColorAppStream(crRightBottom,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1016,7 +1016,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
sAppStream << fRight - fHalfWidth * 2 << " " << fTop - fHalfWidth * 2 << " l f\n";
}
- sColor = CPWL_Utils::GetColorAppStream(color,true);
+ sColor = CPWL_Utils::GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1026,7 +1026,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
}
break;
case PBS_UNDERLINED:
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1065,7 +1065,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
case PBS_SOLID:
case PBS_UNDERLINED:
{
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fWidth << " w\n" << sColor
@@ -1076,7 +1076,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
break;
case PBS_DASH:
{
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fWidth << " w\n"
@@ -1090,7 +1090,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
{
FX_FLOAT fHalfWidth = fWidth / 2.0f;
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1098,7 +1098,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crLeftTop,false);
+ sColor = CPWL_Utils::GetColorAppStream(crLeftTop,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1106,7 +1106,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crRightBottom,false);
+ sColor = CPWL_Utils::GetColorAppStream(crRightBottom,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1119,7 +1119,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
{
FX_FLOAT fHalfWidth = fWidth / 2.0f;
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1127,7 +1127,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crLeftTop,false);
+ sColor = CPWL_Utils::GetColorAppStream(crLeftTop,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1135,7 +1135,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crRightBottom,false);
+ sColor = CPWL_Utils::GetColorAppStream(crRightBottom,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1208,42 +1208,42 @@ CPWL_Color CPWL_Utils::DevideColor(const CPWL_Color & sColor,FX_FLOAT fColorDevi
CFX_ByteString CPWL_Utils::GetAppStream_Check(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Check(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Check(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Circle(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Circle(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,false) << CPWL_Utils::GetAP_Cross(rcBBox) << "S\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,FALSE) << CPWL_Utils::GetAP_Cross(rcBBox) << "S\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n1 w\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Diamond(rcBBox) << "f\nQ\n";
+ sAP << "q\n1 w\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Diamond(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Square(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Square(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Square(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Star(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Star(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Star(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
@@ -1299,7 +1299,7 @@ CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CPDF_Rect & rcBBox)
if (!rcBBox.IsEmpty())
{
- sAppStream << "q\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,220.0f/255.0f,220.0f/255.0f,220.0f/255.0f),true);
+ sAppStream << "q\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,220.0f/255.0f,220.0f/255.0f,220.0f/255.0f),TRUE);
sAppStream << rcBBox.left << " " << rcBBox.bottom << " "
<< rcBBox.right - rcBBox.left << " " << rcBBox.top - rcBBox.bottom << " re f\n";
sAppStream << "Q\n";
@@ -1474,7 +1474,7 @@ void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Devi
}
void CPWL_Utils::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)
{
FX_FLOAT fStepGray = 1.0f;
@@ -1638,7 +1638,7 @@ static void AddSpellCheckObj(CFX_PathData & PathData, IFX_Edit* pEdit, const CPV
FX_FLOAT fY = 0.0f;
FX_FLOAT fStep = 0.0f;
- bool bBreak = false;
+ FX_BOOL bBreak = FALSE;
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator())
{
@@ -1678,7 +1678,7 @@ static void AddSpellCheckObj(CFX_PathData & PathData, IFX_Edit* pEdit, const CPV
fEndX = word.ptWord.x + word.fWidth;
}
- bBreak = true;
+ bBreak = TRUE;
}
else
{
@@ -1700,7 +1700,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
const FX_COLORREF crSpell = ArgbEncode(255,255,0,0);
//for spellcheck
- bool bLatinWord = false;
+ FX_BOOL bLatinWord = FALSE;
CPVT_WordPlace wpWordStart;
CFX_ByteString sLatinWord;
@@ -1744,7 +1744,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
if (!bLatinWord)
{
wpWordStart = place;
- bLatinWord = true;
+ bLatinWord = TRUE;
}
sLatinWord += (char)word.Word;
@@ -1761,7 +1761,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
pIterator->SetAt(place);
}
}
- bLatinWord = false;
+ bLatinWord = FALSE;
}
sLatinWord.Empty();
@@ -1781,7 +1781,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
pIterator->SetAt(place);
}
}
- bLatinWord = false;
+ bLatinWord = FALSE;
}
sLatinWord.Empty();
@@ -1806,12 +1806,12 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
pDevice->RestoreState();
}
-bool CPWL_Utils::IsBlackOrWhite(const CPWL_Color& color)
+FX_BOOL CPWL_Utils::IsBlackOrWhite(const CPWL_Color& color)
{
switch (color.nColorType)
{
case COLORTYPE_TRANSPARENT:
- return false;
+ return FALSE;
case COLORTYPE_GRAY:
return color.fColor1 < 0.5f;
case COLORTYPE_RGB:
@@ -1820,7 +1820,7 @@ bool CPWL_Utils::IsBlackOrWhite(const CPWL_Color& color)
return color.fColor1 + color.fColor2 + color.fColor3 + color.fColor4 > 2.0f;
}
- return true;
+ return TRUE;
}
CPWL_Color CPWL_Utils::GetReverseColor(const CPWL_Color& color)
@@ -1851,8 +1851,8 @@ CPWL_Color CPWL_Utils::GetReverseColor(const CPWL_Color& color)
CFX_ByteString CPWL_Utils::GetIconAppStream(int32_t nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
const CPWL_Color& crStroke)
{
- CFX_ByteString sAppStream = CPWL_Utils::GetColorAppStream(crStroke, false);
- sAppStream += CPWL_Utils::GetColorAppStream(crFill, true);
+ CFX_ByteString sAppStream = CPWL_Utils::GetColorAppStream(crStroke, FALSE);
+ sAppStream += CPWL_Utils::GetColorAppStream(crFill, TRUE);
CFX_ByteString sPath;
CFX_PathData path;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
index f214fb30a2..433b3c6846 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -123,40 +123,40 @@ public:
m_pMainKeyboardWnd = NULL;
}
- bool IsWndCreated(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsWndCreated(const CPWL_Wnd * pWnd) const
{
return m_pCreatedWnd == pWnd;
}
- bool IsMainCaptureMouse(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsMainCaptureMouse(const CPWL_Wnd * pWnd) const
{
return pWnd == m_pMainMouseWnd;
}
- bool IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
{
if (pWnd)
for( int32_t i=0,sz=m_aMousePath.GetSize(); i<sz; i++)
if (m_aMousePath.GetAt(i) == pWnd)
- return true;
+ return TRUE;
- return false;
+ return FALSE;
}
- bool IsMainCaptureKeyboard(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsMainCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
return pWnd == m_pMainKeyboardWnd;
}
- bool IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
if (pWnd)
for( int32_t i=0,sz=m_aKeyboardPath.GetSize(); i<sz; i++)
if (m_aKeyboardPath.GetAt(i) == pWnd)
- return true;
+ return TRUE;
- return false;
+ return FALSE;
}
void SetFocus(CPWL_Wnd * pWnd)
@@ -225,16 +225,16 @@ CPWL_Wnd::CPWL_Wnd() :
m_pVScrollBar(NULL),
m_rcWindow(),
m_rcClip(),
- m_bCreated(false),
- m_bVisible(false),
- m_bNotifying(false),
- m_bEnabled(true)
+ m_bCreated(FALSE),
+ m_bVisible(FALSE),
+ m_bNotifying(FALSE),
+ m_bEnabled(TRUE)
{
}
CPWL_Wnd::~CPWL_Wnd()
{
- ASSERT(m_bCreated == false);
+ ASSERT(m_bCreated == FALSE);
}
CFX_ByteString CPWL_Wnd::GetClassName() const
@@ -272,7 +272,7 @@ void CPWL_Wnd::Create(const PWL_CREATEPARAM & cp)
OnCreated();
RePosChildWnd();
- m_bCreated = true;
+ m_bCreated = TRUE;
}
}
@@ -308,7 +308,7 @@ void CPWL_Wnd::Destroy()
if (m_sPrivateParam.pParentWnd)
m_sPrivateParam.pParentWnd->OnNotify(this, PNM_REMOVECHILD);
- m_bCreated = false;
+ m_bCreated = FALSE;
}
DestroyMsgControl();
@@ -318,7 +318,7 @@ void CPWL_Wnd::Destroy()
m_pVScrollBar = NULL;
}
-void CPWL_Wnd::Move(const CPDF_Rect & rcNew, bool bReset,bool bRefresh)
+void CPWL_Wnd::Move(const CPDF_Rect & rcNew, FX_BOOL bReset,FX_BOOL bRefresh)
{
if (IsValid())
{
@@ -494,7 +494,7 @@ void CPWL_Wnd::InvalidateRect(CPDF_Rect* pRect)
}
#define PWL_IMPLEMENT_KEY_METHOD(key_method_name)\
-bool CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
+FX_BOOL CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
{\
if (IsValid() && IsVisible() && IsEnabled())\
{\
@@ -512,11 +512,11 @@ bool CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
}\
}\
}\
- return false;\
+ return FALSE;\
}
#define PWL_IMPLEMENT_MOUSE_METHOD(mouse_method_name)\
-bool CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
+FX_BOOL CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
{\
if (IsValid() && IsVisible() && IsEnabled())\
{\
@@ -550,7 +550,7 @@ bool CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
SetCursor();\
}\
}\
- return false;\
+ return FALSE;\
}
PWL_IMPLEMENT_KEY_METHOD(OnKeyDown)
@@ -567,7 +567,7 @@ PWL_IMPLEMENT_MOUSE_METHOD(OnRButtonDown)
PWL_IMPLEMENT_MOUSE_METHOD(OnRButtonUp)
PWL_IMPLEMENT_MOUSE_METHOD(OnMouseMove)
-bool CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
if (IsValid() && IsVisible() && IsEnabled())
{
@@ -586,7 +586,7 @@ bool CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFl
}
}
}
- return false;
+ return FALSE;
}
void CPWL_Wnd::AddChild(CPWL_Wnd * pWnd)
@@ -624,7 +624,7 @@ void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t
}
}
-bool CPWL_Wnd::IsValid() const
+FX_BOOL CPWL_Wnd::IsValid() const
{
return m_bCreated;
}
@@ -677,7 +677,7 @@ CPDF_Rect CPWL_Wnd::GetWindowCenterSquare() const
return CPWL_Utils::GetCenterSquare(CPWL_Utils::DeflateRect(GetWindowRect(),0.1f));
}
-bool CPWL_Wnd::HasFlag(FX_DWORD dwFlags) const
+FX_BOOL CPWL_Wnd::HasFlag(FX_DWORD dwFlags) const
{
return (m_sPrivateParam.dwFlags & dwFlags) != 0;
}
@@ -865,12 +865,12 @@ void CPWL_Wnd::OnKillFocus()
{
}
-bool CPWL_Wnd::WndHitTest(const CPDF_Point & point) const
+FX_BOOL CPWL_Wnd::WndHitTest(const CPDF_Point & point) const
{
return IsValid() && IsVisible() && GetWindowRect().Contains(point.x,point.y);
}
-bool CPWL_Wnd::ClientHitTest(const CPDF_Point & point) const
+FX_BOOL CPWL_Wnd::ClientHitTest(const CPDF_Point & point) const
{
return IsValid() && IsVisible() && GetClientRect().Contains(point.x,point.y);
}
@@ -883,7 +883,7 @@ const CPWL_Wnd* CPWL_Wnd::GetRootWnd() const
return this;
}
-void CPWL_Wnd::SetVisible(bool bVisible)
+void CPWL_Wnd::SetVisible(FX_BOOL bVisible)
{
if (IsValid())
{
@@ -915,7 +915,7 @@ CPDF_Rect CPWL_Wnd::GetClipRect() const
return m_rcClip;
}
-bool CPWL_Wnd::IsReadOnly() const
+FX_BOOL CPWL_Wnd::IsReadOnly() const
{
return HasFlag(PWS_READONLY);
}
@@ -931,7 +931,7 @@ void CPWL_Wnd::RePosChildWnd()
rcContent.right-1.0f,
rcContent.top);
- if (pVSB) pVSB->Move(rcVScroll,true,false);
+ if (pVSB) pVSB->Move(rcVScroll,TRUE,FALSE);
}
void CPWL_Wnd::CreateChildWnd(const PWL_CREATEPARAM & cp)
@@ -968,33 +968,33 @@ CPWL_MsgControl* CPWL_Wnd::GetMsgControl() const
return m_sPrivateParam.pMsgControl;
}
-bool CPWL_Wnd::IsCaptureMouse() const
+FX_BOOL CPWL_Wnd::IsCaptureMouse() const
{
return IsWndCaptureMouse(this);
}
-bool CPWL_Wnd::IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
+FX_BOOL CPWL_Wnd::IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
{
if (CPWL_MsgControl * pCtrl = GetMsgControl())
return pCtrl->IsWndCaptureMouse(pWnd);
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
+FX_BOOL CPWL_Wnd::IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
if (CPWL_MsgControl * pCtrl = GetMsgControl())
return pCtrl->IsWndCaptureKeyboard(pWnd);
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsFocused() const
+FX_BOOL CPWL_Wnd::IsFocused() const
{
if (CPWL_MsgControl * pCtrl = GetMsgControl())
return pCtrl->IsMainCaptureKeyboard(this);
- return false;
+ return FALSE;
}
CPDF_Rect CPWL_Wnd::GetFocusRect() const
@@ -1217,7 +1217,7 @@ const CPWL_Wnd* CPWL_Wnd::GetFocused() const
return NULL;
}
-void CPWL_Wnd::EnableWindow(bool bEnable)
+void CPWL_Wnd::EnableWindow(FX_BOOL bEnable)
{
if (m_bEnabled != bEnable)
{
@@ -1238,7 +1238,7 @@ void CPWL_Wnd::EnableWindow(bool bEnable)
}
}
-bool CPWL_Wnd::IsEnabled()
+FX_BOOL CPWL_Wnd::IsEnabled()
{
return m_bEnabled;
}
@@ -1251,42 +1251,42 @@ void CPWL_Wnd::OnDisabled()
{
}
-bool CPWL_Wnd::IsCTRLpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsCTRLpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsCTRLKeyDown(nFlag);
}
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsSHIFTpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsSHIFTpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsSHIFTKeyDown(nFlag);
}
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsALTpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsALTpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsALTKeyDown(nFlag);
}
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsINSERTKeyDown(nFlag);
}
- return false;
+ return FALSE;
}