Mercurial > mercurial > hgweb_rsearcher.cgi
diff include/rsearcher.h @ 9:ae89ce4793d8
add satellite-view.
author | pyon@macmini |
---|---|
date | Wed, 31 Oct 2018 20:10:29 +0900 |
parents | 82f9af6aa7e4 |
children | 36811fd22bd2 |
line wrap: on
line diff
--- a/include/rsearcher.h Tue Oct 30 17:26:02 2018 +0900 +++ b/include/rsearcher.h Wed Oct 31 20:10:29 2018 +0900 @@ -1,5 +1,5 @@ // Filename : rsearcher.h -// Last Change: 2018-10-30 08:48:18. +// Last Change: 2018-10-31 16:38:57. // #ifndef __RSEARCH_H__ @@ -63,6 +63,7 @@ private: int m_dragx, m_dragy; // for image drag int cx, cy; // for mouse-gesture + bool with_stl = false; wxBitmap m_bmp0; wxScrolledWindow* m_parent; @@ -75,6 +76,8 @@ void OnLeftDown( wxMouseEvent& event ); void OnLeftUp( wxMouseEvent& event ); + void OnLeftDClick( wxMouseEvent& event ); + void OnRightDClick( wxMouseEvent& event ); void OnStartRGesture( wxMouseEvent& event ); void OnEndRGesture( wxMouseEvent& event ); void OnMotion( wxMouseEvent& event ); @@ -82,6 +85,21 @@ void SetOrigImage( wxBitmap bmp ) { m_bmp0 = bmp; }; wxBitmap GetOrigImage( void ) { return m_bmp0; }; void ChangeBook( int i ); + void WithSatellite( bool sw ) { with_stl = sw; }; +}; + +class StlFrame : public wxFrame +{ + private: + wxScrolledWindow* m_scrolledWindow; + MyStaticBitmap* m_staticBitmap; + + public: + 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 ); + ~StlFrame(); + + void SetBitmap( wxBitmap bmp ) { m_staticBitmap->SetBitmap( bmp ); }; + void SetScroll( int w, int h ) { m_scrolledWindow->SetScrollbars( 10, 10, (int)w / 10, (int)h / 10 ); }; }; class MainFrame : public wxFrame @@ -130,6 +148,7 @@ wxButton* m_buttonPzoom; wxButton* m_buttonMzoom; wxButton* m_buttonDark; + wxButton* m_buttonSatellite; wxButton* m_buttonHelp; wxButton* m_buttonClose; wxButton* m_buttonLogout; @@ -139,7 +158,7 @@ ~MainFrame(); void SetServer( wxString addr, int port ) { http.SetServer( addr, port ); m_server = wxString::Format(wxT("%s:%d"),addr,port);}; - void GetDB( void ) { http.GetDB(); }; + bool GetDB( void ) { return http.GetDB(); }; void SetUser( wxString user ) { m_user = user; WriteLog( wxT( "[login] " ) + m_user ); }; void CreateControls( void ); void SetAccelerator( void ); @@ -152,7 +171,6 @@ void ChangeCZoom( int z ); void ChangeZoom( wxScrolledWindow* sc, MyStaticBitmap* sb, int z ); void ChangeColor( MyStaticBitmap* sb ); - void GetImages2( wxString hhs, wxString date ); void GetImages( wxString hhs, wxString date ); void PrintImages( void ); void WriteLog( wxString msg ); @@ -174,6 +192,7 @@ void OnPlusZoom( wxCommandEvent& event ); void OnMinusZoom( wxCommandEvent& event ); void OnDark( wxCommandEvent& event ); + void OnSatellite( wxCommandEvent& event ); void OnHelp( wxCommandEvent& event ); void OnLogout( wxCommandEvent& event ); };