Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_IconList.h

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Icon.h ('k') | fpdfsdk/include/pdfwindow/PWL_ListBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_ 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_ 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_
9 9
10 #include "../../../core/include/fxcrt/fx_string.h" 10 #include "../../../core/include/fxcrt/fx_string.h"
(...skipping 16 matching lines...) Expand all
27 class CPWL_IconList_Item : public CPWL_Wnd 27 class CPWL_IconList_Item : public CPWL_Wnd
28 { 28 {
29 public: 29 public:
30 CPWL_IconList_Item(); 30 CPWL_IconList_Item();
31 virtual ~CPWL_IconList_Item(); 31 virtual ~CPWL_IconList_Item();
32 32
33 virtual CFX_ByteString GetClassName() const; 33 virtual CFX_ByteString GetClassName() const;
34 virtual void CreateChildWnd(c onst PWL_CREATEPARAM & cp); 34 virtual void CreateChildWnd(c onst PWL_CREATEPARAM & cp);
35 virtual void RePosChildWnd(); 35 virtual void RePosChildWnd();
36 36
37 » void» » » » » » » » SetSelec t(FX_BOOL bSelected); 37 » void» » » » » » » » SetSelec t(bool bSelected);
38 » FX_BOOL»» » » » » » » IsSelect ed() const; 38 » bool» » » » » » » » IsSelect ed() const;
39 void SetData( void* pData); 39 void SetData( void* pData);
40 void SetIcon( int32_t nIconIndex); 40 void SetIcon( int32_t nIconIndex);
41 void SetText( const CFX_WideString& str); 41 void SetText( const CFX_WideString& str);
42 void SetIconF illColor(const CPWL_Color& color); 42 void SetIconF illColor(const CPWL_Color& color);
43 CFX_WideString GetText() const; 43 CFX_WideString GetText() const;
44 44
45 protected: 45 protected:
46 virtual FX_FLOAT GetItemHeight(FX _FLOAT fLimitWidth); 46 virtual FX_FLOAT GetItemHeight(FX _FLOAT fLimitWidth);
47 virtual void DrawThisAppearan ce(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); 47 virtual void DrawThisAppearan ce(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
48 48
49 virtual void OnEnabled(); 49 virtual void OnEnabled();
50 virtual void OnDisabled(); 50 virtual void OnDisabled();
51 51
52 private: 52 private:
53 int32_t m_nIconIndex; 53 int32_t m_nIconIndex;
54 void* m_pData; 54 void* m_pData;
55 » FX_BOOL»» » » » » » » m_bSelec ted; 55 » bool» » » » » » » » m_bSelec ted;
56 CPWL_Label* m_pText; 56 CPWL_Label* m_pText;
57 CPWL_Color m_crIcon ; 57 CPWL_Color m_crIcon ;
58 }; 58 };
59 59
60 class CPWL_IconList_Content : public CPWL_ListCtrl 60 class CPWL_IconList_Content : public CPWL_ListCtrl
61 { 61 {
62 public: 62 public:
63 CPWL_IconList_Content(int32_t nListCount); 63 CPWL_IconList_Content(int32_t nListCount);
64 virtual ~CPWL_IconList_Content(); 64 virtual ~CPWL_IconList_Content();
65 65
66 void SetSelec t(int32_t nIndex); 66 void SetSelec t(int32_t nIndex);
67 int32_t GetSelect() cons t; 67 int32_t GetSelect() cons t;
68 void SetNotif y(IPWL_IconList_Notify* pNotify); 68 void SetNotif y(IPWL_IconList_Notify* pNotify);
69 » void» » » » » » » » EnableNo tify(FX_BOOL bNotify); 69 » void» » » » » » » » EnableNo tify(bool bNotify);
70 void SetListD ata(int32_t nItemIndex, void* pData); 70 void SetListD ata(int32_t nItemIndex, void* pData);
71 void SetListI con(int32_t nItemIndex, int32_t nIconIndex); 71 void SetListI con(int32_t nItemIndex, int32_t nIconIndex);
72 void SetListS tring(int32_t nItemIndex, const CFX_WideString& str); 72 void SetListS tring(int32_t nItemIndex, const CFX_WideString& str);
73 void SetIconF illColor(const CPWL_Color& color); 73 void SetIconF illColor(const CPWL_Color& color);
74 CFX_WideString GetListString(in t32_t nItemIndex) const; 74 CFX_WideString GetListString(in t32_t nItemIndex) const;
75 IPWL_IconList_Notify* GetNotify() const; 75 IPWL_IconList_Notify* GetNotify() const;
76 void ScrollTo Item(int32_t nItemIndex); 76 void ScrollTo Item(int32_t nItemIndex);
77 77
78 protected: 78 protected:
79 virtual void CreateChildWnd(c onst PWL_CREATEPARAM & cp); 79 virtual void CreateChildWnd(c onst PWL_CREATEPARAM & cp);
80 » virtual FX_BOOL»» » » » » OnLButtonDown(co nst CPDF_Point & point, FX_DWORD nFlag); 80 » virtual bool» » » » » » OnLButtonDown(co nst CPDF_Point & point, FX_DWORD nFlag);
81 » virtual FX_BOOL»» » » » » OnLButtonUp(cons t CPDF_Point & point, FX_DWORD nFlag); 81 » virtual bool» » » » » » OnLButtonUp(cons t CPDF_Point & point, FX_DWORD nFlag);
82 » virtual FX_BOOL»» » » » » OnMouseMove(cons t CPDF_Point & point, FX_DWORD nFlag); 82 » virtual bool» » » » » » OnMouseMove(cons t CPDF_Point & point, FX_DWORD nFlag);
83 » virtual FX_BOOL»» » » » » OnKeyDown(FX_WOR D nChar, FX_DWORD nFlag); 83 » virtual bool» » » » » » OnKeyDown(FX_WOR D nChar, FX_DWORD nFlag);
84 84
85 private: 85 private:
86 CPWL_IconList_Item* GetListItem(int3 2_t nItemIndex) const; 86 CPWL_IconList_Item* GetListItem(int3 2_t nItemIndex) const;
87 » void» » » » » » » » SelectIt em(int32_t nItemIndex, FX_BOOL bSelect); 87 » void» » » » » » » » SelectIt em(int32_t nItemIndex, bool bSelect);
88 int32_t FindItemIndex(co nst CPDF_Point& point); 88 int32_t FindItemIndex(co nst CPDF_Point& point);
89 89
90 » FX_BOOL»» » » » » » » m_nSelec tIndex; 90 » bool» » » » » » » » m_nSelec tIndex;
91 IPWL_IconList_Notify* m_pNotify; 91 IPWL_IconList_Notify* m_pNotify;
92 » FX_BOOL»» » » » » » » m_bEnabl eNotify; 92 » bool» » » » » » » » m_bEnabl eNotify;
93 » FX_BOOL»» » » » » » » m_bMouse Down; 93 » bool» » » » » » » » m_bMouse Down;
94 int32_t m_nListCount; 94 int32_t m_nListCount;
95 }; 95 };
96 96
97 class PWL_CLASS CPWL_IconList : public CPWL_Wnd 97 class PWL_CLASS CPWL_IconList : public CPWL_Wnd
98 { 98 {
99 public: 99 public:
100 CPWL_IconList(int32_t nListCount); 100 CPWL_IconList(int32_t nListCount);
101 virtual ~CPWL_IconList(); 101 virtual ~CPWL_IconList();
102 102
103 » virtual FX_BOOL»» » » » » OnMouseWheel(sho rt zDelta, const CPDF_Point & point, FX_DWORD nFlag); 103 » virtual bool» » » » » » OnMouseWheel(sho rt zDelta, const CPDF_Point & point, FX_DWORD nFlag);
104 104
105 void SetSelec t(int32_t nIndex); 105 void SetSelec t(int32_t nIndex);
106 void SetTopIt em(int32_t nIndex); 106 void SetTopIt em(int32_t nIndex);
107 int32_t GetSelect() cons t; 107 int32_t GetSelect() cons t;
108 void SetNotif y(IPWL_IconList_Notify* pNotify); 108 void SetNotif y(IPWL_IconList_Notify* pNotify);
109 » void» » » » » » » » EnableNo tify(FX_BOOL bNotify); 109 » void» » » » » » » » EnableNo tify(bool bNotify);
110 void SetListD ata(int32_t nItemIndex, void* pData); 110 void SetListD ata(int32_t nItemIndex, void* pData);
111 void SetListI con(int32_t nItemIndex, int32_t nIconIndex); 111 void SetListI con(int32_t nItemIndex, int32_t nIconIndex);
112 void SetListS tring(int32_t nItemIndex, const CFX_WideString& str); 112 void SetListS tring(int32_t nItemIndex, const CFX_WideString& str);
113 void SetIconF illColor(const CPWL_Color& color); 113 void SetIconF illColor(const CPWL_Color& color);
114 CFX_WideString GetListString(in t32_t nItemIndex) const; 114 CFX_WideString GetListString(in t32_t nItemIndex) const;
115 115
116 protected: 116 protected:
117 virtual void OnCreated(); 117 virtual void OnCreated();
118 virtual void RePosChildWnd(); 118 virtual void RePosChildWnd();
119 virtual void CreateChildWnd(c onst PWL_CREATEPARAM & cp); 119 virtual void CreateChildWnd(c onst PWL_CREATEPARAM & cp);
120 120
121 virtual void OnNotify(CPWL_Wn d* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); 121 virtual void OnNotify(CPWL_Wn d* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
122 122
123 private: 123 private:
124 CPWL_IconList_Content* m_pListContent; 124 CPWL_IconList_Content* m_pListContent;
125 int32_t m_nListCount; 125 int32_t m_nListCount;
126 }; 126 };
127 127
128 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_ 128 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Icon.h ('k') | fpdfsdk/include/pdfwindow/PWL_ListBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698