• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision552257e3e3ccf811b137250d0010f2027e6629c7 (tree)
Time2012-02-26 21:22:32
Authorqwerty2501 <riot313@gmai...>
Commiterqwerty2501

Log Message

プロパティクラスのアクセス修飾子を修正

Change Summary

Incremental Difference

Binary files a/nlite.suo and b/nlite.suo differ
--- a/nlite/nlite.h
+++ b/nlite/nlite.h
@@ -7,15 +7,15 @@ namespace nlite{
77 //クラス先行宣言
88 class CApplicationInfo;
99 class CListenerList;
10- struct Property;
11- struct GeneralProperty;
10+ class CProperty;
11+ class CGeneralProperty;
1212 class CListenerData;
1313
1414
1515
1616
1717 //アプリケーションプロパティ
18- extern Property nliteProperty;
18+ extern CProperty nliteProperty;
1919 const static UINT_PTR COMMENTVIEW_HEADERITEMSIZE = 5;
2020 enum MESSAGE{
2121 UM_COMMENTVIEW_SETCTRL = WM_USER + 1,
--- a/nlite/nlite_chatData.cpp
+++ b/nlite/nlite_chatData.cpp
@@ -124,7 +124,7 @@ VOID CChatData::SetChat(NicoLiveChat &chat_in,CListenerData &listener){
124124
125125 const tstring &name = results.str(results.size() - 1).c_str();
126126
127- if(nliteProperty.gp.numberNameFlag == TRUE || _tcstol(name.c_str(),NULL,10) == 0){
127+ if(nliteProperty.GetGeneralProperty().IsNumberName() == TRUE || _tcstol(name.c_str(),NULL,10) == 0){
128128 this->listenerData->SetUserName(name.c_str());
129129 }
130130
@@ -271,7 +271,7 @@ CCommentList::iterator CCommentList::OnChatReceve(NicoLiveChat_P chatData_in,LPC
271271 if(empty() == TRUE || back().date <= chatData.date){
272272 chatList.push_back(chatData);
273273 rslt = (--chatList.end());
274- if(nlite::nliteProperty.crp.commentReadFlag == TRUE){
274+ if(nlite::nliteProperty.GetCommentReadProperty().IsCommentRead() == TRUE){
275275
276276 g_speaker.SynthesisAsync((const speaker::TChar_P)(LPCTSTR)rslt->chatBuf);
277277 }
--- a/nlite/nlite_commentview.cpp
+++ b/nlite/nlite_commentview.cpp
@@ -30,12 +30,12 @@ namespace nlite{
3030 defaultFormat.dwMask |= CFM_COLOR;
3131 if(chat.GetPremium() == 2 || chat.GetPremium() == 3){
3232
33- defaultFormat.crTextColor = m_master.viewproperty.ownerStringColor;
33+ defaultFormat.crTextColor = m_master.viewproperty.GetOwnerStringColor();
3434 }
3535
3636 else {
3737
38- defaultFormat.crTextColor = m_master.viewproperty.baseStringColor;
38+ defaultFormat.crTextColor = m_master.viewproperty.GetBaseStringColor();
3939
4040 }
4141
@@ -162,7 +162,7 @@ namespace nlite{
162162
163163 if (comment.IsSelect() == TRUE)
164164 {
165- bkColor = m_master.viewproperty.selectBackColor;
165+ bkColor = m_master.viewproperty.GetSelectBackColor();
166166
167167 }
168168 else
@@ -180,7 +180,7 @@ namespace nlite{
180180
181181 } else {
182182
183- bkColor = m_master.viewproperty.backColor;
183+ bkColor = m_master.viewproperty.GetBackColor();
184184
185185
186186
@@ -262,7 +262,7 @@ namespace nlite{
262262
263263 if(ctrlsBegin == ctrlsEnd)ctrlsBegin = Extend();
264264
265- ctrlsBegin->SetCtrl(hdwp,tmpRect,*chatDataBegin,m_hMaster.viewproperty.commentFoldingFlag);
265+ ctrlsBegin->SetCtrl(hdwp,tmpRect,*chatDataBegin,m_hMaster.viewproperty.IsCommentFoldingFlag());
266266
267267 heightSum = tmpRect.bottom;
268268
@@ -385,7 +385,7 @@ namespace nlite{
385385 return nMax;
386386 }
387387
388- VOID CCommentView::SetProperty(const CommentViewProperty &setProperty,const GeneralProperty &in_generalProperty){
388+ VOID CCommentView::SetProperty(const CCommentViewProperty &setProperty,const CGeneralProperty &in_generalProperty){
389389
390390
391391 viewproperty = setProperty;
@@ -395,7 +395,7 @@ namespace nlite{
395395 return;
396396 }
397397
398- CommentViewProperty &CCommentView::GetProperty(){
398+ CCommentViewProperty &CCommentView::GetProperty(){
399399
400400 return viewproperty;
401401
@@ -424,7 +424,7 @@ namespace nlite{
424424
425425 GetTextExtentPoint32(hdc , columns[index] , _tcslen(columns[index]) , &size);
426426 UINT_PTR holsize = holizenSize[index] + size.cx + 15;
427- holizenSize[index] = viewproperty.headerholSize[index] >= 0 ? viewproperty.headerholSize[index] : holsize;
427+ holizenSize[index] = viewproperty.GetHeaderHolSize()[index] >= 0 ? viewproperty.GetHeaderHolSize()[index] : holsize;
428428 }
429429
430430 SelectObject(hdc,hOld);
@@ -436,7 +436,7 @@ namespace nlite{
436436
437437 AddHeader(&headersinfo);
438438
439- m_header.SetOrderArray(ARRAY_LENGTH(viewproperty.headerOrderArray),viewproperty.headerOrderArray);
439+ m_header.SetOrderArray(viewproperty.GetHeaderOrderArrayLength(),viewproperty.GetHeaderOrderArray());
440440
441441
442442
@@ -636,13 +636,13 @@ namespace nlite{
636636
637637
638638 VOID CCommentView::OnDestroy(){
639- m_header.GetOrderArray(ARRAY_LENGTH(viewproperty.headerOrderArray),viewproperty.headerOrderArray);
639+ m_header.GetOrderArray(viewproperty.GetHeaderOrderArrayLength(),viewproperty.GetHeaderOrderArray());
640640 INT_PTR headerItemcount = m_header.GetItemCount();
641641 RECT headerItemRect;
642642 for(INT_PTR itemindex = 0;itemindex < headerItemcount;itemindex++){
643643
644644 m_header.GetItemRect(itemindex,&headerItemRect);
645- viewproperty.headerholSize[itemindex] = headerItemRect.right - headerItemRect.left;
645+ viewproperty.GetHeaderHolSize()[itemindex] = headerItemRect.right - headerItemRect.left;
646646 }
647647 commentlist.OnDestroy();
648648 m_header.DestroyWindow();
@@ -892,11 +892,11 @@ namespace nlite{
892892 if(selectSellLinePen.IsNull() ==FALSE)selectSellLinePen.DeleteObject();
893893 if(selectBkBrush.IsNull() == FALSE)selectBkBrush.DeleteObject();
894894
895- collLinePen.CreatePen(PS_SOLID,1,self.viewproperty.colLineColor);
896- normalSellLinePen.CreatePen(PS_SOLID,1,self.viewproperty.normalSellLineColor);
897- normalBkBrush.CreateSolidBrush(self.viewproperty.backColor);
898- selectSellLinePen.CreatePen(PS_SOLID,1,self.viewproperty.selectSellLineColor);
899- selectBkBrush.CreateSolidBrush(self.viewproperty.selectBackColor);
895+ collLinePen.CreatePen(PS_SOLID,1,self.viewproperty.GetColLineColor());
896+ normalSellLinePen.CreatePen(PS_SOLID,1,self.viewproperty.GetNormalLineColor());
897+ normalBkBrush.CreateSolidBrush(self.viewproperty.GetBackColor());
898+ selectSellLinePen.CreatePen(PS_SOLID,1,self.viewproperty.GetSelectSellLineColor());
899+ selectBkBrush.CreateSolidBrush(self.viewproperty.GetSelectBackColor());
900900
901901
902902 if(IsWindow() == TRUE)this->SetRedraw(TRUE);
@@ -1177,7 +1177,7 @@ overclientrect:
11771177 //選択状態かチェック
11781178 if (chatData.IsSelect() == TRUE)
11791179 {
1180- bkColor = self.viewproperty.selectBackColor;
1180+ bkColor = self.viewproperty.GetSelectBackColor();
11811181
11821182 dc.SelectBrush(this->selectBkBrush);
11831183 dc.SelectPen(this->selectSellLinePen);
@@ -1212,7 +1212,7 @@ overclientrect:
12121212 dc.SelectBrush(originBkBrush);
12131213 } else {
12141214
1215- bkColor = self.viewproperty.backColor;
1215+ bkColor = self.viewproperty.GetBackColor();
12161216 dc.SelectBrush(this->normalBkBrush);
12171217 dc.SelectBrush(this->normalBkBrush);
12181218
@@ -1234,14 +1234,14 @@ overclientrect:
12341234
12351235 const CNLiteString &viewUserName = chatData.GetListnerData().GetName().Length() == 0 ? chatData.GetListnerData().GetUserID() : chatData.GetListnerData().GetName();
12361236 dc.SelectFont(linkFont);
1237- dc.SetTextColor(chatData.GetListnerData().GetNameColor() != CListenerData::INIT_COLOR ? chatData.GetListnerData().GetNameColor() : self.viewproperty.linkStringColor);
1237+ dc.SetTextColor(chatData.GetListnerData().GetNameColor() != CListenerData::INIT_COLOR ? chatData.GetListnerData().GetNameColor() : self.viewproperty.GetLinkStringColor());
12381238 //テキスト描画
12391239 dc.DrawTextW(noString,_tcslen(noString),&noViewRect,DT_WORD_ELLIPSIS);
12401240
12411241
12421242 dc.DrawTextW(viewUserName,viewUserName.Length(),&userNameViewRect,DT_WORD_ELLIPSIS);
12431243 dc.SelectFont(::AtlGetDefaultGuiFont());
1244- dc.SetTextColor(chatData.GetStringColor() == CChatData::ViewData::INIT_COLOR ? chatData.GetStringColor() :self.viewproperty.baseStringColor);
1244+ dc.SetTextColor(chatData.GetStringColor() == CChatData::ViewData::INIT_COLOR ? chatData.GetStringColor() :self.viewproperty.GetBaseStringColor());
12451245 dc.DrawTextW(dateString,_tcslen(dateString),&timeViewRect,DT_WORD_ELLIPSIS);
12461246
12471247 return;
--- a/nlite/nlite_commentview.h
+++ b/nlite/nlite_commentview.h
@@ -370,9 +370,9 @@ namespace nlite{
370370 CHeaderCtrl m_header; //ヘッダーコントロール
371371 CCommentListWindow m_commentListWindow; //コメントリストウィンドウ
372372 CNicoLiveStream &stream; //放送オブジェクト
373- GeneralProperty generalProperty; //一般設定
373+ CGeneralProperty generalProperty; //一般設定
374374 CCommentList commentlist; //コメントリスト
375- CommentViewProperty viewproperty; //表示プロパティ
375+ CCommentViewProperty viewproperty; //表示プロパティ
376376 HFONT hHeaderFontNew; //ヘッダーフォント
377377 CNicoVideoAuth &refAuth; //ニコニコ生放送認証オブジェクト参照
378378 CChatChildCtrlsList chatChildCtrlsList; //子ウィンドウリスト
@@ -435,12 +435,12 @@ namespace nlite{
435435 ///
436436 ///プロパティ設定
437437 ///
438- VOID SetProperty(const CommentViewProperty &setProperty,const GeneralProperty &in_generalProperty);
438+ VOID SetProperty(const CCommentViewProperty &setProperty,const CGeneralProperty &in_generalProperty);
439439
440440 ///
441441 ///プロパティ取得
442442 ///
443- CommentViewProperty &GetProperty();
443+ CCommentViewProperty &GetProperty();
444444
445445 ///
446446 ///ウィンドウ作成
--- a/nlite/nlite_common.cpp
+++ b/nlite/nlite_common.cpp
@@ -22,7 +22,7 @@ namespace nlite{
2222 const tregex LILNKREGEX(text::LINK_TEXT);
2323 const tregex NAMESERTCHREGEX(text::SEARTCH_AT_MARK);
2424 }
25- Property nliteProperty;
25+ CProperty nliteProperty;
2626 CListenerList nlite::listenerList;
2727 TCHAR appFolderPath[_MAX_PATH];
2828 CString ncvAppSettingPath;
@@ -30,7 +30,7 @@ namespace nlite{
3030 speaker::ISpeaker &g_speaker = speaker::ISpeaker::GetMeiNormal(TEXT("libs\\Voice\\mei_normal\\"),TEXT("libs\\open_jtalk_dic\\"));
3131 VOID nlite::UnexpectedErrorMessageShow(LPCTSTR headMessage,LPCTSTR summary,UINT line,LPCTSTR fileName,LPCTSTR function){
3232
33- CString errLogFilePath(nliteProperty.propertySaveFolderPath);
33+ CString errLogFilePath(nliteProperty.GetPropertySaveFolderPath());
3434 CAtlFile errFile;
3535 TCHAR errfile[_MAX_PATH];
3636
@@ -70,17 +70,17 @@ namespace nlite{
7070 return;
7171 }
7272
73- HINSTANCE OpenURL(HWND hwnd,const GeneralProperty &gp,LPCTSTR url ,INT nShowCommand){
73+ HINSTANCE OpenURL(HWND hwnd,const CGeneralProperty &gp,LPCTSTR url ,INT nShowCommand){
7474
7575 HINSTANCE rslt;
7676
77- if(gp.browserPath.Length() == 0){
77+ if(gp.GetBrowserPath().Length() == 0){
7878
7979 rslt = ShellExecute(hwnd, NULL, url, NULL, NULL, nShowCommand);
8080
8181 } else{
8282
83- rslt = ShellExecute(hwnd, NULL, gp.browserPath, url, NULL, nShowCommand);
83+ rslt = ShellExecute(hwnd, NULL, gp.GetBrowserPath(), url, NULL, nShowCommand);
8484
8585 }
8686
--- a/nlite/nlite_common.h
+++ b/nlite/nlite_common.h
@@ -13,7 +13,7 @@ namespace nlite{
1313 //グローバル関数
1414 extern VOID UnexpectedErrorMessageShow(LPCTSTR headMessage,LPCTSTR summary,UINT line,LPCTSTR fileName,LPCTSTR function);
1515
16- extern HINSTANCE OpenURL(HWND hwnd,const GeneralProperty &gp,LPCTSTR url ,INT nShowCommand);
16+ extern HINSTANCE OpenURL(HWND hwnd,const CGeneralProperty &gp,LPCTSTR url ,INT nShowCommand);
1717
1818 ///
1919 ///指定されたディレクトリにファイルまたはディレクトリを作成
--- a/nlite/nlite_mainframe.cpp
+++ b/nlite/nlite_mainframe.cpp
@@ -158,8 +158,8 @@ LRESULT CNliteMainFrame::OnCreate(LPCREATESTRUCT lpcs){
158158 this->GetWindowRect(&wndRect);
159159
160160 LONG cyMaxImized = GetSystemMetrics (SM_CYMAXIMIZED);
161- wndRect.bottom = nliteProperty.mfp.windowSize.cy != 0 ? nliteProperty.mfp.windowSize.cy : (LONG)cyMaxImized / 2;
162- wndRect.right = nliteProperty.mfp.windowSize.cx != 0 ? nliteProperty.mfp.windowSize.cx : commentViewSize.left + commentViewSize.right + 20 + commentView.GetColumnHolSizeSum();
161+ wndRect.bottom = nliteProperty.GetMainFrameProperty().GetWindowSize().cy != 0 ? nliteProperty.GetMainFrameProperty().GetWindowSize().cy : (LONG)cyMaxImized / 2;
162+ wndRect.right = nliteProperty.GetMainFrameProperty().GetWindowSize().cx != 0 ? nliteProperty.GetMainFrameProperty().GetWindowSize().cx : commentViewSize.left + commentViewSize.right + 20 + commentView.GetColumnHolSizeSum();
163163
164164
165165
@@ -174,10 +174,10 @@ LRESULT CNliteMainFrame::OnCreate(LPCREATESTRUCT lpcs){
174174
175175 listenerSettingWindow.Create(*this);
176176
177- this->SetMenuItemCheck(IDM_FRONT_WINDOW_CHECK,nliteProperty.mfp.windowFrontFlag);
178- this->SetMenuItemCheck(IDM_SPEAK_COMMENT_CHECK,nliteProperty.crp.commentReadFlag);
177+ this->SetMenuItemCheck(IDM_FRONT_WINDOW_CHECK,nliteProperty.GetMainFrameProperty().IsWindowFront());
178+ this->SetMenuItemCheck(IDM_SPEAK_COMMENT_CHECK,nliteProperty.GetCommentReadProperty().IsCommentRead());
179179
180- this->SetWindowPos(nliteProperty.mfp.windowFrontFlag == TRUE ? HWND_TOPMOST : HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
180+ this->SetWindowPos(nliteProperty.GetMainFrameProperty().IsWindowFront() == TRUE ? HWND_TOPMOST : HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
181181
182182 return 0;
183183 }
@@ -190,31 +190,31 @@ VOID CNliteMainFrame::Initialize(LPCTSTR localAppDataPath){
190190 nliteProperty.ReadProperty();
191191
192192
193- if((nliteProperty.gp.ncvUserSettingReadedFlag == FALSE) &&
193+ if((nliteProperty.GetGeneralProperty().IsNCVUserSettingReaded() == FALSE) &&
194194 ((PathFileExists(ncvAppSettingPath) && (!::PathIsDirectory( ncvAppSettingPath ))))){
195195
196196 if((::MessageBox(NULL,TEXT("NCVのリスナー情報と同期しますか?"),TEXT("リスナー情報読み込み"),MB_OK | MB_OKCANCEL) == IDOK)){
197197 listenerList.ReadProperty(GetNCVListenerInfoFilePath());
198198 }
199- nliteProperty.gp.ncvUserSettingReadedFlag = TRUE;
199+ nliteProperty.GetGeneralProperty().SetNCVUSerSettingReaded(TRUE);
200200
201201
202202
203203
204204 }
205205
206- listenerList.ReadProperty(nliteProperty.listenerDataPath);
206+ listenerList.ReadProperty(nliteProperty.GetListenerDataPath());
207207
208- commentView.SetProperty(nliteProperty.cvp,nliteProperty.gp);
209- if(nliteProperty.gp.browserType == BT_NOSETTING){
208+ commentView.SetProperty(nliteProperty.GetCommentViewProperty(),nliteProperty.GetGeneralProperty());
209+ if(nliteProperty.GetGeneralProperty().GetBrowserType() == BT_NOSETTING){
210210 nliteProperty.CookieSetting();
211- while(nliteProperty.gp.browserType == BT_NOSETTING){
211+ while(nliteProperty.GetGeneralProperty().GetBrowserType() == BT_NOSETTING){
212212 ::MessageBox(NULL,TEXT("ブラウザタイプを指定してください。これ以外のブラウザは現在使用することはできません"),TEXT("ブラウザタイプ指定エラー"),MB_OK);
213213 nliteProperty.CookieSetting();
214214 }
215215 }
216216
217- nicoVideoAuth.SetBrowserType(nliteProperty.gp.browserType);
217+ nicoVideoAuth.SetBrowserType(nliteProperty.GetGeneralProperty().GetBrowserType());
218218 nicoLiveStream.SetResFrom(200);
219219 }catch(Exception &e){
220220
@@ -279,9 +279,9 @@ VOID CNliteMainFrame::OnMenuAbount(UINT uNotifyCode,int nID,HWND hWndCtl){
279279
280280 VOID CNliteMainFrame::Finalaize(){
281281
282- nliteProperty.cvp = commentView.GetProperty();
282+ nliteProperty.SetCommentViewProperty(commentView.GetProperty());
283283 nliteProperty.WriteProperty();
284- listenerList.WriteProperty(nliteProperty.listenerDataPath);
284+ listenerList.WriteProperty(nliteProperty.GetListenerDataPath());
285285 }
286286
287287 VOID CNliteMainFrame::OnViewPreference(UINT uNotifyCode,int nID,HWND hWndCtl){
@@ -302,13 +302,13 @@ LRESULT CNliteMainFrame::OnUnlockLvNoBuffer(UINT uMsg,WPARAM wParam,LPARAM lPara
302302 VOID CNliteMainFrame::OnCookie(UINT uNotifyCode,int nID,HWND hWndCtl){
303303 nliteProperty.CookieSetting();
304304
305- while(nliteProperty.gp.browserType == BT_NOSETTING){
305+ while(nliteProperty.GetGeneralProperty().GetBrowserType() == BT_NOSETTING){
306306 ::MessageBox(NULL,TEXT("ブラウザタイプを指定してください。これ以外のブラウザは現在使用することはできません"),TEXT("ブラウザタイプ指定エラー"),MB_OK);
307307 nliteProperty.CookieSetting();
308308 }
309309
310310 try {
311- nicoVideoAuth.SetBrowserType(nliteProperty.gp.browserType);
311+ nicoVideoAuth.SetBrowserType(nliteProperty.GetGeneralProperty().GetBrowserType());
312312 } catch(NLIBException &e){
313313
314314 MessageBox(e.what(),TEXT("クッキー取得失敗"),MB_OK | MB_ICONERROR);
@@ -321,8 +321,8 @@ VOID CNliteMainFrame::OnCookie(UINT uNotifyCode,int nID,HWND hWndCtl){
321321 VOID CNliteMainFrame::OnSpeakCommentCheck(UINT uNotifyCode,int nID,HWND hWndCtl){
322322
323323
324- nliteProperty.crp.commentReadFlag = !IsMenuItemChecked(IDM_SPEAK_COMMENT_CHECK);
325- SetMenuItemCheck(IDM_SPEAK_COMMENT_CHECK,nliteProperty.crp.commentReadFlag );
324+ nliteProperty.GetCommentReadProperty().SetCommentRead(!IsMenuItemChecked(IDM_SPEAK_COMMENT_CHECK));
325+ SetMenuItemCheck(IDM_SPEAK_COMMENT_CHECK,nliteProperty.GetCommentReadProperty().IsCommentRead() );
326326
327327 return;
328328 }
@@ -330,9 +330,9 @@ VOID CNliteMainFrame::OnSpeakCommentCheck(UINT uNotifyCode,int nID,HWND hWndCtl)
330330 VOID CNliteMainFrame::OnFrontWindowCheck(UINT uNotifyCode,int nID,HWND hWndCtl){
331331
332332
333- nliteProperty.mfp.windowFrontFlag = !IsMenuItemChecked(IDM_FRONT_WINDOW_CHECK);
334- SetMenuItemCheck(IDM_FRONT_WINDOW_CHECK,nliteProperty.mfp.windowFrontFlag );
335- this->SetWindowPos(nliteProperty.mfp.windowFrontFlag == TRUE ? HWND_TOPMOST : HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
333+ nliteProperty.GetMainFrameProperty().SetWindowFront(!IsMenuItemChecked(IDM_FRONT_WINDOW_CHECK));
334+ SetMenuItemCheck(IDM_FRONT_WINDOW_CHECK,nliteProperty.GetMainFrameProperty().IsWindowFront() );
335+ this->SetWindowPos(nliteProperty.GetMainFrameProperty().IsWindowFront() == TRUE ? HWND_TOPMOST : HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
336336 return;
337337 }
338338
--- a/nlite/nlite_property.cpp
+++ b/nlite/nlite_property.cpp
@@ -48,7 +48,7 @@ namespace nlite{
4848
4949
5050
51- CommentViewProperty::CommentViewProperty():
51+ CCommentViewProperty::CCommentViewProperty():
5252 commentFoldingFlag(TRUE),
5353 commentTimeType(StreamingTimeType),
5454 baseStringColor(PALETTERGB(0,0,0)),
@@ -72,8 +72,68 @@ namespace nlite{
7272
7373
7474
75+COLORREF CCommentViewProperty::GetOwnerStringColor()const{
7576
76- CommentReadProperty::CommentReadProperty():
77+ return this->ownerStringColor;
78+}
79+
80+COLORREF CCommentViewProperty::GetBaseStringColor()const{
81+
82+ return this->baseStringColor;
83+}
84+
85+
86+COLORREF CCommentViewProperty::GetSelectBackColor()const{
87+
88+ return this->selectBackColor;
89+}
90+
91+COLORREF CCommentViewProperty::GetSelectSellLineColor()const{
92+
93+ return this->selectBackColor;
94+}
95+
96+COLORREF CCommentViewProperty::GetBackColor()const{
97+
98+ return this->backColor;
99+}
100+
101+COLORREF CCommentViewProperty::GetNormalLineColor()const{
102+
103+ return this->normalSellLineColor;
104+}
105+
106+COLORREF CCommentViewProperty::GetLinkStringColor()const{
107+
108+ return this->linkStringColor;
109+}
110+
111+COLORREF CCommentViewProperty::GetColLineColor()const{
112+
113+ return this->colLineColor;
114+}
115+
116+BOOL CCommentViewProperty::IsCommentFoldingFlag()const{
117+
118+ return this->commentFoldingFlag;
119+}
120+
121+INT_PTR *CCommentViewProperty::GetHeaderHolSize(){
122+
123+ return this->headerholSize;
124+
125+}
126+
127+INT_PTR *CCommentViewProperty::GetHeaderOrderArray(){
128+
129+ return this->headerOrderArray;
130+}
131+
132+UINT_PTR CCommentViewProperty::GetHeaderOrderArrayLength()const{
133+
134+ return ARRAY_LENGTH(this->headerOrderArray);
135+}
136+ CCommentReadProperty::CCommentReadProperty():
77137 commentReadFlag(FALSE),
78138 ngWordReadFlag(TRUE),
79139 ngUserReadFlag(TRUE),
@@ -83,10 +143,19 @@ namespace nlite{
83143 teropReadFlag(TRUE)
84144 {}
85145
146+ VOID CCommentReadProperty::SetCommentRead(BOOL flag){
147+
148+ this->commentReadFlag = flag;
149+ }
150+
151+ BOOL CCommentReadProperty::IsCommentRead()const{
152+
153+ return this->commentReadFlag;
154+ }
86155
87156
88157
89- GeneralProperty::GeneralProperty():
158+ CGeneralProperty::CGeneralProperty():
90159 userCountUpdateFlag(TRUE),
91160 commentLogAutoSaveFlag(FALSE),
92161 defaultBrowserFlag(TRUE),
@@ -99,20 +168,57 @@ namespace nlite{
99168 ncvUserSettingReadedFlag(FALSE)
100169 {}
101170
171+ VOID CGeneralProperty::SetNCVUSerSettingReaded(BOOL flag){
172+ this->ncvUserSettingReadedFlag = flag;
173+ return;
174+ }
102175
176+ BOOL CGeneralProperty::IsNCVUserSettingReaded()const{
103177
104- MainFrameProperty::MainFrameProperty():
178+ return this->ncvUserSettingReadedFlag;
179+
180+ }
181+
182+ BOOL CGeneralProperty::IsNumberName()const{
183+
184+ return this->numberNameFlag;
185+ }
186+
187+ BROWSERTYPE CGeneralProperty::GetBrowserType()const{
188+
189+ return this->browserType;
190+ }
191+
192+ const CNLiteString &CGeneralProperty::GetBrowserPath()const{
193+
194+ return this->browserPath;
195+ }
196+
197+ CMainFrameProperty::CMainFrameProperty():
105198 windowFrontFlag(TRUE)
106199 {
107200
108201 ZeroMemory(&windowSize,sizeof(windowSize));
109202
110203 }
204+ VOID CMainFrameProperty::SetWindowFront(BOOL flag){
205+ this->windowFrontFlag = flag;
206+ return;
207+ }
208+
209+ const SIZE &CMainFrameProperty::GetWindowSize()const{
210+
211+ return this->windowSize;
212+ }
213+
214+ BOOL CMainFrameProperty::IsWindowFront()const{
111215
216+ return this->windowFrontFlag;
217+ }
112218
113219
114220
115- Property::Property()
221+ CProperty::CProperty()
116222 {
117223 TCHAR localAppPath[_MAX_PATH];
118224 SHGetFolderPathW(0,CSIDL_LOCAL_APPDATA,0,SHGFP_TYPE_CURRENT,localAppPath);
@@ -120,19 +226,19 @@ namespace nlite{
120226 this->appLocalPath = localAppPath;
121227 }
122228
123- Property::~Property()
229+ CProperty::~CProperty()
124230 {
125231
126232
127233 }
128234
129- VOID Property::Initialize(){
130- this->~Property();
131- new(this) Property;
235+ VOID CProperty::Initialize(){
236+ this->~CProperty();
237+ new(this) CProperty;
132238
133239 }
134240
135- BROWSERTYPE Property::CookieSetting(){
241+ BROWSERTYPE CProperty::CookieSetting(){
136242
137243 CCookieSettingWindow cookieSettingwindow;
138244
@@ -149,7 +255,34 @@ namespace nlite{
149255
150256 }
151257
152- VOID Property::ReadProperty(){
258+ VOID CProperty::SetCommentViewProperty(const CCommentViewProperty& commentViewProperty){
259+
260+ this->cvp = commentViewProperty;
261+ return;
262+ }
263+
264+ CCommentViewProperty &CProperty::GetCommentViewProperty(){
265+
266+ return this->cvp;
267+ }
268+
269+ CMainFrameProperty &CProperty::GetMainFrameProperty(){
270+
271+ return this->mfp;
272+ }
273+
274+ CGeneralProperty &CProperty::GetGeneralProperty(){
275+
276+ return this->gp;
277+ }
278+
279+ CCommentReadProperty &CProperty::GetCommentReadProperty(){
280+
281+ return this->crp;
282+
283+ }
284+
285+ VOID CProperty::ReadProperty(){
153286
154287 CreatePropertyFile();
155288 CAtlFile propertyFile;
@@ -169,7 +302,7 @@ namespace nlite{
169302
170303 LPSTR propertyTagStart = strstr(&propertyBuf[0],"<");
171304 if(propertyTagStart != NULL){
172- ReadPropertyXML reader(*this);
305+ CReadPropertyXML reader(*this);
173306 reader.Parse(propertyTagStart);
174307 }
175308
@@ -179,8 +312,18 @@ namespace nlite{
179312 return;
180313 }
181314
315+ const CNLiteString &CProperty::GetListenerDataPath()const{
316+
317+ return this->listenerDataPath;
318+ }
319+
320+ const CNLiteString &CProperty::GetPropertySaveFolderPath()const{
321+
322+ return this->propertyFolderPath;
323+ }
324+
182325
183- VOID Property::CreatePropertyFile(){
326+ VOID CProperty::CreatePropertyFile(){
184327
185328 CString iniFile;
186329 iniFile = appLocalPath;
@@ -218,7 +361,7 @@ namespace nlite{
218361 }
219362
220363
221- VOID Property::WriteProperty(){
364+ VOID CProperty::WriteProperty(){
222365
223366 CreatePropertyFile();
224367 CComPtr<IXmlWriter> pWriter;
@@ -310,7 +453,7 @@ namespace nlite{
310453 ///
311454 ///コンストラクタ
312455 ///
313- ReadPropertyXML::ReadPropertyXML(Property &in_property):nliteProperty(in_property),propertyType(Node::None){
456+ CReadPropertyXML::CReadPropertyXML(CProperty &in_property):nliteProperty(in_property),propertyType(Node::None){
314457
315458 return;
316459 }
@@ -322,7 +465,7 @@ namespace nlite{
322465 //
323466
324467 #define NLITE_PSZNAME_CMP(t,p) (_tcscmp(NLITE_GET_TYPENAME(t),(LPCTSTR)(p)) == 0)
325- void ReadPropertyXML::OnStartElement (const XML_Char *pszName, const XML_Char **papszAttrs){
468+ void CReadPropertyXML::OnStartElement (const XML_Char *pszName, const XML_Char **papszAttrs){
326469
327470 switch(propertyType){
328471
@@ -330,29 +473,29 @@ namespace nlite{
330473
331474 if(NLITE_PSZNAME_CMP(nliteProperty.crp,pszName)){
332475
333- propertyType = Node::CommentReadProperty;
476+ propertyType = Node::CCommentReadProperty;
334477
335478 } else if(NLITE_PSZNAME_CMP(nliteProperty.cvp,pszName)){
336479
337- propertyType = Node::CommentViewProperty;
480+ propertyType = Node::CCommentViewProperty;
338481
339482 } else if(NLITE_PSZNAME_CMP(nliteProperty.mfp,pszName)){
340483
341- propertyType = Node::MainFrameProperty;
484+ propertyType = Node::CMainFrameProperty;
342485
343486 } else if(NLITE_PSZNAME_CMP(nliteProperty.gp,pszName)){
344487
345- propertyType = Node::GeneralProperty;
488+ propertyType = Node::CGeneralProperty;
346489
347490 }
348491
349492 break;
350493
351494
352- case Node::CommentReadProperty:
353- case Node::CommentViewProperty:
354- case Node::GeneralProperty:
355- case Node::MainFrameProperty:
495+ case Node::CCommentReadProperty:
496+ case Node::CCommentViewProperty:
497+ case Node::CGeneralProperty:
498+ case Node::CMainFrameProperty:
356499
357500 nodeName = (LPCTSTR)pszName;
358501 break;
@@ -368,7 +511,7 @@ namespace nlite{
368511
369512
370513
371- void ReadPropertyXML::OnEndElement (const XML_Char *pszName){
514+ void CReadPropertyXML::OnEndElement (const XML_Char *pszName){
372515
373516 if(NLITE_PSZNAME_CMP(nliteProperty.crp,pszName) ||
374517 NLITE_PSZNAME_CMP(nliteProperty.cvp,pszName)||
@@ -410,7 +553,7 @@ namespace nlite{
410553
411554 #define NLITE_NAME(n) (#n)
412555
413- void ReadPropertyXML::OnCharacterData (const XML_Char *pszData, int nLength){
556+ void CReadPropertyXML::OnCharacterData (const XML_Char *pszData, int nLength){
414557
415558 if (nodeName.empty() == true)return;
416559
@@ -418,7 +561,7 @@ namespace nlite{
418561
419562
420563
421- case Node::CommentReadProperty:
564+ case Node::CCommentReadProperty:
422565
423566 NLITE_R_X_P_S(nliteProperty,crp,shortComment);
424567 NLITE_R_X_P_I(nliteProperty,crp,administratorCommentReadFlag);
@@ -435,7 +578,7 @@ namespace nlite{
435578 NLITE_R_X_P_I(nliteProperty,crp,userCommentReadFlag);
436579
437580 break;
438- case Node::CommentViewProperty:
581+ case Node::CCommentViewProperty:
439582 NLITE_R_X_P_I(nliteProperty,cvp,anonymousIDLinkColor);
440583 NLITE_R_X_P_I(nliteProperty,cvp,backColor);
441584 NLITE_R_X_P_I(nliteProperty,cvp,baseStringColor);
@@ -451,7 +594,7 @@ namespace nlite{
451594 NLITE_R_X_P_I(nliteProperty,cvp,ownerStringColor);
452595
453596 break;
454- case Node::GeneralProperty:
597+ case Node::CGeneralProperty:
455598 NLITE_R_X_P_I(nliteProperty,gp,activeCountTimeFlag);
456599 NLITE_R_X_P_I(nliteProperty,gp,autoColorRegisterFlag);
457600 NLITE_R_X_P_I(nliteProperty,gp,autoNameRegisterFlag);
@@ -465,7 +608,7 @@ namespace nlite{
465608 NLITE_R_X_P_I(nliteProperty,gp,userCountUpdateFlag);
466609 NLITE_R_X_P_I(nliteProperty,gp,ncvUserSettingReadedFlag);
467610 break;
468- case Node::MainFrameProperty:
611+ case Node::CMainFrameProperty:
469612 NLITE_R_X_P_I(nliteProperty,mfp,windowSize.cx);
470613 NLITE_R_X_P_I(nliteProperty,mfp,windowSize.cy);
471614 NLITE_R_X_P_I(nliteProperty,mfp,windowFrontFlag);
--- a/nlite/nlite_property.h
+++ b/nlite/nlite_property.h
@@ -1,15 +1,15 @@
11 #pragma once
2-
2+#include "nlite_propertyWindow.h"
33 namespace nlite{
44
5-
6-
5+ class CProperty;
6+ class CReadPropertyXML;
77 ///
88 ///コメントビュー設定
99 ///
10- struct CommentViewProperty{
11-
12-
10+ class CCommentViewProperty{
11+ friend CProperty;
12+ friend CReadPropertyXML;
1313 enum CommentTimeType{
1414 WriteTimeType,
1515 StreamingTimeType
@@ -19,7 +19,7 @@ namespace nlite{
1919
2020
2121
22- public:
22+ private:
2323 INT_PTR headerholSize[COMMENTVIEW_HEADERITEMSIZE]; //ヘッダ横サイズ
2424 INT_PTR headerOrderArray[COMMENTVIEW_HEADERITEMSIZE]; //ヘッダ並び順配列
2525 BOOL commentFoldingFlag; //コメント折りたたみフラグ
@@ -35,18 +35,47 @@ namespace nlite{
3535 COLORREF colLineColor; //項目の縦線
3636
3737
38+ public:
3839 ///
3940 ///コンストラクタ
4041 ///
41- CommentViewProperty();
42+ CCommentViewProperty();
43+
44+
45+ //ゲッター
46+ public:
47+ COLORREF GetOwnerStringColor()const;
48+
49+ COLORREF GetBaseStringColor()const;
50+
51+ COLORREF GetSelectBackColor()const;
52+
53+ COLORREF GetSelectSellLineColor()const;
54+
55+ COLORREF GetBackColor()const;
56+
57+ COLORREF GetNormalLineColor()const;
58+
59+ COLORREF GetLinkStringColor()const;
60+
61+ COLORREF GetColLineColor()const;
62+
63+ BOOL IsCommentFoldingFlag()const;
64+
65+ INT_PTR *GetHeaderHolSize();
66+
67+ INT_PTR *GetHeaderOrderArray();
68+
69+ UINT_PTR GetHeaderOrderArrayLength()const;
4270 };
4371
4472 ///
4573 ///コメント読み上げ設定
4674 ///
47- struct CommentReadProperty{
48-
49- public:
75+ class CCommentReadProperty{
76+ friend CReadPropertyXML;
77+ friend CProperty;
78+ private:
5079
5180 BOOL commentReadFlag; //コメント読み上げフラグ
5281 BOOL ngWordReadFlag; //NGワード読み上げフラグ
@@ -61,18 +90,32 @@ namespace nlite{
6190 CNLiteString shortComment; //省略時に読み上げる文字列
6291 CNLiteString outString; //読み上げ除外文字列
6392
93+ public:
6494 ///
6595 ///コンストラクタ
6696 ///
67- CommentReadProperty();
97+ CCommentReadProperty();
98+
99+ //セッター
100+ public:
101+ VOID SetCommentRead(BOOL flag);
102+
103+ //ゲッター
104+ public:
105+ ///
106+ ///コメント読み上げフラグ取得
107+ ///
108+ BOOL IsCommentRead()const;
109+
68110 };
69111
70112 ///
71113 ///一般設定
72114 ///
73- struct GeneralProperty{
74-
75- public:
115+ class CGeneralProperty{
116+ friend CProperty;
117+ friend CReadPropertyXML;
118+ private:
76119 CNLiteString browserPath; //ブラウザのパス
77120 BOOL userCountUpdateFlag; //来場者数を更新するかのフラグ
78121 BOOL commentLogAutoSaveFlag; //コメント自動保存用のフラグ
@@ -87,53 +130,98 @@ namespace nlite{
87130 BOOL ncvUserSettingReadedFlag; //ncvリスナーデータ読み込み済みフラグ
88131
89132
133+ public:
90134 ///
91135 ///コンストラクタ
92136 ///
93- GeneralProperty();
137+ CGeneralProperty();
138+
139+
140+ //セッター
141+ public:
142+ VOID SetNCVUSerSettingReaded(BOOL flag);
143+
144+ //ゲッター
145+ public:
146+ ///
147+ ///ncvリスナーデータ読み込みフラグ判定
148+ ///
149+ BOOL IsNCVUserSettingReaded()const;
94150
151+ BOOL IsNumberName()const;
152+
153+ ///
154+ ///ブラウザタイプ取得
155+ ///
156+ BROWSERTYPE GetBrowserType()const;
157+
158+ ///
159+ ///ブラウザパス取得
160+ ///
161+ const CNLiteString &GetBrowserPath()const;
95162 };
96163
97164
98165 ///
99166 ///メイン設定
100167 ///
101- struct MainFrameProperty{
102-
103-
104- public:
168+ class CMainFrameProperty{
169+ friend CReadPropertyXML;
170+ friend CProperty;
171+ private:
105172
106173 SIZE windowSize; //ウィンドウサイズ
107174 BOOL windowFrontFlag; //ウィンドウ最前面表示フラグ
108175
109176
177+ public:
110178 ///
111179 ///コンストラクタ
112180 ///
113- MainFrameProperty();
181+ CMainFrameProperty();
114182
183+
184+ //セッター
185+ public:
186+ VOID SetWindowFront(BOOL flag);
187+
188+ //ゲッター
189+ public:
190+
191+ ///
192+ ///ウィンドウサイズの取得
193+ ///
194+ const SIZE &GetWindowSize()const;
115195
116196
197+ ///
198+ ///ウィンドウ全面表示フラグの取得
199+ ///
200+ BOOL IsWindowFront()const;
201+
117202 };
118203
119204 ///
120205 ///nlite設定
121206 ///
122- struct Property{
123-
124- public:
125- CommentViewProperty cvp; //コメントビュープロパティ
126- MainFrameProperty mfp; //メインウィンドウプロパティ
127- GeneralProperty gp; //共有プロパティ
128- CommentReadProperty crp; //コメント読み上げプロパティ
207+ class CProperty{
208+ friend CReadPropertyXML;
209+ private:
210+ CCommentViewProperty cvp; //コメントビュープロパティ
211+ CMainFrameProperty mfp; //メインウィンドウプロパティ
212+ CGeneralProperty gp; //共有プロパティ
213+ CCommentReadProperty crp; //コメント読み上げプロパティ
129214 CNLiteString appLocalPath; //ローカルフォルダパス
130215 CNLiteString propertyFolderPath; //プロパティ配置が記載されたフォルダ
131216 CNLiteString propertySaveFolderPath; //プロパティデータ保存先フォルダ
132217 CNLiteString propertyPath; //プロパティファイルパス
133218 CNLiteString listenerDataPath; //リスナー情報設定ファイルパス
134- Property();
219+
220+
221+ public:
222+ CProperty();
135223
136- ~Property();
224+ ~CProperty();
137225
138226
139227
@@ -150,28 +238,47 @@ namespace nlite{
150238
151239 BROWSERTYPE CookieSetting();
152240
241+ //セッター
242+ public:
243+ VOID SetCommentViewProperty(const CCommentViewProperty& commentViewProperty);
153244
245+ //ゲッター
246+
247+ public:
248+ CCommentViewProperty &GetCommentViewProperty();
249+
250+ CMainFrameProperty &GetMainFrameProperty();
251+
252+ CGeneralProperty &GetGeneralProperty();
154253
254+ CCommentReadProperty &GetCommentReadProperty();
255+
256+
257+ const CNLiteString &GetListenerDataPath()const;
258+
259+ const CNLiteString &GetPropertySaveFolderPath()const;
260+
261+
155262 };
156263
157264
158265 ///
159266 ///設定ファイルのxml読み取り用クラス
160267 ///
161- class ReadPropertyXML:public CXmlParser{
268+ class CReadPropertyXML:public CXmlParser{
162269
163270 private:
164271
165- Property &nliteProperty;
272+ CProperty &nliteProperty;
166273
167274 struct Node{
168275
169276 enum type{
170277 None,
171- CommentReadProperty,
172- CommentViewProperty,
173- MainFrameProperty,
174- GeneralProperty
278+ CCommentReadProperty,
279+ CCommentViewProperty,
280+ CMainFrameProperty,
281+ CGeneralProperty
175282 };
176283 };
177284
@@ -185,7 +292,7 @@ namespace nlite{
185292 ///
186293 ///コンストラクタ
187294 ///
188- ReadPropertyXML(Property &in_property);
295+ CReadPropertyXML(CProperty &in_property);
189296
190297
191298