0
|
1 // Filename : rsearcher.h
|
2
|
2 // Last Change: 2018-10-02 Tue 19:36:21.
|
0
|
3 //
|
|
4
|
|
5 #ifndef __RSEARCH_H__
|
|
6 #define __RSEARCH_H__
|
|
7
|
|
8 #include <wx/artprov.h>
|
|
9 #include <wx/xrc/xmlres.h>
|
|
10 #include <wx/string.h>
|
|
11 #include <wx/srchctrl.h>
|
|
12 #include <wx/gdicmn.h>
|
|
13 #include <wx/font.h>
|
|
14 #include <wx/colour.h>
|
|
15 #include <wx/settings.h>
|
|
16 #include <wx/textctrl.h>
|
|
17 #include <wx/button.h>
|
|
18 #include <wx/notebook.h>
|
|
19 #include <wx/dataview.h>
|
|
20 #include <wx/slider.h>
|
|
21 #include <wx/sizer.h>
|
|
22 #include <wx/html/htmlwin.h>
|
|
23 #include <wx/frame.h>
|
|
24 #include <wx/statbmp.h>
|
|
25 #include <wx/msgdlg.h>
|
2
|
26 #include <wx/filefn.h>
|
0
|
27 #include <wx/regex.h>
|
2
|
28 #include <wx/textfile.h>
|
0
|
29
|
|
30 class MySearchCtrl : public wxSearchCtrl
|
|
31 {
|
|
32 DECLARE_EVENT_TABLE()
|
|
33 public:
|
|
34 MySearchCtrl( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style );
|
|
35 ~MySearchCtrl();
|
|
36
|
|
37 void OnKey( wxKeyEvent& event );
|
|
38 };
|
|
39
|
|
40 class MyStaticBitmap : public wxStaticBitmap
|
|
41 {
|
|
42 private:
|
|
43 int m_dragx, m_dragy;
|
|
44 int m_zoom = 0;
|
|
45 wxBitmap m_bmp[5];
|
|
46 wxScrolledWindow* m_parent;
|
|
47
|
|
48 public:
|
|
49 MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name );
|
|
50 ~MyStaticBitmap();
|
|
51
|
|
52 void OnLeftDown( wxMouseEvent& event );
|
|
53 void OnLeftUp( wxMouseEvent& event );
|
|
54 void OnMotion( wxMouseEvent& event );
|
|
55 void OnWheel( wxMouseEvent& event );
|
|
56 void SetImage( int i, wxBitmap bmp ) { m_bmp[i] = bmp; };
|
|
57 void SetZoom( int m_zoom );
|
|
58 };
|
|
59
|
|
60 class MainFrame : public wxFrame
|
|
61 {
|
|
62 DECLARE_EVENT_TABLE()
|
|
63 private:
|
2
|
64 bool startup = true;
|
|
65 wxString m_server;
|
|
66 wxString m_hhs;
|
|
67 wxArrayString m_index;
|
0
|
68
|
|
69 protected:
|
|
70 enum {
|
|
71 ID_SEARCH = wxID_HIGHEST + 100,
|
|
72 ID_LIST,
|
|
73 ID_NBOOK,
|
|
74 ID_SLDR,
|
|
75 ID_PRINT,
|
|
76 ID_TEST,
|
|
77 };
|
|
78
|
|
79 MySearchCtrl* m_searchCtrl;
|
|
80 MyStaticBitmap* m_staticBitmap1;
|
|
81 MyStaticBitmap* m_staticBitmap2;
|
|
82 MyStaticBitmap* m_staticBitmap3;
|
|
83 MyStaticBitmap* m_staticBitmap4;
|
|
84 MyStaticBitmap* m_staticBitmap5;
|
1
|
85 MyStaticBitmap* m_staticBitmap6;
|
0
|
86
|
|
87 wxNotebook* m_notebook;
|
|
88 wxScrolledWindow* m_scrolledWindow1;
|
|
89 wxScrolledWindow* m_scrolledWindow2;
|
|
90 wxScrolledWindow* m_scrolledWindow3;
|
|
91 wxScrolledWindow* m_scrolledWindow4;
|
|
92 wxScrolledWindow* m_scrolledWindow5;
|
|
93 wxScrolledWindow* m_scrolledWindow6;
|
|
94
|
|
95 wxTextCtrl* m_textCtrlName;
|
|
96 wxTextCtrl* m_textCtrlAddr;
|
|
97 wxDataViewListCtrl* m_dataViewListCtrl;
|
|
98 wxDataViewColumn* m_dataViewListColumnNo;
|
|
99 wxDataViewColumn* m_dataViewListColumnDate;
|
|
100 wxTextCtrl* m_textCtrlLog;
|
|
101 wxSlider* m_slider;
|
|
102 wxButton* m_buttonPrint;
|
1
|
103 wxButton* m_buttonTest;
|
0
|
104
|
|
105 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 );
|
|
107 ~MainFrame();
|
2
|
108 void SetServer( wxString server ) { m_server = server; };
|
|
109 void CreateControls( void );
|
|
110 void Cmd( wxString cmd );
|
|
111 void Search( void );
|
|
112 void LoadIndex( void );
|
|
113 void LoadBitmap( wxScrolledWindow* sc, wxStaticBitmap* sb, wxString file );
|
|
114 void LoadBitmaps( wxString date );
|
|
115 void GetImages( wxString hhs, wxString date );
|
|
116 void RemoveFile( wxString pattern );
|
|
117 void SaveConfig( wxCloseEvent& event );
|
|
118 void InDevelop( bool );
|
|
119
|
|
120 void OnItemSelected( wxDataViewEvent& event );
|
0
|
121 void OnItemDClicked( wxDataViewEvent& event );
|
|
122 void OnNBookChanged( wxBookCtrlEvent& event );
|
|
123 //void OnIdle( wxIdleEvent& event );
|
|
124 void OnTestButton( wxCommandEvent& event );
|
|
125 };
|
|
126
|
|
127
|
|
128 #endif // __RSEARCH_H__
|
|
129
|