Mercurial > mercurial > hgweb_rsearcher.cgi
comparison src/rsearcher.cpp @ 16:b651aa41b9d4 default tip
hhsinfo method (server)
author | pyon@macmini |
---|---|
date | Mon, 15 Jul 2019 07:03:05 +0900 |
parents | c262e17de9b1 |
children |
comparison
equal
deleted
inserted
replaced
15:c262e17de9b1 | 16:b651aa41b9d4 |
---|---|
1 // Filename : rsearcher.cpp | 1 // Filename : rsearcher.cpp |
2 // Last Change: 2019-05-29 水 15:37:32. | 2 // Last Change: 2019-07-15 Mon 06:58:17. |
3 // | 3 // |
4 | 4 |
5 #include <wx/arrstr.h> | 5 #include <wx/arrstr.h> |
6 #include <wx/html/htmprint.h> | 6 #include <wx/html/htmprint.h> |
7 #include <wx/clipbrd.h> | 7 #include <wx/clipbrd.h> |
8 #include "id.h" | 8 #include "id.h" |
9 #include "mngdb.h" | 9 #include "mngdb.h" |
10 #include "batchprint.h" | |
11 #include "index.h" | |
10 #include "rsearcher.h" | 12 #include "rsearcher.h" |
11 #include "main.h" | 13 #include "main.h" |
12 | 14 |
13 | 15 |
14 /********************/ | 16 /********************/ |
90 /********************/ | 92 /********************/ |
91 MyStaticBitmap::MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) | 93 MyStaticBitmap::MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) |
92 : wxStaticBitmap( parent, id, label, pos, size, style, name ) | 94 : wxStaticBitmap( parent, id, label, pos, size, style, name ) |
93 { | 95 { |
94 m_parent = parent; | 96 m_parent = parent; |
95 Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OnLeftDown ), NULL, this ); | 97 Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MyStaticBitmap::OnLeftDown ), NULL, this ); |
96 Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OnLeftUp ), NULL, this ); | 98 Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyStaticBitmap::OnLeftUp ), NULL, this ); |
97 Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( OnLeftDClick ), NULL, this ); | 99 Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MyStaticBitmap::OnLeftDClick ), NULL, this ); |
98 Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( OnRightDClick ), NULL, this ); | 100 Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MyStaticBitmap::OnRightDClick ), NULL, this ); |
99 Connect( wxEVT_MOTION, wxMouseEventHandler( OnMotion ), NULL, this ); | 101 Connect( wxEVT_MOTION, wxMouseEventHandler( MyStaticBitmap::OnMotion ), NULL, this ); |
100 Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OnWheel ), NULL, this ); | 102 Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MyStaticBitmap::OnWheel ), NULL, this ); |
101 Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OnStartRGesture ), NULL, this ); | 103 Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MyStaticBitmap::OnStartRGesture ), NULL, this ); |
102 Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OnEndRGesture ), NULL, this ); | 104 Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( MyStaticBitmap::OnEndRGesture ), NULL, this ); |
103 } | 105 } |
104 | 106 |
105 MyStaticBitmap::~MyStaticBitmap() | 107 MyStaticBitmap::~MyStaticBitmap() |
106 { | 108 { |
107 Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OnLeftDown ), NULL, this ); | 109 Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MyStaticBitmap::OnLeftDown ), NULL, this ); |
108 Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( OnLeftUp ), NULL, this ); | 110 Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyStaticBitmap::OnLeftUp ), NULL, this ); |
109 Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( OnLeftDClick ), NULL, this ); | 111 Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MyStaticBitmap::OnLeftDClick ), NULL, this ); |
110 Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( OnRightDClick ), NULL, this ); | 112 Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MyStaticBitmap::OnRightDClick ), NULL, this ); |
111 Disconnect( wxEVT_MOTION, wxMouseEventHandler( OnMotion ), NULL, this ); | 113 Disconnect( wxEVT_MOTION, wxMouseEventHandler( MyStaticBitmap::OnMotion ), NULL, this ); |
112 Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OnWheel ), NULL, this ); | 114 Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MyStaticBitmap::OnWheel ), NULL, this ); |
113 Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OnStartRGesture ), NULL, this ); | 115 Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MyStaticBitmap::OnStartRGesture ), NULL, this ); |
114 Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( OnEndRGesture ), NULL, this ); | 116 Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( MyStaticBitmap::OnEndRGesture ), NULL, this ); |
115 } | 117 } |
116 | 118 |
117 // Event Handlers | 119 // Event Handlers |
118 void MyStaticBitmap::OnWheel( wxMouseEvent& event ) | 120 void MyStaticBitmap::OnWheel( wxMouseEvent& event ) |
119 { | 121 { |
283 EVT_BUTTON( wxID_PRINT, MainFrame::OnPrint ) | 285 EVT_BUTTON( wxID_PRINT, MainFrame::OnPrint ) |
284 EVT_CLOSE( MainFrame::OnClose ) | 286 EVT_CLOSE( MainFrame::OnClose ) |
285 EVT_IDLE( MainFrame::OnIdle ) | 287 EVT_IDLE( MainFrame::OnIdle ) |
286 EVT_TIMER( ID_TIMER, MainFrame::OnTimer ) | 288 EVT_TIMER( ID_TIMER, MainFrame::OnTimer ) |
287 // shortcut-key | 289 // shortcut-key |
288 EVT_BUTTON( ID_FOCUS, MainFrame::OnFocus ) | 290 EVT_BUTTON( ID_FOCUS, MainFrame::OnFocus ) |
289 EVT_BUTTON( ID_PZOOM, MainFrame::OnPlusZoom ) | 291 EVT_BUTTON( ID_PZOOM, MainFrame::OnPlusZoom ) |
290 EVT_BUTTON( ID_MZOOM, MainFrame::OnMinusZoom ) | 292 EVT_BUTTON( ID_MZOOM, MainFrame::OnMinusZoom ) |
291 EVT_BUTTON( ID_DARK, MainFrame::OnDark ) | 293 EVT_BUTTON( ID_DARK, MainFrame::OnDark ) |
292 EVT_BUTTON( ID_SWIN, MainFrame::OnSatellite ) | 294 EVT_BUTTON( ID_SWIN, MainFrame::OnSatellite ) |
293 EVT_BUTTON( ID_UPIDX, MainFrame::OnUpdateIndex ) | 295 EVT_BUTTON( ID_UPIDX, MainFrame::OnUpdateIndex ) |
294 EVT_BUTTON( ID_DLMAN, MainFrame::OnDownloadManual ) | 296 EVT_BUTTON( ID_DLMAN, MainFrame::OnDownloadManual ) |
295 EVT_BUTTON( wxID_HELP, MainFrame::OnHelp ) | 297 EVT_BUTTON( ID_BPRINT, MainFrame::OnBatchPrint ) |
298 EVT_BUTTON( ID_INDEX, MainFrame::OnIndex ) | |
299 EVT_BUTTON( wxID_HELP, MainFrame::OnHelp ) | |
296 EVT_BUTTON( wxID_CLOSE, MainFrame::OnBClose ) | 300 EVT_BUTTON( wxID_CLOSE, MainFrame::OnBClose ) |
297 EVT_BUTTON( ID_LOGOUT, MainFrame::OnLogout ) | 301 EVT_BUTTON( ID_LOGOUT, MainFrame::OnLogout ) |
298 END_EVENT_TABLE() | 302 END_EVENT_TABLE() |
299 | 303 |
300 | 304 |
301 // Event Handler | 305 // Event Handler |
302 void MainFrame::OnSplitWin( wxSplitterEvent& WXUNUSED(event) ) | 306 void MainFrame::OnSplitWin( wxSplitterEvent& WXUNUSED(event) ) |
438 | 442 |
439 void MainFrame::OnDownloadManual( wxCommandEvent& WXUNUSED(event) ) | 443 void MainFrame::OnDownloadManual( wxCommandEvent& WXUNUSED(event) ) |
440 { | 444 { |
441 wxString execmd = wxT( "cmd /c start manual.pdf" ); | 445 wxString execmd = wxT( "cmd /c start manual.pdf" ); |
442 wxExecute( execmd ); | 446 wxExecute( execmd ); |
447 } | |
448 | |
449 void MainFrame::OnIndex( wxCommandEvent& WXUNUSED(event) ) | |
450 { | |
451 IndexFrame *idx = new IndexFrame( NULL, wxID_ANY, wxT( "Index" ), wxPoint( 0, 0 ), wxSize( 800, 500 ), wxDEFAULT_FRAME_STYLE ); | |
452 idx->Show( true ); | |
453 idx->Raise(); | |
454 } | |
455 | |
456 void MainFrame::OnBatchPrint( wxCommandEvent& WXUNUSED(event) ) | |
457 { | |
458 BatchPrintFrame *bp = new BatchPrintFrame( NULL, wxID_ANY, wxT( "Batch Print" ), wxPoint( 0, 0 ), wxSize( 800, 500 ), wxDEFAULT_FRAME_STYLE ); | |
459 bp->Show( true ); | |
460 bp->Raise(); | |
443 } | 461 } |
444 | 462 |
445 void MainFrame::OnHelp( wxCommandEvent& WXUNUSED(event) ) | 463 void MainFrame::OnHelp( wxCommandEvent& WXUNUSED(event) ) |
446 { | 464 { |
447 wxString version, build; | 465 wxString version, build; |
604 m_buttonMzoom->Hide(); | 622 m_buttonMzoom->Hide(); |
605 m_buttonDark = new wxButton( this, ID_DARK, wxT( "Dark" ), wxDefaultPosition, wxDefaultSize, 0 ); | 623 m_buttonDark = new wxButton( this, ID_DARK, wxT( "Dark" ), wxDefaultPosition, wxDefaultSize, 0 ); |
606 m_buttonDark->Hide(); | 624 m_buttonDark->Hide(); |
607 m_buttonSatellite = new wxButton( this, ID_SWIN, wxT( "Satellite" ), wxDefaultPosition, wxDefaultSize, 0 ); | 625 m_buttonSatellite = new wxButton( this, ID_SWIN, wxT( "Satellite" ), wxDefaultPosition, wxDefaultSize, 0 ); |
608 m_buttonSatellite->Hide(); | 626 m_buttonSatellite->Hide(); |
627 m_buttonIndex = new wxButton( this, ID_INDEX, wxT( "Index" ), wxDefaultPosition, wxDefaultSize, 0 ); | |
628 m_buttonIndex->Hide(); | |
629 m_buttonBPrint = new wxButton( this, ID_BPRINT, wxT( "Batch Print" ), wxDefaultPosition, wxDefaultSize, 0 ); | |
630 m_buttonBPrint->Hide(); | |
609 m_buttonDLMan = new wxButton( this, ID_DLMAN, wxT( "Manual" ), wxDefaultPosition, wxDefaultSize, 0 ); | 631 m_buttonDLMan = new wxButton( this, ID_DLMAN, wxT( "Manual" ), wxDefaultPosition, wxDefaultSize, 0 ); |
610 m_buttonDLMan->Hide(); | 632 m_buttonDLMan->Hide(); |
611 m_buttonUpdateIndex = new wxButton( this, ID_UPIDX, wxT( "Update Index" ), wxDefaultPosition, wxDefaultSize, 0 ); | 633 m_buttonUpdateIndex = new wxButton( this, ID_UPIDX, wxT( "Update Index" ), wxDefaultPosition, wxDefaultSize, 0 ); |
612 m_buttonUpdateIndex->Hide(); | 634 m_buttonUpdateIndex->Hide(); |
613 m_buttonClose = new wxButton( this, wxID_CLOSE, wxT( "Close" ), wxDefaultPosition, wxDefaultSize, 0 ); | 635 m_buttonClose = new wxButton( this, wxID_CLOSE, wxT( "Close" ), wxDefaultPosition, wxDefaultSize, 0 ); |
642 m_spinCtrl->SetValue( wxGetApp().pzoom ); | 664 m_spinCtrl->SetValue( wxGetApp().pzoom ); |
643 } | 665 } |
644 | 666 |
645 void MainFrame::SetAccelerator( void ) | 667 void MainFrame::SetAccelerator( void ) |
646 { | 668 { |
647 wxAcceleratorEntry entries[11]; | 669 wxAcceleratorEntry entries[13]; |
648 entries[0].Set( wxACCEL_CTRL, (int)'P', wxID_PRINT ); | 670 entries[0].Set( wxACCEL_CTRL, (int)'P', wxID_PRINT ); |
649 entries[1].Set( wxACCEL_NORMAL, WXK_F1, wxID_HELP ); | 671 entries[1].Set( wxACCEL_NORMAL, WXK_F1, wxID_HELP ); |
650 entries[2].Set( wxACCEL_NORMAL, WXK_F2, ID_DLMAN ); | 672 entries[2].Set( wxACCEL_NORMAL, WXK_F2, ID_DLMAN ); |
651 entries[3].Set( wxACCEL_NORMAL, WXK_F4, ID_FOCUS ); | 673 entries[3].Set( wxACCEL_NORMAL, WXK_F3, ID_BPRINT ); |
652 entries[4].Set( wxACCEL_NORMAL, (int)'Z', ID_PZOOM ); | 674 entries[4].Set( wxACCEL_NORMAL, WXK_F4, ID_FOCUS ); |
653 entries[5].Set( wxACCEL_NORMAL, (int)'X', ID_MZOOM ); | 675 entries[5].Set( wxACCEL_NORMAL, WXK_F7, ID_INDEX ); |
654 entries[6].Set( wxACCEL_NORMAL, (int)'D', ID_DARK ); | 676 entries[6].Set( wxACCEL_NORMAL, (int)'Z', ID_PZOOM ); |
655 entries[7].Set( wxACCEL_CTRL, (int)'Q', wxID_CLOSE ); | 677 entries[7].Set( wxACCEL_NORMAL, (int)'X', ID_MZOOM ); |
656 entries[8].Set( wxACCEL_SHIFT, (int)'W', ID_SWIN ); | 678 entries[8].Set( wxACCEL_NORMAL, (int)'D', ID_DARK ); |
657 entries[9].Set( wxACCEL_SHIFT, (int)'R', ID_UPIDX ); | 679 entries[9].Set( wxACCEL_CTRL, (int)'Q', wxID_CLOSE ); |
658 entries[10].Set( wxACCEL_SHIFT, (int)'L', ID_DARK ); // now building ( logout ) | 680 entries[10].Set( wxACCEL_SHIFT, (int)'W', ID_SWIN ); |
659 wxAcceleratorTable accel( 10, entries ); | 681 entries[11].Set( wxACCEL_SHIFT, (int)'R', ID_UPIDX ); |
682 entries[12].Set( wxACCEL_SHIFT, (int)'L', ID_DARK ); // now building ( logout ) | |
683 wxAcceleratorTable accel( 13, entries ); | |
660 SetAcceleratorTable( accel ); | 684 SetAcceleratorTable( accel ); |
661 } | 685 } |
662 | 686 |
663 void MainFrame::Cmd( wxString cmd ) | 687 void MainFrame::Cmd( wxString cmd ) |
664 { | 688 { |