OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 XFA_FWL_CFWL_LISTITEM_H_ | 7 #ifndef XFA_FWL_CFWL_LISTITEM_H_ |
8 #define XFA_FWL_CFWL_LISTITEM_H_ | 8 #define XFA_FWL_CFWL_LISTITEM_H_ |
9 | 9 |
10 #include "core/fxcrt/fx_coordinates.h" | 10 #include "core/fxcrt/fx_coordinates.h" |
11 #include "core/fxcrt/fx_string.h" | 11 #include "core/fxcrt/fx_string.h" |
12 | 12 |
13 class CFX_DIBitmap; | |
14 | |
15 class CFWL_ListItem { | 13 class CFWL_ListItem { |
16 public: | 14 public: |
17 explicit CFWL_ListItem(const CFX_WideString& text); | 15 explicit CFWL_ListItem(const CFX_WideString& text); |
18 ~CFWL_ListItem(); | 16 ~CFWL_ListItem(); |
19 | 17 |
20 CFX_RectF GetRect() const { return m_rtItem; } | 18 CFX_RectF GetRect() const { return m_rtItem; } |
21 void SetRect(const CFX_RectF& rect) { m_rtItem = rect; } | 19 void SetRect(const CFX_RectF& rect) { m_rtItem = rect; } |
22 | 20 |
23 uint32_t GetStyles() const { return m_dwStates; } | 21 uint32_t GetStates() const { return m_dwStates; } |
24 void SetStyles(uint32_t dwStyle) { m_dwStates = dwStyle; } | 22 void SetStates(uint32_t dwStates) { m_dwStates = dwStates; } |
25 | |
26 CFX_RectF GetCheckRect() const { return m_rtCheckBox; } | |
27 void SetCheckRect(const CFX_RectF& rtCheck) { m_rtCheckBox = rtCheck; } | |
28 | |
29 uint32_t GetStates() const { return GetStyles() | GetCheckState(); } | |
30 | |
31 uint32_t GetCheckState() const { return m_dwCheckState; } | |
32 void SetCheckState(uint32_t dwCheckState) { m_dwCheckState = dwCheckState; } | |
33 | |
34 CFX_DIBitmap* GetIcon() const { return m_pDIB; } | |
35 | 23 |
36 CFX_WideString GetText() const { return m_wsText; } | 24 CFX_WideString GetText() const { return m_wsText; } |
37 | 25 |
38 private: | 26 private: |
39 CFX_RectF m_rtItem; | 27 CFX_RectF m_rtItem; |
40 uint32_t m_dwStates; | 28 uint32_t m_dwStates; |
41 CFX_WideString m_wsText; | 29 CFX_WideString m_wsText; |
42 CFX_DIBitmap* m_pDIB; | |
43 uint32_t m_dwCheckState; | |
44 CFX_RectF m_rtCheckBox; | |
45 }; | 30 }; |
46 | 31 |
47 #endif // XFA_FWL_CFWL_LISTITEM_H_ | 32 #endif // XFA_FWL_CFWL_LISTITEM_H_ |
OLD | NEW |