diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
commit | 9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch) | |
tree | c97037f398d714665aefccb6eb54d0969ad7030c /fpdfsdk/include/pdfwindow/PWL_IconList.h | |
parent | 780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff) | |
download | pdfium-9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f.tar.xz |
XFA: clang-format all pdfium code.
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \
xargs ../../buildtools/mac/clang-format -i
Then manually merged https://codereview.chromium.org/1269223002/
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
Diffstat (limited to 'fpdfsdk/include/pdfwindow/PWL_IconList.h')
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_IconList.h | 202 |
1 files changed, 102 insertions, 100 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h index b8bc3d2957..30a12dcd9b 100644 --- a/fpdfsdk/include/pdfwindow/PWL_IconList.h +++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h @@ -17,112 +17,114 @@ class CPWL_IconList_Content; class CPWL_IconList; class CPWL_Label; -class IPWL_IconList_Notify -{ -public: - virtual ~IPWL_IconList_Notify() { } - virtual void OnNoteListSelChanged(int32_t nItemIndex) = 0; +class IPWL_IconList_Notify { + public: + virtual ~IPWL_IconList_Notify() {} + virtual void OnNoteListSelChanged(int32_t nItemIndex) = 0; }; -class CPWL_IconList_Item : public CPWL_Wnd -{ -public: - CPWL_IconList_Item(); - virtual ~CPWL_IconList_Item(); - - virtual CFX_ByteString GetClassName() const; - virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); - virtual void RePosChildWnd(); - - void SetSelect(FX_BOOL bSelected); - FX_BOOL IsSelected() const; - void SetData(void* pData); - void SetIcon(int32_t nIconIndex); - void SetText(const CFX_WideString& str); - void SetIconFillColor(const CPWL_Color& color); - CFX_WideString GetText() const; - -protected: - virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth); - virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); - - virtual void OnEnabled(); - virtual void OnDisabled(); - -private: - int32_t m_nIconIndex; - void* m_pData; - FX_BOOL m_bSelected; - CPWL_Label* m_pText; - CPWL_Color m_crIcon; +class CPWL_IconList_Item : public CPWL_Wnd { + public: + CPWL_IconList_Item(); + virtual ~CPWL_IconList_Item(); + + virtual CFX_ByteString GetClassName() const; + virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); + virtual void RePosChildWnd(); + + void SetSelect(FX_BOOL bSelected); + FX_BOOL IsSelected() const; + void SetData(void* pData); + void SetIcon(int32_t nIconIndex); + void SetText(const CFX_WideString& str); + void SetIconFillColor(const CPWL_Color& color); + CFX_WideString GetText() const; + + protected: + virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth); + virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, + CPDF_Matrix* pUser2Device); + + virtual void OnEnabled(); + virtual void OnDisabled(); + + private: + int32_t m_nIconIndex; + void* m_pData; + FX_BOOL m_bSelected; + CPWL_Label* m_pText; + CPWL_Color m_crIcon; }; -class CPWL_IconList_Content : public CPWL_ListCtrl -{ -public: - CPWL_IconList_Content(int32_t nListCount); - virtual ~CPWL_IconList_Content(); - - void SetSelect(int32_t nIndex); - int32_t GetSelect() const; - void SetNotify(IPWL_IconList_Notify* pNotify); - void EnableNotify(FX_BOOL bNotify); - void SetListData(int32_t nItemIndex, void* pData); - void SetListIcon(int32_t nItemIndex, int32_t nIconIndex); - void SetListString(int32_t nItemIndex, const CFX_WideString& str); - void SetIconFillColor(const CPWL_Color& color); - CFX_WideString GetListString(int32_t nItemIndex) const; - IPWL_IconList_Notify* GetNotify() const; - void ScrollToItem(int32_t nItemIndex); - -protected: - virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); - virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); - virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); - virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - -private: - CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const; - void SelectItem(int32_t nItemIndex, FX_BOOL bSelect); - int32_t FindItemIndex(const CPDF_Point& point); - - int32_t m_nSelectIndex; - IPWL_IconList_Notify* m_pNotify; - FX_BOOL m_bEnableNotify; - FX_BOOL m_bMouseDown; - int32_t m_nListCount; +class CPWL_IconList_Content : public CPWL_ListCtrl { + public: + CPWL_IconList_Content(int32_t nListCount); + virtual ~CPWL_IconList_Content(); + + void SetSelect(int32_t nIndex); + int32_t GetSelect() const; + void SetNotify(IPWL_IconList_Notify* pNotify); + void EnableNotify(FX_BOOL bNotify); + void SetListData(int32_t nItemIndex, void* pData); + void SetListIcon(int32_t nItemIndex, int32_t nIconIndex); + void SetListString(int32_t nItemIndex, const CFX_WideString& str); + void SetIconFillColor(const CPWL_Color& color); + CFX_WideString GetListString(int32_t nItemIndex) const; + IPWL_IconList_Notify* GetNotify() const; + void ScrollToItem(int32_t nItemIndex); + + protected: + virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); + virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); + virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + + private: + CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const; + void SelectItem(int32_t nItemIndex, FX_BOOL bSelect); + int32_t FindItemIndex(const CPDF_Point& point); + + int32_t m_nSelectIndex; + IPWL_IconList_Notify* m_pNotify; + FX_BOOL m_bEnableNotify; + FX_BOOL m_bMouseDown; + int32_t m_nListCount; }; -class CPWL_IconList : public CPWL_Wnd -{ -public: - CPWL_IconList(int32_t nListCount); - virtual ~CPWL_IconList(); - - virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag); - - void SetSelect(int32_t nIndex); - void SetTopItem(int32_t nIndex); - int32_t GetSelect() const; - void SetNotify(IPWL_IconList_Notify* pNotify); - void EnableNotify(FX_BOOL bNotify); - void SetListData(int32_t nItemIndex, void* pData); - void SetListIcon(int32_t nItemIndex, int32_t nIconIndex); - void SetListString(int32_t nItemIndex, const CFX_WideString& str); - void SetIconFillColor(const CPWL_Color& color); - CFX_WideString GetListString(int32_t nItemIndex) const; - -protected: - virtual void OnCreated(); - virtual void RePosChildWnd(); - virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); - - virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); - -private: - CPWL_IconList_Content* m_pListContent; - int32_t m_nListCount; +class CPWL_IconList : public CPWL_Wnd { + public: + CPWL_IconList(int32_t nListCount); + virtual ~CPWL_IconList(); + + virtual FX_BOOL OnMouseWheel(short zDelta, + const CPDF_Point& point, + FX_DWORD nFlag); + + void SetSelect(int32_t nIndex); + void SetTopItem(int32_t nIndex); + int32_t GetSelect() const; + void SetNotify(IPWL_IconList_Notify* pNotify); + void EnableNotify(FX_BOOL bNotify); + void SetListData(int32_t nItemIndex, void* pData); + void SetListIcon(int32_t nItemIndex, int32_t nIconIndex); + void SetListString(int32_t nItemIndex, const CFX_WideString& str); + void SetIconFillColor(const CPWL_Color& color); + CFX_WideString GetListString(int32_t nItemIndex) const; + + protected: + virtual void OnCreated(); + virtual void RePosChildWnd(); + virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); + + virtual void OnNotify(CPWL_Wnd* pWnd, + FX_DWORD msg, + intptr_t wParam = 0, + intptr_t lParam = 0); + + private: + CPWL_IconList_Content* m_pListContent; + int32_t m_nListCount; }; #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_ |