2 * Run cavern inside an Aven window
4 * Copyright (C) 2005,2006,2010,2015,2016 Olly Betts
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef SURVEX_CAVERNLOG_H
22 #define SURVEX_CAVERNLOG_H
25 #include <wx/html/htmlwin.h>
30 # define CAVERNLOG_USE_THREADS
33 #ifdef CAVERNLOG_USE_THREADS
34 class CavernOutputEvent
;
39 class CavernLogWindow
: public wxHtmlWindow
{
40 #ifdef CAVERNLOG_USE_THREADS
41 friend class CavernThread
;
51 unsigned char buf
[1024];
60 #ifdef CAVERNLOG_USE_THREADS
63 CavernThread
* thread
;
65 wxCriticalSection thread_lock
;
69 CavernLogWindow(MainFrm
* mainfrm_
, const wxString
& survey_
, wxWindow
* parent
);
73 /** Start to process survey data in file. */
74 void process(const wxString
&file
);
76 virtual void OnLinkClicked(const wxHtmlLinkInfo
&link
);
78 void OnReprocess(wxCommandEvent
&);
80 void OnSave(wxCommandEvent
&);
82 void OnOK(wxCommandEvent
&);
84 #ifdef CAVERNLOG_USE_THREADS
85 void OnCavernOutput(wxCommandEvent
& e
);
87 void OnClose(wxCloseEvent
&);
89 void OnIdle(wxIdleEvent
&);