-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathRenLibApplet.h
More file actions
126 lines (100 loc) · 2.87 KB
/
Copy pathRenLibApplet.h
File metadata and controls
126 lines (100 loc) · 2.87 KB
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
// RenLibApplet.h: interface for the RenLibApplet class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_RENLIB_APPLET_H__BB1690C8_CF99_48C1_B318_9A98599582C2__INCLUDED_)
#define AFX_RENLIB_APPLET_H__BB1690C8_CF99_48C1_B318_9A98599582C2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <vector>
class MoveList;
class MoveNode;
class RenLibApplet
{
public:
enum Size
{
BIG,
SMALL
};
enum Url
{
WEB,
LOCAL
};
static const CString cFirstComment;
static const CString cLastComment;
class Information
{
public:
Information();
Information(
Size size,
CString titleAppletWebPage,
CString titleGameWebPage,
BOOL showOneLineComment,
BOOL showMultiLineComment,
BOOL showBoardText,
BOOL showCoordinates,
BOOL showNumbers,
BOOL showCommands,
BOOL showBoard,
Url url,
CString repeatOneLineComment,
COLORREF backgroundColor);
public:
Size mSize;
CString mTitleAppletWebPage;
CString mTitleGameWebPage;
BOOL mShowOneLineComment;
BOOL mShowMultiLineComment;
BOOL mShowBoardText;
BOOL mShowCoordinates;
BOOL mShowNumbers;
BOOL mShowCommands;
BOOL mShowBoard;
Url mUrl;
CString mRepeatOneLineComment;
COLORREF mBackgroundColor;
};
public:
RenLibApplet(Information info);
virtual ~RenLibApplet();
bool getAppletInformation(
const CString& strDirectory, Information& info, COLORREF* custColors);
bool Create(
const CString& fileName, const MoveList& aMoveList,
CString& strComment, const Information& info);
bool CreateExportGameFile(
const CString& strDirectory, CStringList& strList, const CString& titleGameWebPage,
const CString& strCaption, CString& strFile);
bool CreateTournamentGameFile(
const CString& strDirectory, CStringList& strList, const CString& titleGameWebPage,
const CString& strCaption, CString& strFile);
bool CreateGameCollectionFile(
const CString& titleGameWebPage, const CString& strCaption, CString& strFile);
bool AddGameCollectionFile(
const MoveList& aMoveList, CString& strOneLineComment, CString& strMultiLineComment,
const Information& info);
bool CloseGameCollectionFile();
private:
RenLibApplet();
void generateAppletCode(
CString& strAppletCode, const MoveList& aMoveList, CString& strComment,
const Information& info);
private:
typedef struct GameData
{
CString applet;
CString oneLineComment;
CString multiLineComment;
};
CStdioFile mFile;
std::vector<GameData> mSortedList;
CString mAppletUrl;
CString mBlackWinImage;
CString mWhiteWinImage;
CString mDrawImage;
void WriteLine(const CString& line);
};
#endif // !defined(AFX_RENLIB_APPLET_H__BB1690C8_CF99_48C1_B318_9A98599582C2__INCLUDED_)