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

Side by Side Diff: xfa/fwl/core/ifwl_combolist.h

Issue 2467993003: Merge delegates into IFWL_* classes. (Closed)
Patch Set: Add const version Created 4 years, 1 month 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 | « xfa/fwl/core/ifwl_comboedit.cpp ('k') | xfa/fwl/core/ifwl_combolist.cpp » ('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 XFA_FWL_CORE_IFWL_COMBOLIST_H_ 7 #ifndef XFA_FWL_CORE_IFWL_COMBOLIST_H_
8 #define XFA_FWL_CORE_IFWL_COMBOLIST_H_ 8 #define XFA_FWL_CORE_IFWL_COMBOLIST_H_
9 9
10 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" 10 #include "xfa/fwl/core/cfwl_widgetimpproperties.h"
11 #include "xfa/fwl/core/ifwl_listbox.h" 11 #include "xfa/fwl/core/ifwl_listbox.h"
12 #include "xfa/fwl/core/ifwl_widget.h" 12 #include "xfa/fwl/core/ifwl_widget.h"
13 13
14 class IFWL_ComboList : public IFWL_ListBox { 14 class IFWL_ComboList : public IFWL_ListBox {
15 public: 15 public:
16 IFWL_ComboList(const IFWL_App* app, 16 IFWL_ComboList(const IFWL_App* app,
17 const CFWL_WidgetImpProperties& properties, 17 const CFWL_WidgetImpProperties& properties,
18 IFWL_Widget* pOuter); 18 IFWL_Widget* pOuter);
19 19
20 // IFWL_ListBox.
21 void OnProcessMessage(CFWL_Message* pMessage) override;
22
20 int32_t MatchItem(const CFX_WideString& wsMatch); 23 int32_t MatchItem(const CFX_WideString& wsMatch);
21 void ChangeSelected(int32_t iSel); 24 void ChangeSelected(int32_t iSel);
22 int32_t CountItems(); 25 int32_t CountItems();
23 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); 26 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem);
24 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); 27 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy);
25 void SetFocus(FX_BOOL bSet); 28 void SetFocus(FX_BOOL bSet);
26 29
27 FX_BOOL m_bNotifyOwner; 30 FX_BOOL m_bNotifyOwner;
28 31
29 friend class CFWL_ComboListImpDelegate;
30 friend class IFWL_ComboBox; 32 friend class IFWL_ComboBox;
31 };
32 33
33 class CFWL_ComboListImpDelegate : public CFWL_ListBoxImpDelegate { 34 private:
34 public: 35 void OnDropListFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet);
35 CFWL_ComboListImpDelegate(IFWL_ComboList* pOwner);
36 void OnProcessMessage(CFWL_Message* pMessage) override;
37
38 protected:
39 void OnDropListFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
40 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg); 36 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg);
41 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg); 37 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg);
42 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg); 38 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg);
43 int32_t OnDropListKey(CFWL_MsgKey* pKey); 39 int32_t OnDropListKey(CFWL_MsgKey* pKey);
44 void OnDropListKeyDown(CFWL_MsgKey* pKey); 40 void OnDropListKeyDown(CFWL_MsgKey* pKey);
45 IFWL_ComboList* m_pOwner;
46 }; 41 };
47 42
48 #endif // XFA_FWL_CORE_IFWL_COMBOLIST_H_ 43 #endif // XFA_FWL_CORE_IFWL_COMBOLIST_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_comboedit.cpp ('k') | xfa/fwl/core/ifwl_combolist.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698