]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui.h
Patch from Andy Ross to allow virtual panel to tilt with mouse view:
[flightgear.git] / src / GUI / gui.h
index 2f8505ea136bf4a2ad7763ef9ae9d75bf6be2959..496c3306cb2eccab6710be5dcc36349f14401311 100644 (file)
 #include <GL/glut.h>           // needed before pu.h
 #include <plib/pu.h>           // plib include
 
+#include <simgear/misc/exception.hxx>
+
 // gui.cxx
 extern void guiInit();
 extern void guiToggleMenu(void);
 extern void mkDialog(const char *txt);
+extern void guiErrorMessage(const char *txt);
+extern void guiErrorMessage(const char *txt, const sg_throwable &throwable);
 extern void ConfirmExitDialog(void);
 
 extern void fgDumpSnapShot();
@@ -56,6 +60,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 +75,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_