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
26 #include "texwindow.h"
28 #include "camwindow.h"
31 #include "pluginmanager.h"
34 #include "gtkr_vector.h"
37 #define __toascii(c) ((c) & 0x7f)
40 const int RAD_SHIFT = 0x01;
41 const int RAD_ALT = 0x02;
42 const int RAD_CONTROL = 0x04;
43 const int RAD_PRESS = 0x08;
49 unsigned int m_nModifiers;
50 unsigned int m_nCommand;
57 unsigned int m_nVKKey;
60 #define ID_FILE_NEW 0xE100
61 #define ID_FILE_OPEN 0xE101
62 #define ID_FILE_SAVE 0xE103
63 #define ID_EDIT_UNDO 0xE12B
64 #define ID_EDIT_REDO 0xE12C
65 #define ID_HELP 0xE146
66 #define ID_FILE_RECENT1 0xE110
67 #define ID_FILE_RECENT2 0xE111
68 #define ID_FILE_RECENT3 0xE112
69 #define ID_FILE_RECENT4 0xE113
71 #define IDC_BTN_FACEFIT 1143
72 #define ID_ENTITY_START 22800
73 #define ID_ENTITY_END 32000 //leo
74 //#define ID_ENTITY_END 33500
75 #define ID_VIEW_XY 32772
76 #define ID_VIEW_SIDE 32773
77 #define ID_VIEW_FRONT 32774
78 #define ID_CAMERATOGGLE 32775
79 #define ID_VIEW_CAMERATOGGLE 32776
80 #define ID_BUTTON32777 32777
81 #define ID_BUTTON32778 32778
82 #define ID_TEXTURES_POPUP 32780
83 #define ID_POPUP_SELECTION 32782
84 #define ID_VIEW_CHANGE 32783
85 #define ID_VIEW_CAMERAUPDATE 32784
86 #define ID_VIEW_CLIPPER 32785
87 #define ID_PREFS 32786
88 #define ID_TOGGLE_LOCK 32787
89 #define ID_EDIT_MAPINFO 32788
90 #define ID_EDIT_ENTITYINFO 32789
91 #define ID_BRUSH_SCRIPTS 32790
92 #define ID_VIEW_NEXTVIEW 32791
93 #define ID_HELP_COMMANDLIST 32792
94 #define ID_FILE_NEWPROJECT 32793
95 #define ID_SNAPTOGRID 32795
96 #define ID_VIEW_CENTERVIEW 32796
97 #define ID_SPLIT_SELECTED 32823
98 #define ID_CLIP_SELECTED 32824
99 #define ID_FLIP_CLIP 32825
100 #define ID_TOGGLEVIEW_YZ 32831
101 #define ID_TOGGLEVIEW_XZ 32832
102 #define ID_COLORS_GRIDTEXT 32833
103 #define ID_COLORS_BRUSH 32834
104 #define ID_COLORS_SELECTEDBRUSH 32835
105 #define ID_COLORS_CLIPPER 32836
106 #define ID_COLORS_GRIDBLOCK 32837
107 #define ID_COLORS_VIEWNAME 32838
108 #define ID_COLOR_SETORIGINAL 32839
109 #define ID_COLOR_SETQER 32840
110 #define ID_COLOR_SETBLACK 32841
111 #define ID_COLOR_SETYDNAR 37001 /* ydnar */
112 #define ID_BYEBYE 32842
113 #define ID_SELECT_SCALE 32843
114 #define ID_SELECT_MOUSEROTATE 32844
115 #define ID_COLORS_SELECTEDBRUSH3D 32845
116 #define ID_COLORS_CAMERABACK 32846
117 #define ID_TEXTURE_REPLACESELECTED 32859
118 #define ID_TEXTURE_REPLACEALL 32860
119 #define ID_SELECT_MOUSESCALE 32866
120 #define ID_SCALELOCKX 32867
121 #define ID_SCALELOCKY 32868
122 #define ID_SCALELOCKZ 32869
123 #define ID_VIEW_CUBICCLIPPING 32870
124 #define ID_FILE_PROJECTSETTINGS 32875
125 #define ID_VIEW_CUBEOUT 32876
126 #define ID_VIEW_CUBEIN 32877
127 #define ID_NODES_LOADNODES 32878
128 #define ID_NODES_SHOWNODES 32879
129 #define ID_NODES_SHOWLINKS 32880
130 #define ID_NODES_REMOVEALLNODES 32881
131 #define ID_NODES_COUNTNODES 32882
132 #define ID_NODES_GIVEMONEYTONELNO 32883
133 #define ID_FILE_SAVEREGION 32887
134 #define ID_FILE_LOADREGION 32888
135 #define ID_SELECTION_MOVEDOWN 32890
136 #define ID_TOOLBAR_MAIN 32891
137 #define ID_SELECTION_MOVEUP 32892
138 //#define ID_TOOLBAR_TEXTURE 32892
139 #define ID_BRUSH_MAKECONE 32896
140 #define ID_TEXTURES_LOAD 32897
141 #define ID_TOGGLE_ROTATELOCK 32898
142 #define ID_FILE_IMPORTMAP 32911
143 #define ID_FILE_EXPORTMAP 32912
144 #define ID_EDIT_LOADPREFAB 32913
145 #define ID_SELECTION_SELECT_NUDGELEFT 32916
146 #define ID_SELECTION_SELECT_NUDGERIGHT 32917
147 #define ID_SELECTION_SELECT_NUDGEUP 32918
148 #define ID_SELECTION_SELECT_NUDGEDOWN 32919
149 #define ID_TEXTURES_LOADLIST 32920
150 #define ID_DONTSELECTCURVE 32923
151 #define ID_CONVERTCURVES 32924
152 #define ID_PATCH_SHOWBOUNDINGBOX 32926
153 #define ID_CURVE_SIMPLEPATCHMESH 32927
154 #define ID_PATCH_WIREFRAME 32928
155 #define ID_PATCH_WELD 32929
156 #define ID_CURVE_PATCHTUBE 32930
157 #define ID_CURVE_PATCHCONE 32931
158 #define ID_CURVE_PATCHENDCAP 32932
159 #define ID_CURVE_PATCHBEVEL 32933
160 #define ID_PATCH_DRILLDOWN 32936
161 #define ID_CURVE_LOADPATCHFILE 32937
162 #define ID_CURVE_INSERTROW 32938
163 #define ID_CURVE_INSERTCOLUMN 32939
164 #define ID_CURVE_DELETEROW 32940
165 #define ID_CURVE_DELETECOLUMN 32941
166 #define ID_BUTTON32942 32942
167 //#define ID_PATCH_INSDEL 32942
168 #define ID_CURVE_INSERT_ADDCOLUMN 32943
169 #define ID_CURVE_INSERT_INSERTCOLUMN 32944
170 #define ID_CURVE_INSERT_ADDROW 32945
171 #define ID_CURVE_INSERT_INSERTROW 32946
172 #define ID_CURVE_DELETE_FIRSTCOLUMN 32947
173 #define ID_CURVE_DELETE_LASTCOLUMN 32948
174 #define ID_CURVE_DELETE_FIRSTROW 32949
175 #define ID_CURVE_DELETE_LASTROW 32950
176 #define ID_CURVE_NEGATIVE 32951
177 #define ID_PATCH_BEND 32952
178 #define ID_CURVE_PATCHDENSETUBE 32955
179 #define ID_CURVE_PATCHVERYDENSETUBE 32956
180 #define ID_CURVE_CAP 32957
181 #define ID_CURVE_REDISPERSE_ROWS 32961
182 #define ID_PATCH_NATURALIZE 32963
183 #define ID_CURVE_PATCHSQUARE 32964
184 #define ID_BRUSH_PRIMITIVES_SPHERE 32965
185 #define ID_BRUSH_PRIMITIVES_TORUS 32966
186 #define ID_TEXTURES_TEXTUREWINDOWSCALE_200 32967
187 #define ID_TEXTURES_TEXTUREWINDOWSCALE_100 32968
188 #define ID_TEXTURES_TEXTUREWINDOWSCALE_50 32969
189 #define ID_TEXTURES_TEXTUREWINDOWSCALE_25 32970
190 #define ID_TEXTURES_TEXTUREWINDOWSCALE_10 32971
191 #define ID_CURVE_NEGATIVETEXTUREX 32972
192 #define ID_TEXTURES_FLUSH 32973
193 #define ID_CURVE_OVERLAY_SET 32974
194 #define ID_CURVE_OVERLAY_CLEAR 32975
195 #define ID_CURVE_NEGATIVETEXTUREY 32976
196 #define ID_CURVE_THICKEN 32977
197 #define ID_CURVE_CYCLECAP 32978
198 #define ID_CURVE_MATRIX_TRANSPOSE 32981
199 #define ID_PLUGINS_REFRESH 32982
200 #define ID_TEXTURES_RELOADSHADERS 32983
201 #define ID_VIEW_ENTITIESAS_BOUNDINGBOX 32984
202 #define ID_VIEW_ENTITIESAS_WRITEFRAME 32985
203 #define ID_VIEW_ENTITIESAS_SELECTEDWIREFRAME 32986
204 #define ID_VIEW_ENTITIESAS_SELECTEDSKINNED 32987
205 #define ID_VIEW_ENTITIESAS_SKINNED 32988
206 #define ID_VIEW_ENTITIESAS_SKINNEDANDBOXED 32989
207 #define ID_SHOW_ENTITIES 32990
208 #define ID_VIEW_ENTITIESAS_WIREFRAME 32991
209 #define ID_VIEW_OPENGLLIGHTING 32998
210 #define ID_EDIT_SAVEPREFAB 33001
211 #define ID_CURVE_MOREENDCAPSBEVELS_SQUAREENDCAP 33002
212 #define ID_CURVE_MOREENDCAPSBEVELS_SQUAREBEVEL 33003
213 #define ID_CURVE_PRIMITIVES_SPHERE 33005
214 #define ID_VIEW_HIDESHOW_HIDESELECTED 33006
215 #define ID_VIEW_HIDESHOW_SHOWHIDDEN 33007
216 #define ID_TEXTURES_SHADERS_SHOW 33008
217 //#define ID_SELECTION_CSGADD 33009
218 #define ID_SELECTION_CSGMERGE 33011
219 #define ID_TEXTURES_FLUSH_UNUSED 33014
220 #define ID_DROP_GROUP_REMOVE 33016
221 #define ID_DROP_GROUP_ADDTO_WORLD 33017
222 #define ID_DROP_GROUP_NEWGROUP 33018
223 #define ID_DROP_GROUP_NAME 33019
224 #define ID_DROP_GROUP_ADDTO 33020
225 #define ID_VIEW_SHOWANGLES 33021
226 #define ID_VIEW_SHOWWORKZONE 33022
227 #define ID_TEXTURE_FLUSH 33023
228 #define ID_TEXTURES_SHOWSHADERS 33025
229 #define ID_DONTSELECTMODEL 33027
230 #define ID_TEXTURES_SHADERLISTONLY 33030
231 #define ID_PLUGIN_START 33800
232 #define ID_PLUGIN_END 33999
233 #define ID_FILE_EXIT 40002
234 #define ID_FILE_SAVEAS 40004
235 #define ID_VIEW_CENTER 40005
236 #define ID_VIEW_UPFLOOR 40006
237 #define ID_VIEW_DOWNFLOOR 40007
238 #define ID_BRUSH_FLIPX 40008
239 #define ID_BRUSH_FLIPY 40009
240 #define ID_BRUSH_FLIPZ 40010
241 #define ID_BRUSH_ROTATEX 40011
242 #define ID_BRUSH_ROTATEY 40012
243 #define ID_BRUSH_ROTATEZ 40013
244 #define ID_BSP_FULLVIS 40016
245 #define ID_BSP_FASTVIS 40017
246 #define ID_BSP_NOVIS 40018
247 #define ID_BSP_RELIGHT 40019
248 #define ID_BSP_ENTITIES 40020
249 #define ID_FILE_POINTFILE 40021
250 #define ID_VIEW_100 40022
251 #define ID_VIEW_75 40023
252 #define ID_VIEW_50 40024
253 #define ID_VIEW_25 40025
254 #define ID_VIEW_12 40026
255 #define ID_TEXTURES_SHOWALL 40033
256 #define ID_TEXTURES_SHOWINUSE 40034
257 #define ID_TEXTURES_TOGGLEVIEW 40037
258 #define ID_SELECTION_CREATEENTITY 40039
259 #define ID_SELECTION_EDITENTITY 40040
260 #define ID_MISC_BENCHMARK 40041
261 #define ID_REGION_OFF 40043
262 #define ID_REGION_SETXY 40044
263 #define ID_REGION_SETBRUSH 40045
264 #define ID_SELECTION_MAKEHOLLOW 40046
265 #define ID_SELECTION_SELECTPARTIALTALL 40047
266 #define ID_SELECTION_SELECTCOMPLETETALL 40048
267 #define ID_SELECTION_CSGSUBTRACT 40049
268 #define ID_SELECTION_SELECTTOUCHING 40050
269 #define ID_VIEW_NEAREST 40052
270 #define ID_VIEW_NEARESTMIPMAP 40053
271 #define ID_VIEW_LINEAR 40054
272 #define ID_VIEW_BILINEAR 40055
273 #define ID_VIEW_BILINEARMIPMAP 40056
274 #define ID_VIEW_TRILINEAR 40057
275 #define ID_TEXTURES_WIREFRAME 40058
276 #define ID_TEXTURES_FLATSHADE 40059
277 #define ID_VIEW_SHOWNAMES 40060
278 #define ID_VIEW_ZOOMIN 40061
279 #define ID_VIEW_ZOOMOUT 40062
280 #define ID_VIEW_SHOWCOORDINATES 40063
281 #define ID_VIEW_Z100 40064
282 #define ID_VIEW_ZZOOMIN 40065
283 #define ID_VIEW_ZZOOMOUT 40066
284 #define ID_SELECTION_CLONE 40067
285 #define ID_SELECTION_DESELECT 40068
286 #define ID_SELECTION_DELETE 40069
287 #define ID_BUTTON40068 40070
288 #define ID_SELECTION_DRAGVERTECIES 40074
289 #define ID_SELECTION_DRAGEDGES 40075
290 #define ID_REGION_SETTALLBRUSH 40076
291 #define ID_SELECTION_SELECTINSIDE 40092
292 #define ID_PROJECT_RELEAD 40094
293 #define ID_PROJECT_CHANGE 40095
294 #define ID_MISC_GAMMA 40097
295 #define ID_MISC_TEXTUREBACKGROUN 40104
296 #define ID_TEXTUREBK 40105
297 #define ID_COLORS_XYBK 40106
298 #define ID_FILE_ABOUT 40107
299 #define ID_VIEW_CONSOLE 40108
300 #define ID_VIEW_ENTITY 40109
301 #define ID_VIEW_TEXTURE 40110
302 #define ID_COLORS_MAJOR 40111
303 #define ID_COLORS_MINOR 40113
304 #define ID_SELECTION_CONNECT 40114
305 #define ID_FILE_LOADPROJECT 40115
306 #define ID_MISC_FINDBRUSH 40116
307 #define ID_MISC_NEXTLEAKSPOT 40117
308 #define ID_MISC_PREVIOUSLEAKSPOT 40118
309 #define ID_BRUSH_3SIDED 40119
310 #define ID_BRUSH_4SIDED 40120
311 #define ID_BRUSH_5SIDED 40121
312 #define ID_BRUSH_6SIDED 40122
313 #define ID_BRUSH_7SIDED 40123
314 #define ID_BRUSH_8SIDED 40124
315 #define ID_BRUSH_9SIDED 40125
316 #define ID_SELECTION_ARBITRARYROTATION 40126
317 #define ID_BRUSH_ARBITRARYSIDED 40127
318 #define ID_SELECTION_UNGROUPENTITY 40130
319 #define ID_MISC_SELECTENTITYCOLOR 40131
320 #define ID_MISC_PRINTXY 40132
321 #define ID_HELP_ABOUT 40134
322 #define ID_EDIT_COPYBRUSH 40135
323 #define ID_EDIT_PASTEBRUSH 40136
324 #define ID_TEXTURES_INSPECTOR 40137
325 #define ID_SELECTION_MAKE_DETAIL 40139
326 #define ID_SELECTION_MAKE_STRUCTURAL 40140
327 #define ID_REGION_SETSELECTION 40141
328 #define ID_VIEW_SHOWBLOCKS 40142
329 #define ID_CAMERA_UP 40152
330 #define ID_CAMERA_DOWN 40153
331 #define ID_CAMERA_LEFT 40154
332 #define ID_CAMERA_RIGHT 40155
333 #define ID_CAMERA_FORWARD 40156
334 #define ID_CAMERA_BACK 40157
335 #define ID_CAMERA_ANGLEUP 40158
336 #define ID_CAMERA_ANGLEDOWN 40159
337 #define ID_CAMERA_STRAFELEFT 40160
338 #define ID_CAMERA_STRAFERIGHT 40161
339 #define ID_GRID_TOGGLE 40162
340 #define ID_ENTITYLIST 40163
341 #define ID_MAPINFO 40164
342 #define ID_TOGGLECONSOLE 40165
343 #define ID_TOGGLECAMERA 40166
344 #define ID_TOGGLEZ 40167
345 #define ID_TOGGLEVIEW 40168
346 #define ID_SELECTION_TEXTURE_FIT 40171
347 #define ID_SELECTION_TEXTURE_ROTATECLOCK 40172
348 #define ID_SELECTION_TEXTURE_ROTATECOUNTER 40173
349 #define ID_SELECTION_TEXTURE_SCALEUP 40174
350 #define ID_SELECTION_TEXTURE_SCALEDOWN 40175
351 #define ID_SELECTION_TEXTURE_SHIFTLEFT 40176
352 #define ID_SELECTION_TEXTURE_SHIFTRIGHT 40177
353 #define ID_SELECTION_TEXTURE_SHIFTUP 40178
354 #define ID_SELECTION_TEXTURE_SHIFTDOWN 40179
355 #define ID_GRID_NEXT 40180
356 #define ID_GRID_PREV 40181
357 #define ID_SELECTION_TEXTURE_SCALELEFT 40182
358 #define ID_SELECTION_TEXTURE_SCALERIGHT 40183
359 #define ID_SELECTION_PRINT 40184
360 #define ID_SELECTION_TOGGLESIZEPAINT 40185
361 #define ID_PATCH_TAB 40186
362 #define ID_PATCH_ENTER 40187
363 #define ID_SELECT_SNAPTOGRID 40188
364 #define ID_PATCH_INSPECTOR 40189
365 #define ID_SELECT_ALL 40190
366 #define ID_CURVE_FREEZE 40191
367 #define ID_CURVE_UNFREEZE 40192
368 #define ID_CURVE_UNFREEZEALL 40193
369 #define ID_SELECT_RESELECT 40194
370 #define ID_FITFACE 40196
371 #define ID_VIEW_CROSSHAIR 40197
372 #define ID_SELECTION_INVERT 40198
373 #define ID_VIEW_GROUPS 40199
374 #define ID_FILE_SLEEP 40200
375 #define ID_HELP_LINKS 40201
376 #define ID_VIEW_SHOWOUTLINE 40202 // TTimo: outline as in colored outline around the window to quickly guess the orientation
377 #define ID_VIEW_SHOWAXES 40203
378 #define ID_SELECTION_NOOUTLINE 40204 // TTimo: outline as in zbuffered outline toggle on camera view (TA Q3Radiant 200f addition)
379 #define ID_SELECTION_OUTLINESTYLE 40205 // Arnout: cycles through selection styles (extended 'nooutline')
380 #define ID_SELECTION_SEPERATE 40206 // TTimo: split brushes out of an entity back into worldspawn
381 #define ID_SELECTION_MERGE 40207 // TTimo: merge brushes from worldspawn into entity
382 #define ID_HELP_BUGREPORT 40208
384 #define ID_FILTER_WORLD 40209
385 #define ID_FILTER_PATCHES 40210
386 #define ID_FILTER_DETAILS 40211
387 #define ID_FILTER_ENTITIES 40212
388 #define ID_FILTER_MODELS 40213
389 #define ID_FILTER_HINTSSKIPS 40214
390 #define ID_FILTER_CLIPS 40215
391 #define ID_FILTER_LIQUIDS 40216
392 #define ID_FILTER_TRIGGERS 40217
393 #define ID_FILTER_AREAPORTALS 40218
394 #define ID_FILTER_TRANSLUCENT 40219
395 #define ID_FILTER_CAULK 40220
396 #define ID_FILTER_LIGHTS 40221
397 #define ID_FILTER_PATHS 40223
398 #define ID_FILTER_CLUSTERPORTALS 40224
399 #define ID_FILTER_LIGHTGRID 40225
400 #define ID_FILTER_STRUCTURAL 40226
401 #define ID_FILTER_BOTCLIPS 40227
403 #define ID_CURVE_REDISPERSE_INTERMEDIATE_COLS 40230
404 #define ID_CURVE_REDISPERSE_INTERMEDIATE_ROWS 40231
405 #define ID_EDIT_PASTEBRUSHTOCAMERA 40232
407 #define ID_COLORS_MINOR_ALT 40230
408 #define ID_COLORS_MAJOR_ALT 40231
410 // those must have their own ID chunk ID_GRID_025 <= ID_GRID <= ID_GRID_256
411 #define ID_GRID_025 40300
412 #define ID_GRID_05 40301
413 #define ID_GRID_1 40302
414 #define ID_GRID_2 40303
415 #define ID_GRID_4 40304
416 #define ID_GRID_8 40305
417 #define ID_GRID_16 40306
418 #define ID_GRID_32 40307
419 #define ID_GRID_64 40308
420 #define ID_GRID_128 40309
421 #define ID_GRID_256 40310
423 #define ID_FILE_CHECKUPDATE 40320
425 #define ID_TEXTUREWINDOW_SCALEUP 40321
426 #define ID_TEXTUREWINDOW_SCALEDOWN 40322
428 class CSynapseClientRadiant : public CSynapseClient
431 bool RequestAPI(APIDescriptor_t *pAPI);
432 const char* GetInfo();
433 const char* GetName();
435 void ImportMap(IDataStream *in, CPtrArray *ents, const char *type);
436 void ExportMap(CPtrArray *ents, IDataStream *out, const char *type);
438 CSynapseClientRadiant() { }
439 virtual ~CSynapseClientRadiant() { }
454 GtkWidget *m_pWidget;
457 called to fire up the help links
459 void handle_help_command(int id);
464 the urls to fire up in the game packs help menus
466 vector<Str *> mHelpURLs;
469 scan the .game files for game install packs
470 look there for help description nodes
471 build the corresponding menus in Radiant
473 void create_game_help_menu (GtkWidget *menu, GtkAccelGroup *accel);
476 build the menu once the filename is found
478 void process_xlink (Str &FileName, char *menu_name, const char *base_url, GtkWidget *menu, GtkAccelGroup *accel);
481 void create_main_menu (GtkWidget *window, GtkWidget *vbox);
482 void create_main_toolbar (GtkWidget *window, GtkWidget *vbox);
483 void create_plugin_toolbar (GtkWidget *window, GtkWidget *vbox);
484 void create_main_statusbar (GtkWidget *window, GtkWidget *vbox);
485 GtkWidget *m_pStatusLabel[6];
486 GtkWidget *m_pSplits[4];
493 CWatchBSP* m_pWatchBSP;
497 CPlugInManager m_PlugInMgr;
502 CString m_strStatus[15];
503 bool m_bNeedStatusUpdate;
507 deals with dynamically loading the modules, initializing them, requesting the APIs
509 CSynapseServer m_SynapseServer;
511 we are also a synapse client in that we provide and require some APIs as well
513 CSynapseClientRadiant m_SynapseClient;
518 // trigger network listen
521 { return m_bSleeping; }
523 void UpdatePatchToolbarButtons();
524 // Gef: Changed to float for sub-integer grid size
525 void NudgeSelection(int nDirection, float nAmount);
526 void SetButtonMenuStates();
527 void SetGridStatus();
528 void RoutineProcessing();
529 XYWnd* ActiveXY() { return m_pActiveXY; };
530 void UpdateWindows(int nBits);
531 void SetStatusText(int nPane, const char* pText);
532 void UpdateStatusText();
533 void SetWindowStyle(int nStyle);
534 virtual ~MainFrame();
535 XYWnd* GetXYWnd() {return m_pXYWnd;}
536 XYWnd* GetXZWnd() {return m_pXZWnd;}
537 XYWnd* GetYZWnd() {return m_pYZWnd;}
538 ZWnd* GetZWnd() {return m_pZWnd;}
539 CamWnd* GetCamWnd() {return m_pCamWnd;}
540 TexWnd* GetTexWnd() {return m_pTexWnd;}
541 CWatchBSP *GetWatchBSP() { return m_pWatchBSP; }
542 void ReleaseContexts ();
543 void CreateContexts ();
545 void SetActiveXY(XYWnd* p)
548 m_pActiveXY->SetActive(false);
553 m_pActiveXY->SetActive(true);
557 EViewStyle CurrentStyle()
559 return m_nCurrentStyle;
562 bool FloatingGroupDialog()
564 return CurrentStyle() == eFloating || CurrentStyle() == eSplit;
568 const GdkRectangle & GetPrimaryMonitorRect( void ) const { return primaryMonitorRect; }
569 const int GetGDKOffsetX( void ) const { return gdk_offset_x; }
570 const int GetGDKOffsetY( void ) const { return gdk_offset_y; }
576 void CreateQEChildren();
577 void LoadCommandMap();
578 void ShowMenuItemKeyBindings(GtkWidget* window);
583 void Nudge(int nDim, float fNudge);
584 CPlugInManager &GetPlugInMgr() {return m_PlugInMgr;};
585 CSynapseServer &GetSynapseServer() {return m_SynapseServer;};
586 CSynapseClientRadiant &GetSynapseClient() {return m_SynapseClient;};
587 void AddPlugInToolbarButton(const IToolbarButton* button);
588 void AddPlugInMenuItem(IPlugIn* pPlugIn);
589 void CleanPlugInMenu();
591 // these are public so i can easily reflect messages
592 // from child windows..
599 void OnFileLoadproject();
602 void OnFilePointfile();
605 void OnFileCheckUpdate();
608 void OnViewConsole();
609 void OnViewDownfloor();
612 void OnViewShowblocks();
613 void OnViewShowclip();
614 void OnViewShowcoordinates();
615 void OnViewShowOutline();
616 void OnViewShowAxes();
617 void OnViewShowdetail();
618 void OnViewShowent();
619 void OnViewShowlights();
620 void OnViewShownames();
621 void OnViewShowpath();
622 void OnViewShowwater();
623 void OnViewShowworld();
624 void OnViewTexture();
625 void OnViewUpfloor();
629 void OnViewZoomout();
630 void OnViewZzoomin();
631 void OnViewZzoomout();
633 void OnTexturesShowinuse();
634 void OnTexturesInspector();
635 void OnMiscBenchmark();
636 void OnMiscFindbrush();
638 void OnMiscNextleakspot();
639 void OnMiscPreviousleakspot();
640 void OnMiscPrintxy();
641 void OnMiscSelectentitycolor();
643 void OnColorsMajor();
644 void OnColorsMinor();
645 void OnColorsMajor_Alt();
646 void OnColorsMinor_Alt();
648 void OnBrush3sided();
649 void OnBrush4sided();
650 void OnBrush5sided();
651 void OnBrush6sided();
652 void OnBrush7sided();
653 void OnBrush8sided();
654 void OnBrush9sided();
655 void OnBrushArbitrarysided();
659 void OnBrushRotatex();
660 void OnBrushRotatey();
661 void OnBrushRotatez();
663 void OnRegionSetbrush();
664 void OnRegionSetselection();
665 void OnRegionSettallbrush();
666 void OnRegionSetxy();
667 void OnSelectionArbitraryrotation();
668 void OnSelectionClone();
669 void OnSelectionConnect();
670 void OnSelectionCsgsubtract();
671 void OnSelectionCsgmerge();
672 void OnSelectionNoOutline();
673 void OnSelectionOutlineStyle();
674 void OnSelectionDelete();
675 void OnSelectionDeselect();
676 void OnSelectionDragedges();
677 void OnSelectionDragvertecies();
678 void OnSelectionMakeDetail();
679 void OnSelectionMakeStructural();
680 void OnSelectionMakehollow();
681 void OnSelectionSelectcompletetall();
682 void OnSelectionSelectinside();
683 void OnSelectionSelectpartialtall();
684 void OnSelectionSelecttouching();
685 void OnSelectionUngroupentity();
686 void OnSelectionMergeentity();
687 void OnSelectionGroupworld();
688 void OnTexturesPopup();
689 void OnPopupSelection();
691 void OnViewCameraupdate();
695 void OnHelpBugreport();
696 void OnViewClipper();
697 void OnCameraAngledown();
698 void OnCameraAngleup();
699 void OnCameraBack(bool keydown);
701 void OnCameraForward(bool keydown);
702 void OnCameraLeft(bool keydown);
703 void OnCameraRight(bool keydown);
704 void OnCameraStrafeleft(bool keydown);
705 void OnCameraStraferight(bool keydown);
709 void OnTogglecamera();
710 void OnToggleconsole();
714 void OnEditMapinfo();
715 void OnEditEntityinfo();
716 void OnBrushScripts();
717 void OnViewCenterview();
718 void OnViewNextview();
719 void OnHelpCommandlist();
720 void OnFileNewproject();
722 void OnClipSelected();
723 void OnSplitSelected();
724 void OnToggleviewXz();
725 void OnToggleviewYz();
726 void OnColorsBrush();
727 void OnColorsClipper();
728 void OnColorsGridtext();
729 void OnColorsSelectedbrush();
730 void OnColorsSelectedbrush3D();
731 void OnColorsCameraBack();
732 void OnColorsGridblock();
733 void OnColorsViewname();
734 void OnColorSetoriginal();
735 void OnColorSetqer();
736 void OnColorSetblack();
737 void OnColorSetydnar(); /* ydnar */
739 void OnSelectScale();
740 void OnSelectMouserotate();
741 void OnEditCopybrush();
742 void OnEditPastebrush();
743 void OnEditPastebrushToCamera();
746 void OnSelectionInvert();
747 // void OnSelectionTextureDec();
748 void OnSelectionTextureFit();
749 // void OnSelectionTextureInc();
750 void OnSelectionTextureRotateclock();
751 void OnSelectionTextureRotatecounter();
752 void OnSelectionTextureScaledown();
753 void OnSelectionTextureScaleup();
754 void OnSelectionTextureShiftdown();
755 void OnSelectionTextureShiftleft();
756 void OnSelectionTextureShiftright();
757 void OnSelectionTextureShiftup();
760 void OnSelectionTextureScaleLeft();
761 void OnSelectionTextureScaleRight();
762 void OnTextureReplaceall();
766 void OnSelectMousescale();
767 void OnViewCubicclipping();
768 void OnFileProjectsettings();
770 void OnViewCubeout();
771 void OnFileSaveregion();
772 void OnSelectionMovedown();
773 void OnSelectionMoveup();
774 void OnToolbarMain();
775 void OnToolbarTexture();
776 void OnSelectionPrint();
777 void OnSelectionTogglesizepaint();
778 void OnBrushMakecone();
779 void OnTexturesLoad();
780 void OnToggleRotatelock();
781 void OnFileImportmap();
782 void OnFileExportmap();
783 void OnEditLoadprefab();
784 void OnSelectionSelectNudgedown();
785 void OnSelectionSelectNudgeleft();
786 void OnSelectionSelectNudgeright();
787 void OnSelectionSelectNudgeup();
788 void OnTexturesLoadlist();
789 void OnDontselectcurve();
790 void OnConvertcurves();
791 void OnCurveSimplepatchmesh();
792 void OnPatchToggleBox();
793 void OnPatchWireframe();
794 void OnCurvePatchcone();
795 void OnCurvePatchtube();
797 void OnCurvePatchbevel();
798 void OnCurvePatchendcap();
799 void OnPatchDrilldown();
800 void OnCurveInsertcolumn();
801 void OnCurveInsertrow();
802 void OnCurveDeletecolumn();
803 void OnCurveDeleterow();
804 void OnCurveInsertAddcolumn();
805 void OnCurveInsertAddrow();
806 void OnCurveInsertInsertcolumn();
807 void OnCurveInsertInsertrow();
808 void OnCurveNegative();
809 void OnCurveNegativeTextureX();
810 void OnCurveNegativeTextureY();
811 void OnCurveDeleteFirstcolumn();
812 void OnCurveDeleteFirstrow();
813 void OnCurveDeleteLastcolumn();
814 void OnCurveDeleteLastrow();
816 // void OnPatchInsdel();
819 void OnCurvePatchdensetube();
820 void OnCurvePatchverydensetube();
822 void OnCurveCapInvertedbevel();
823 void OnCurveCapInvertedendcap();
824 void OnCurveRedisperseRows();
825 void OnCurveRedisperseIntermediateCols();
826 void OnCurveRedisperseIntermediateRows();
827 void OnPatchNaturalize();
829 void OnCurvePatchsquare();
830 void OnTexturewindowScaleup();
831 void OnTexturewindowScaledown();
832 void OnCurveOverlayClear();
833 void OnCurveOverlaySet();
834 void OnCurveThicken();
835 void OnCurveCyclecap();
836 void OnCurveMatrixTranspose();
837 void OnTexturesReloadshaders();
838 void OnShowEntities();
839 // will set the view mode right, don't set the value for mode if you only want to update the radio item
840 void OnEntitiesSetViewAs(int mode = 0);
841 void OnPluginsRefresh();
842 void OnTexturesShowall();
843 void OnPatchInspector();
844 void OnViewOpengllighting();
846 void OnCurveFreeze();
847 void OnCurveUnFreeze();
848 void OnCurveUnFreezeAll();
849 void OnSelectReselect();
850 void OnEditSaveprefab();
851 void OnCurveMoreendcapsbevelsSquarebevel();
852 void OnCurveMoreendcapsbevelsSquareendcap();
853 void OnBrushPrimitivesSphere();
854 void OnViewCrosshair();
855 void OnViewHideshowHideselected();
856 void OnViewHideshowShowhidden();
857 void OnTexturesShadersShow();
859 void OnDropGroupAddtoWorld();
860 void OnDropGroupName();
861 void OnDropGroupNewgroup();
862 void OnDropGroupRemove();
863 void OnViewShowWorkzone();
864 void OnViewShowAngles();
865 void OnMru(unsigned int nID);
866 void OnViewNearest(unsigned int nID);
867 void OnTextureWad(unsigned int nID);
868 void OnBspCommand(unsigned int nID);
869 void OnGrid(unsigned int nID);
870 void OnPlugIn(unsigned int nID, char *str);
872 void SetTextureScale(int id);
873 void OnDontselectmodel();
874 void OnTexturesShaderlistonly();
876 void OnFilterAreaportals();
877 void OnFilterCaulk();
878 void OnFilterStructural();
879 void OnFilterClips();
880 void OnFilterBotClips();
881 void OnFilterDetails();
882 void OnFilterEntities();
883 void OnFilterHintsskips();
884 void OnFilterLights();
885 void OnFilterLiquids();
886 void OnFilterModels();
887 void OnFilterPatches();
888 void OnFilterTranslucent();
889 void OnFilterTriggers();
890 void OnFilterWorld();
891 void OnFilterPaths();
892 void OnFilterClusterportals();
893 void OnFilterLightgrid();
896 EViewStyle m_nCurrentStyle;
899 GdkRectangle primaryMonitorRect;
906 // some C API to the mainframe functions
907 void WINAPI QERApp_Sleep();
909 #endif // _MAINFRAME_H_