camwindow.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999-2006 Id Software, Inc. and contributors.
00003 For a list of contributors, see the accompanying CONTRIBUTORS file.
00004 
00005 This file is part of GtkRadiant.
00006 
00007 GtkRadiant is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation; either version 2 of the License, or
00010 (at your option) any later version.
00011 
00012 GtkRadiant is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with GtkRadiant; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 */
00021 
00022 #if !defined(INCLUDED_CAMWINDOW_H)
00023 #define INCLUDED_CAMWINDOW_H
00024 
00025 #include "math/Vector3.h"
00026 #include "signal/signalfwd.h"
00027 
00028 typedef struct _GtkWidget GtkWidget;
00029 typedef struct _GtkWindow GtkWindow;
00030 
00031 class CamWnd;
00032 CamWnd* NewCamWnd();
00033 void DeleteCamWnd(CamWnd* camwnd);
00034 
00035 void AddCameraMovedCallback(const SignalHandler& handler);
00036 
00037 void CamWnd_Update(CamWnd& camwnd);
00038 
00039 GtkWidget* CamWnd_getWidget(CamWnd& camwnd);
00040 void CamWnd_setParent(CamWnd& camwnd, GtkWindow* parent);
00041 
00042 void GlobalCamera_setCamWnd(CamWnd& camwnd);
00043 
00044 typedef struct _GtkMenu GtkMenu;
00045 typedef struct _GtkToolbar GtkToolbar;
00046 void CamWnd_constructToolbar(GtkToolbar* toolbar);
00047 void CamWnd_registerShortcuts();
00048 
00049 void GlobalCamera_Benchmark();
00050 
00051 const Vector3& Camera_getOrigin(CamWnd& camwnd);
00052 void Camera_setOrigin(CamWnd& camwnd, const Vector3& origin);
00053 
00054 enum {
00055     CAMERA_PITCH = 0, // up / down
00056     CAMERA_YAW = 1, // left / right
00057     CAMERA_ROLL = 2, // fall over
00058 };
00059 
00060 const Vector3& Camera_getAngles(CamWnd& camwnd);
00061 void Camera_setAngles(CamWnd& camwnd, const Vector3& angles);
00062 
00063 
00064 struct camwindow_globals_t {
00065     Vector3 color_cameraback;
00066     Vector3 color_selbrushes3d;
00067 
00068     int m_nCubicScale;  
00070     camwindow_globals_t() :
00071             color_cameraback(0.25f, 0.25f, 0.25f),
00072             color_selbrushes3d(1.0f, 0.f, 0.f),
00073             m_nCubicScale(13) {
00074     }
00075 
00076 };
00077 
00078 extern camwindow_globals_t g_camwindow_globals;
00079 
00080 void CamWnd_Construct();
00081 void CamWnd_Destroy();
00082 
00083 // Constants
00084 const int CAMWND_MINSIZE_X = 240;
00085 const int CAMWND_MINSIZE_Y = 200;
00086 
00087 #endif

Generated by  doxygen 1.6.2