| Revision | 552257e3e3ccf811b137250d0010f2027e6629c7 (tree) |
|---|---|
| Time | 2012-02-26 21:22:32 |
| Author | qwerty2501 <riot313@gmai...> |
| Commiter | qwerty2501 |
プロパティクラスのアクセス修飾子を修正
| @@ -7,15 +7,15 @@ namespace nlite{ | ||
| 7 | 7 | //クラス先行宣言 |
| 8 | 8 | class CApplicationInfo; |
| 9 | 9 | class CListenerList; |
| 10 | - struct Property; | |
| 11 | - struct GeneralProperty; | |
| 10 | + class CProperty; | |
| 11 | + class CGeneralProperty; | |
| 12 | 12 | class CListenerData; |
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | //アプリケーションプロパティ |
| 18 | - extern Property nliteProperty; | |
| 18 | + extern CProperty nliteProperty; | |
| 19 | 19 | const static UINT_PTR COMMENTVIEW_HEADERITEMSIZE = 5; |
| 20 | 20 | enum MESSAGE{ |
| 21 | 21 | UM_COMMENTVIEW_SETCTRL = WM_USER + 1, |
| @@ -124,7 +124,7 @@ VOID CChatData::SetChat(NicoLiveChat &chat_in,CListenerData &listener){ | ||
| 124 | 124 | |
| 125 | 125 | const tstring &name = results.str(results.size() - 1).c_str(); |
| 126 | 126 | |
| 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){ | |
| 128 | 128 | this->listenerData->SetUserName(name.c_str()); |
| 129 | 129 | } |
| 130 | 130 |
| @@ -271,7 +271,7 @@ CCommentList::iterator CCommentList::OnChatReceve(NicoLiveChat_P chatData_in,LPC | ||
| 271 | 271 | if(empty() == TRUE || back().date <= chatData.date){ |
| 272 | 272 | chatList.push_back(chatData); |
| 273 | 273 | rslt = (--chatList.end()); |
| 274 | - if(nlite::nliteProperty.crp.commentReadFlag == TRUE){ | |
| 274 | + if(nlite::nliteProperty.GetCommentReadProperty().IsCommentRead() == TRUE){ | |
| 275 | 275 | |
| 276 | 276 | g_speaker.SynthesisAsync((const speaker::TChar_P)(LPCTSTR)rslt->chatBuf); |
| 277 | 277 | } |
| @@ -30,12 +30,12 @@ namespace nlite{ | ||
| 30 | 30 | defaultFormat.dwMask |= CFM_COLOR; |
| 31 | 31 | if(chat.GetPremium() == 2 || chat.GetPremium() == 3){ |
| 32 | 32 | |
| 33 | - defaultFormat.crTextColor = m_master.viewproperty.ownerStringColor; | |
| 33 | + defaultFormat.crTextColor = m_master.viewproperty.GetOwnerStringColor(); | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | else { |
| 37 | 37 | |
| 38 | - defaultFormat.crTextColor = m_master.viewproperty.baseStringColor; | |
| 38 | + defaultFormat.crTextColor = m_master.viewproperty.GetBaseStringColor(); | |
| 39 | 39 | |
| 40 | 40 | } |
| 41 | 41 |
| @@ -162,7 +162,7 @@ namespace nlite{ | ||
| 162 | 162 | |
| 163 | 163 | if (comment.IsSelect() == TRUE) |
| 164 | 164 | { |
| 165 | - bkColor = m_master.viewproperty.selectBackColor; | |
| 165 | + bkColor = m_master.viewproperty.GetSelectBackColor(); | |
| 166 | 166 | |
| 167 | 167 | } |
| 168 | 168 | else |
| @@ -180,7 +180,7 @@ namespace nlite{ | ||
| 180 | 180 | |
| 181 | 181 | } else { |
| 182 | 182 | |
| 183 | - bkColor = m_master.viewproperty.backColor; | |
| 183 | + bkColor = m_master.viewproperty.GetBackColor(); | |
| 184 | 184 | |
| 185 | 185 | |
| 186 | 186 |
| @@ -262,7 +262,7 @@ namespace nlite{ | ||
| 262 | 262 | |
| 263 | 263 | if(ctrlsBegin == ctrlsEnd)ctrlsBegin = Extend(); |
| 264 | 264 | |
| 265 | - ctrlsBegin->SetCtrl(hdwp,tmpRect,*chatDataBegin,m_hMaster.viewproperty.commentFoldingFlag); | |
| 265 | + ctrlsBegin->SetCtrl(hdwp,tmpRect,*chatDataBegin,m_hMaster.viewproperty.IsCommentFoldingFlag()); | |
| 266 | 266 | |
| 267 | 267 | heightSum = tmpRect.bottom; |
| 268 | 268 |
| @@ -385,7 +385,7 @@ namespace nlite{ | ||
| 385 | 385 | return nMax; |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | - VOID CCommentView::SetProperty(const CommentViewProperty &setProperty,const GeneralProperty &in_generalProperty){ | |
| 388 | + VOID CCommentView::SetProperty(const CCommentViewProperty &setProperty,const CGeneralProperty &in_generalProperty){ | |
| 389 | 389 | |
| 390 | 390 | |
| 391 | 391 | viewproperty = setProperty; |
| @@ -395,7 +395,7 @@ namespace nlite{ | ||
| 395 | 395 | return; |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | - CommentViewProperty &CCommentView::GetProperty(){ | |
| 398 | + CCommentViewProperty &CCommentView::GetProperty(){ | |
| 399 | 399 | |
| 400 | 400 | return viewproperty; |
| 401 | 401 |
| @@ -424,7 +424,7 @@ namespace nlite{ | ||
| 424 | 424 | |
| 425 | 425 | GetTextExtentPoint32(hdc , columns[index] , _tcslen(columns[index]) , &size); |
| 426 | 426 | 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; | |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | SelectObject(hdc,hOld); |
| @@ -436,7 +436,7 @@ namespace nlite{ | ||
| 436 | 436 | |
| 437 | 437 | AddHeader(&headersinfo); |
| 438 | 438 | |
| 439 | - m_header.SetOrderArray(ARRAY_LENGTH(viewproperty.headerOrderArray),viewproperty.headerOrderArray); | |
| 439 | + m_header.SetOrderArray(viewproperty.GetHeaderOrderArrayLength(),viewproperty.GetHeaderOrderArray()); | |
| 440 | 440 | |
| 441 | 441 | |
| 442 | 442 |
| @@ -636,13 +636,13 @@ namespace nlite{ | ||
| 636 | 636 | |
| 637 | 637 | |
| 638 | 638 | VOID CCommentView::OnDestroy(){ |
| 639 | - m_header.GetOrderArray(ARRAY_LENGTH(viewproperty.headerOrderArray),viewproperty.headerOrderArray); | |
| 639 | + m_header.GetOrderArray(viewproperty.GetHeaderOrderArrayLength(),viewproperty.GetHeaderOrderArray()); | |
| 640 | 640 | INT_PTR headerItemcount = m_header.GetItemCount(); |
| 641 | 641 | RECT headerItemRect; |
| 642 | 642 | for(INT_PTR itemindex = 0;itemindex < headerItemcount;itemindex++){ |
| 643 | 643 | |
| 644 | 644 | m_header.GetItemRect(itemindex,&headerItemRect); |
| 645 | - viewproperty.headerholSize[itemindex] = headerItemRect.right - headerItemRect.left; | |
| 645 | + viewproperty.GetHeaderHolSize()[itemindex] = headerItemRect.right - headerItemRect.left; | |
| 646 | 646 | } |
| 647 | 647 | commentlist.OnDestroy(); |
| 648 | 648 | m_header.DestroyWindow(); |
| @@ -892,11 +892,11 @@ namespace nlite{ | ||
| 892 | 892 | if(selectSellLinePen.IsNull() ==FALSE)selectSellLinePen.DeleteObject(); |
| 893 | 893 | if(selectBkBrush.IsNull() == FALSE)selectBkBrush.DeleteObject(); |
| 894 | 894 | |
| 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()); | |
| 900 | 900 | |
| 901 | 901 | |
| 902 | 902 | if(IsWindow() == TRUE)this->SetRedraw(TRUE); |
| @@ -1177,7 +1177,7 @@ overclientrect: | ||
| 1177 | 1177 | //選択状態かチェック |
| 1178 | 1178 | if (chatData.IsSelect() == TRUE) |
| 1179 | 1179 | { |
| 1180 | - bkColor = self.viewproperty.selectBackColor; | |
| 1180 | + bkColor = self.viewproperty.GetSelectBackColor(); | |
| 1181 | 1181 | |
| 1182 | 1182 | dc.SelectBrush(this->selectBkBrush); |
| 1183 | 1183 | dc.SelectPen(this->selectSellLinePen); |
| @@ -1212,7 +1212,7 @@ overclientrect: | ||
| 1212 | 1212 | dc.SelectBrush(originBkBrush); |
| 1213 | 1213 | } else { |
| 1214 | 1214 | |
| 1215 | - bkColor = self.viewproperty.backColor; | |
| 1215 | + bkColor = self.viewproperty.GetBackColor(); | |
| 1216 | 1216 | dc.SelectBrush(this->normalBkBrush); |
| 1217 | 1217 | dc.SelectBrush(this->normalBkBrush); |
| 1218 | 1218 |
| @@ -1234,14 +1234,14 @@ overclientrect: | ||
| 1234 | 1234 | |
| 1235 | 1235 | const CNLiteString &viewUserName = chatData.GetListnerData().GetName().Length() == 0 ? chatData.GetListnerData().GetUserID() : chatData.GetListnerData().GetName(); |
| 1236 | 1236 | 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()); | |
| 1238 | 1238 | //テキスト描画 |
| 1239 | 1239 | dc.DrawTextW(noString,_tcslen(noString),&noViewRect,DT_WORD_ELLIPSIS); |
| 1240 | 1240 | |
| 1241 | 1241 | |
| 1242 | 1242 | dc.DrawTextW(viewUserName,viewUserName.Length(),&userNameViewRect,DT_WORD_ELLIPSIS); |
| 1243 | 1243 | 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()); | |
| 1245 | 1245 | dc.DrawTextW(dateString,_tcslen(dateString),&timeViewRect,DT_WORD_ELLIPSIS); |
| 1246 | 1246 | |
| 1247 | 1247 | return; |
| @@ -370,9 +370,9 @@ namespace nlite{ | ||
| 370 | 370 | CHeaderCtrl m_header; //ヘッダーコントロール |
| 371 | 371 | CCommentListWindow m_commentListWindow; //コメントリストウィンドウ |
| 372 | 372 | CNicoLiveStream &stream; //放送オブジェクト |
| 373 | - GeneralProperty generalProperty; //一般設定 | |
| 373 | + CGeneralProperty generalProperty; //一般設定 | |
| 374 | 374 | CCommentList commentlist; //コメントリスト |
| 375 | - CommentViewProperty viewproperty; //表示プロパティ | |
| 375 | + CCommentViewProperty viewproperty; //表示プロパティ | |
| 376 | 376 | HFONT hHeaderFontNew; //ヘッダーフォント |
| 377 | 377 | CNicoVideoAuth &refAuth; //ニコニコ生放送認証オブジェクト参照 |
| 378 | 378 | CChatChildCtrlsList chatChildCtrlsList; //子ウィンドウリスト |
| @@ -435,12 +435,12 @@ namespace nlite{ | ||
| 435 | 435 | /// |
| 436 | 436 | ///プロパティ設定 |
| 437 | 437 | /// |
| 438 | - VOID SetProperty(const CommentViewProperty &setProperty,const GeneralProperty &in_generalProperty); | |
| 438 | + VOID SetProperty(const CCommentViewProperty &setProperty,const CGeneralProperty &in_generalProperty); | |
| 439 | 439 | |
| 440 | 440 | /// |
| 441 | 441 | ///プロパティ取得 |
| 442 | 442 | /// |
| 443 | - CommentViewProperty &GetProperty(); | |
| 443 | + CCommentViewProperty &GetProperty(); | |
| 444 | 444 | |
| 445 | 445 | /// |
| 446 | 446 | ///ウィンドウ作成 |
| @@ -22,7 +22,7 @@ namespace nlite{ | ||
| 22 | 22 | const tregex LILNKREGEX(text::LINK_TEXT); |
| 23 | 23 | const tregex NAMESERTCHREGEX(text::SEARTCH_AT_MARK); |
| 24 | 24 | } |
| 25 | - Property nliteProperty; | |
| 25 | + CProperty nliteProperty; | |
| 26 | 26 | CListenerList nlite::listenerList; |
| 27 | 27 | TCHAR appFolderPath[_MAX_PATH]; |
| 28 | 28 | CString ncvAppSettingPath; |
| @@ -30,7 +30,7 @@ namespace nlite{ | ||
| 30 | 30 | speaker::ISpeaker &g_speaker = speaker::ISpeaker::GetMeiNormal(TEXT("libs\\Voice\\mei_normal\\"),TEXT("libs\\open_jtalk_dic\\")); |
| 31 | 31 | VOID nlite::UnexpectedErrorMessageShow(LPCTSTR headMessage,LPCTSTR summary,UINT line,LPCTSTR fileName,LPCTSTR function){ |
| 32 | 32 | |
| 33 | - CString errLogFilePath(nliteProperty.propertySaveFolderPath); | |
| 33 | + CString errLogFilePath(nliteProperty.GetPropertySaveFolderPath()); | |
| 34 | 34 | CAtlFile errFile; |
| 35 | 35 | TCHAR errfile[_MAX_PATH]; |
| 36 | 36 |
| @@ -70,17 +70,17 @@ namespace nlite{ | ||
| 70 | 70 | return; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - HINSTANCE OpenURL(HWND hwnd,const GeneralProperty &gp,LPCTSTR url ,INT nShowCommand){ | |
| 73 | + HINSTANCE OpenURL(HWND hwnd,const CGeneralProperty &gp,LPCTSTR url ,INT nShowCommand){ | |
| 74 | 74 | |
| 75 | 75 | HINSTANCE rslt; |
| 76 | 76 | |
| 77 | - if(gp.browserPath.Length() == 0){ | |
| 77 | + if(gp.GetBrowserPath().Length() == 0){ | |
| 78 | 78 | |
| 79 | 79 | rslt = ShellExecute(hwnd, NULL, url, NULL, NULL, nShowCommand); |
| 80 | 80 | |
| 81 | 81 | } else{ |
| 82 | 82 | |
| 83 | - rslt = ShellExecute(hwnd, NULL, gp.browserPath, url, NULL, nShowCommand); | |
| 83 | + rslt = ShellExecute(hwnd, NULL, gp.GetBrowserPath(), url, NULL, nShowCommand); | |
| 84 | 84 | |
| 85 | 85 | } |
| 86 | 86 |
| @@ -13,7 +13,7 @@ namespace nlite{ | ||
| 13 | 13 | //グローバル関数 |
| 14 | 14 | extern VOID UnexpectedErrorMessageShow(LPCTSTR headMessage,LPCTSTR summary,UINT line,LPCTSTR fileName,LPCTSTR function); |
| 15 | 15 | |
| 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); | |
| 17 | 17 | |
| 18 | 18 | /// |
| 19 | 19 | ///指定されたディレクトリにファイルまたはディレクトリを作成 |
| @@ -158,8 +158,8 @@ LRESULT CNliteMainFrame::OnCreate(LPCREATESTRUCT lpcs){ | ||
| 158 | 158 | this->GetWindowRect(&wndRect); |
| 159 | 159 | |
| 160 | 160 | 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(); | |
| 163 | 163 | |
| 164 | 164 | |
| 165 | 165 |
| @@ -174,10 +174,10 @@ LRESULT CNliteMainFrame::OnCreate(LPCREATESTRUCT lpcs){ | ||
| 174 | 174 | |
| 175 | 175 | listenerSettingWindow.Create(*this); |
| 176 | 176 | |
| 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()); | |
| 179 | 179 | |
| 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); | |
| 181 | 181 | |
| 182 | 182 | return 0; |
| 183 | 183 | } |
| @@ -190,31 +190,31 @@ VOID CNliteMainFrame::Initialize(LPCTSTR localAppDataPath){ | ||
| 190 | 190 | nliteProperty.ReadProperty(); |
| 191 | 191 | |
| 192 | 192 | |
| 193 | - if((nliteProperty.gp.ncvUserSettingReadedFlag == FALSE) && | |
| 193 | + if((nliteProperty.GetGeneralProperty().IsNCVUserSettingReaded() == FALSE) && | |
| 194 | 194 | ((PathFileExists(ncvAppSettingPath) && (!::PathIsDirectory( ncvAppSettingPath ))))){ |
| 195 | 195 | |
| 196 | 196 | if((::MessageBox(NULL,TEXT("NCVのリスナー情報と同期しますか?"),TEXT("リスナー情報読み込み"),MB_OK | MB_OKCANCEL) == IDOK)){ |
| 197 | 197 | listenerList.ReadProperty(GetNCVListenerInfoFilePath()); |
| 198 | 198 | } |
| 199 | - nliteProperty.gp.ncvUserSettingReadedFlag = TRUE; | |
| 199 | + nliteProperty.GetGeneralProperty().SetNCVUSerSettingReaded(TRUE); | |
| 200 | 200 | |
| 201 | 201 | |
| 202 | 202 | |
| 203 | 203 | |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - listenerList.ReadProperty(nliteProperty.listenerDataPath); | |
| 206 | + listenerList.ReadProperty(nliteProperty.GetListenerDataPath()); | |
| 207 | 207 | |
| 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){ | |
| 210 | 210 | nliteProperty.CookieSetting(); |
| 211 | - while(nliteProperty.gp.browserType == BT_NOSETTING){ | |
| 211 | + while(nliteProperty.GetGeneralProperty().GetBrowserType() == BT_NOSETTING){ | |
| 212 | 212 | ::MessageBox(NULL,TEXT("ブラウザタイプを指定してください。これ以外のブラウザは現在使用することはできません"),TEXT("ブラウザタイプ指定エラー"),MB_OK); |
| 213 | 213 | nliteProperty.CookieSetting(); |
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | - nicoVideoAuth.SetBrowserType(nliteProperty.gp.browserType); | |
| 217 | + nicoVideoAuth.SetBrowserType(nliteProperty.GetGeneralProperty().GetBrowserType()); | |
| 218 | 218 | nicoLiveStream.SetResFrom(200); |
| 219 | 219 | }catch(Exception &e){ |
| 220 | 220 |
| @@ -279,9 +279,9 @@ VOID CNliteMainFrame::OnMenuAbount(UINT uNotifyCode,int nID,HWND hWndCtl){ | ||
| 279 | 279 | |
| 280 | 280 | VOID CNliteMainFrame::Finalaize(){ |
| 281 | 281 | |
| 282 | - nliteProperty.cvp = commentView.GetProperty(); | |
| 282 | + nliteProperty.SetCommentViewProperty(commentView.GetProperty()); | |
| 283 | 283 | nliteProperty.WriteProperty(); |
| 284 | - listenerList.WriteProperty(nliteProperty.listenerDataPath); | |
| 284 | + listenerList.WriteProperty(nliteProperty.GetListenerDataPath()); | |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | VOID CNliteMainFrame::OnViewPreference(UINT uNotifyCode,int nID,HWND hWndCtl){ |
| @@ -302,13 +302,13 @@ LRESULT CNliteMainFrame::OnUnlockLvNoBuffer(UINT uMsg,WPARAM wParam,LPARAM lPara | ||
| 302 | 302 | VOID CNliteMainFrame::OnCookie(UINT uNotifyCode,int nID,HWND hWndCtl){ |
| 303 | 303 | nliteProperty.CookieSetting(); |
| 304 | 304 | |
| 305 | - while(nliteProperty.gp.browserType == BT_NOSETTING){ | |
| 305 | + while(nliteProperty.GetGeneralProperty().GetBrowserType() == BT_NOSETTING){ | |
| 306 | 306 | ::MessageBox(NULL,TEXT("ブラウザタイプを指定してください。これ以外のブラウザは現在使用することはできません"),TEXT("ブラウザタイプ指定エラー"),MB_OK); |
| 307 | 307 | nliteProperty.CookieSetting(); |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | try { |
| 311 | - nicoVideoAuth.SetBrowserType(nliteProperty.gp.browserType); | |
| 311 | + nicoVideoAuth.SetBrowserType(nliteProperty.GetGeneralProperty().GetBrowserType()); | |
| 312 | 312 | } catch(NLIBException &e){ |
| 313 | 313 | |
| 314 | 314 | MessageBox(e.what(),TEXT("クッキー取得失敗"),MB_OK | MB_ICONERROR); |
| @@ -321,8 +321,8 @@ VOID CNliteMainFrame::OnCookie(UINT uNotifyCode,int nID,HWND hWndCtl){ | ||
| 321 | 321 | VOID CNliteMainFrame::OnSpeakCommentCheck(UINT uNotifyCode,int nID,HWND hWndCtl){ |
| 322 | 322 | |
| 323 | 323 | |
| 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() ); | |
| 326 | 326 | |
| 327 | 327 | return; |
| 328 | 328 | } |
| @@ -330,9 +330,9 @@ VOID CNliteMainFrame::OnSpeakCommentCheck(UINT uNotifyCode,int nID,HWND hWndCtl) | ||
| 330 | 330 | VOID CNliteMainFrame::OnFrontWindowCheck(UINT uNotifyCode,int nID,HWND hWndCtl){ |
| 331 | 331 | |
| 332 | 332 | |
| 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); | |
| 336 | 336 | return; |
| 337 | 337 | } |
| 338 | 338 |
| @@ -48,7 +48,7 @@ namespace nlite{ | ||
| 48 | 48 | |
| 49 | 49 | |
| 50 | 50 | |
| 51 | - CommentViewProperty::CommentViewProperty(): | |
| 51 | + CCommentViewProperty::CCommentViewProperty(): | |
| 52 | 52 | commentFoldingFlag(TRUE), |
| 53 | 53 | commentTimeType(StreamingTimeType), |
| 54 | 54 | baseStringColor(PALETTERGB(0,0,0)), |
| @@ -72,8 +72,68 @@ namespace nlite{ | ||
| 72 | 72 | |
| 73 | 73 | |
| 74 | 74 | |
| 75 | +COLORREF CCommentViewProperty::GetOwnerStringColor()const{ | |
| 75 | 76 | |
| 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(): | |
| 77 | 137 | commentReadFlag(FALSE), |
| 78 | 138 | ngWordReadFlag(TRUE), |
| 79 | 139 | ngUserReadFlag(TRUE), |
| @@ -83,10 +143,19 @@ namespace nlite{ | ||
| 83 | 143 | teropReadFlag(TRUE) |
| 84 | 144 | {} |
| 85 | 145 | |
| 146 | + VOID CCommentReadProperty::SetCommentRead(BOOL flag){ | |
| 147 | + | |
| 148 | + this->commentReadFlag = flag; | |
| 149 | + } | |
| 150 | + | |
| 151 | + BOOL CCommentReadProperty::IsCommentRead()const{ | |
| 152 | + | |
| 153 | + return this->commentReadFlag; | |
| 154 | + } | |
| 86 | 155 | |
| 87 | 156 | |
| 88 | 157 | |
| 89 | - GeneralProperty::GeneralProperty(): | |
| 158 | + CGeneralProperty::CGeneralProperty(): | |
| 90 | 159 | userCountUpdateFlag(TRUE), |
| 91 | 160 | commentLogAutoSaveFlag(FALSE), |
| 92 | 161 | defaultBrowserFlag(TRUE), |
| @@ -99,20 +168,57 @@ namespace nlite{ | ||
| 99 | 168 | ncvUserSettingReadedFlag(FALSE) |
| 100 | 169 | {} |
| 101 | 170 | |
| 171 | + VOID CGeneralProperty::SetNCVUSerSettingReaded(BOOL flag){ | |
| 172 | + this->ncvUserSettingReadedFlag = flag; | |
| 173 | + return; | |
| 174 | + } | |
| 102 | 175 | |
| 176 | + BOOL CGeneralProperty::IsNCVUserSettingReaded()const{ | |
| 103 | 177 | |
| 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(): | |
| 105 | 198 | windowFrontFlag(TRUE) |
| 106 | 199 | { |
| 107 | 200 | |
| 108 | 201 | ZeroMemory(&windowSize,sizeof(windowSize)); |
| 109 | 202 | |
| 110 | 203 | } |
| 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{ | |
| 111 | 215 | |
| 216 | + return this->windowFrontFlag; | |
| 217 | + } | |
| 112 | 218 | |
| 113 | 219 | |
| 114 | 220 | |
| 115 | - Property::Property() | |
| 221 | + CProperty::CProperty() | |
| 116 | 222 | { |
| 117 | 223 | TCHAR localAppPath[_MAX_PATH]; |
| 118 | 224 | SHGetFolderPathW(0,CSIDL_LOCAL_APPDATA,0,SHGFP_TYPE_CURRENT,localAppPath); |
| @@ -120,19 +226,19 @@ namespace nlite{ | ||
| 120 | 226 | this->appLocalPath = localAppPath; |
| 121 | 227 | } |
| 122 | 228 | |
| 123 | - Property::~Property() | |
| 229 | + CProperty::~CProperty() | |
| 124 | 230 | { |
| 125 | 231 | |
| 126 | 232 | |
| 127 | 233 | } |
| 128 | 234 | |
| 129 | - VOID Property::Initialize(){ | |
| 130 | - this->~Property(); | |
| 131 | - new(this) Property; | |
| 235 | + VOID CProperty::Initialize(){ | |
| 236 | + this->~CProperty(); | |
| 237 | + new(this) CProperty; | |
| 132 | 238 | |
| 133 | 239 | } |
| 134 | 240 | |
| 135 | - BROWSERTYPE Property::CookieSetting(){ | |
| 241 | + BROWSERTYPE CProperty::CookieSetting(){ | |
| 136 | 242 | |
| 137 | 243 | CCookieSettingWindow cookieSettingwindow; |
| 138 | 244 |
| @@ -149,7 +255,34 @@ namespace nlite{ | ||
| 149 | 255 | |
| 150 | 256 | } |
| 151 | 257 | |
| 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(){ | |
| 153 | 286 | |
| 154 | 287 | CreatePropertyFile(); |
| 155 | 288 | CAtlFile propertyFile; |
| @@ -169,7 +302,7 @@ namespace nlite{ | ||
| 169 | 302 | |
| 170 | 303 | LPSTR propertyTagStart = strstr(&propertyBuf[0],"<"); |
| 171 | 304 | if(propertyTagStart != NULL){ |
| 172 | - ReadPropertyXML reader(*this); | |
| 305 | + CReadPropertyXML reader(*this); | |
| 173 | 306 | reader.Parse(propertyTagStart); |
| 174 | 307 | } |
| 175 | 308 |
| @@ -179,8 +312,18 @@ namespace nlite{ | ||
| 179 | 312 | return; |
| 180 | 313 | } |
| 181 | 314 | |
| 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 | + | |
| 182 | 325 | |
| 183 | - VOID Property::CreatePropertyFile(){ | |
| 326 | + VOID CProperty::CreatePropertyFile(){ | |
| 184 | 327 | |
| 185 | 328 | CString iniFile; |
| 186 | 329 | iniFile = appLocalPath; |
| @@ -218,7 +361,7 @@ namespace nlite{ | ||
| 218 | 361 | } |
| 219 | 362 | |
| 220 | 363 | |
| 221 | - VOID Property::WriteProperty(){ | |
| 364 | + VOID CProperty::WriteProperty(){ | |
| 222 | 365 | |
| 223 | 366 | CreatePropertyFile(); |
| 224 | 367 | CComPtr<IXmlWriter> pWriter; |
| @@ -310,7 +453,7 @@ namespace nlite{ | ||
| 310 | 453 | /// |
| 311 | 454 | ///コンストラクタ |
| 312 | 455 | /// |
| 313 | - ReadPropertyXML::ReadPropertyXML(Property &in_property):nliteProperty(in_property),propertyType(Node::None){ | |
| 456 | + CReadPropertyXML::CReadPropertyXML(CProperty &in_property):nliteProperty(in_property),propertyType(Node::None){ | |
| 314 | 457 | |
| 315 | 458 | return; |
| 316 | 459 | } |
| @@ -322,7 +465,7 @@ namespace nlite{ | ||
| 322 | 465 | // |
| 323 | 466 | |
| 324 | 467 | #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){ | |
| 326 | 469 | |
| 327 | 470 | switch(propertyType){ |
| 328 | 471 |
| @@ -330,29 +473,29 @@ namespace nlite{ | ||
| 330 | 473 | |
| 331 | 474 | if(NLITE_PSZNAME_CMP(nliteProperty.crp,pszName)){ |
| 332 | 475 | |
| 333 | - propertyType = Node::CommentReadProperty; | |
| 476 | + propertyType = Node::CCommentReadProperty; | |
| 334 | 477 | |
| 335 | 478 | } else if(NLITE_PSZNAME_CMP(nliteProperty.cvp,pszName)){ |
| 336 | 479 | |
| 337 | - propertyType = Node::CommentViewProperty; | |
| 480 | + propertyType = Node::CCommentViewProperty; | |
| 338 | 481 | |
| 339 | 482 | } else if(NLITE_PSZNAME_CMP(nliteProperty.mfp,pszName)){ |
| 340 | 483 | |
| 341 | - propertyType = Node::MainFrameProperty; | |
| 484 | + propertyType = Node::CMainFrameProperty; | |
| 342 | 485 | |
| 343 | 486 | } else if(NLITE_PSZNAME_CMP(nliteProperty.gp,pszName)){ |
| 344 | 487 | |
| 345 | - propertyType = Node::GeneralProperty; | |
| 488 | + propertyType = Node::CGeneralProperty; | |
| 346 | 489 | |
| 347 | 490 | } |
| 348 | 491 | |
| 349 | 492 | break; |
| 350 | 493 | |
| 351 | 494 | |
| 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: | |
| 356 | 499 | |
| 357 | 500 | nodeName = (LPCTSTR)pszName; |
| 358 | 501 | break; |
| @@ -368,7 +511,7 @@ namespace nlite{ | ||
| 368 | 511 | |
| 369 | 512 | |
| 370 | 513 | |
| 371 | - void ReadPropertyXML::OnEndElement (const XML_Char *pszName){ | |
| 514 | + void CReadPropertyXML::OnEndElement (const XML_Char *pszName){ | |
| 372 | 515 | |
| 373 | 516 | if(NLITE_PSZNAME_CMP(nliteProperty.crp,pszName) || |
| 374 | 517 | NLITE_PSZNAME_CMP(nliteProperty.cvp,pszName)|| |
| @@ -410,7 +553,7 @@ namespace nlite{ | ||
| 410 | 553 | |
| 411 | 554 | #define NLITE_NAME(n) (#n) |
| 412 | 555 | |
| 413 | - void ReadPropertyXML::OnCharacterData (const XML_Char *pszData, int nLength){ | |
| 556 | + void CReadPropertyXML::OnCharacterData (const XML_Char *pszData, int nLength){ | |
| 414 | 557 | |
| 415 | 558 | if (nodeName.empty() == true)return; |
| 416 | 559 |
| @@ -418,7 +561,7 @@ namespace nlite{ | ||
| 418 | 561 | |
| 419 | 562 | |
| 420 | 563 | |
| 421 | - case Node::CommentReadProperty: | |
| 564 | + case Node::CCommentReadProperty: | |
| 422 | 565 | |
| 423 | 566 | NLITE_R_X_P_S(nliteProperty,crp,shortComment); |
| 424 | 567 | NLITE_R_X_P_I(nliteProperty,crp,administratorCommentReadFlag); |
| @@ -435,7 +578,7 @@ namespace nlite{ | ||
| 435 | 578 | NLITE_R_X_P_I(nliteProperty,crp,userCommentReadFlag); |
| 436 | 579 | |
| 437 | 580 | break; |
| 438 | - case Node::CommentViewProperty: | |
| 581 | + case Node::CCommentViewProperty: | |
| 439 | 582 | NLITE_R_X_P_I(nliteProperty,cvp,anonymousIDLinkColor); |
| 440 | 583 | NLITE_R_X_P_I(nliteProperty,cvp,backColor); |
| 441 | 584 | NLITE_R_X_P_I(nliteProperty,cvp,baseStringColor); |
| @@ -451,7 +594,7 @@ namespace nlite{ | ||
| 451 | 594 | NLITE_R_X_P_I(nliteProperty,cvp,ownerStringColor); |
| 452 | 595 | |
| 453 | 596 | break; |
| 454 | - case Node::GeneralProperty: | |
| 597 | + case Node::CGeneralProperty: | |
| 455 | 598 | NLITE_R_X_P_I(nliteProperty,gp,activeCountTimeFlag); |
| 456 | 599 | NLITE_R_X_P_I(nliteProperty,gp,autoColorRegisterFlag); |
| 457 | 600 | NLITE_R_X_P_I(nliteProperty,gp,autoNameRegisterFlag); |
| @@ -465,7 +608,7 @@ namespace nlite{ | ||
| 465 | 608 | NLITE_R_X_P_I(nliteProperty,gp,userCountUpdateFlag); |
| 466 | 609 | NLITE_R_X_P_I(nliteProperty,gp,ncvUserSettingReadedFlag); |
| 467 | 610 | break; |
| 468 | - case Node::MainFrameProperty: | |
| 611 | + case Node::CMainFrameProperty: | |
| 469 | 612 | NLITE_R_X_P_I(nliteProperty,mfp,windowSize.cx); |
| 470 | 613 | NLITE_R_X_P_I(nliteProperty,mfp,windowSize.cy); |
| 471 | 614 | NLITE_R_X_P_I(nliteProperty,mfp,windowFrontFlag); |
| @@ -1,15 +1,15 @@ | ||
| 1 | 1 | #pragma once |
| 2 | - | |
| 2 | +#include "nlite_propertyWindow.h" | |
| 3 | 3 | namespace nlite{ |
| 4 | 4 | |
| 5 | - | |
| 6 | - | |
| 5 | + class CProperty; | |
| 6 | + class CReadPropertyXML; | |
| 7 | 7 | /// |
| 8 | 8 | ///コメントビュー設定 |
| 9 | 9 | /// |
| 10 | - struct CommentViewProperty{ | |
| 11 | - | |
| 12 | - | |
| 10 | + class CCommentViewProperty{ | |
| 11 | + friend CProperty; | |
| 12 | + friend CReadPropertyXML; | |
| 13 | 13 | enum CommentTimeType{ |
| 14 | 14 | WriteTimeType, |
| 15 | 15 | StreamingTimeType |
| @@ -19,7 +19,7 @@ namespace nlite{ | ||
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | - public: | |
| 22 | + private: | |
| 23 | 23 | INT_PTR headerholSize[COMMENTVIEW_HEADERITEMSIZE]; //ヘッダ横サイズ |
| 24 | 24 | INT_PTR headerOrderArray[COMMENTVIEW_HEADERITEMSIZE]; //ヘッダ並び順配列 |
| 25 | 25 | BOOL commentFoldingFlag; //コメント折りたたみフラグ |
| @@ -35,18 +35,47 @@ namespace nlite{ | ||
| 35 | 35 | COLORREF colLineColor; //項目の縦線 |
| 36 | 36 | |
| 37 | 37 | |
| 38 | + public: | |
| 38 | 39 | /// |
| 39 | 40 | ///コンストラクタ |
| 40 | 41 | /// |
| 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; | |
| 42 | 70 | }; |
| 43 | 71 | |
| 44 | 72 | /// |
| 45 | 73 | ///コメント読み上げ設定 |
| 46 | 74 | /// |
| 47 | - struct CommentReadProperty{ | |
| 48 | - | |
| 49 | - public: | |
| 75 | + class CCommentReadProperty{ | |
| 76 | + friend CReadPropertyXML; | |
| 77 | + friend CProperty; | |
| 78 | + private: | |
| 50 | 79 | |
| 51 | 80 | BOOL commentReadFlag; //コメント読み上げフラグ |
| 52 | 81 | BOOL ngWordReadFlag; //NGワード読み上げフラグ |
| @@ -61,18 +90,32 @@ namespace nlite{ | ||
| 61 | 90 | CNLiteString shortComment; //省略時に読み上げる文字列 |
| 62 | 91 | CNLiteString outString; //読み上げ除外文字列 |
| 63 | 92 | |
| 93 | + public: | |
| 64 | 94 | /// |
| 65 | 95 | ///コンストラクタ |
| 66 | 96 | /// |
| 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 | + | |
| 68 | 110 | }; |
| 69 | 111 | |
| 70 | 112 | /// |
| 71 | 113 | ///一般設定 |
| 72 | 114 | /// |
| 73 | - struct GeneralProperty{ | |
| 74 | - | |
| 75 | - public: | |
| 115 | + class CGeneralProperty{ | |
| 116 | + friend CProperty; | |
| 117 | + friend CReadPropertyXML; | |
| 118 | + private: | |
| 76 | 119 | CNLiteString browserPath; //ブラウザのパス |
| 77 | 120 | BOOL userCountUpdateFlag; //来場者数を更新するかのフラグ |
| 78 | 121 | BOOL commentLogAutoSaveFlag; //コメント自動保存用のフラグ |
| @@ -87,53 +130,98 @@ namespace nlite{ | ||
| 87 | 130 | BOOL ncvUserSettingReadedFlag; //ncvリスナーデータ読み込み済みフラグ |
| 88 | 131 | |
| 89 | 132 | |
| 133 | + public: | |
| 90 | 134 | /// |
| 91 | 135 | ///コンストラクタ |
| 92 | 136 | /// |
| 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; | |
| 94 | 150 | |
| 151 | + BOOL IsNumberName()const; | |
| 152 | + | |
| 153 | + /// | |
| 154 | + ///ブラウザタイプ取得 | |
| 155 | + /// | |
| 156 | + BROWSERTYPE GetBrowserType()const; | |
| 157 | + | |
| 158 | + /// | |
| 159 | + ///ブラウザパス取得 | |
| 160 | + /// | |
| 161 | + const CNLiteString &GetBrowserPath()const; | |
| 95 | 162 | }; |
| 96 | 163 | |
| 97 | 164 | |
| 98 | 165 | /// |
| 99 | 166 | ///メイン設定 |
| 100 | 167 | /// |
| 101 | - struct MainFrameProperty{ | |
| 102 | - | |
| 103 | - | |
| 104 | - public: | |
| 168 | + class CMainFrameProperty{ | |
| 169 | + friend CReadPropertyXML; | |
| 170 | + friend CProperty; | |
| 171 | + private: | |
| 105 | 172 | |
| 106 | 173 | SIZE windowSize; //ウィンドウサイズ |
| 107 | 174 | BOOL windowFrontFlag; //ウィンドウ最前面表示フラグ |
| 108 | 175 | |
| 109 | 176 | |
| 177 | + public: | |
| 110 | 178 | /// |
| 111 | 179 | ///コンストラクタ |
| 112 | 180 | /// |
| 113 | - MainFrameProperty(); | |
| 181 | + CMainFrameProperty(); | |
| 114 | 182 | |
| 183 | + | |
| 184 | + //セッター | |
| 185 | + public: | |
| 186 | + VOID SetWindowFront(BOOL flag); | |
| 187 | + | |
| 188 | + //ゲッター | |
| 189 | + public: | |
| 190 | + | |
| 191 | + /// | |
| 192 | + ///ウィンドウサイズの取得 | |
| 193 | + /// | |
| 194 | + const SIZE &GetWindowSize()const; | |
| 115 | 195 | |
| 116 | 196 | |
| 197 | + /// | |
| 198 | + ///ウィンドウ全面表示フラグの取得 | |
| 199 | + /// | |
| 200 | + BOOL IsWindowFront()const; | |
| 201 | + | |
| 117 | 202 | }; |
| 118 | 203 | |
| 119 | 204 | /// |
| 120 | 205 | ///nlite設定 |
| 121 | 206 | /// |
| 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; //コメント読み上げプロパティ | |
| 129 | 214 | CNLiteString appLocalPath; //ローカルフォルダパス |
| 130 | 215 | CNLiteString propertyFolderPath; //プロパティ配置が記載されたフォルダ |
| 131 | 216 | CNLiteString propertySaveFolderPath; //プロパティデータ保存先フォルダ |
| 132 | 217 | CNLiteString propertyPath; //プロパティファイルパス |
| 133 | 218 | CNLiteString listenerDataPath; //リスナー情報設定ファイルパス |
| 134 | - Property(); | |
| 219 | + | |
| 220 | + | |
| 221 | + public: | |
| 222 | + CProperty(); | |
| 135 | 223 | |
| 136 | - ~Property(); | |
| 224 | + ~CProperty(); | |
| 137 | 225 | |
| 138 | 226 | |
| 139 | 227 |
| @@ -150,28 +238,47 @@ namespace nlite{ | ||
| 150 | 238 | |
| 151 | 239 | BROWSERTYPE CookieSetting(); |
| 152 | 240 | |
| 241 | + //セッター | |
| 242 | + public: | |
| 243 | + VOID SetCommentViewProperty(const CCommentViewProperty& commentViewProperty); | |
| 153 | 244 | |
| 245 | + //ゲッター | |
| 246 | + | |
| 247 | + public: | |
| 248 | + CCommentViewProperty &GetCommentViewProperty(); | |
| 249 | + | |
| 250 | + CMainFrameProperty &GetMainFrameProperty(); | |
| 251 | + | |
| 252 | + CGeneralProperty &GetGeneralProperty(); | |
| 154 | 253 | |
| 254 | + CCommentReadProperty &GetCommentReadProperty(); | |
| 255 | + | |
| 256 | + | |
| 257 | + const CNLiteString &GetListenerDataPath()const; | |
| 258 | + | |
| 259 | + const CNLiteString &GetPropertySaveFolderPath()const; | |
| 260 | + | |
| 261 | + | |
| 155 | 262 | }; |
| 156 | 263 | |
| 157 | 264 | |
| 158 | 265 | /// |
| 159 | 266 | ///設定ファイルのxml読み取り用クラス |
| 160 | 267 | /// |
| 161 | - class ReadPropertyXML:public CXmlParser{ | |
| 268 | + class CReadPropertyXML:public CXmlParser{ | |
| 162 | 269 | |
| 163 | 270 | private: |
| 164 | 271 | |
| 165 | - Property &nliteProperty; | |
| 272 | + CProperty &nliteProperty; | |
| 166 | 273 | |
| 167 | 274 | struct Node{ |
| 168 | 275 | |
| 169 | 276 | enum type{ |
| 170 | 277 | None, |
| 171 | - CommentReadProperty, | |
| 172 | - CommentViewProperty, | |
| 173 | - MainFrameProperty, | |
| 174 | - GeneralProperty | |
| 278 | + CCommentReadProperty, | |
| 279 | + CCommentViewProperty, | |
| 280 | + CMainFrameProperty, | |
| 281 | + CGeneralProperty | |
| 175 | 282 | }; |
| 176 | 283 | }; |
| 177 | 284 |
| @@ -185,7 +292,7 @@ namespace nlite{ | ||
| 185 | 292 | /// |
| 186 | 293 | ///コンストラクタ |
| 187 | 294 | /// |
| 188 | - ReadPropertyXML(Property &in_property); | |
| 295 | + CReadPropertyXML(CProperty &in_property); | |
| 189 | 296 | |
| 190 | 297 | |
| 191 | 298 |