]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui.h
- Added ultra-light traffic is now a separate traffic class that can have its
[flightgear.git] / src / GUI / gui.h
index 8a592de0f4e13406670213af0c31956e553e0db6..31e65bb10f3c2197d41282a198ab71da1463827c 100644 (file)
@@ -16,7 +16,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  * $Id$
  **************************************************************************/
 #ifndef _GUI_H_
 #define _GUI_H_
 
-#include <pu.h>                        // plib include
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+#  include <windows.h>
+#endif
+
+#include <plib/pu.h>
+
+#include <simgear/structure/exception.hxx>
+
+#define TR_HIRES_SNAP   1
 
-extern void guiInit();
-extern void guiMotionFunc ( int x, int y );
-extern void guiMouseFunc(int button, int updown, int x, int y);
-extern void maybeToggleMouse( void );
-extern void BusyCursor( int restore );
 
-extern void guiToggleMenu(void);
+// gui.cxx
+extern void guiInit();
 extern void mkDialog(const char *txt);
-extern void ConfirmExitDialog(void);
-extern void guiFixPanel( void );
+extern void guiErrorMessage(const char *txt);
+extern void guiErrorMessage(const char *txt, const sg_throwable &throwable);
+
+extern void fgDumpSnapShot();
+extern void fgDumpSceneGraph();
 
 extern puFont guiFnt;
 extern fntTexFont *guiFntHandle;
+extern int gui_menu_on;
+
+// from gui_funcs.cxx
+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 helpCb(puObject *);
+
+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"
@@ -48,28 +78,36 @@ extern char *gui_msg_YES;    // "YES"
 extern char *gui_msg_CANCEL; // "CANCEL"
 extern char *gui_msg_RESET;  // "RESET"
 
+// mouse.cxx
+extern void guiInitMouse(int width, int height);
+extern void maybeToggleMouse( void );
+extern void TurnCursorOn( void );
+extern void TurnCursorOff( void );
+
 // MACROS TO HELP KEEP PUI LIVE INTERFACE STACK IN SYNC
 // These insure that the mouse is active when dialog is shown
 // and try to the maintain the original mouse state when hidden
 // 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(); \
-    guiFixPanel(); \
+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_