X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FGUI%2Fgui.h;h=4ea7b588de5558b77bfe53c870855a1c3d79fda3;hb=474789269b7656509f62339c17e62a55b6157d43;hp=496c3306cb2eccab6710be5dcc36349f14401311;hpb=08bbb83b8e3a009c49c30bb6fedec61be59d6ba3;p=flightgear.git diff --git a/src/GUI/gui.h b/src/GUI/gui.h index 496c3306c..4ea7b588d 100644 --- a/src/GUI/gui.h +++ b/src/GUI/gui.h @@ -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$ **************************************************************************/ @@ -29,70 +29,44 @@ # include #endif -#ifdef HAVE_WINDOWS_H -# include -#endif +#include -#include // needed before pu.h -#include // plib include +#include -#include +#define TR_HIRES_SNAP 1 +namespace osg +{ +class GraphicsContext; +} // gui.cxx -extern void guiInit(); -extern void guiToggleMenu(void); +extern void guiStartInit(osg::GraphicsContext*); +extern bool guiFinishInit(); 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(); +extern bool fgDumpSnapShot(); +extern void fgDumpSceneGraph(); +extern void fgDumpTerrainBranch(); extern puFont guiFnt; extern fntTexFont *guiFntHandle; extern int gui_menu_on; -// GLOBAL COMMON DIALOG BOX TEXT STRINGS -extern char *gui_msg_OK; // "OK" -extern char *gui_msg_NO; // "NO" -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 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 CenterView( 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 +// from gui_funcs.cxx +extern void fgDumpSnapShotWrapper(); +#ifdef TR_HIRES_SNAP +extern void fgHiResDumpWrapper(); +extern void fgHiResDump(); +#endif -// Activate Dialog Box -inline void FG_PUSH_PUI_DIALOG( puObject *X ) { - maybeToggleMouse(); - puPushLiveInterface( (puInterface *)X ) ; - X->reveal() ; -} +extern void helpCb(); -// Deactivate Dialog Box -inline void FG_POP_PUI_DIALOG( puObject *X ) { - X->hide(); - puPopLiveInterface(); - maybeToggleMouse(); -} +typedef struct { + const char *name; + void (*fn)(); +} __fg_gui_fn_t; +extern const __fg_gui_fn_t __fg_gui_fn[]; -// Finalize Dialog Box Construction -inline void FG_FINALIZE_PUI_DIALOG( puObject *X ) { - ((puGroup *)X)->close(); - X->hide(); - puPopLiveInterface(); -} - #endif // _GUI_H_