summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
commitbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (patch)
tree4cfbe682869d89900f33751c37f6a84865beeb0a /fpdfsdk/src/pdfwindow/PWL_IconList.cpp
parentb116136da234afcad018bb44a3ccb64b9ad2a554 (diff)
downloadpdfium-bfa9a824a20f37c2dd7111012b46c929cf2ed8a0.tar.xz
Merge to XFA: Use stdint.h types throughout PDFium.
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_IconList.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_IconList.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
index 990f8b893f..cbb94d23d7 100644
--- a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
@@ -100,7 +100,7 @@ void CPWL_IconList_Item::SetData(void* pData)
m_pData = pData;
}
-void CPWL_IconList_Item::SetIcon(FX_INT32 nIconIndex)
+void CPWL_IconList_Item::SetIcon(int32_t nIconIndex)
{
m_nIconIndex = nIconIndex;
}
@@ -148,7 +148,7 @@ void CPWL_IconList_Item::OnDisabled()
/* ----------------- CPWL_IconList_Content ----------------- */
-CPWL_IconList_Content::CPWL_IconList_Content(FX_INT32 nListCount) :
+CPWL_IconList_Content::CPWL_IconList_Content(int32_t nListCount) :
m_nSelectIndex(-1),
m_pNotify(NULL),
m_bEnableNotify(TRUE),
@@ -163,7 +163,7 @@ CPWL_IconList_Content::~CPWL_IconList_Content()
void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM & cp)
{
- for (FX_INT32 i=0; i<m_nListCount; i++)
+ for (int32_t i=0; i<m_nListCount; i++)
{
CPWL_IconList_Item* pNewItem = new CPWL_IconList_Item();
@@ -188,7 +188,7 @@ void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM & cp)
sInfo.fSmallStep = 13.0f;
sInfo.fBigStep = sInfo.fPlateWidth;
- pParent->OnNotify(this, PNM_SETSCROLLINFO, SBT_VSCROLL, (FX_INTPTR)&sInfo);
+ pParent->OnNotify(this, PNM_SETSCROLLINFO, SBT_VSCROLL, (intptr_t)&sInfo);
}
}
@@ -199,7 +199,7 @@ FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CPDF_Point & point, FX_DWORD
SetCapture();
m_bMouseDown = TRUE;
- FX_INT32 nItemIndex = FindItemIndex(point);
+ int32_t nItemIndex = FindItemIndex(point);
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
@@ -218,7 +218,7 @@ FX_BOOL CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nF
{
if (m_bMouseDown)
{
- FX_INT32 nItemIndex = FindItemIndex(point);
+ int32_t nItemIndex = FindItemIndex(point);
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
@@ -233,7 +233,7 @@ FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
case FWL_VKEY_Up:
if (m_nSelectIndex > 0)
{
- FX_INT32 nItemIndex = m_nSelectIndex - 1;
+ int32_t nItemIndex = m_nSelectIndex - 1;
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
@@ -241,7 +241,7 @@ FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
case FWL_VKEY_Down:
if (m_nSelectIndex < m_nListCount-1)
{
- FX_INT32 nItemIndex = m_nSelectIndex + 1;
+ int32_t nItemIndex = m_nSelectIndex + 1;
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
@@ -251,10 +251,10 @@ FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
return FALSE;
}
-FX_INT32 CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
+int32_t CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
{
- FX_INT32 nIndex = 0;
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ int32_t nIndex = 0;
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -270,7 +270,7 @@ FX_INT32 CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
return nIndex;
}
-void CPWL_IconList_Content::ScrollToItem(FX_INT32 nItemIndex)
+void CPWL_IconList_Content::ScrollToItem(int32_t nItemIndex)
{
CPDF_Rect rcClient = GetClientRect();
@@ -297,13 +297,13 @@ void CPWL_IconList_Content::ScrollToItem(FX_INT32 nItemIndex)
this->InvalidateRect();
if (CPWL_Wnd* pParent = this->GetParentWindow())
{
- pParent->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptScroll.y);
+ pParent->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptScroll.y);
}
}
}
}
-void CPWL_IconList_Content::SetSelect(FX_INT32 nIndex)
+void CPWL_IconList_Content::SetSelect(int32_t nIndex)
{
if (m_nSelectIndex != nIndex)
{
@@ -316,7 +316,7 @@ void CPWL_IconList_Content::SetSelect(FX_INT32 nIndex)
}
}
-FX_INT32 CPWL_IconList_Content::GetSelect() const
+int32_t CPWL_IconList_Content::GetSelect() const
{
return m_nSelectIndex;
}
@@ -338,7 +338,7 @@ void CPWL_IconList_Content::EnableNotify(FX_BOOL bNotify)
m_bEnableNotify = bNotify;
}
-void CPWL_IconList_Content::SelectItem(FX_INT32 nItemIndex, FX_BOOL bSelect)
+void CPWL_IconList_Content::SelectItem(int32_t nItemIndex, FX_BOOL bSelect)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
{
@@ -347,7 +347,7 @@ void CPWL_IconList_Content::SelectItem(FX_INT32 nItemIndex, FX_BOOL bSelect)
}
}
-CPWL_IconList_Item* CPWL_IconList_Content::GetListItem(FX_INT32 nItemIndex) const
+CPWL_IconList_Item* CPWL_IconList_Content::GetListItem(int32_t nItemIndex) const
{
if (nItemIndex >= 0 && nItemIndex<m_aChildren.GetSize())
{
@@ -363,25 +363,25 @@ CPWL_IconList_Item* CPWL_IconList_Content::GetListItem(FX_INT32 nItemIndex) cons
return NULL;
}
-void CPWL_IconList_Content::SetListData(FX_INT32 nItemIndex, void* pData)
+void CPWL_IconList_Content::SetListData(int32_t nItemIndex, void* pData)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
pItem->SetData(pData);
}
-void CPWL_IconList_Content::SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex)
+void CPWL_IconList_Content::SetListIcon(int32_t nItemIndex, int32_t nIconIndex)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
pItem->SetIcon(nIconIndex);
}
-void CPWL_IconList_Content::SetListString(FX_INT32 nItemIndex, const CFX_WideString& str)
+void CPWL_IconList_Content::SetListString(int32_t nItemIndex, const CFX_WideString& str)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
pItem->SetText(str);
}
-CFX_WideString CPWL_IconList_Content::GetListString(FX_INT32 nItemIndex) const
+CFX_WideString CPWL_IconList_Content::GetListString(int32_t nItemIndex) const
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
return pItem->GetText();
@@ -391,7 +391,7 @@ CFX_WideString CPWL_IconList_Content::GetListString(FX_INT32 nItemIndex) const
void CPWL_IconList_Content::SetIconFillColor(const CPWL_Color& color)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -408,7 +408,7 @@ void CPWL_IconList_Content::SetIconFillColor(const CPWL_Color& color)
/* -------------------- CPWL_IconList --------------------- */
-CPWL_IconList::CPWL_IconList(FX_INT32 nListCount) :
+CPWL_IconList::CPWL_IconList(int32_t nListCount) :
m_pListContent(NULL),
m_nListCount(nListCount)
{
@@ -446,7 +446,7 @@ void CPWL_IconList::OnCreated()
}
}
-void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
@@ -502,17 +502,17 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_
}
}
-void CPWL_IconList::SetSelect(FX_INT32 nIndex)
+void CPWL_IconList::SetSelect(int32_t nIndex)
{
m_pListContent->SetSelect(nIndex);
}
-void CPWL_IconList::SetTopItem(FX_INT32 nIndex)
+void CPWL_IconList::SetTopItem(int32_t nIndex)
{
m_pListContent->ScrollToItem(nIndex);
}
-FX_INT32 CPWL_IconList::GetSelect() const
+int32_t CPWL_IconList::GetSelect() const
{
return m_pListContent->GetSelect();
}
@@ -527,22 +527,22 @@ void CPWL_IconList::EnableNotify(FX_BOOL bNotify)
m_pListContent->EnableNotify(bNotify);
}
-void CPWL_IconList::SetListData(FX_INT32 nItemIndex, void* pData)
+void CPWL_IconList::SetListData(int32_t nItemIndex, void* pData)
{
m_pListContent->SetListData(nItemIndex, pData);
}
-void CPWL_IconList::SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex)
+void CPWL_IconList::SetListIcon(int32_t nItemIndex, int32_t nIconIndex)
{
m_pListContent->SetListIcon(nItemIndex, nIconIndex);
}
-void CPWL_IconList::SetListString(FX_INT32 nItemIndex, const CFX_WideString& str)
+void CPWL_IconList::SetListString(int32_t nItemIndex, const CFX_WideString& str)
{
m_pListContent->SetListString(nItemIndex, str);
}
-CFX_WideString CPWL_IconList::GetListString(FX_INT32 nItemIndex) const
+CFX_WideString CPWL_IconList::GetListString(int32_t nItemIndex) const
{
return m_pListContent->GetListString(nItemIndex);
}
@@ -581,7 +581,7 @@ FX_BOOL CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_D
m_pListContent->InvalidateRect(NULL);
if (CPWL_ScrollBar* pScrollBar = this->GetVScrollBar())
- pScrollBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptNew.y);
+ pScrollBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
return TRUE;
}