Mercurial > mercurial > hgweb_rsearcher.cgi
comparison include/rsearcher.h @ 9:ae89ce4793d8
add satellite-view.
author | pyon@macmini |
---|---|
date | Wed, 31 Oct 2018 20:10:29 +0900 |
parents | 82f9af6aa7e4 |
children | 36811fd22bd2 |
comparison
equal
deleted
inserted
replaced
8:82f9af6aa7e4 | 9:ae89ce4793d8 |
---|---|
1 // Filename : rsearcher.h | 1 // Filename : rsearcher.h |
2 // Last Change: 2018-10-30 08:48:18. | 2 // Last Change: 2018-10-31 16:38:57. |
3 // | 3 // |
4 | 4 |
5 #ifndef __RSEARCH_H__ | 5 #ifndef __RSEARCH_H__ |
6 #define __RSEARCH_H__ | 6 #define __RSEARCH_H__ |
7 | 7 |
61 class MyStaticBitmap : public wxStaticBitmap | 61 class MyStaticBitmap : public wxStaticBitmap |
62 { | 62 { |
63 private: | 63 private: |
64 int m_dragx, m_dragy; // for image drag | 64 int m_dragx, m_dragy; // for image drag |
65 int cx, cy; // for mouse-gesture | 65 int cx, cy; // for mouse-gesture |
66 bool with_stl = false; | |
66 wxBitmap m_bmp0; | 67 wxBitmap m_bmp0; |
67 wxScrolledWindow* m_parent; | 68 wxScrolledWindow* m_parent; |
68 | 69 |
69 public: | 70 public: |
70 int zoom = 0; | 71 int zoom = 0; |
73 MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name ); | 74 MyStaticBitmap( wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name ); |
74 ~MyStaticBitmap(); | 75 ~MyStaticBitmap(); |
75 | 76 |
76 void OnLeftDown( wxMouseEvent& event ); | 77 void OnLeftDown( wxMouseEvent& event ); |
77 void OnLeftUp( wxMouseEvent& event ); | 78 void OnLeftUp( wxMouseEvent& event ); |
79 void OnLeftDClick( wxMouseEvent& event ); | |
80 void OnRightDClick( wxMouseEvent& event ); | |
78 void OnStartRGesture( wxMouseEvent& event ); | 81 void OnStartRGesture( wxMouseEvent& event ); |
79 void OnEndRGesture( wxMouseEvent& event ); | 82 void OnEndRGesture( wxMouseEvent& event ); |
80 void OnMotion( wxMouseEvent& event ); | 83 void OnMotion( wxMouseEvent& event ); |
81 void OnWheel( wxMouseEvent& event ); | 84 void OnWheel( wxMouseEvent& event ); |
82 void SetOrigImage( wxBitmap bmp ) { m_bmp0 = bmp; }; | 85 void SetOrigImage( wxBitmap bmp ) { m_bmp0 = bmp; }; |
83 wxBitmap GetOrigImage( void ) { return m_bmp0; }; | 86 wxBitmap GetOrigImage( void ) { return m_bmp0; }; |
84 void ChangeBook( int i ); | 87 void ChangeBook( int i ); |
88 void WithSatellite( bool sw ) { with_stl = sw; }; | |
89 }; | |
90 | |
91 class StlFrame : public wxFrame | |
92 { | |
93 private: | |
94 wxScrolledWindow* m_scrolledWindow; | |
95 MyStaticBitmap* m_staticBitmap; | |
96 | |
97 public: | |
98 StlFrame( 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 ); | |
99 ~StlFrame(); | |
100 | |
101 void SetBitmap( wxBitmap bmp ) { m_staticBitmap->SetBitmap( bmp ); }; | |
102 void SetScroll( int w, int h ) { m_scrolledWindow->SetScrollbars( 10, 10, (int)w / 10, (int)h / 10 ); }; | |
85 }; | 103 }; |
86 | 104 |
87 class MainFrame : public wxFrame | 105 class MainFrame : public wxFrame |
88 { | 106 { |
89 DECLARE_EVENT_TABLE() | 107 DECLARE_EVENT_TABLE() |
128 wxSlider* m_slider; | 146 wxSlider* m_slider; |
129 wxButton* m_buttonFocus; | 147 wxButton* m_buttonFocus; |
130 wxButton* m_buttonPzoom; | 148 wxButton* m_buttonPzoom; |
131 wxButton* m_buttonMzoom; | 149 wxButton* m_buttonMzoom; |
132 wxButton* m_buttonDark; | 150 wxButton* m_buttonDark; |
151 wxButton* m_buttonSatellite; | |
133 wxButton* m_buttonHelp; | 152 wxButton* m_buttonHelp; |
134 wxButton* m_buttonClose; | 153 wxButton* m_buttonClose; |
135 wxButton* m_buttonLogout; | 154 wxButton* m_buttonLogout; |
136 | 155 |
137 public: | 156 public: |
138 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 ); | 157 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 ); |
139 ~MainFrame(); | 158 ~MainFrame(); |
140 | 159 |
141 void SetServer( wxString addr, int port ) { http.SetServer( addr, port ); m_server = wxString::Format(wxT("%s:%d"),addr,port);}; | 160 void SetServer( wxString addr, int port ) { http.SetServer( addr, port ); m_server = wxString::Format(wxT("%s:%d"),addr,port);}; |
142 void GetDB( void ) { http.GetDB(); }; | 161 bool GetDB( void ) { return http.GetDB(); }; |
143 void SetUser( wxString user ) { m_user = user; WriteLog( wxT( "[login] " ) + m_user ); }; | 162 void SetUser( wxString user ) { m_user = user; WriteLog( wxT( "[login] " ) + m_user ); }; |
144 void CreateControls( void ); | 163 void CreateControls( void ); |
145 void SetAccelerator( void ); | 164 void SetAccelerator( void ); |
146 void Cmd( wxString cmd ); | 165 void Cmd( wxString cmd ); |
147 void Search( void ); | 166 void Search( void ); |
150 bool LoadBitmap( wxScrolledWindow* sc, MyStaticBitmap* sb, wxString file ); | 169 bool LoadBitmap( wxScrolledWindow* sc, MyStaticBitmap* sb, wxString file ); |
151 bool LoadBitmaps( wxString date, bool reload ); | 170 bool LoadBitmaps( wxString date, bool reload ); |
152 void ChangeCZoom( int z ); | 171 void ChangeCZoom( int z ); |
153 void ChangeZoom( wxScrolledWindow* sc, MyStaticBitmap* sb, int z ); | 172 void ChangeZoom( wxScrolledWindow* sc, MyStaticBitmap* sb, int z ); |
154 void ChangeColor( MyStaticBitmap* sb ); | 173 void ChangeColor( MyStaticBitmap* sb ); |
155 void GetImages2( wxString hhs, wxString date ); | |
156 void GetImages( wxString hhs, wxString date ); | 174 void GetImages( wxString hhs, wxString date ); |
157 void PrintImages( void ); | 175 void PrintImages( void ); |
158 void WriteLog( wxString msg ); | 176 void WriteLog( wxString msg ); |
159 void Close( void ); | 177 void Close( void ); |
160 void InDevelop( bool ); | 178 void InDevelop( bool ); |
172 // for shortcut-key | 190 // for shortcut-key |
173 void OnFocus( wxCommandEvent& event ); | 191 void OnFocus( wxCommandEvent& event ); |
174 void OnPlusZoom( wxCommandEvent& event ); | 192 void OnPlusZoom( wxCommandEvent& event ); |
175 void OnMinusZoom( wxCommandEvent& event ); | 193 void OnMinusZoom( wxCommandEvent& event ); |
176 void OnDark( wxCommandEvent& event ); | 194 void OnDark( wxCommandEvent& event ); |
195 void OnSatellite( wxCommandEvent& event ); | |
177 void OnHelp( wxCommandEvent& event ); | 196 void OnHelp( wxCommandEvent& event ); |
178 void OnLogout( wxCommandEvent& event ); | 197 void OnLogout( wxCommandEvent& event ); |
179 }; | 198 }; |
180 | 199 |
181 #endif // __RSEARCH_H__ | 200 #endif // __RSEARCH_H__ |