doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Window.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #ifndef __WINDOW_H__
30 #define __WINDOW_H__
31 
32 #include "Rectangle.h"
33 #include "DeviceContext.h"
34 #include "RegExp.h"
35 #include "Winvar.h"
36 #include "GuiScript.h"
37 #include "SimpleWindow.h"
38 
39 const int WIN_CHILD = 0x00000001;
40 const int WIN_CAPTION = 0x00000002;
41 const int WIN_BORDER = 0x00000004;
42 const int WIN_SIZABLE = 0x00000008;
43 const int WIN_MOVABLE = 0x00000010;
44 const int WIN_FOCUS = 0x00000020;
45 const int WIN_CAPTURE = 0x00000040;
46 const int WIN_HCENTER = 0x00000080;
47 const int WIN_VCENTER = 0x00000100;
48 const int WIN_MODAL = 0x00000200;
49 const int WIN_INTRANSITION = 0x00000400;
50 const int WIN_CANFOCUS = 0x00000800;
51 const int WIN_SELECTED = 0x00001000;
52 const int WIN_TRANSFORM = 0x00002000;
53 const int WIN_HOLDCAPTURE = 0x00004000;
54 const int WIN_NOWRAP = 0x00008000;
55 const int WIN_NOCLIP = 0x00010000;
56 const int WIN_INVERTRECT = 0x00020000;
57 const int WIN_NATURALMAT = 0x00040000;
58 const int WIN_NOCURSOR = 0x00080000;
59 const int WIN_MENUGUI = 0x00100000;
60 const int WIN_ACTIVE = 0x00200000;
61 const int WIN_SHOWCOORDS = 0x00400000;
62 const int WIN_SHOWTIME = 0x00800000;
63 const int WIN_WANTENTER = 0x01000000;
64 
65 const int WIN_DESKTOP = 0x10000000;
66 
67 const char CAPTION_HEIGHT[] = "16.0";
68 const char SCROLLER_SIZE[] = "16.0";
69 const int SCROLLBAR_SIZE = 16;
70 
71 const int MAX_WINDOW_NAME = 32;
72 const int MAX_LIST_ITEMS = 1024;
73 
74 const char DEFAULT_BACKCOLOR[] = "1 1 1 1";
75 const char DEFAULT_FORECOLOR[] = "0 0 0 1";
76 const char DEFAULT_BORDERCOLOR[] = "0 0 0 1";
77 const char DEFAULT_TEXTSCALE[] = "0.4";
78 
79 typedef enum {
100 } wexpOpType_t;
101 
102 typedef enum {
106 
107 typedef struct {
109  int a, b, c, d;
110 } wexpOp_t;
111 
112 struct idRegEntry {
113  const char *name;
115  int index;
116 };
117 
118 class rvGEWindowWrapper;
119 class idWindow;
120 
123  event = new idGuiScriptList;
124  }
126  delete event;
127  }
128  int time;
130  bool pending;
131  size_t Size() {
132  return sizeof(*this) + event->Size();
133  }
134 };
135 
137 {
138 public:
139 
140  rvNamedEvent(const char* name)
141  {
142  mEvent = new idGuiScriptList;
143  mName = name;
144  }
146  {
147  delete mEvent;
148  }
149  size_t Size()
150  {
151  return sizeof(*this) + mEvent->Size();
152  }
153 
156 };
157 
160  int offset;
162 };
163 
164 
166 class idWindow {
167 public:
170  virtual ~idWindow();
171 
172  enum {
185  };
186 
187  enum {
197  };
198 
199  static const char *ScriptNames[SCRIPT_COUNT];
200 
201  static const idRegEntry RegisterVars[];
202  static const int NumRegisterVars;
203 
204  void SetDC(idDeviceContext *d);
205 
206  idDeviceContext* GetDC ( void ) { return dc; }
207 
208  idWindow *SetFocus(idWindow *w, bool scripts = true);
209 
211  void SetParent(idWindow *w);
212  void SetFlag(unsigned int f);
213  void ClearFlag(unsigned int f);
214  unsigned GetFlags() {return flags;};
215  void Move(float x, float y);
216  void BringToTop(idWindow *w);
217  void Adjust(float xd, float yd);
218  void SetAdjustMode(idWindow *child);
219  void Size(float x, float y, float w, float h);
220  void SetupFromState();
221  void SetupBackground();
222  drawWin_t *FindChildByName(const char *name);
223  idSimpleWindow *FindSimpleWinByName(const char *_name);
224  idWindow *GetParent() { return parent; }
226  bool Contains(float x, float y);
227  size_t Size();
228  virtual size_t Allocated();
229  idStr* GetStrPtrByName(const char *_name);
230 
231  virtual idWinVar *GetWinVarByName (const char *_name, bool winLookup = false, drawWin_t** owner = NULL);
232 
233  int GetWinVarOffset( idWinVar *wv, drawWin_t *dw );
234  float GetMaxCharHeight();
235  float GetMaxCharWidth();
236  void SetFont();
237  void SetInitialState(const char *_name);
238  void AddChild(idWindow *win);
239  void DebugDraw(int time, float x, float y);
240  void CalcClientRect(float xofs, float yofs);
241  void CommonInit();
242  void CleanUp();
244  void DrawCaption(int time, float x, float y);
245  void SetupTransforms(float x, float y);
246  bool Contains(const idRectangle &sr, float x, float y);
247  const char *GetName() { return name; };
248 
249  virtual bool Parse(idParser *src, bool rebuild = true);
250  virtual const char *HandleEvent(const sysEvent_t *event, bool *updateVisuals);
251  void CalcRects(float x, float y);
252  virtual void Redraw(float x, float y);
253 
254  virtual void ArchiveToDictionary(idDict *dict, bool useNames = true);
255  virtual void InitFromDictionary(idDict *dict, bool byName = true);
256  virtual void PostParse();
257  virtual void Activate( bool activate, idStr &act );
258  virtual void Trigger();
259  virtual void GainFocus();
260  virtual void LoseFocus();
261  virtual void GainCapture();
262  virtual void LoseCapture();
263  virtual void Sized();
264  virtual void Moved();
265  virtual void Draw(int time, float x, float y);
266  virtual void MouseExit();
267  virtual void MouseEnter();
268  virtual void DrawBackground(const idRectangle &drawRect);
269  virtual const char *RouteMouseCoords(float xd, float yd);
270  virtual void SetBuddy(idWindow *buddy) {};
271  virtual void HandleBuddyUpdate(idWindow *buddy) {};
272  virtual void StateChanged( bool redraw );
273  virtual void ReadFromDemoFile( class idDemoFile *f, bool rebuild = true );
274  virtual void WriteToDemoFile( class idDemoFile *f );
275 
276  // SaveGame support
277  void WriteSaveGameString( const char *string, idFile *savefile );
278  void WriteSaveGameTransition( idTransitionData &trans, idFile *savefile );
279  virtual void WriteToSaveGame( idFile *savefile );
280  void ReadSaveGameString( idStr &string, idFile *savefile );
281  void ReadSaveGameTransition( idTransitionData & trans, idFile *savefile );
282  virtual void ReadFromSaveGame( idFile *savefile );
283  void FixupTransitions();
284  virtual void HasAction(){};
285  virtual void HasScripts(){};
286 
287  void FixupParms();
288  void GetScriptString(const char *name, idStr &out);
289  void SetScriptParams();
290  bool HasOps() { return (ops.Num() > 0); };
291  float EvalRegs(int test = -1, bool force = false);
292  void StartTransition();
293  void AddTransition(idWinVar *dest, idVec4 from, idVec4 to, int time, float accelTime, float decelTime);
294  void ResetTime(int time);
295  void ResetCinematics();
296 
297  int NumTransitions();
298 
299  bool ParseScript(idParser *src, idGuiScriptList &list, int *timeParm = NULL, bool allowIf = false);
300  bool RunScript(int n);
302  void SetRegs(const char *key, const char *val);
303  int ParseExpression( idParser *src, idWinVar *var = NULL, int component = 0 );
304  int ExpressionConstant(float f);
306  void AddCommand(const char *cmd);
307  void AddUpdateVar(idWinVar *var);
308  bool Interactive();
309  bool ContainsStateVars();
310  void SetChildWinVarVal(const char *name, const char *var, const char *val);
313  const char *GetComment() { return comment; }
314  void SetComment( const char * p) { comment = p; }
315 
317 
318  virtual void RunNamedEvent ( const char* eventName );
319 
320  void AddDefinedVar ( idWinVar* var );
321 
322  idWindow* FindChildByPoint ( float x, float y, idWindow* below = NULL );
323  int GetChildIndex ( idWindow* window );
324  int GetChildCount ( void );
325  idWindow* GetChild ( int index );
326  void RemoveChild ( idWindow *win );
327  bool InsertChild ( idWindow *win, idWindow* before );
328 
329  void ScreenToClient ( idRectangle* rect );
330  void ClientToScreen ( idRectangle* rect );
331 
332  bool UpdateFromDictionary ( idDict& dict );
333 
334 protected:
335 
336  friend class rvGEWindowWrapper;
337 
338  idWindow* FindChildByPoint ( float x, float y, idWindow** below );
339  void SetDefaults ( void );
340 
341  friend class idSimpleWindow;
342  friend class idUserInterfaceLocal;
343  bool IsSimple();
344  void UpdateWinVars();
345  void DisableRegister(const char *_name);
346  void Transition();
347  void Time();
348  bool RunTimeEvents(int time);
349  void Dump();
350 
351  int ExpressionTemporary();
353  int EmitOp( int a, int b, wexpOpType_t opType, wexpOp_t **opp = NULL );
354  int ParseEmitOp( idParser *src, int a, wexpOpType_t opType, int priority, wexpOp_t **opp = NULL );
355  int ParseTerm( idParser *src, idWinVar *var = NULL, int component = 0 );
356  int ParseExpressionPriority( idParser *src, int priority, idWinVar *var = NULL, int component = 0 );
357  void EvaluateRegisters(float *registers);
361  bool ParseScriptEntry(const char *name, idParser *src);
362  bool ParseRegEntry(const char *name, idParser *src);
363  virtual bool ParseInternalVar(const char *name, idParser *src);
364  void ParseString(idParser *src, idStr &out);
365  void ParseVec4(idParser *src, idVec4 &out);
366  void ConvertRegEntry(const char *name, idParser *src, idStr &out, int tabs);
367 
368  float actualX; // physical coords
369  float actualY; // ''
370  int childID; // this childs id
371  unsigned int flags; // visible, focus, mouseover, cursor, border, etc..
372  int lastTimeRun; //
373  idRectangle drawRect; // overall rect
374  idRectangle clientRect; // client area
376 
377  int timeLine; // time stamp used for various fx
378  float xOffset;
379  float yOffset;
382  float matScalex;
383  float matScaley;
384  float borderSize;
385  float textAlignx;
386  float textAligny;
390 
391  signed char textShadow;
392  unsigned char fontNum;
393  unsigned char cursor; //
394  signed char textAlign;
395 
399  idWinRectangle rect; // overall rect
409 
412 
413  idRectangle textRect; // text extented rect
414  const idMaterial *background; // background asset
415 
416  idWindow *parent; // parent window
417  idList<idWindow*> children; // child windows
419 
420  idWindow *focusedChild; // if a child window has the focus
421  idWindow *captureChild; // if a child window has mouse capture
422  idWindow *overChild; // if a child window has mouse capture
423  bool hover;
424 
426 
428 
430  static idCVar gui_edit;
431 
433  bool *saveTemps;
434 
437 
438  static bool registerIsTemporary[MAX_EXPRESSION_REGISTERS]; // statics to assist during parsing
439 
440  idList<wexpOp_t> ops; // evaluate to make expressionRegisters
442  idList<wexpOp_t> *saveOps; // evaluate to make expressionRegisters
443  idList<rvNamedEvent*> namedEvents; // added named events
445 
447 
449 };
450 
451 ID_INLINE void idWindow::AddDefinedVar( idWinVar* var ) {
452  definedVars.AddUnique( var );
453 }
454 
455 #endif /* !__WINDOW_H__ */
void Dump()
unsigned GetFlags()
Definition: Window.h:214
static idCVar gui_edit
Definition: Window.h:430
idList< float > expressionRegisters
Definition: Window.h:441
void UpdateWinVars()
Definition: Window.cpp:584
idList< idTimeLineEvent * > timeLineEvents
Definition: Window.h:435
void GetScriptString(const char *name, idStr &out)
void ResetTime(int time)
Definition: Window.cpp:2646
float GetMaxCharHeight()
Definition: Window.cpp:303
idWinBool noTime
Definition: Window.h:396
idWinFloat textScale
Definition: Window.h:405
virtual void Sized()
Definition: Window.cpp:1443
int ExpressionConstant(float f)
Definition: Window.cpp:2702
bool ParseScript(idParser *src, idGuiScriptList &list, int *timeParm=NULL, bool allowIf=false)
Definition: Window.cpp:1571
bool UpdateFromDictionary(idDict &dict)
Definition: Window.cpp:4194
bool Contains(float x, float y)
Definition: Window.cpp:681
void ScreenToClient(idRectangle *rect)
Definition: Window.cpp:4118
const int WIN_NOWRAP
Definition: Window.h:54
signed char textShadow
Definition: Window.h:391
void AddDefinedVar(idWinVar *var)
Definition: Window.h:451
virtual void MouseExit()
Definition: Window.cpp:406
const char * GetName()
Definition: Window.h:247
idGuiScriptList * event
Definition: Window.h:129
idRegisterList regList
Definition: Window.h:446
int GetWinVarOffset(idWinVar *wv, drawWin_t *dw)
Definition: Window.cpp:1717
virtual void StateChanged(bool redraw)
Definition: Window.cpp:518
const int WIN_TRANSFORM
Definition: Window.h:52
unsigned int flags
Definition: Window.h:371
int EmitOp(int a, int b, wexpOpType_t opType, wexpOp_t **opp=NULL)
Definition: Window.cpp:2766
void RestoreExpressionParseState()
Definition: Window.cpp:1671
virtual void ArchiveToDictionary(idDict *dict, bool useNames=true)
Definition: Window.cpp:1317
idStr comment
Definition: Window.h:388
idWinBool noEvents
Definition: Window.h:398
virtual bool ParseInternalVar(const char *name, idParser *src)
Definition: Window.cpp:1915
idList< idWindow * > children
Definition: Window.h:417
bool IsSimple()
Definition: Window.cpp:3884
const int WIN_VCENTER
Definition: Window.h:47
const int WIN_MOVABLE
Definition: Window.h:43
virtual void SetBuddy(idWindow *buddy)
Definition: Window.h:270
drawWin_t * FindChildByName(const char *name)
Definition: Window.cpp:2573
idWindow(idUserInterfaceLocal *gui)
Definition: Window.cpp:220
void BringToTop(idWindow *w)
Definition: Window.cpp:353
void SetScriptParams()
void DisableRegister(const char *_name)
Definition: Window.cpp:1697
void AddCommand(const char *cmd)
Definition: Window.cpp:693
virtual ~idWindow()
Definition: Window.cpp:269
GLenum GLint GLint y
Definition: glext.h:2849
idList< drawWin_t > drawWindows
Definition: Window.h:418
idWinVec4 matColor
Definition: Window.h:401
idList< float > * saveRegs
Definition: Window.h:444
GLenum GLsizei n
Definition: glext.h:3705
bool ContainsStateVars()
Definition: Window.cpp:3921
const char DEFAULT_BORDERCOLOR[]
Definition: Window.h:76
signed char textAlign
Definition: Window.h:394
const int WIN_SELECTED
Definition: Window.h:51
void ClientToScreen(idRectangle *rect)
Definition: Window.cpp:4137
float xOffset
Definition: Window.h:378
const int WIN_ACTIVE
Definition: Window.h:60
const int WIN_FOCUS
Definition: Window.h:44
wexpOpType_t
Definition: Window.h:79
int lastTimeRun
Definition: Window.h:372
void ParseString(idParser *src, idStr &out)
Definition: Window.cpp:1883
void SetFont()
Definition: Window.cpp:294
virtual void WriteToSaveGame(idFile *savefile)
Definition: Window.cpp:3464
idWinFloat rotate
Definition: Window.h:406
idRegisterList * RegList()
Definition: Window.h:305
void ParseVec4(idParser *src, idVec4 &out)
Definition: Window.cpp:1895
virtual void GainCapture()
Definition: Window.cpp:1467
const int WIN_MENUGUI
Definition: Window.h:59
const char * name
Definition: Window.h:113
const char SCROLLER_SIZE[]
Definition: Window.h:68
~idTimeLineEvent()
Definition: Window.h:125
int d
Definition: Window.h:109
idDeviceContext * dc
Definition: Window.h:425
const char DEFAULT_TEXTSCALE[]
Definition: Window.h:77
void FixupParms()
Definition: Window.cpp:3838
const int WIN_SHOWTIME
Definition: Window.h:62
GLuint src
Definition: glext.h:5390
idRegister::REGTYPE type
Definition: Window.h:114
const idMaterial * background
Definition: Window.h:414
GLenum GLint x
Definition: glext.h:2849
idGuiScriptList * scripts[SCRIPT_COUNT]
Definition: Window.h:432
virtual void Trigger()
Definition: Window.cpp:504
const int MAX_LIST_ITEMS
Definition: Window.h:72
int test(char *url)
Definition: lib500.c:3
void DebugDraw(int time, float x, float y)
Definition: Window.cpp:959
void SetDC(idDeviceContext *d)
Definition: Window.cpp:1301
const int WIN_CAPTURE
Definition: Window.h:45
float forceAspectWidth
Definition: Window.h:380
virtual void HandleBuddyUpdate(idWindow *buddy)
Definition: Window.h:271
virtual void MouseEnter()
Definition: Window.cpp:392
idWindow * overChild
Definition: Window.h:422
const int SCROLLBAR_SIZE
Definition: Window.h:69
virtual void LoseCapture()
Definition: Window.cpp:1475
int timeLine
Definition: Window.h:377
int ParseExpressionPriority(idParser *src, int priority, idWinVar *var=NULL, int component=0)
Definition: Window.cpp:2920
unsigned char cursor
Definition: Window.h:393
virtual void WriteToDemoFile(class idDemoFile *f)
Definition: Window.cpp:3319
float borderSize
Definition: Window.h:384
bool pending
Definition: Window.h:130
void CalcRects(float x, float y)
Definition: Window.cpp:1173
Definition: File.h:50
void SetParent(idWindow *w)
Definition: Window.cpp:1503
virtual void Draw(int time, float x, float y)
Definition: Window.cpp:323
idWindow * FindChildByPoint(float x, float y, idWindow *below=NULL)
Definition: Window.cpp:4012
idRectangle clientRect
Definition: Window.h:374
idWindow * focusedChild
Definition: Window.h:420
idList< idWinVar * > updateVars
Definition: Window.h:411
void AddUpdateVar(idWinVar *var)
Definition: Window.cpp:575
idWinBool visible
Definition: Window.h:397
idStr * GetStrPtrByName(const char *_name)
Definition: Window.cpp:2604
virtual void HasScripts()
Definition: Window.h:285
idRectangle drawRect
Definition: Window.h:373
void Time()
Definition: Window.cpp:1048
virtual void Activate(bool activate, idStr &act)
Definition: Window.cpp:481
Definition: Vector.h:52
float matScalex
Definition: Window.h:382
rvNamedEvent(const char *name)
Definition: Window.h:140
idGuiScriptList * mEvent
Definition: Window.h:155
virtual void DrawBackground(const idRectangle &drawRect)
Definition: Window.cpp:1107
virtual void PostParse()
Definition: Window.cpp:1709
bool RunTimeEvents(int time)
Definition: Window.cpp:596
idWindow * parent
Definition: Window.h:416
GLuint index
Definition: glext.h:3476
const GLubyte * c
Definition: glext.h:4677
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:3454
Definition: Vector.h:808
virtual void InitFromDictionary(idDict *dict, bool byName=true)
Definition: Window.cpp:1330
const int WIN_MODAL
Definition: Window.h:48
wexpRegister_t
Definition: Window.h:102
const int WIN_WANTENTER
Definition: Window.h:63
~rvNamedEvent(void)
Definition: Window.h:145
void Adjust(float xd, float yd)
idList< wexpOp_t > ops
Definition: Window.h:440
bool * saveTemps
Definition: Window.h:433
Definition: Dict.h:65
#define NULL
Definition: Lib.h:88
size_t Size()
Definition: Window.h:149
idDeviceContext * GetDC(void)
Definition: Window.h:206
idSimpleWindow * FindSimpleWinByName(const char *_name)
Definition: Window.cpp:2555
float actualY
Definition: Window.h:369
void SetComment(const char *p)
Definition: Window.h:314
const int WIN_CHILD
Definition: Window.h:39
float EvalRegs(int test=-1, bool force=false)
Definition: Window.cpp:1079
unsigned char fontNum
Definition: Window.h:392
float forceAspectHeight
Definition: Window.h:381
const int WIN_NATURALMAT
Definition: Window.h:57
idWinVec4 foreColor
Definition: Window.h:402
idWindow * SetCapture(idWindow *w)
Definition: Window.cpp:550
const int WIN_CANFOCUS
Definition: Window.h:50
const int WIN_CAPTION
Definition: Window.h:40
virtual bool Parse(idParser *src, bool rebuild=true)
Definition: Window.cpp:2130
static const char * ScriptNames[SCRIPT_COUNT]
Definition: Window.h:199
float matScaley
Definition: Window.h:383
virtual void HasAction()
Definition: Window.h:284
idList< wexpOp_t > * saveOps
Definition: Window.h:442
size_t Size()
Definition: GuiScript.h:90
virtual const char * RouteMouseCoords(float xd, float yd)
Definition: Window.cpp:421
float GetMaxCharWidth()
Definition: Window.cpp:313
void DrawBorderAndCaption(const idRectangle &drawRect)
Definition: Window.cpp:1130
virtual size_t Allocated()
Definition: Window.cpp:179
idWindow * GetCaptureChild()
Definition: Window.cpp:1512
static const idRegEntry RegisterVars[]
Definition: Window.h:201
int NumTransitions()
Definition: Window.cpp:3757
int index
Definition: Window.h:115
void SetupTransforms(float x, float y)
Definition: Window.cpp:1141
void Move(float x, float y)
Definition: Window.cpp:278
static idCVar gui_debug
Definition: Window.h:429
GLubyte GLubyte GLubyte a
Definition: glext.h:4662
void SaveExpressionParseState()
Definition: Window.cpp:1661
idList< idTransitionData > transitions
Definition: Window.h:436
const int MAX_WINDOW_NAME
Definition: Window.h:71
void ReadSaveGameString(idStr &string, idFile *savefile)
Definition: Window.cpp:3590
void WriteSaveGameString(const char *string, idFile *savefile)
Definition: Window.cpp:3404
const int WIN_SHOWCOORDS
Definition: Window.h:61
idWinStr text
Definition: Window.h:407
const int WIN_INTRANSITION
Definition: Window.h:49
void SetAdjustMode(idWindow *child)
void RemoveChild(idWindow *win)
Definition: Window.cpp:4066
idStr cmd
Definition: Window.h:316
virtual void RunNamedEvent(const char *eventName)
Definition: Window.cpp:633
idWinRectangle rect
Definition: Window.h:399
void SetInitialState(const char *_name)
Definition: Window.cpp:2114
const char * GetComment()
Definition: Window.h:313
void ParseBracedExpression(idParser *src)
Definition: Window.cpp:3012
void Transition()
Definition: Window.cpp:998
GLubyte GLubyte b
Definition: glext.h:4662
const int WIN_HCENTER
Definition: Window.h:46
void CommonInit()
Definition: Window.cpp:112
idVec2 shear
Definition: Window.h:389
void ResetCinematics()
Definition: Window.cpp:2635
idWindow * SetFocus(idWindow *w, bool scripts=true)
Definition: Window.cpp:1537
bool ParseRegEntry(const char *name, idParser *src)
Definition: Window.cpp:2052
idWinVec4 borderColor
Definition: Window.h:404
prefInfo window
bool RunScriptList(idGuiScriptList *src)
Definition: Window.cpp:2677
bool Interactive()
Definition: Window.cpp:3939
int ParseExpression(idParser *src, idWinVar *var=NULL, int component=0)
Definition: Window.cpp:3003
void ClearFlag(unsigned int f)
Definition: Window.cpp:1493
float textAlignx
Definition: Window.h:385
int ExpressionTemporary()
Definition: Window.cpp:2733
void SetChildWinVarVal(const char *name, const char *var, const char *val)
Definition: Window.cpp:3957
idWinBool hideCursor
Definition: Window.h:448
const int WIN_SIZABLE
Definition: Window.h:42
float textAligny
Definition: Window.h:386
void SetRegs(const char *key, const char *val)
int AddUnique(const type &obj)
Definition: List.h:742
idUserInterfaceLocal * gui
Definition: Window.h:427
idWinVec4 backColor
Definition: Window.h:400
tuple f
Definition: idal.py:89
const char CAPTION_HEIGHT[]
Definition: Window.h:67
void DrawCaption(int time, float x, float y)
idUserInterfaceLocal * GetGui()
Definition: Window.h:225
static bool registerIsTemporary[MAX_EXPRESSION_REGISTERS]
Definition: Window.h:438
int Num(void) const
Definition: List.h:265
const int WIN_INVERTRECT
Definition: Window.h:56
const char DEFAULT_BACKCOLOR[]
Definition: Window.h:74
bool HasOps()
Definition: Window.h:290
const GLcharARB * name
Definition: glext.h:3629
void FixupTransitions()
Definition: Window.cpp:3771
idWindow * GetChild(int index)
Definition: Window.cpp:4036
void ConvertRegEntry(const char *name, idParser *src, idStr &out, int tabs)
Definition: Str.h:116
int GetChildCount(void)
Definition: Window.cpp:4024
wexpOpType_t opType
Definition: Window.h:108
virtual void Redraw(float x, float y)
Definition: Window.cpp:1194
const int WIN_NOCURSOR
Definition: Window.h:58
idStr mName
Definition: Window.h:154
Window win
Definition: glimp.cpp:46
void ReadSaveGameTransition(idTransitionData &trans, idFile *savefile)
Definition: Window.cpp:3441
bool InsertChild(idWindow *win, idWindow *before)
Definition: Window.cpp:4089
void SetDefaults(void)
Definition: Window.cpp:4159
idList< rvNamedEvent * > namedEvents
Definition: Window.h:443
bool ParseScriptEntry(const char *name, idParser *src)
Definition: Window.cpp:1681
Definition: Window.h:112
size_t Size()
Definition: Window.cpp:164
idInterpolateAccelDecelLinear< idVec4 > interp
Definition: Window.h:161
idStr name
Definition: Window.h:387
void CleanUp()
Definition: Window.cpp:242
virtual void ReadFromDemoFile(class idDemoFile *f, bool rebuild=true)
Definition: Window.cpp:3160
void StartTransition()
Definition: Window.cpp:2626
bool RunScript(int n)
Definition: Window.cpp:2690
wexpOp_t * ExpressionOp()
Definition: Window.cpp:2749
void EvaluateRegisters(float *registers)
Definition: Window.cpp:3027
const int WIN_BORDER
Definition: Window.h:41
bool hover
Definition: Window.h:423
void AddChild(idWindow *win)
Definition: Window.cpp:3829
float yOffset
Definition: Window.h:379
virtual void Moved()
Definition: Window.cpp:1435
virtual void LoseFocus()
Definition: Window.cpp:1459
const int WIN_NOCLIP
Definition: Window.h:55
static const int NumRegisterVars
Definition: Window.h:202
virtual const char * HandleEvent(const sysEvent_t *event, bool *updateVisuals)
Definition: Window.cpp:709
const int WIN_HOLDCAPTURE
Definition: Window.h:53
GLfloat GLfloat p
Definition: glext.h:4674
const int WIN_DESKTOP
Definition: Window.h:65
void SetFlag(unsigned int f)
Definition: Window.cpp:1484
idList< idWinVar * > definedVars
Definition: Window.h:410
idWinVar * data
Definition: Window.h:159
idWinBackground backGroundName
Definition: Window.h:408
void SetupBackground()
Definition: Window.cpp:1393
int GetChildIndex(idWindow *window)
Definition: Window.cpp:4048
virtual idWinVar * GetWinVarByName(const char *_name, bool winLookup=false, drawWin_t **owner=NULL)
Definition: Window.cpp:1776
size_t Size()
Definition: Window.h:131
const char DEFAULT_FORECOLOR[]
Definition: Window.h:75
idWindow * GetParent()
Definition: Window.h:224
virtual void ReadFromSaveGame(idFile *savefile)
Definition: Window.cpp:3607
idWindow * GetFocusedChild()
Definition: Window.cpp:1524
idRectangle textRect
Definition: Window.h:413
int childID
Definition: Window.h:370
virtual void GainFocus()
Definition: Window.cpp:1451
idWinVec4 hoverColor
Definition: Window.h:403
void SetupFromState()
Definition: Window.cpp:1409
void CalcClientRect(float xofs, float yofs)
Definition: Window.cpp:1343
idVec2 origin
Definition: Window.h:375
void AddTransition(idWinVar *dest, idVec4 from, idVec4 to, int time, float accelTime, float decelTime)
Definition: Window.cpp:2613
idWindow * captureChild
Definition: Window.h:421
float actualX
Definition: Window.h:368
int ParseTerm(idParser *src, idWinVar *var=NULL, int component=0)
Definition: Window.cpp:2830
int ParseEmitOp(idParser *src, int a, wexpOpType_t opType, int priority, wexpOp_t **opp=NULL)
Definition: Window.cpp:2817
void WriteSaveGameTransition(idTransitionData &trans, idFile *savefile)
Definition: Window.cpp:3416