| 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_IFWL_LISTBOX_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_LISTBOX_H_ |
| 8 #define XFA_FWL_CORE_IFWL_LISTBOX_H_ | 8 #define XFA_FWL_CORE_IFWL_LISTBOX_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 class IFWL_ListBoxCompare { | 97 class IFWL_ListBoxCompare { |
| 98 public: | 98 public: |
| 99 virtual ~IFWL_ListBoxCompare() {} | 99 virtual ~IFWL_ListBoxCompare() {} |
| 100 virtual int32_t Compare(IFWL_ListItem* hLeft, IFWL_ListItem* hRight) = 0; | 100 virtual int32_t Compare(IFWL_ListItem* hLeft, IFWL_ListItem* hRight) = 0; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 class IFWL_ListBox : public IFWL_Widget { | 103 class IFWL_ListBox : public IFWL_Widget { |
| 104 public: | 104 public: |
| 105 IFWL_ListBox(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter); | 105 IFWL_ListBox(const IFWL_App* app, |
| 106 const CFWL_WidgetImpProperties& properties, |
| 107 IFWL_Widget* pOuter); |
| 106 ~IFWL_ListBox() override; | 108 ~IFWL_ListBox() override; |
| 107 | 109 |
| 108 // IFWL_Widget | 110 // IFWL_Widget |
| 111 void Initialize() override; |
| 112 void Finalize() override; |
| 109 FWL_Type GetClassID() const override; | 113 FWL_Type GetClassID() const override; |
| 110 FWL_Error Initialize() override; | |
| 111 void Finalize() override; | |
| 112 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 114 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
| 113 FWL_Error Update() override; | 115 FWL_Error Update() override; |
| 114 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; | 116 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; |
| 115 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 117 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
| 116 const CFX_Matrix* pMatrix = nullptr) override; | 118 const CFX_Matrix* pMatrix = nullptr) override; |
| 117 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override; | 119 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override; |
| 118 | 120 |
| 119 int32_t CountSelItems(); | 121 int32_t CountSelItems(); |
| 120 IFWL_ListItem* GetSelItem(int32_t nIndexSel); | 122 IFWL_ListItem* GetSelItem(int32_t nIndexSel); |
| 121 int32_t GetSelIndex(int32_t nIndex); | 123 int32_t GetSelIndex(int32_t nIndex); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 198 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
| 197 void OnMouseWheel(CFWL_MsgMouseWheel* pMsg); | 199 void OnMouseWheel(CFWL_MsgMouseWheel* pMsg); |
| 198 void OnKeyDown(CFWL_MsgKey* pMsg); | 200 void OnKeyDown(CFWL_MsgKey* pMsg); |
| 199 void OnVK(IFWL_ListItem* hItem, FX_BOOL bShift, FX_BOOL bCtrl); | 201 void OnVK(IFWL_ListItem* hItem, FX_BOOL bShift, FX_BOOL bCtrl); |
| 200 FX_BOOL OnScroll(IFWL_ScrollBar* pScrollBar, uint32_t dwCode, FX_FLOAT fPos); | 202 FX_BOOL OnScroll(IFWL_ScrollBar* pScrollBar, uint32_t dwCode, FX_FLOAT fPos); |
| 201 void DispatchSelChangedEv(); | 203 void DispatchSelChangedEv(); |
| 202 IFWL_ListBox* m_pOwner; | 204 IFWL_ListBox* m_pOwner; |
| 203 }; | 205 }; |
| 204 | 206 |
| 205 #endif // XFA_FWL_CORE_IFWL_LISTBOX_H_ | 207 #endif // XFA_FWL_CORE_IFWL_LISTBOX_H_ |
| OLD | NEW |