-
Notifications
You must be signed in to change notification settings - Fork 0
/
Adapter_SearchResult.h
44 lines (34 loc) · 1.01 KB
/
Adapter_SearchResult.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include <helper/SAdapterBase.h>
#include <vector>
#include "GlobalUnits.h"
struct SearchResultItemData
{
int nType; //1个人聊天,2多人聊天,3订阅号,4新闻,5公众号
std::string strID;
};
class CAdapter_SearchResult : public SAdapterBase
{
public:
struct IListener
{
virtual void SearchResultItemDBClick(int nType, const std::string& strID) = 0;
};
public:
CAdapter_SearchResult(SListView* pOwner, IListener* pListener);
~CAdapter_SearchResult(void);
public:
void AddItem(const int& nType, const std::string& strID);
void DeleteAllItem();
protected:
virtual void getView(int position, SWindow* pItem, pugi::xml_node xmlTemplate);\
virtual int getCount();
virtual SStringT getColunName(int iCol) const;
bool OnEventLvSelChangeing(EventLVSelChanging* pEvt);
bool OnEventItemPanelDBClick(EventArgs* e);
private:
std::vector<SearchResultItemData*> m_vecItemInfo;
SListView* m_pOwner;
IListener* m_pListener;
MemberFunctionSlot<CAdapter_SearchResult, EventArgs> m_evtItemDBClick;
};