diff include/rsearcher.h @ 7:29829e98d510

add net.cpp
author pyon@macmini
date Fri, 26 Oct 2018 21:05:11 +0900
parents 9a8b581c1993
children 82f9af6aa7e4
line wrap: on
line diff
--- a/include/rsearcher.h	Tue Oct 23 19:15:22 2018 +0900
+++ b/include/rsearcher.h	Fri Oct 26 21:05:11 2018 +0900
@@ -1,5 +1,5 @@
 // Filename   : rsearcher.h
-// Last Change: 2018-10-23 ‰Î 14:26:02.
+// Last Change: 2018-10-26 ‹à 15:10:47.
 //
 
 #ifndef __RSEARCH_H__
@@ -30,6 +30,7 @@
 #include <wx/textfile.h>
 #include <wx/timer.h>
 #include <wx/hashmap.h>
+#include "net.h"
 
 /* Data Class */
 class HhsClass {
@@ -94,6 +95,7 @@
 		wxArrayString m_index;
 		wxTimer       m_timer;
 		HhsHash       hhash;
+		RsHttp		  http;
 		bool		  m_dark = false;
 	
 	protected:
@@ -124,17 +126,20 @@
 
 		// invisible button for shortcut-key
 		wxSlider*           m_slider;
+		wxButton*           m_buttonFocus;
 		wxButton*           m_buttonPzoom;
 		wxButton*           m_buttonMzoom;
 		wxButton*           m_buttonDark;
 		wxButton*           m_buttonHelp;
+		wxButton*           m_buttonClose;
 		wxButton*           m_buttonLogout;
 	
 	public:
 		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 );
 		~MainFrame();
 
-		void SetServer( wxString server ) { m_server = server; };
+		void SetServer( wxString addr, int port ) { http.SetServer( addr, port ); m_server = wxString::Format(wxT("%s:%d"),addr,port);};
+		void GetDB( void ) { http.GetDB(); };
 		void SetUser( wxString user ) { m_user = user; WriteLog( wxT( "[login] " ) + m_user ); };
 		void CreateControls( void );
 		void SetAccelerator( void );
@@ -147,9 +152,11 @@
 		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 );
+		void Close( void );
         void InDevelop( bool );
 
 		void OnItemSelected( wxDataViewEvent& event );
@@ -157,9 +164,13 @@
         void OnNBookChanged( wxBookCtrlEvent& event );
         void OnPasteSearch( wxCommandEvent& event );
         void OnPrint( wxCommandEvent& event );
-		void OnClose( wxCloseEvent& event );	// save config
+		void OnClose( wxCloseEvent& event );
+		void OnBClose( wxCommandEvent& event );
 		void OnIdle( wxIdleEvent& event );
 		void OnTimer( wxTimerEvent& event );
+
+		// for shortcut-key
+        void OnFocus( wxCommandEvent& event );
         void OnPlusZoom( wxCommandEvent& event );
         void OnMinusZoom( wxCommandEvent& event );
         void OnDark( wxCommandEvent& event );