/
articleviewpopup.h
128 lines (89 loc) · 3.24 KB
/
articleviewpopup.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// ライセンス: GPL2
//
// ポップアップ系ビュー
//
#ifndef _ARTICLEVIEWPOPUP_H
#define _ARTICLEVIEWPOPUP_H
#include "articleviewbase.h"
namespace ARTICLE
{
// ポップアップビューのベース
class ArticleViewPopup : public ArticleViewBase
{
bool m_show_abone;
public:
ArticleViewPopup( const std::string& url, bool show_abone );
~ArticleViewPopup();
protected:
void show_instruct_popup();
const bool show_abone() const { return m_show_abone; }
private:
virtual void pack_widget();
virtual DrawAreaBase* create_drawarea();
};
/////////////////////////////////////////////////////////////////////////
// HTMLコメントポップアップ
class ArticleViewPopupHTML : public ArticleViewPopup
{
std::string m_html;
public:
ArticleViewPopupHTML( const std::string& url, const std::string& html ): ArticleViewPopup( url, false ), m_html( html ){}
~ArticleViewPopupHTML(){}
virtual void show_view(){ append_html( m_html ); }
};
/////////////////////////////////////////////////////////////////////////
// レス抽出ポップアップ
class ArticleViewPopupRes : public ArticleViewPopup
{
std::string m_str_num;
bool m_show_title;
public:
ArticleViewPopupRes( const std::string& url, const std::string& num, bool show_title, bool show_abone )
: ArticleViewPopup( url, show_abone ), m_str_num( num ), m_show_title( show_title ){}
~ArticleViewPopupRes(){}
virtual void show_view(){
show_instruct_popup();
show_res( m_str_num, m_show_title );
}
};
/////////////////////////////////////////////////////////////////////////
// 名前抽出ポップアップ
class ArticleViewPopupName : public ArticleViewPopup
{
std::string m_str_name;
public:
ArticleViewPopupName( const std::string& url, const std::string& name ): ArticleViewPopup( url, false ), m_str_name( name ){}
~ArticleViewPopupName(){}
virtual void show_view(){
show_instruct_popup();
show_name( m_str_name, false );
}
};
/////////////////////////////////////////////////////////////////////////
// ID 抽出ポップアップ
class ArticleViewPopupID : public ArticleViewPopup
{
std::string m_str_id;
public:
ArticleViewPopupID( const std::string& url, const std::string& id ): ArticleViewPopup( url, false ), m_str_id( id ) {}
~ArticleViewPopupID(){}
virtual void show_view(){
show_instruct_popup();
show_id( m_str_id, false );
}
};
/////////////////////////////////////////////////////////////////////////
// 参照抽出ポップアップ
class ArticleViewPopupRefer : public ArticleViewPopup
{
std::string m_str_num;
public:
ArticleViewPopupRefer( const std::string& url, const std::string& num ): ArticleViewPopup( url, false ), m_str_num( num ){}
~ArticleViewPopupRefer(){}
virtual void show_view(){
show_instruct_popup();
show_refer( atol( m_str_num.c_str() ) );
}
};
}
#endif