| OLD | NEW |
| 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 XFA_FWL_CORE_CFWL_LISTBOX_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_LISTBOX_H_ |
| 8 #define XFA_FWL_CORE_CFWL_LISTBOX_H_ | 8 #define XFA_FWL_CORE_CFWL_LISTBOX_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 void SetSelection(CFWL_ListItem* hStart, CFWL_ListItem* hEnd, bool bSelected); | 106 void SetSelection(CFWL_ListItem* hStart, CFWL_ListItem* hEnd, bool bSelected); |
| 107 CFWL_ListItem* GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy); | 107 CFWL_ListItem* GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy); |
| 108 bool ScrollToVisible(CFWL_ListItem* hItem); | 108 bool ScrollToVisible(CFWL_ListItem* hItem); |
| 109 void InitScrollBar(bool bVert = true); | 109 void InitScrollBar(bool bVert = true); |
| 110 bool IsShowScrollBar(bool bVert); | 110 bool IsShowScrollBar(bool bVert); |
| 111 CFWL_ScrollBar* GetVertScrollBar() const { return m_pVertScrollBar.get(); } | 111 CFWL_ScrollBar* GetVertScrollBar() const { return m_pVertScrollBar.get(); } |
| 112 const CFX_RectF& GetRTClient() const { return m_rtClient; } | 112 const CFX_RectF& GetRTClient() const { return m_rtClient; } |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 void SetSelectionDirect(CFWL_ListItem* hItem, bool bSelect); | 115 void SetSelectionDirect(CFWL_ListItem* hItem, bool bSelect); |
| 116 bool IsMultiSelection() const; |
| 116 bool IsItemSelected(CFWL_ListItem* hItem); | 117 bool IsItemSelected(CFWL_ListItem* hItem); |
| 117 void ClearSelection(); | 118 void ClearSelection(); |
| 118 void SelectAll(); | 119 void SelectAll(); |
| 119 CFWL_ListItem* GetFocusedItem(); | 120 CFWL_ListItem* GetFocusedItem(); |
| 120 void SetFocusItem(CFWL_ListItem* hItem); | 121 void SetFocusItem(CFWL_ListItem* hItem); |
| 121 bool GetItemCheckRectInternal(CFWL_ListItem* hItem, CFX_RectF& rtCheck); | 122 bool GetItemCheckRectInternal(CFWL_ListItem* hItem, CFX_RectF& rtCheck); |
| 122 bool SetItemChecked(CFWL_ListItem* hItem, bool bChecked); | 123 bool SetItemChecked(CFWL_ListItem* hItem, bool bChecked); |
| 123 bool GetItemChecked(CFWL_ListItem* hItem); | 124 bool GetItemChecked(CFWL_ListItem* hItem); |
| 124 void DrawBkground(CFX_Graphics* pGraphics, | 125 void DrawBkground(CFX_Graphics* pGraphics, |
| 125 IFWL_ThemeProvider* pTheme, | 126 IFWL_ThemeProvider* pTheme, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 int32_t m_iTTOAligns; | 161 int32_t m_iTTOAligns; |
| 161 CFWL_ListItem* m_hAnchor; | 162 CFWL_ListItem* m_hAnchor; |
| 162 FX_FLOAT m_fItemHeight; | 163 FX_FLOAT m_fItemHeight; |
| 163 FX_FLOAT m_fScorllBarWidth; | 164 FX_FLOAT m_fScorllBarWidth; |
| 164 bool m_bLButtonDown; | 165 bool m_bLButtonDown; |
| 165 IFWL_ThemeProvider* m_pScrollBarTP; | 166 IFWL_ThemeProvider* m_pScrollBarTP; |
| 166 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; | 167 std::vector<std::unique_ptr<CFWL_ListItem>> m_ItemArray; |
| 167 }; | 168 }; |
| 168 | 169 |
| 169 #endif // XFA_FWL_CORE_CFWL_LISTBOX_H_ | 170 #endif // XFA_FWL_CORE_CFWL_LISTBOX_H_ |
| OLD | NEW |