doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ListWindow.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 #ifndef __LISTWINDOW_H
29 #define __LISTWINDOW_H
30 
31 class idSliderWindow;
32 
33 enum {
36 };
37 
38 struct idTabRect {
39  int x;
40  int w;
41  int align;
42  int valign;
43  int type;
45  float iconVOffset;
46 };
47 
48 class idListWindow : public idWindow {
49 public:
52 
53  virtual const char* HandleEvent(const sysEvent_t *event, bool *updateVisuals);
54  virtual void PostParse();
55  virtual void Draw(int time, float x, float y);
56  virtual void Activate(bool activate, idStr &act);
57  virtual void HandleBuddyUpdate(idWindow *buddy);
58  virtual void StateChanged( bool redraw = false );
59  virtual size_t Allocated(){return idWindow::Allocated();};
60  virtual idWinVar* GetWinVarByName(const char *_name, bool winLookup = false, drawWin_t** owner = NULL);
61 
62  void UpdateList();
63 
64 private:
65  virtual bool ParseInternalVar(const char *name, idParser *src);
66  void CommonInit();
67  void InitScroller( bool horizontal );
68  void SetCurrentSel( int sel );
69  void AddCurrentSel( int sel );
70  int GetCurrentSel();
71  bool IsSelected( int index );
72  void ClearSelection( int sel );
73 
75  int top;
76  float sizeBias;
77  bool horizontal;
86 
91 
92  int clickTime;
93 
94  int typedTime;
96 };
97 
98 #endif // __LISTWINDOW_H
virtual void StateChanged(bool redraw=false)
Definition: ListWindow.cpp:627
idVec2 iconSize
Definition: ListWindow.h:44
idStrList listItems
Definition: ListWindow.h:87
idStr tabStopStr
Definition: ListWindow.h:78
idSliderWindow * scroller
Definition: ListWindow.h:88
idStr tabIconSizeStr
Definition: ListWindow.h:82
GLenum GLint GLint y
Definition: glext.h:2849
virtual void HandleBuddyUpdate(idWindow *buddy)
Definition: ListWindow.cpp:586
virtual void Draw(int time, float x, float y)
Definition: ListWindow.cpp:457
bool multipleSel
Definition: ListWindow.h:85
idStr tabAlignStr
Definition: ListWindow.h:79
idStr listName
Definition: ListWindow.h:90
virtual bool ParseInternalVar(const char *name, idParser *src)
Definition: ListWindow.cpp:243
GLuint src
Definition: glext.h:5390
virtual const char * HandleEvent(const sysEvent_t *event, bool *updateVisuals)
Definition: ListWindow.cpp:96
GLenum GLint x
Definition: glext.h:2849
idStr tabVAlignStr
Definition: ListWindow.h:80
virtual void Activate(bool activate, idStr &act)
Definition: ListWindow.cpp:578
idList< int > currentSel
Definition: ListWindow.h:89
idStr tabIconVOffsetStr
Definition: ListWindow.h:83
Definition: Vector.h:52
GLuint index
Definition: glext.h:3476
int GetCurrentSel()
Definition: ListWindow.cpp:88
#define NULL
Definition: Lib.h:88
virtual void PostParse()
Definition: ListWindow.cpp:303
int align
Definition: ListWindow.h:41
void UpdateList()
Definition: ListWindow.cpp:590
int valign
Definition: ListWindow.h:42
virtual idWinVar * GetWinVarByName(const char *_name, bool winLookup=false, drawWin_t **owner=NULL)
Definition: ListWindow.cpp:299
virtual size_t Allocated()
Definition: Window.cpp:179
void InitScroller(bool horizontal)
Definition: ListWindow.cpp:423
void ClearSelection(int sel)
Definition: ListWindow.cpp:77
idUserInterfaceLocal * gui
Definition: Window.h:427
void SetCurrentSel(int sel)
Definition: ListWindow.cpp:72
bool horizontal
Definition: ListWindow.h:77
const GLcharARB * name
Definition: glext.h:3629
bool IsSelected(int index)
Definition: ListWindow.cpp:92
Definition: Str.h:116
virtual size_t Allocated()
Definition: ListWindow.h:59
void AddCurrentSel(int sel)
Definition: ListWindow.cpp:84
idList< idTabRect > tabInfo
Definition: ListWindow.h:74
float iconVOffset
Definition: ListWindow.h:45
int type
Definition: ListWindow.h:43
float sizeBias
Definition: ListWindow.h:76
idHashTable< const idMaterial * > iconMaterials
Definition: ListWindow.h:84
idListWindow(idUserInterfaceLocal *gui)
Definition: ListWindow.cpp:67
void CommonInit()
Definition: ListWindow.cpp:49
idStr typed
Definition: ListWindow.h:95
idStr tabTypeStr
Definition: ListWindow.h:81