1 /************************************************************************** 2 * gui.h 3 * 4 * Written 1998 by Durk Talsma, started Juni, 1998. For the flight gear 5 * project. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation; either version 2 of the 10 * License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $Id$ 22 **************************************************************************/ 23 24 25 #ifndef _GUI_H_ 26 #define _GUI_H_ 27 28 #ifdef HAVE_CONFIG_H 29 # include <config.h> 30 #endif 31 32 #include <simgear/structure/exception.hxx> 33 34 #include "FlightGear_pu.h" 35 36 #define TR_HIRES_SNAP 1 37 38 namespace osg 39 { 40 class GraphicsContext; 41 } 42 // gui.cxx 43 extern bool guiInit(); 44 extern bool openBrowser(const std::string& address); 45 extern void mkDialog(const char *txt); 46 extern void guiErrorMessage(const char *txt); 47 extern void guiErrorMessage(const char *txt, const sg_throwable &throwable); 48 49 extern bool fgDumpSnapShot(); 50 void fgCancelSnapShot(); 51 52 extern void fgDumpSceneGraph(); 53 extern void fgDumpTerrainBranch(); 54 extern void fgPrintVisibleSceneInfoCommand(); 55 56 extern puFont guiFnt; 57 extern fntTexFont *guiFntHandle; 58 extern int gui_menu_on; 59 60 // from gui_funcs.cxx 61 extern void fgDumpSnapShotWrapper(); 62 #ifdef TR_HIRES_SNAP 63 extern void fgHiResDumpWrapper(); 64 extern void fgHiResDump(); 65 #endif 66 67 extern void helpCb(); 68 69 /// synchronize /sim/freeze properties with visiblity 70 /// of the popup-dialog which informs the user 71 void syncPausePopupState(); 72 73 typedef struct { 74 const char *name; 75 void (*fn)(); 76 } __fg_gui_fn_t; 77 extern const __fg_gui_fn_t __fg_gui_fn[]; 78 79 #endif // _GUI_H_ 80