Mercurial > mercurial > hgweb_searcher03.cgi
comparison src/myframe.cpp @ 11:dfcf8c973219
Implement Cache maker.
author | pyon@macmini |
---|---|
date | Wed, 07 May 2014 20:38:57 +0900 |
parents | 29021e6e1ebe |
children | 52958cd4a073 |
comparison
equal
deleted
inserted
replaced
10:29021e6e1ebe | 11:dfcf8c973219 |
---|---|
1 // Filename : myframe.cpp | 1 // Filename : myframe.cpp |
2 // Last Change: 28-Apr-2014. | 2 // Last Change: 02-May-2014. |
3 // | 3 // |
4 #include "main.h" | 4 #include "main.h" |
5 #include "db.h" | 5 #include "db.h" |
6 #include "about.h" | 6 #include "about.h" |
7 #include "kana.h" | 7 #include "kana.h" |
8 #include "hist.h" | 8 #include "hist.h" |
9 #include "preview.h" | 9 #include "preview.h" |
10 #include "index.h" | 10 #include "index.h" |
11 #include "cache.h" | |
11 #include "param.h" | 12 #include "param.h" |
12 #include "marksheet.h" | 13 #include "marksheet.h" |
13 #include "myframe.h" | 14 #include "myframe.h" |
14 #include "bprint.h" | 15 #include "bprint.h" |
15 | 16 |
224 m_menuFile->Append( m_menuItemBPrintMode ); | 225 m_menuFile->Append( m_menuItemBPrintMode ); |
225 | 226 |
226 wxMenuItem* m_menuItemIndex = new wxMenuItem( m_menuFile, ID_MNINDEX, wxString( wxT("インデックス\tF11") ) , wxT("Update index"), wxITEM_NORMAL ); | 227 wxMenuItem* m_menuItemIndex = new wxMenuItem( m_menuFile, ID_MNINDEX, wxString( wxT("インデックス\tF11") ) , wxT("Update index"), wxITEM_NORMAL ); |
227 m_menuFile->Append( m_menuItemIndex ); | 228 m_menuFile->Append( m_menuItemIndex ); |
228 | 229 |
230 wxMenuItem* m_menuItemCache = new wxMenuItem( m_menuFile, ID_MNCACHE, wxString( wxT("キャッシュ\tF9") ) , wxT("Make cache"), wxITEM_NORMAL ); | |
231 m_menuFile->Append( m_menuItemCache ); | |
232 | |
229 m_menuFile->AppendSeparator(); // ---- | 233 m_menuFile->AppendSeparator(); // ---- |
230 | 234 |
231 wxMenuItem* m_menuItemBkup = new wxMenuItem( m_menuFile, ID_MNDBBKUP, wxString( wxT("DBバックアップ(&B)") ) , wxT("Backup databases"), wxITEM_NORMAL ); | 235 wxMenuItem* m_menuItemBkup = new wxMenuItem( m_menuFile, ID_MNDBBKUP, wxString( wxT("DBバックアップ(&B)") ) , wxT("Backup databases"), wxITEM_NORMAL ); |
232 m_menuFile->Append( m_menuItemBkup ); | 236 m_menuFile->Append( m_menuItemBkup ); |
233 | 237 |
340 BEGIN_EVENT_TABLE( MyFrame, wxFrame ) | 344 BEGIN_EVENT_TABLE( MyFrame, wxFrame ) |
341 EVT_MENU( ID_MNABOUT, MyFrame::OnAbout ) | 345 EVT_MENU( ID_MNABOUT, MyFrame::OnAbout ) |
342 EVT_MENU( wxID_EXIT, MyFrame::OnQuit ) | 346 EVT_MENU( wxID_EXIT, MyFrame::OnQuit ) |
343 EVT_MENU( ID_MNBPNT, MyFrame::OnBPrintMode ) | 347 EVT_MENU( ID_MNBPNT, MyFrame::OnBPrintMode ) |
344 EVT_MENU( ID_MNINDEX, MyFrame::OnIndex ) | 348 EVT_MENU( ID_MNINDEX, MyFrame::OnIndex ) |
349 EVT_MENU( ID_MNCACHE, MyFrame::OnCache ) | |
345 EVT_MENU( ID_MNDBBKUP, MyFrame::OnDBBackup ) | 350 EVT_MENU( ID_MNDBBKUP, MyFrame::OnDBBackup ) |
346 EVT_MENU( ID_MNMASKPARAM, MyFrame::OnMaskParam ) | 351 EVT_MENU( ID_MNMASKPARAM, MyFrame::OnMaskParam ) |
347 EVT_MENU( ID_MNMARKPARAM, MyFrame::OnMarkParam ) | 352 EVT_MENU( ID_MNMARKPARAM, MyFrame::OnMarkParam ) |
348 EVT_MENU( ID_MNAPPDIR, MyFrame::OnOpenAppDir ) | 353 EVT_MENU( ID_MNAPPDIR, MyFrame::OnOpenAppDir ) |
349 EVT_LIST_ITEM_SELECTED( ID_LIST, MyFrame::OnSelectItem ) | 354 EVT_LIST_ITEM_SELECTED( ID_LIST, MyFrame::OnSelectItem ) |
550 | 555 |
551 IndexDialog* index = new IndexDialog( this, wxID_ANY, wxT("インデックス作成"), wxDefaultPosition, wxSize( 700, 600 ), wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP ); | 556 IndexDialog* index = new IndexDialog( this, wxID_ANY, wxT("インデックス作成"), wxDefaultPosition, wxSize( 700, 600 ), wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP ); |
552 index->SetRootdir( rootdir ); | 557 index->SetRootdir( rootdir ); |
553 index->ShowModal(); | 558 index->ShowModal(); |
554 } | 559 } |
560 /* キャッシュ作成ダイアログ */ | |
561 void MyFrame::OnCache( wxCommandEvent& WXUNUSED(event) ) | |
562 { | |
563 wxString rootdir; | |
564 config->SetPath( wxT("/Index") ); | |
565 config->Read( wxT("rootdir"), &rootdir ); | |
566 | |
567 CacheDialog* cache = new CacheDialog( this, wxID_ANY, wxT("キャッシュ作成"), wxDefaultPosition, wxDefaultSize, wxCAPTION|wxSTAY_ON_TOP ); | |
568 cache->Setting( rootdir, THUMB_W, THUMB_H ); | |
569 cache->ShowModal(); | |
570 } | |
555 /* マークシートパラメータ設定ダイアログ */ | 571 /* マークシートパラメータ設定ダイアログ */ |
556 void MyFrame::OnMarkParam( wxCommandEvent& WXUNUSED(event) ) | 572 void MyFrame::OnMarkParam( wxCommandEvent& WXUNUSED(event) ) |
557 { | 573 { |
558 SetParams( 2 ); | 574 SetParams( 2 ); |
559 } | 575 } |