doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MaterialModifier.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 "MaterialEditor.h"
31 
32 class MaterialDocManager;
33 class MaterialTreeView;
34 
39 
40 public:
42  virtual ~MaterialModifier() {};
43 
44  virtual void Undo() = 0;
45  virtual void Redo() = 0;
46 
47 protected:
50 };
51 
56 
57 public:
60 
61  virtual void Undo() = 0;
62  virtual void Redo() = 0;
63 
64 protected:
65  int stage;
67 };
68 
73 
74 public:
75  AttributeMaterialModifierString(MaterialDocManager* manager, const char* materialName, int stage, const char* key, const char* value, const char* oldValue);
77 
78  virtual void Undo();
79  virtual void Redo();
80 
81 protected:
84 
85 };
86 
91 
92 public:
93  AttributeMaterialModifierBool(MaterialDocManager* manager, const char* materialName, int stage, const char* key, bool value, bool oldValue);
95 
96  virtual void Undo();
97  virtual void Redo();
98 
99 protected:
100  bool value;
101  bool oldValue;
102 
103 };
104 
109 
110 public:
112  virtual ~StageMoveModifier() {};
113 
114  virtual void Undo();
115  virtual void Redo();
116 
117 protected:
118  int from;
119  int to;
120 };
121 
126 public:
128  virtual ~StageDeleteModifier() {};
129 
130  virtual void Undo();
131  virtual void Redo();
132 
133 protected:
134  int stageNum;
136 };
137 
142 public:
144  virtual ~StageInsertModifier() {};
145 
146  virtual void Undo();
147  virtual void Redo();
148 
149 protected:
150  int stageNum;
153 };
154 
159 public:
161  virtual ~AddMaterialModifier() {};
162 
163  virtual void Undo();
164  virtual void Redo();
165 
166 protected:
168 };
169 
174 public:
177 
178  virtual void Undo();
179  virtual void Redo();
180 
181 protected:
182 
183 };
184 
189 public:
190  MoveMaterialModifier(MaterialDocManager* manager, const char* materialName, const char* materialFile, const char* copyMaterial);
191  virtual ~MoveMaterialModifier() {};
192 
193  virtual void Undo();
194  virtual void Redo();
195 
196 protected:
199 };
200 
205 public:
208 
209  virtual void Undo();
210  virtual void Redo();
211 
212 protected:
214 };
215 
220 public:
223 
224  virtual void Undo();
225  virtual void Redo();
226 
227 protected:
229  HTREEITEM item;
230  HTREEITEM parent;
231 };
232 
237 public:
240 
241  virtual void Undo();
242  virtual void Redo();
243 
244 protected:
246  HTREEITEM item;
248 };
249 
254 public:
257 
258  virtual void Undo();
259  virtual void Redo();
260 
261 protected:
264 
265  HTREEITEM item;
266  HTREEITEM parent;
267 };
268 
Undo/Redo operation for stage moves.
Undo/Redo operation for string attribute changes.
Undo/Redo operation for adding material folders.
Undo/Redo operation for moving materials.
GLsizei const GLfloat * value
Definition: glext.h:3614
MaterialDocManager * manager
Base class for Undo/Redo operations for attribute changes.
virtual void Undo()
Performs an undo operation of a deleted material folder.
virtual void Redo()
Performs a redo operation of a renamed material folder.
virtual void Redo()
Performs a redo operation of a string attribute change.
virtual void Redo()=0
Undo/Redo operation for adding materials.
virtual void Redo()
Performs a redo operation of a renamed material.
RenameMaterialFolderModifier(MaterialDocManager *manager, const char *materialName, MaterialTreeView *view, HTREEITEM item, const char *oldName)
Constructor for RenameMaterialFolderModifier.
Undo/Redo operation for boolean attribute changes.
virtual void Redo()
Performs a redo operation of a moved stage.
Base class for modifications that can be made to a material that can be undone and redone...
virtual void Undo()
Performs an undo operation of a deleted material.
virtual void Undo()
Performs an undo operation of a string attribute change.
Undo/Redo operation for stage deletes.
virtual void Undo()
Performs an undo operation of a stage move.
virtual void Redo()=0
StageInsertModifier(MaterialDocManager *manager, const char *materialName, int stageNum, int stageType, const char *stageName)
Constructor for StageInsertModifier.
virtual void Undo()
Performs an undo operation of a boolean attribute change.
StageDeleteModifier(MaterialDocManager *manager, const char *materialName, int stageNum, idDict stageData)
Constructor for StageDeleteModifier.
AddMaterialModifier(MaterialDocManager *manager, const char *materialName, const char *materialFile)
Constructor for AddMaterialModifier.
StageMoveModifier(MaterialDocManager *manager, const char *materialName, int from, int to)
Constructor for StageMoveModifier.
virtual void Redo()
Performs a redo operation of a moved material.
DeleteMaterialFolderModifier(MaterialDocManager *manager, const char *materialName, MaterialTreeView *view, HTREEITEM parent, idStrList *affectedMaterials)
Constructor for DeleteMaterialFolderModifier.
virtual void Undo()=0
AddMaterialFolderModifier(MaterialDocManager *manager, const char *materialName, MaterialTreeView *view, HTREEITEM item, HTREEITEM parent)
Constructor for AddMaterialFolderModifier.
DeleteMaterialModifier(MaterialDocManager *manager, const char *materialName)
Constructor for DeleteMaterialModifier.
virtual void Undo()=0
virtual void Redo()
Performs a redo operation of an inserted stage.
AttributeMaterialModifierString(MaterialDocManager *manager, const char *materialName, int stage, const char *key, const char *value, const char *oldValue)
Constructor for AttributeMaterialModifierString.
Definition: Dict.h:65
RenameMaterialModifier(MaterialDocManager *manager, const char *materialName, const char *oldName)
Constructor for RenameMaterialModifier.
virtual void Redo()
Performs a redo operation of an added material.
virtual ~StageMoveModifier()
virtual void Undo()
Performs an undo operation of a renamed material folder.
virtual void Undo()
Performs an undo operation of a moved material.
virtual void Undo()
Performs an undo operation of an added material folder.
virtual ~AddMaterialModifier()
Undo/Redo operation for renaming materials.
MoveMaterialModifier(MaterialDocManager *manager, const char *materialName, const char *materialFile, const char *copyMaterial)
Constructor for MoveMaterialModifier.
virtual void Undo()
Performs an undo operation of a renamed material.
virtual void Undo()
Performs an undo operation of an inserted stage.
Undo/Redo operation for stage inserts.
virtual void Undo()
Performs an undo operation of an added material.
A tree view of all the materials that have been defined.
virtual void Redo()
Performs a redo operation of a deleted stage.
virtual void Redo()
Performs a redo operation of a boolean attribute change.
virtual ~MaterialModifier()
Definition: Str.h:116
virtual void Redo()
Performs a redo operation of a deleted material.
virtual ~StageDeleteModifier()
Responsible for managing the materials that are being viewed and/or edited.
AttributeMaterialModifierBool(MaterialDocManager *manager, const char *materialName, int stage, const char *key, bool value, bool oldValue)
Constructor for AttributeMaterialModifierBool.
Undo/Redo operation for renaming a material folder.
Undo/Redo operation for deleting materials.
virtual void Undo()
Performs an undo operation of a deleted stage.
AttributeMaterialModifier(MaterialDocManager *manager, const char *materialName, int stage, const char *key)
Constructor for AttributeMaterialModifier.
virtual void Redo()
Performs a redo operation of an added material folder.
MaterialModifier(MaterialDocManager *manager, const char *materialName)
Constructor for MaterialModifier.
Undo/Redo operation for deleting a material folder.
virtual void Redo()
Performs a redo operation of a deleted material folder.
virtual ~StageInsertModifier()