2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 // precompiled headers
26 #include <gdk/gdkkeysyms.h>
31 #if defined(__linux__) || defined(__APPLE__)
33 // Necessary for proper boolean type declaration
36 typedef void* HMODULE;
40 #define MB_OK 0x00000000L
41 #define MB_OKCANCEL 0x00000001L
42 #define MB_ABORTRETRYIGNORE 0x00000002L
43 #define MB_YESNOCANCEL 0x00000003L
44 #define MB_YESNO 0x00000004L
45 #define MB_RETRYCANCEL 0x00000005L
48 #define MB_ICONHAND 0x00000010L
49 #define MB_ICONQUESTION 0x00000020L
50 #define MB_ICONEXCLAMATION 0x00000030L
51 #define MB_ICONASTERISK 0x00000040L
53 #define MB_USERICON 0x00000080L
54 #define MB_ICONWARNING MB_ICONEXCLAMATION
55 #define MB_ICONERROR MB_ICONHAND
56 #define MB_ICONINFORMATION MB_ICONASTERISK
57 #define MB_ICONSTOP MB_ICONHAND
59 #define MB_TYPEMASK 0x0000000FL
60 #define MB_ICONMASK 0x000000F0L
61 #define MB_DEFMASK 0x00000F00L
62 #define MB_MODEMASK 0x00003000L
63 #define MB_MISCMASK 0x0000C000L
73 typedef struct tagRECT
79 } RECT, *PRECT, *LPRECT;
84 // FIXME TTimo: drop this
85 extern "C" void Sys_Printf (char *text, ...);
89 #include "qerplugin.h"
92 #include "iselectedface.h"
93 #include "isurfaceplugin.h"
97 // the implementation of a IWindowListener interface to use with the native UI
98 // TODO: move in it's own set of files?
99 // NOTE: I'm not too sure about the bool flags being any use.. they are supposed to tell if we handle the event or not
100 class CWindowListener : public IWindowListener
104 // Increment the number of references to this object
105 void IncRef () { refCount++; }
106 // Decrement the reference count
107 void DecRef () { if ( --refCount <= 0 ) delete this; }
108 // IWindowListener ---------------------------------------
109 bool OnLButtonDown(guint32 nFlags, double x, double y);
110 bool OnMButtonDown(guint32 nFlags, double x, double y) { return false; }
111 bool OnRButtonDown(guint32 nFlags, double x, double y);
112 bool OnLButtonUp(guint32 nFlags, double x, double y);
113 bool OnMButtonUp(guint32 nFlags, double x, double y) { return false; }
114 bool OnRButtonUp(guint32 nFlags, double x, double y);
115 bool OnMouseMove(guint32 nFlags, double x, double y);
116 bool OnKeyPressed(char *s);
124 float data[MAX_POINTS_ON_WINDING][2];
126 #include "ControlPointsManager.h"
128 extern _QERQglTable g_QglTable;
129 extern _QERFuncTable_1 g_FuncTable;
131 // NOTE: these are used by the CControlPointsManager classes, not very C++ish
132 extern bool g_bPrefsUpdateCameraView;
133 extern _QERSelectedFaceTable g_SelectedFaceTable;
134 extern _QERFaceData g_CancelFaceData;
136 #define Sys_Printf g_FuncTable.m_pfnSysPrintf
137 #define Sys_FPrintf g_FuncTable.m_pfnSysFPrintf
139 // call to validate the current changes into the editor
140 extern void Textool_Validate();
141 extern void Textool_Cancel();
143 class CSynapseClientTexTool : public CSynapseClient
146 // CSynapseClient API
147 bool RequestAPI(APIDescriptor_t *pAPI);
148 const char* GetInfo();
150 CSynapseClientTexTool() { }
151 virtual ~CSynapseClientTexTool() { }
154 extern IWindow *g_pToolWnd;