]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui.h
Fix line endings
[flightgear.git] / src / GUI / gui.h
index 2f8505ea136bf4a2ad7763ef9ae9d75bf6be2959..4220b4714578c0609b08e2ee605e5a037e360e5e 100644 (file)
 #  include <windows.h>
 #endif
 
-#include <GL/glut.h>           // needed before pu.h
-#include <plib/pu.h>           // plib include
+#include <plib/pu.h>
+
+#include <simgear/structure/exception.hxx>
+
+#define TR_HIRES_SNAP   1
+
 
 // gui.cxx
 extern void guiInit();
-extern void guiToggleMenu(void);
 extern void mkDialog(const char *txt);
-extern void ConfirmExitDialog(void);
+extern void guiErrorMessage(const char *txt);
+extern void guiErrorMessage(const char *txt, const sg_throwable &throwable);
 
 extern void fgDumpSnapShot();
 
@@ -48,6 +52,45 @@ extern puFont guiFnt;
 extern fntTexFont *guiFntHandle;
 extern int gui_menu_on;
 
+// from gui_funcs.cxx
+extern void saveFlight(puObject *);
+extern void loadFlight(puObject *);
+extern void reInit(puObject *);
+extern void fgDumpSnapShotWrapper(puObject *);
+#ifdef TR_HIRES_SNAP
+extern void fgHiResDumpWrapper(puObject *);
+extern void fgHiResDump();
+#endif
+#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+extern void printScreen(puObject *);
+#endif
+extern void guiTogglePanel(puObject *);
+extern void PilotOffsetAdjust(puObject *);
+extern void fgHUDalphaAdjust(puObject *);
+extern void prop_pickerView(puObject *);
+extern void NewAirport(puObject *);
+#ifdef FG_NETWORK_OLK
+extern void net_display_toggle(puObject *);
+extern void NewCallSign(puObject *);
+extern void net_fgd_scan(puObject *);
+extern void net_register(puObject *);
+extern void net_unregister(puObject *);
+#endif
+extern void NewAltitude(puObject *);
+extern void AddWayPoint(puObject *);
+extern void PopWayPoint(puObject *);
+extern void ClearRoute(puObject *);
+extern void fgAPAdjust(puObject *);
+extern void fgLatLonFormatToggle(puObject *);
+extern void helpCb(puObject *);
+extern void fgReshape(int, int);
+
+typedef struct {
+        char *name;
+        void (*fn)(puObject *);
+} __fg_gui_fn_t;
+extern const __fg_gui_fn_t __fg_gui_fn[];
+
 // GLOBAL COMMON DIALOG BOX TEXT STRINGS
 extern char *gui_msg_OK;     // "OK"
 extern char *gui_msg_NO;     // "NO"
@@ -56,6 +99,7 @@ extern char *gui_msg_CANCEL; // "CANCEL"
 extern char *gui_msg_RESET;  // "RESET"
 
 // mouse.cxx
+extern void guiInitMouse(int width, int height);
 extern void guiMotionFunc ( int x, int y );
 extern void guiMouseFunc(int button, int updown, int x, int y);
 extern void maybeToggleMouse( void );
@@ -70,21 +114,24 @@ extern void TurnCursorOff( void );
 // These will also repair any damage done to the Panel if active
 
 // Activate Dialog Box
-#define FG_PUSH_PUI_DIALOG( X ) \
-    maybeToggleMouse(); \
-    puPushLiveInterface( (X) ) ; \
-    ( X )->reveal()
+inline void FG_PUSH_PUI_DIALOG( puObject *X ) {
+    maybeToggleMouse(); 
+    puPushLiveInterface( (puInterface *)X ) ; 
+    X->reveal() ;
+}
 
 // Deactivate Dialog Box
-#define FG_POP_PUI_DIALOG( X ) \
-    (X)->hide(); \
-    puPopLiveInterface(); \
+inline void FG_POP_PUI_DIALOG( puObject *X ) {
+    X->hide(); 
+    puPopLiveInterface(); 
     maybeToggleMouse();
+}
 
 // Finalize Dialog Box Construction 
-#define FG_FINALIZE_PUI_DIALOG( X ) \
-    ( X )->close(); \
-    ( X )->hide(); \
+inline void FG_FINALIZE_PUI_DIALOG( puObject *X ) {
+    ((puGroup *)X)->close();
+    X->hide();
     puPopLiveInterface();
+}
             
 #endif // _GUI_H_