OSDN Git Service

2012/01/23 17:17:27
[nlite/nlite.git] / nlite / nlite_property.h
1 #pragma once
2
3 namespace nlite{
4
5         ///
6         ///\83v\83\8d\83p\83e\83B\83x\81[\83X\83N\83\89\83X
7         ///
8         struct PropertyBase{
9
10         protected:
11                 CNLiteString sectionName;
12
13         public:
14                 PropertyBase(LPCTSTR in_sectionName);
15         };
16
17         class CCookieSettingWindow:public CDialogImpl<CCookieSettingWindow>{
18                 
19         private:
20                 BROWSERTYPE browserType;
21
22         public:
23                 enum { IDD = IDD_DIALOG_BROWSERTYPE };
24
25                 BEGIN_MSG_MAP(CMainDlg)
26                         MSG_WM_INITDIALOG(OnInitDialog)
27                         COMMAND_ID_HANDLER_EX(IDC_BUTTON_COOKIE_OK, OnOK)
28                         COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
29                 END_MSG_MAP()
30
31
32                 BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam);
33
34                 VOID OnOK(UINT uNotifyCode, int nID, CWindow wndCtl);
35
36                 VOID OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl);
37
38                 VOID SetBrowserType(BROWSERTYPE browserType);
39
40                 BROWSERTYPE GetBrowserType();
41
42                 
43
44
45         };
46
47         struct CommentViewProperty:public PropertyBase{
48
49                 
50                 enum CommentTimeType{
51                         WriteTimeType,
52                         StreamingTimeType
53
54                 };
55
56         
57                 
58 #define COMMENTVIEW_HEADERITEMSIZE 5
59         public:
60                 INT_PTR headerholSize[COMMENTVIEW_HEADERITEMSIZE];
61                 INT_PTR headerOraderArray[COMMENTVIEW_HEADERITEMSIZE];
62                 BOOL commentFoldingFlag;
63                 UINT_PTR commentTimeType;
64                 
65                 COLORREF backColor;
66                 COLORREF baseStringColor;
67                 COLORREF IDLinkColor;
68                 COLORREF anonymousIDLinkColor;
69                 COLORREF lineColor;
70
71
72                 CommentViewProperty();
73
74                 LPCTSTR GetSectionName();
75
76                 
77
78         };
79
80         ///
81         ///\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\90Ý\92è
82         ///
83         struct CommentReadProperty:public PropertyBase{
84
85         public:
86
87                 BOOL commentReadFlag;                                                           //\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83t\83\89\83O
88                 BOOL ngWordReadFlag;                                                            //NG\83\8f\81[\83h\93Ç\82Ý\8fã\82°\83t\83\89\83O
89                 BOOL ngUserReadFlag;                                                            //NG\83\86\81[\83U\81[\93Ç\82Ý\8fã\82°\83t\83\89\83O
90                 BOOL managementReadFlag;                                                        //\89^\89c\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83t\83\89\83O
91                 BOOL bspReadFlag;                                                                       //\83o\83b\83N\83X\83e\81[\83W\83p\83X\93Ç\82Ý\8fã\82°\83t\83\89\83O
92                 BOOL userCommentReadFlag;                                                       //\83\86\81[\83U\81[\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83t\83\89\83O
93                 BOOL teropReadFlag;                                                                     //\83e\83\8d\83b\83v\93Ç\82Ý\8fã\82°\83t\83\89\83O
94                 BOOL newLineReadFlag;                                                           //\89ü\8ds\93Ç\82Ý\8fã\82°\83t\83\89\83O
95                 BOOL besideLengthFlag;                                                          //\93Ç\82Ý\8fã\82°\83T\83C\83Y\8c\88\92è\83t\83\89\83O
96                 UINT_PTR maxCommentLength;                                                      //\93Ç\82Ý\8fã\82°\83T\83C\83Y\90Ý\92è\8e\9e\82Ì\8dÅ\91å\83T\83C\83Y
97                 CNLiteString shortComment;                                                              //\8fÈ\97ª\8e\9e\82É\93Ç\82Ý\8fã\82°\82é\95\8e\9a\97ñ
98                 CNLiteString outString;                                                                 //\93Ç\82Ý\8fã\82°\8f\9c\8aO\95\8e\9a\97ñ
99                 
100                 CommentReadProperty();
101
102                 LPCTSTR GetSectionName();
103                 
104
105         };
106
107         ///
108         ///\88ê\94Ê\90Ý\92è
109         ///
110         struct GeneralProperty:public PropertyBase{
111
112         public:
113                 CNLiteString browserPath;                                               //\83u\83\89\83E\83U\82Ì\83p\83X
114                 BOOL userCountUpdateFlag;                                       //\97\88\8fê\8eÒ\90\94\82ð\8dX\90V\82·\82é\82©\82Ì\83t\83\89\83O
115                 BOOL commentLogAutoSaveFlag;                            //\83R\83\81\83\93\83g\8e©\93®\95Û\91\97p\82Ì\83t\83\89\83O
116                 CNLiteString commentPath;                                               //\83R\83\81\83\93\83g\83\8d\83O\95Û\91\8fê\8f\8a
117                 BOOL defaultBroserFlag;                                         //\83\8a\83\93\83N\82ð\8aJ\82­\8dÛ\82É\8aî\92ê\82Ì\83u\83\89\83E\83U\82ð\8eg\97p\82·\82é\82©\82Ì\83t\83\89\83O
118                 BOOL autoNameRegisterFlag;                                      //\83\86\81[\83U\96¼\8e©\93®\93o\98^\83t\83\89\83O
119                 BOOL autoNameUpdateFlag;                                        //\8e©\93®\93o\98^\8e\9e\82É\8dX\90V\82·\82é\83t\83\89\83O
120                 BOOL numberNameFlag;                                            //\90\94\8e\9a\82Ì\82Ý\82Ì\96¼\91O\82ð\8b\96\89Â\82·\82é\82©\82Ì\83t\83\89\83O
121                 BOOL  autoColorRegisterFlag;                            //\96¼\91O\93o\98^\8e\9d\82É\90F\82ð\8e©\93®\93I\82É\8ew\92è\82·\82é\82©\82Ì\83t\83\89\83O
122                 BOOL activeCountTimeFlag;                                       //\83A\83N\83e\83B\83u\90l\90\94\82ð\8e©\93®\8dX\90V\82·\82é\82©\82Ì\83t\83\89\83O
123                 BROWSERTYPE browserType;                                        //\83u\83\89\83E\83U\83^\83C\83v
124
125                 GeneralProperty();
126
127                 LPCTSTR GetSectionName();
128                 
129         };
130         
131
132         ///
133         ///\83\81\83C\83\93\90Ý\92è
134         ///
135         struct MainFrameProperty:public PropertyBase{
136
137
138         public:
139
140                 SIZE windowSize;                                                        //\83E\83B\83\93\83h\83E\83T\83C\83Y
141                 BOOL windowFrontFlag;                                           //\83E\83B\83\93\83h\83E\8dÅ\91O\96Ê\95\\8e¦\83t\83\89\83O
142
143
144                 ///
145                 ///\83R\83\93\83X\83g\83\89\83N\83^
146                 ///
147                 MainFrameProperty();
148
149
150                 LPCTSTR GetSectionName();
151                 
152                 
153
154         };
155
156         ///
157         ///nlite\90Ý\92è
158         ///
159         struct Property{
160
161         public:
162                 CommentViewProperty cvp;
163                 MainFrameProperty mfp;
164                 GeneralProperty gp;
165                 CommentReadProperty crp;
166                 CNLiteString appLocalPath;
167                 CNLiteString propertyPath;
168
169                 Property();
170
171                 ~Property();
172
173                 
174
175         private:
176                 VOID CreatePropertyFile();
177
178         public:
179                 VOID Initialize();
180
181                 VOID ReadIniFile();
182
183
184                 VOID WriteIniFile();
185
186                 BROWSERTYPE CookieSetting();
187
188                 
189
190         };
191
192
193 }