]> git.mxchange.org Git - flightgear.git/blob - src/GUI/gui.h
More property node optimizations.
[flightgear.git] / src / GUI / gui.h
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., 675 Mass Ave, Cambridge, MA 02139, 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 #ifdef HAVE_WINDOWS_H
33 #  include <windows.h>
34 #endif
35
36 #include <GL/glut.h>            // needed before pu.h
37 #include <plib/pu.h>            // plib include
38
39 // gui.cxx
40 extern void guiInit();
41 extern void guiToggleMenu(void);
42 extern void mkDialog(const char *txt);
43 extern void ConfirmExitDialog(void);
44
45 extern void fgDumpSnapShot();
46
47 extern puFont guiFnt;
48 extern fntTexFont *guiFntHandle;
49 extern int gui_menu_on;
50
51 // GLOBAL COMMON DIALOG BOX TEXT STRINGS
52 extern char *gui_msg_OK;     // "OK"
53 extern char *gui_msg_NO;     // "NO"
54 extern char *gui_msg_YES;    // "YES"
55 extern char *gui_msg_CANCEL; // "CANCEL"
56 extern char *gui_msg_RESET;  // "RESET"
57
58 // mouse.cxx
59 extern void guiMotionFunc ( int x, int y );
60 extern void guiMouseFunc(int button, int updown, int x, int y);
61 extern void maybeToggleMouse( void );
62 extern void BusyCursor( int restore );
63 extern void CenterView( void );
64 extern void TurnCursorOn( void );
65 extern void TurnCursorOff( void );
66
67 // MACROS TO HELP KEEP PUI LIVE INTERFACE STACK IN SYNC
68 // These insure that the mouse is active when dialog is shown
69 // and try to the maintain the original mouse state when hidden
70 // These will also repair any damage done to the Panel if active
71
72 // Activate Dialog Box
73 #define FG_PUSH_PUI_DIALOG( X ) \
74     maybeToggleMouse(); \
75     puPushLiveInterface( (X) ) ; \
76     ( X )->reveal()
77
78 // Deactivate Dialog Box
79 #define FG_POP_PUI_DIALOG( X ) \
80     (X)->hide(); \
81     puPopLiveInterface(); \
82     maybeToggleMouse();
83
84 // Finalize Dialog Box Construction 
85 #define FG_FINALIZE_PUI_DIALOG( X ) \
86     ( X )->close(); \
87     ( X )->hide(); \
88     puPopLiveInterface();
89             
90 #endif // _GUI_H_