summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_listitem.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-14 06:25:02 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-14 06:25:02 -0800
commit603f57b85c0643f0598f03b97c4525501f3e1221 (patch)
tree85c9521a8f0fec47ba84041d64cb84e6bc019638 /xfa/fwl/cfwl_listitem.h
parenta9caab94c1f16929e5acf2676117224617d80f53 (diff)
downloadpdfium-603f57b85c0643f0598f03b97c4525501f3e1221.tar.xz
Update CFWL_ListBox to return instead of using out params.
This CL updates the CFWL_ListBox code to work with return values instead of out params. This also extracts the CFWL_ListItem code out of CFWL_ListBox and puts into the correct class. Review-Url: https://codereview.chromium.org/2572783002
Diffstat (limited to 'xfa/fwl/cfwl_listitem.h')
-rw-r--r--xfa/fwl/cfwl_listitem.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/xfa/fwl/cfwl_listitem.h b/xfa/fwl/cfwl_listitem.h
index 0e608f8d92..c4af1d89b5 100644
--- a/xfa/fwl/cfwl_listitem.h
+++ b/xfa/fwl/cfwl_listitem.h
@@ -14,12 +14,30 @@ class CFX_DIBitmap;
class CFWL_ListItem {
public:
- CFWL_ListItem();
+ explicit CFWL_ListItem(const CFX_WideString& text);
~CFWL_ListItem();
+ CFX_RectF GetRect() const { return m_rtItem; }
+ void SetRect(const CFX_RectF& rect) { m_rtItem = rect; }
+
+ uint32_t GetStyles() const { return m_dwStates; }
+ void SetStyles(uint32_t dwStyle) { m_dwStates = dwStyle; }
+
+ CFX_RectF GetCheckRect() const { return m_rtCheckBox; }
+ void SetCheckRect(const CFX_RectF& rtCheck) { m_rtCheckBox = rtCheck; }
+
+ uint32_t GetStates() const { return GetStyles() | GetCheckState(); }
+
+ uint32_t GetCheckState() const { return m_dwCheckState; }
+ void SetCheckState(uint32_t dwCheckState) { m_dwCheckState = dwCheckState; }
+
+ CFX_DIBitmap* GetIcon() const { return m_pDIB; }
+
+ CFX_WideString GetText() const { return m_wsText; }
+
+ private:
CFX_RectF m_rtItem;
uint32_t m_dwStates;
- uint32_t m_dwStyles;
CFX_WideString m_wsText;
CFX_DIBitmap* m_pDIB;
uint32_t m_dwCheckState;