-
Notifications
You must be signed in to change notification settings - Fork 4
/
ElementDescriptor.h
86 lines (71 loc) · 1.99 KB
/
ElementDescriptor.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#pragma once
typedef bool (*FN_IsMe) (const MSHTML::IHTMLElementPtr elem);
typedef CString (*FN_GetTitle) (const MSHTML::IHTMLElementPtr elem);
class CElementDescriptor
{
private:
FN_IsMe m_isMe;
FN_GetTitle m_getTitle;
CString m_caption;
int m_imageID;
bool m_viewInTree;
// ???? ??? ????????? ????????????
CString m_script_path;
CString m_class_name;
bool m_script;
HANDLE m_picture;
int m_pictType;
bool m_title_from_script;
public:
CElementDescriptor();
bool Init(FN_IsMe fn1, FN_GetTitle fn2, int imageID, bool viewInTree_default, CString caption = L"");
bool Load(CString path);
virtual bool IsMe(const MSHTML::IHTMLElementPtr elem);
CString GetTitle(const MSHTML::IHTMLElementPtr elem);
bool ViewInTree();
int GetDTImageID();
CString GetCaption();
void SetViewInTree(bool view);
// ?????? ??? ????????? ????????????
void ProcessScript();
CString GetClassName();
bool GetPic(HANDLE& handle, int& type);
void CleanUp();
void SetImageID(int ID);
protected:
MSHTML::IHTMLElementPtr FindTitleNode(MSHTML::IHTMLDOMNodePtr elem);
CString FindTitle(MSHTML::IHTMLDOMNodePtr elem);
CString GetImageFileName(MSHTML::IHTMLDOMNodePtr elem);
// ?????? ??? ????????? ????????????
CString AskClassName();
};
/*class CBodyED : public CElementDescriptor
{
public:
CBodyED(){};
bool IsMe(const MSHTML::IHTMLElementPtr elem);
int GetDTImageID();
CString GetElementCaption(const MSHTML::IHTMLElementPtr elem);
};
class CSectionED : public CElementDescriptor
{
public:
bool IsMe(const MSHTML::IHTMLElementPtr elem);
int GetDTImageID();
CString GetElementCaption(const MSHTML::IHTMLElementPtr elem);
};
class CImageED : public CElementDescriptor
{
public:
CImageED(){};
bool IsMe(const MSHTML::IHTMLElementPtr elem);
int GetDTImageID();
CString GetElementCaption(const MSHTML::IHTMLElementPtr elem);
};
class CPoemED : public CElementDeascriptor
{
public:
bool IsMe(const MSHTML::IHTMLElementPtr elem);
int GetDTImageID();
CString GetElementCaption(const MSHTML::IHTMLElementPtr elem);
}; */