//*****************************************************************************************
// Truevision - a 3d modeler for gnome and povray
//
// main.h
//
// Vincent LE PRINCE <vincentleprince@users.sourceforge.net>
// Copyright (C) 2000-2001 Vincent LE PRINCE
// This file is part of the TRUEVISION Package

//   This program is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; either version 2 of the License, or
//   (at your option) any later version.
//
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   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.  */ 
//*******************************************************************************************
#ifndef MAIN_H
#define MAIN_H

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

using namespace std;
#include "gnome.h"
#include <stdlib.h>
#include <iostream>
#include <libgnome/gnome-i18n.h>
#include <locale.h>
#include <glib.h>

// Definitions
#define APP_NAME "Truevision"
#define APP_COPY "(c) 2000 The Free Software Foundation"
#define APP_DESCR "3D modeler for Gnome"
#define APP_AUTHORS { "Vincent LE PRINCE", NULL }

// Global objects base definitions
// these objects are to be called from anywhere in the sources
// with a definition like 'PREF_DEF'
// Need main.h inclusion
class app_object {
	public:
		virtual ~app_object() {}
		virtual void pref_changed() {}
};


// Global objects
// & program parameters
struct app_objs {
	GnomeProgram *app;
	int argc;
	char **argv;
	char **envp;
	app_object *interf;
	app_object *prefer;
	app_object *vmanager;
	app_object *proppanel;
	app_object *toolbar;
	app_object *obj3dlist;
	app_object *scene;
	app_object *texlist;
	app_object *povfe;
	app_object *matlib;
	app_object *undoman;
};


// General use functions
// dialog boxes for warnings, fatal errors & about dialog.
void app_exit();
void app_fatal_err( const char *message );
void app_warning( const char *message );
void app_warning( const char *message, const char *message2 );
void about();


#endif
