forked from ckw-mod/ckw-mod
-
Notifications
You must be signed in to change notification settings - Fork 2
/
option.h
106 lines (95 loc) · 2.52 KB
/
option.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
#ifndef __CK_OPT_H__
#define __CK_OPT_H__
#include "ckw.h"
#include <string>
class ckOpt {
public:
ckOpt();
~ckOpt();
void setFile(const char *path=NULL);
void loadXdefaults();
bool set(int argc, char *argv[]);
bool isWinPos() { return(m_isWinPos); }
int getWinPosX() { return(m_winPosX); }
int getWinPosY() { return(m_winPosY); }
int getWinCharW() { return(m_winCharW); }
int getWinCharH() { return(m_winCharH); }
bool isIconic() { return(m_isIconic); }
COLORREF getColorFg() { return(m_colorFg); }
COLORREF getColorBg() { return(m_colorBg); }
COLORREF getColorCursor() { return(m_colorCursor); }
COLORREF getColorCursorIme() { return(m_colorCursorIme); }
COLORREF getColor(int i)
{
return((0 <= i && i <= 15) ? m_colors[i] : m_colors[0]);
}
bool isScrollHide() { return(m_scrollHide); }
bool isScrollRight() { return(m_scrollRight); }
int getSaveLines() { return(m_saveLines); }
int getBorderSize() { return(m_borderSize); }
int getLineSpace() { return(m_lineSpace); }
int getTransp() { return(m_transp); }
bool isTranspColor() { return(m_isTranspColor); }
COLORREF getTranspColor() { return(m_transpColor); }
bool isTopMost() { return(m_isTopMost); }
const char* getCmd()
{
return((m_cmd.size()) ? m_cmd.c_str() : NULL);
}
int getFontSize() { return(m_fontSize); }
const char* getFont()
{
return((m_font.size()) ? m_font.c_str() : NULL);
}
const char* getBgBmp()
{
return((m_bgBmp.size()) ? m_bgBmp.c_str() : NULL);
}
const char* getCurDir()
{
return((m_curDir.size()) ? m_curDir.c_str() : NULL);
}
const char* getTitle()
{
return((m_title.size()) ? m_title.c_str() : NULL);
}
const char* getIcon()
{
return((m_icon.size()) ? m_icon.c_str() : NULL);
}
protected:
void cmdsMake(int argc, char *argv[]);
void geometry(const char *str);
int setOption(const char *name, const char *value, bool rsrc);
void _loadXdefaults(const char *path);
private:
bool m_isWinPos;
int m_winPosX;
int m_winPosY;
int m_winCharW;
int m_winCharH;
bool m_isIconic;
std::string m_cmd;
std::string m_font;
int m_fontSize;
COLORREF m_colorFg;
COLORREF m_colorBg;
COLORREF m_colorCursor;
COLORREF m_colorCursorIme;
COLORREF m_colors[16];
std::string m_bgBmp;
std::string m_icon;
bool m_scrollHide;
bool m_scrollRight;
int m_saveLines;
int m_borderSize;
int m_lineSpace;
int m_transp;
bool m_isTranspColor;
COLORREF m_transpColor;
bool m_isTopMost;
std::string m_curDir;
std::string m_title;
char m_config_file[MAX_PATH+1];
};
#endif /* __CK_OPT_H__ */