0
|
1 // Filename : rsearcher.h
|
1
|
2 // Last Change: 2018-10-01 Mon 23:08:37.
|
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>
|
|
26 #include <wx/regex.h>
|
|
27
|
|
28 class MySearchCtrl : public wxSearchCtrl
|
|
29 {
|
|
30 DECLARE_EVENT_TABLE()
|
|
31 public:
|
|
32 MySearchCtrl( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style );
|
|
33 ~MySearchCtrl();
|
|
34
|
|
35 void OnKey( wxKeyEvent& event );
|
|
36 };
|
|
37
|
|
38 class MyStaticBitmap : public wxStaticBitmap
|
|
39 {
|
|
40 private:
|
|
41 int m_dragx, m_dragy;
|
|
42 int m_zoom = 0;
|
|
43 wxBitmap m_bmp[5];
|
|
44 wxScrolledWindow* m_parent;
|
|
45
|
|
46 public:
|
|
47 MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name );
|
|
48 ~MyStaticBitmap();
|
|
49
|
|
50 void OnLeftDown( wxMouseEvent& event );
|
|
51 void OnLeftUp( wxMouseEvent& event );
|
|
52 void OnMotion( wxMouseEvent& event );
|
|
53 void OnWheel( wxMouseEvent& event );
|
|
54 void SetImage( int i, wxBitmap bmp ) { m_bmp[i] = bmp; };
|
|
55 void SetZoom( int m_zoom );
|
|
56 };
|
|
57
|
|
58 class MainFrame : public wxFrame
|
|
59 {
|
|
60 DECLARE_EVENT_TABLE()
|
|
61 private:
|
|
62
|
|
63 protected:
|
|
64 enum {
|
|
65 ID_SEARCH = wxID_HIGHEST + 100,
|
|
66 ID_LIST,
|
|
67 ID_NBOOK,
|
|
68 ID_SLDR,
|
|
69 ID_PRINT,
|
|
70 ID_TEST,
|
|
71 };
|
|
72
|
|
73 MySearchCtrl* m_searchCtrl;
|
|
74 MyStaticBitmap* m_staticBitmap1;
|
|
75 MyStaticBitmap* m_staticBitmap2;
|
|
76 MyStaticBitmap* m_staticBitmap3;
|
|
77 MyStaticBitmap* m_staticBitmap4;
|
|
78 MyStaticBitmap* m_staticBitmap5;
|
1
|
79 MyStaticBitmap* m_staticBitmap6;
|
0
|
80
|
|
81 wxNotebook* m_notebook;
|
|
82 wxScrolledWindow* m_scrolledWindow1;
|
|
83 wxScrolledWindow* m_scrolledWindow2;
|
|
84 wxScrolledWindow* m_scrolledWindow3;
|
|
85 wxScrolledWindow* m_scrolledWindow4;
|
|
86 wxScrolledWindow* m_scrolledWindow5;
|
|
87 wxScrolledWindow* m_scrolledWindow6;
|
|
88
|
|
89 wxTextCtrl* m_textCtrlName;
|
|
90 wxTextCtrl* m_textCtrlAddr;
|
|
91 wxDataViewListCtrl* m_dataViewListCtrl;
|
|
92 wxDataViewColumn* m_dataViewListColumnNo;
|
|
93 wxDataViewColumn* m_dataViewListColumnDate;
|
|
94 wxTextCtrl* m_textCtrlLog;
|
|
95 wxSlider* m_slider;
|
|
96 wxButton* m_buttonPrint;
|
1
|
97 wxButton* m_buttonTest;
|
0
|
98
|
|
99 public:
|
|
100 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 );
|
|
101 ~MainFrame();
|
|
102 void OnItemDClicked( wxDataViewEvent& event );
|
|
103 void OnNBookChanged( wxBookCtrlEvent& event );
|
|
104 //void OnIdle( wxIdleEvent& event );
|
|
105 void Cmd( wxString cmd );
|
|
106 void SaveConfig( wxCloseEvent& event );
|
1
|
107 void CreateControls( void );
|
0
|
108 void LoadBitmaps( void );
|
1
|
109 void LoadBitmap( wxScrolledWindow* sc, wxStaticBitmap* sb, wxString file );
|
0
|
110 void GetImage( wxString hhs, wxString no );
|
|
111 void OnTestButton( wxCommandEvent& event );
|
1
|
112 void InDevelop( bool );
|
0
|
113 };
|
|
114
|
|
115
|
|
116 #endif // __RSEARCH_H__
|
|
117
|