| 1 | /* |
|---|
| 2 | // aven.h |
|---|
| 3 | // |
|---|
| 4 | // Main class for Aven. |
|---|
| 5 | // |
|---|
| 6 | // Copyright (C) 2001, Mark R. Shinwell. |
|---|
| 7 | // Copyright (C) 2002,2003,2004,2005,2006 Olly Betts |
|---|
| 8 | // |
|---|
| 9 | // This program is free software; you can redistribute it and/or modify |
|---|
| 10 | // it under the terms of the GNU General Public License as published by |
|---|
| 11 | // the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | // (at your option) any later version. |
|---|
| 13 | // |
|---|
| 14 | // This program is distributed in the hope that it will be useful, |
|---|
| 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | // GNU General Public License for more details. |
|---|
| 18 | // |
|---|
| 19 | // You should have received a copy of the GNU General Public License |
|---|
| 20 | // along with this program; if not, write to the Free Software |
|---|
| 21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 22 | */ |
|---|
| 23 | |
|---|
| 24 | /* Note: this header needs to be safe to include from C code */ |
|---|
| 25 | |
|---|
| 26 | #ifndef aven_h |
|---|
| 27 | #define aven_h |
|---|
| 28 | |
|---|
| 29 | #include <stdarg.h> |
|---|
| 30 | |
|---|
| 31 | #define APP_NAME "Aven" |
|---|
| 32 | #define APP_IMAGE "aven.png" |
|---|
| 33 | #define APP_ABOUT_IMAGE "aven-about.png" |
|---|
| 34 | |
|---|
| 35 | extern |
|---|
| 36 | #ifdef __cplusplus |
|---|
| 37 | "C" |
|---|
| 38 | #endif |
|---|
| 39 | void aven_v_report(int severity, const char *fnm, int line, int en, |
|---|
| 40 | va_list ap); |
|---|
| 41 | |
|---|
| 42 | #ifdef __cplusplus |
|---|
| 43 | |
|---|
| 44 | #include "wx.h" |
|---|
| 45 | |
|---|
| 46 | class MainFrm; |
|---|
| 47 | |
|---|
| 48 | class Aven : public wxGLApp { |
|---|
| 49 | MainFrm * m_Frame; |
|---|
| 50 | // This must be a pointer, otherwise it gets initialised too early and |
|---|
| 51 | // we get a segfault on MS Windows when it tries to look up paper |
|---|
| 52 | // sizes in wxThePrintPaperDatabase which is still NULL at the point |
|---|
| 53 | // when the Aven class is constructed. |
|---|
| 54 | wxPageSetupDialogData * m_pageSetupData; |
|---|
| 55 | |
|---|
| 56 | public: |
|---|
| 57 | Aven(); |
|---|
| 58 | ~Aven(); |
|---|
| 59 | |
|---|
| 60 | virtual bool Initialize(int& argc, wxChar **argv); |
|---|
| 61 | virtual bool OnInit(); |
|---|
| 62 | |
|---|
| 63 | wxPageSetupDialogData * GetPageSetupDialogData(); |
|---|
| 64 | void SetPageSetupDialogData(const wxPageSetupDialogData & psdd); |
|---|
| 65 | |
|---|
| 66 | void ReportError(const wxString&); |
|---|
| 67 | }; |
|---|
| 68 | |
|---|
| 69 | DECLARE_APP(Aven) |
|---|
| 70 | |
|---|
| 71 | #endif |
|---|
| 72 | |
|---|
| 73 | #endif |
|---|