Mercurial > mercurial > hgweb_rsearcher.cgi
comparison include/rsearcher.h @ 3:db4813125eb8
many changes.
| author | pyon@macmini |
|---|---|
| date | Thu, 11 Oct 2018 22:11:09 +0900 |
| parents | 7fe3417cefc8 |
| children | 06342fc544e4 |
comparison
equal
deleted
inserted
replaced
| 2:7fe3417cefc8 | 3:db4813125eb8 |
|---|---|
| 1 // Filename : rsearcher.h | 1 // Filename : rsearcher.h |
| 2 // Last Change: 2018-10-02 Tue 19:36:21. | 2 // Last Change: 2018-10-11 –Ø 18:29:13. |
| 3 // | 3 // |
| 4 | 4 |
| 5 #ifndef __RSEARCH_H__ | 5 #ifndef __RSEARCH_H__ |
| 6 #define __RSEARCH_H__ | 6 #define __RSEARCH_H__ |
| 7 | 7 |
| 23 #include <wx/frame.h> | 23 #include <wx/frame.h> |
| 24 #include <wx/statbmp.h> | 24 #include <wx/statbmp.h> |
| 25 #include <wx/msgdlg.h> | 25 #include <wx/msgdlg.h> |
| 26 #include <wx/filefn.h> | 26 #include <wx/filefn.h> |
| 27 #include <wx/regex.h> | 27 #include <wx/regex.h> |
| 28 #include <wx/progdlg.h> | |
| 29 #include <wx/utils.h> | |
| 28 #include <wx/textfile.h> | 30 #include <wx/textfile.h> |
| 31 #include <wx/timer.h> | |
| 29 | 32 |
| 30 class MySearchCtrl : public wxSearchCtrl | 33 class MySearchCtrl : public wxSearchCtrl |
| 31 { | 34 { |
| 32 DECLARE_EVENT_TABLE() | 35 DECLARE_EVENT_TABLE() |
| 33 public: | 36 public: |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 class MyStaticBitmap : public wxStaticBitmap | 43 class MyStaticBitmap : public wxStaticBitmap |
| 41 { | 44 { |
| 42 private: | 45 private: |
| 43 int m_dragx, m_dragy; | 46 int m_dragx, m_dragy; // for image drag |
| 47 int cx, cy; // for mouse-gesture | |
| 44 int m_zoom = 0; | 48 int m_zoom = 0; |
| 45 wxBitmap m_bmp[5]; | 49 wxBitmap m_bmp[5]; |
| 46 wxScrolledWindow* m_parent; | 50 wxScrolledWindow* m_parent; |
| 47 | 51 |
| 48 public: | 52 public: |
| 49 MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name ); | 53 MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name ); |
| 50 ~MyStaticBitmap(); | 54 ~MyStaticBitmap(); |
| 51 | 55 |
| 52 void OnLeftDown( wxMouseEvent& event ); | 56 void OnLeftDown( wxMouseEvent& event ); |
| 53 void OnLeftUp( wxMouseEvent& event ); | 57 void OnLeftUp( wxMouseEvent& event ); |
| 58 void OnStartRGesture( wxMouseEvent& event ); | |
| 59 void OnEndRGesture( wxMouseEvent& event ); | |
| 54 void OnMotion( wxMouseEvent& event ); | 60 void OnMotion( wxMouseEvent& event ); |
| 55 void OnWheel( wxMouseEvent& event ); | 61 void OnWheel( wxMouseEvent& event ); |
| 56 void SetImage( int i, wxBitmap bmp ) { m_bmp[i] = bmp; }; | 62 void SetImage( int i, wxBitmap bmp ) { m_bmp[i] = bmp; }; |
| 57 void SetZoom( int m_zoom ); | 63 void SetZoom( int m_zoom ); |
| 58 }; | 64 }; |
| 62 DECLARE_EVENT_TABLE() | 68 DECLARE_EVENT_TABLE() |
| 63 private: | 69 private: |
| 64 bool startup = true; | 70 bool startup = true; |
| 65 wxString m_server; | 71 wxString m_server; |
| 66 wxString m_hhs; | 72 wxString m_hhs; |
| 73 wxString m_user; | |
| 67 wxArrayString m_index; | 74 wxArrayString m_index; |
| 75 wxTimer m_timer; | |
| 68 | 76 |
| 69 protected: | 77 protected: |
| 70 enum { | 78 enum { |
| 71 ID_SEARCH = wxID_HIGHEST + 100, | 79 ID_SEARCH = wxID_HIGHEST + 100, |
| 72 ID_LIST, | 80 ID_LIST, |
| 73 ID_NBOOK, | 81 ID_NBOOK, |
| 74 ID_SLDR, | 82 ID_SLDR, |
| 75 ID_PRINT, | 83 ID_TIMER, |
| 84 ID_LOGOUT, | |
| 76 ID_TEST, | 85 ID_TEST, |
| 77 }; | 86 }; |
| 78 | 87 |
| 79 MySearchCtrl* m_searchCtrl; | 88 MySearchCtrl* m_searchCtrl; |
| 80 MyStaticBitmap* m_staticBitmap1; | 89 MyStaticBitmap* m_staticBitmap1; |
| 98 wxDataViewColumn* m_dataViewListColumnNo; | 107 wxDataViewColumn* m_dataViewListColumnNo; |
| 99 wxDataViewColumn* m_dataViewListColumnDate; | 108 wxDataViewColumn* m_dataViewListColumnDate; |
| 100 wxTextCtrl* m_textCtrlLog; | 109 wxTextCtrl* m_textCtrlLog; |
| 101 wxSlider* m_slider; | 110 wxSlider* m_slider; |
| 102 wxButton* m_buttonPrint; | 111 wxButton* m_buttonPrint; |
| 112 wxButton* m_buttonLogout; | |
| 103 wxButton* m_buttonTest; | 113 wxButton* m_buttonTest; |
| 104 | 114 |
| 105 public: | 115 public: |
| 106 MainFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT( "Searcher Remote" ), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); | 116 MainFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT( "Searcher Remote" ), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); |
| 107 ~MainFrame(); | 117 ~MainFrame(); |
| 118 | |
| 108 void SetServer( wxString server ) { m_server = server; }; | 119 void SetServer( wxString server ) { m_server = server; }; |
| 120 void SetUser( wxString user ) { m_user = user; }; | |
| 109 void CreateControls( void ); | 121 void CreateControls( void ); |
| 110 void Cmd( wxString cmd ); | 122 void Cmd( wxString cmd ); |
| 111 void Search( void ); | 123 void Search( void ); |
| 112 void LoadIndex( void ); | 124 void LoadDB( void ); |
| 113 void LoadBitmap( wxScrolledWindow* sc, wxStaticBitmap* sb, wxString file ); | 125 void LoadBitmap( wxScrolledWindow* sc, wxStaticBitmap* sb, wxString file ); |
| 114 void LoadBitmaps( wxString date ); | 126 void LoadBitmaps( wxString date ); |
| 115 void GetImages( wxString hhs, wxString date ); | 127 void GetImages( wxString hhs, wxString date ); |
| 128 void PrintImages( void ); | |
| 116 void RemoveFile( wxString pattern ); | 129 void RemoveFile( wxString pattern ); |
| 117 void SaveConfig( wxCloseEvent& event ); | |
| 118 void InDevelop( bool ); | 130 void InDevelop( bool ); |
| 119 | 131 |
| 120 void OnItemSelected( wxDataViewEvent& event ); | 132 void OnItemSelected( wxDataViewEvent& event ); |
| 121 void OnItemDClicked( wxDataViewEvent& event ); | 133 void OnItemDClicked( wxDataViewEvent& event ); |
| 122 void OnNBookChanged( wxBookCtrlEvent& event ); | 134 void OnNBookChanged( wxBookCtrlEvent& event ); |
| 123 //void OnIdle( wxIdleEvent& event ); | 135 void OnPrint( wxCommandEvent& event ); |
| 136 void OnClose( wxCloseEvent& event ); // save config | |
| 137 void OnIdle( wxIdleEvent& event ); | |
| 138 void OnTimer( wxTimerEvent& event ); | |
| 139 void OnLogout( wxCommandEvent& event ); | |
| 124 void OnTestButton( wxCommandEvent& event ); | 140 void OnTestButton( wxCommandEvent& event ); |
| 125 }; | 141 }; |
| 126 | 142 |
| 127 | 143 |
| 128 #endif // __RSEARCH_H__ | 144 #endif // __RSEARCH_H__ |
