doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SimpleWindow.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 __SIMPLEWIN_H__
30 #define __SIMPLEWIN_H__
31 
33 class idDeviceContext;
34 class idSimpleWindow;
35 
36 typedef struct {
39 } drawWin_t;
40 
42  friend class idWindow;
43 public:
45  virtual ~idSimpleWindow();
46  void Redraw(float x, float y);
47  void StateChanged( bool redraw );
48 
50 
51  idWinVar * GetWinVarByName(const char *_name);
52  int GetWinVarOffset( idWinVar *wv, drawWin_t* owner);
53  size_t Size();
54 
55  idWindow* GetParent ( void ) { return mParent; }
56 
57  virtual void WriteToSaveGame( idFile *savefile );
58  virtual void ReadFromSaveGame( idFile *savefile );
59 
60 protected:
61  void CalcClientRect(float xofs, float yofs);
62  void SetupTransforms(float x, float y);
63  void DrawBackground(const idRectangle &drawRect);
65 
68  int flags;
69  idRectangle drawRect; // overall rect
70  idRectangle clientRect; // client area
73  int fontNum;
74  float matScalex;
75  float matScaley;
76  float borderSize;
77  int textAlign;
78  float textAlignx;
79  float textAligny;
81 
84  idWinRectangle rect; // overall rect
93 
95 
97 
99 };
100 
101 #endif /* !__SIMPLEWIN_H__ */
idRectangle clientRect
Definition: SimpleWindow.h:70
idUserInterfaceLocal * gui
Definition: SimpleWindow.h:66
idWinVec2 shear
Definition: SimpleWindow.h:91
virtual void ReadFromSaveGame(idFile *savefile)
idWindow * GetParent(void)
Definition: SimpleWindow.h:55
idWinBool hideCursor
Definition: SimpleWindow.h:98
GLenum GLint GLint y
Definition: glext.h:2849
virtual void WriteToSaveGame(idFile *savefile)
idDeviceContext * dc
Definition: SimpleWindow.h:67
idWinVec4 borderColor
Definition: SimpleWindow.h:88
idWinRectangle rect
Definition: SimpleWindow.h:84
GLenum GLint x
Definition: glext.h:2849
idWindow * win
Definition: SimpleWindow.h:37
idWinVec4 foreColor
Definition: SimpleWindow.h:87
Definition: File.h:50
idRectangle drawRect
Definition: SimpleWindow.h:69
idWinFloat rotate
Definition: SimpleWindow.h:90
void Redraw(float x, float y)
void SetupTransforms(float x, float y)
Definition: Vector.h:52
idSimpleWindow(idWindow *win)
idWinVec4 matColor
Definition: SimpleWindow.h:86
idWinVec4 backColor
Definition: SimpleWindow.h:85
idWindow * mParent
Definition: SimpleWindow.h:96
void StateChanged(bool redraw)
idWinBool visible
Definition: SimpleWindow.h:83
idWinBackground backGroundName
Definition: SimpleWindow.h:92
idWinVar * GetWinVarByName(const char *_name)
int GetWinVarOffset(idWinVar *wv, drawWin_t *owner)
void DrawBorderAndCaption(const idRectangle &drawRect)
Definition: Str.h:116
idWinFloat textScale
Definition: SimpleWindow.h:89
Window win
Definition: glimp.cpp:46
void DrawBackground(const idRectangle &drawRect)
idWinStr text
Definition: SimpleWindow.h:82
virtual ~idSimpleWindow()
idSimpleWindow * simp
Definition: SimpleWindow.h:38
void CalcClientRect(float xofs, float yofs)
const idMaterial * background
Definition: SimpleWindow.h:94
idRectangle textRect
Definition: SimpleWindow.h:71