doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEOptions.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 #pragma once
29 
30 #include "../common/registryoptions.h"
31 
37 class MEOptions {
38 
39 public:
40  MEOptions();
41  ~MEOptions();
42 
43  bool Save (void);
44  bool Load (void);
45 
50  void SetModified(bool mod = true) { modified = mod; };
55  bool GetModified() { return modified; };
56 
57  void SetWindowPlacement ( const char* name, HWND hwnd );
58  bool GetWindowPlacement ( const char* name, HWND hwnd );
59 
60  void SetMaterialTreeWidth(int width);
62 
63  void SetStageWidth(int width);
64  int GetStageWidth();
65 
68 
69  void SetMaterialEditHeight(int height);
71 
74 
77 
78 protected:
80 
81  bool modified;
82 
89 };
90 
91 
92 ID_INLINE void MEOptions::SetWindowPlacement ( const char* name, HWND hwnd ) {
93  registry.SetWindowPlacement ( name, hwnd );
94 }
95 
96 ID_INLINE bool MEOptions::GetWindowPlacement ( const char* name, HWND hwnd ) {
97  return registry.GetWindowPlacement ( name, hwnd );
98 }
99 
102  SetModified(true);
103 }
104 
106  return materialTreeWidth;
107 }
108 
109 ID_INLINE void MEOptions::SetStageWidth(int width) {
110  stageWidth = width;
111  SetModified(true);
112 }
113 
114 ID_INLINE int MEOptions::GetStageWidth() {
115  return stageWidth;
116 }
117 
120  SetModified(true);
121 }
122 
124  return previewPropertiesWidth;
125 }
126 
129  SetModified(true);
130 }
131 
133  return materialEditHeight;
134 }
135 
138  SetModified(true);
139 }
140 
143 }
144 
147  SetModified(true);
148 }
149 
152 }
int stageWidth
Definition: MEOptions.h:84
bool GetWindowPlacement(const char *name, HWND hwnd)
rvRegistryOptions registry
Definition: MEOptions.h:79
void SetWindowPlacement(const char *name, HWND hwnd)
Definition: MEOptions.h:92
void SetMaterialTreeWidth(int width)
Definition: MEOptions.h:100
int materialEditHeight
Definition: MEOptions.h:86
bool Load(void)
Loads the material editor options from the registry.
Definition: MEOptions.cpp:73
int GetStageWidth()
Definition: MEOptions.h:114
Wrapper class that is responsible for reading and writing Material Editor settings to the registry...
Definition: MEOptions.h:37
int GetPreviewPropHeadingWidth()
Definition: MEOptions.h:150
int materialPropHeadingWidth
Definition: MEOptions.h:87
bool modified
Definition: MEOptions.h:81
~MEOptions()
Destructor for MEOptions.
Definition: MEOptions.cpp:52
int previewPropertiesWidth
Definition: MEOptions.h:85
int materialTreeWidth
Definition: MEOptions.h:83
void SetMaterialEditHeight(int height)
Definition: MEOptions.h:127
GLenum GLsizei width
Definition: glext.h:2846
void SetWindowPlacement(const char *name, HWND hwnd)
void SetModified(bool mod=true)
Sets the flag that determines if the settings need to be saved because they where modified...
Definition: MEOptions.h:50
void SetMaterialPropHeadingWidth(int width)
Definition: MEOptions.h:136
void SetPreviewPropertiesWidth(int width)
Definition: MEOptions.h:118
int GetMaterialPropHeadingWidth()
Definition: MEOptions.h:141
void SetPreviewPropHeadingWidth(int width)
Definition: MEOptions.h:145
GLenum GLsizei GLsizei height
Definition: glext.h:2856
int GetMaterialEditHeight()
Definition: MEOptions.h:132
void SetStageWidth(int width)
Definition: MEOptions.h:109
int GetMaterialTreeWidth()
Definition: MEOptions.h:105
MEOptions()
Constructor for MEOptions.
Definition: MEOptions.cpp:36
const GLcharARB * name
Definition: glext.h:3629
bool GetModified()
Get the flag that determines if the settings need to be saved because they where modified.
Definition: MEOptions.h:55
bool Save(void)
Saves the material editor options to the registry.
Definition: MEOptions.cpp:58
int previewPropHeadingWidth
Definition: MEOptions.h:88
int GetPreviewPropertiesWidth()
Definition: MEOptions.h:123
bool GetWindowPlacement(const char *name, HWND hwnd)
Definition: MEOptions.h:96