[b0c416c] | 1 | /* cavernlog.h |
---|
[6bec10c] | 2 | * Run cavern inside an Aven window |
---|
| 3 | * |
---|
[fb5887c] | 4 | * Copyright (C) 2005,2006,2010 Olly Betts |
---|
[6bec10c] | 5 | * |
---|
| 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. |
---|
| 10 | * |
---|
| 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. |
---|
| 15 | * |
---|
| 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 |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | #ifndef SURVEX_CAVERNLOG_H |
---|
| 22 | #define SURVEX_CAVERNLOG_H |
---|
| 23 | |
---|
| 24 | #include "wx.h" |
---|
| 25 | #include <wx/html/htmlwin.h> |
---|
| 26 | |
---|
[fb5887c] | 27 | class MainFrm; |
---|
| 28 | |
---|
[6bec10c] | 29 | class CavernLogWindow : public wxHtmlWindow { |
---|
[fb5887c] | 30 | wxString filename; |
---|
| 31 | |
---|
| 32 | MainFrm * mainfrm; |
---|
| 33 | |
---|
[d7b53e3] | 34 | bool init_done; |
---|
| 35 | |
---|
| 36 | wxString survey; |
---|
| 37 | |
---|
[6bec10c] | 38 | public: |
---|
[d7b53e3] | 39 | CavernLogWindow(MainFrm * mainfrm_, const wxString & survey_, wxWindow * parent); |
---|
[6bec10c] | 40 | |
---|
[438c9ed] | 41 | /** Process survey data in file. |
---|
| 42 | * |
---|
| 43 | * @return -2 on failure to run cavern, -1 on error from cavern, or the |
---|
| 44 | * number of warnings if no errors. |
---|
| 45 | */ |
---|
[5627cbb] | 46 | int process(const wxString &file); |
---|
[6bec10c] | 47 | |
---|
| 48 | virtual void OnLinkClicked(const wxHtmlLinkInfo &link); |
---|
[fb5887c] | 49 | |
---|
[81e1aa4] | 50 | void OnReprocess(wxCommandEvent &); |
---|
[fb5887c] | 51 | |
---|
| 52 | void OnOK(wxCommandEvent &); |
---|
| 53 | |
---|
| 54 | DECLARE_EVENT_TABLE() |
---|
[6bec10c] | 55 | }; |
---|
| 56 | |
---|
| 57 | #endif |
---|