diff options
Diffstat (limited to 'fpdfsdk/include/fxedit/fxet_list.h')
-rw-r--r-- | fpdfsdk/include/fxedit/fxet_list.h | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h index 5c689ed439..b7888eaf3b 100644 --- a/fpdfsdk/include/fxedit/fxet_list.h +++ b/fpdfsdk/include/fxedit/fxet_list.h @@ -209,8 +209,8 @@ template<class TYPE> class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { public: FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; } - TYPE GetAt(FX_INT32 nIndex) const { if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); return NULL;} - void RemoveAt(FX_INT32 nIndex){if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);} + TYPE GetAt(int32_t nIndex) const { if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); return NULL;} + void RemoveAt(int32_t nIndex){if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);} }; class CFX_List : protected CFX_ListContainer , public IFX_List @@ -227,31 +227,31 @@ public: virtual CPDF_Rect GetContentRect() const; virtual FX_FLOAT GetFontSize() const; - virtual IFX_Edit* GetItemEdit(FX_INT32 nIndex) const; - virtual FX_INT32 GetCount() const; - virtual FX_BOOL IsItemSelected(FX_INT32 nIndex) const; + virtual IFX_Edit* GetItemEdit(int32_t nIndex) const; + virtual int32_t GetCount() const; + virtual FX_BOOL IsItemSelected(int32_t nIndex) const; virtual FX_FLOAT GetFirstHeight() const; virtual void SetMultipleSel(FX_BOOL bMultiple); virtual FX_BOOL IsMultipleSel() const; - virtual FX_BOOL IsValid(FX_INT32 nItemIndex) const; - virtual FX_INT32 FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const; + virtual FX_BOOL IsValid(int32_t nItemIndex) const; + virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const; protected: virtual void Empty(); void AddItem(FX_LPCWSTR str); - virtual void ReArrange(FX_INT32 nItemIndex); + virtual void ReArrange(int32_t nItemIndex); - virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const; - CFX_WideString GetItemText(FX_INT32 nIndex) const; + virtual CPDF_Rect GetItemRect(int32_t nIndex) const; + CFX_WideString GetItemText(int32_t nIndex) const; - void SetItemSelect(FX_INT32 nItemIndex, FX_BOOL bSelected); - void SetItemCaret(FX_INT32 nItemIndex, FX_BOOL bCaret); + void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected); + void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret); - virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const; - FX_INT32 GetFirstSelected() const; - FX_INT32 GetLastSelected() const; + virtual int32_t GetItemIndex(const CPDF_Point & point) const; + int32_t GetFirstSelected() const; + int32_t GetLastSelected() const; FX_WCHAR Toupper(FX_WCHAR c) const; private: @@ -263,14 +263,14 @@ private: struct CPLST_Select_Item { - CPLST_Select_Item(FX_INT32 nItemIndex,FX_INT32 nState) + CPLST_Select_Item(int32_t nItemIndex,int32_t nState) { this->nItemIndex = nItemIndex; this->nState = nState; } - FX_INT32 nItemIndex; - FX_INT32 nState; //0:normal select -1:to deselect 1: to select + int32_t nItemIndex; + int32_t nState; //0:normal select -1:to deselect 1: to select }; class CPLST_Select @@ -280,15 +280,15 @@ public: virtual ~CPLST_Select(); public: - void Add(FX_INT32 nItemIndex); - void Add(FX_INT32 nBeginIndex, FX_INT32 nEndIndex); - void Sub(FX_INT32 nItemIndex); - void Sub(FX_INT32 nBeginIndex, FX_INT32 nEndIndex); - FX_BOOL IsExist(FX_INT32 nItemIndex) const; - FX_INT32 Find(FX_INT32 nItemIndex) const; - FX_INT32 GetCount() const; - FX_INT32 GetItemIndex(FX_INT32 nIndex) const; - FX_INT32 GetState(FX_INT32 nIndex) const; + void Add(int32_t nItemIndex); + void Add(int32_t nBeginIndex, int32_t nEndIndex); + void Sub(int32_t nItemIndex); + void Sub(int32_t nBeginIndex, int32_t nEndIndex); + FX_BOOL IsExist(int32_t nItemIndex) const; + int32_t Find(int32_t nItemIndex) const; + int32_t GetCount() const; + int32_t GetItemIndex(int32_t nIndex) const; + int32_t GetState(int32_t nIndex) const; void Done(); void DeselectAll(); @@ -313,7 +313,7 @@ public: void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl); void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl); void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl); - void OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl); + void OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl); FX_BOOL OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl); virtual CPDF_Point InToOut(const CPDF_Point & point) const; @@ -323,41 +323,41 @@ public: virtual void SetPlateRect(const CPDF_Rect & rect); void SetScrollPos(const CPDF_Point & point); - void ScrollToListItem(FX_INT32 nItemIndex); - virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const; - FX_INT32 GetCaret() const {return m_nCaretIndex;} - FX_INT32 GetSelect() const {return m_nSelItem;} - FX_INT32 GetTopItem() const; + void ScrollToListItem(int32_t nItemIndex); + virtual CPDF_Rect GetItemRect(int32_t nIndex) const; + int32_t GetCaret() const {return m_nCaretIndex;} + int32_t GetSelect() const {return m_nSelItem;} + int32_t GetTopItem() const; virtual CPDF_Rect GetContentRect() const; - virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const; + virtual int32_t GetItemIndex(const CPDF_Point & point) const; void AddString(FX_LPCWSTR string); - void SetTopItem(FX_INT32 nIndex); - void Select(FX_INT32 nItemIndex); - virtual void SetCaret(FX_INT32 nItemIndex); + void SetTopItem(int32_t nIndex); + void Select(int32_t nItemIndex); + virtual void SetCaret(int32_t nItemIndex); virtual void Empty(); virtual void Cancel(); CFX_WideString GetText() const; private: - void SetMultipleSelect(FX_INT32 nItemIndex, FX_BOOL bSelected); - void SetSingleSelect(FX_INT32 nItemIndex); - void InvalidateItem(FX_INT32 nItemIndex); + void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected); + void SetSingleSelect(int32_t nItemIndex); + void InvalidateItem(int32_t nItemIndex); void SelectItems(); - FX_BOOL IsItemVisible(FX_INT32 nItemIndex) const; + FX_BOOL IsItemVisible(int32_t nItemIndex) const; void SetScrollInfo(); void SetScrollPosY(FX_FLOAT fy); - virtual void ReArrange(FX_INT32 nItemIndex); + virtual void ReArrange(int32_t nItemIndex); private: IFX_List_Notify* m_pNotify; FX_BOOL m_bNotifyFlag; CPDF_Point m_ptScrollPos; CPLST_Select m_aSelItems; //for multiple - FX_INT32 m_nSelItem; //for single - FX_INT32 m_nFootIndex; //for multiple + int32_t m_nSelItem; //for single + int32_t m_nFootIndex; //for multiple FX_BOOL m_bCtrlSel; //for multiple - FX_INT32 m_nCaretIndex; //for multiple + int32_t m_nCaretIndex; //for multiple }; #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |