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