]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - radiant/brushmanip.h
Merge branch 'transfilterfix' into 'master'
[xonotic/netradiant.git] / radiant / brushmanip.h
1 /*
2    Copyright (C) 1999-2006 Id Software, Inc. and contributors.
3    For a list of contributors, see the accompanying CONTRIBUTORS file.
4
5    This file is part of GtkRadiant.
6
7    GtkRadiant is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11
12    GtkRadiant is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GtkRadiant; if not, write to the Free Software
19    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20  */
21
22 #if !defined ( INCLUDED_BRUSHWRAPPER_H )
23 #define INCLUDED_BRUSHWRAPPER_H
24
25 #include <cstddef>
26 #include <uilib/uilib.h>
27 #include "string/stringfwd.h"
28 #include "generic/callback.h"
29
30 enum EBrushPrefab {
31     eBrushCuboid,
32     eBrushPrism,
33     eBrushCone,
34     eBrushSphere,
35     eBrushRock,
36 };
37
38 class TextureProjection;
39
40 class ContentsFlagsValue;
41 namespace scene {
42     class Graph;
43 }
44
45 void Scene_BrushConstructPrefab(scene::Graph &graph, EBrushPrefab type, std::size_t sides, const char *shader);
46
47 class AABB;
48
49 void Scene_BrushResize_Selected(scene::Graph &graph, const AABB &bounds, const char *shader);
50
51 void Scene_BrushSetTexdef_Selected(scene::Graph &graph, const TextureProjection &projection);
52
53 void Scene_BrushSetTexdef_Component_Selected(scene::Graph &graph, const TextureProjection &projection);
54
55 void Scene_BrushGetTexdef_Selected(scene::Graph &graph, TextureProjection &projection);
56
57 void Scene_BrushGetTexdef_Component_Selected(scene::Graph &graph, TextureProjection &projection);
58
59 void Scene_BrushGetShaderSize_Component_Selected(scene::Graph &graph, size_t &width, size_t &height);
60
61 void Scene_BrushSetFlags_Selected(scene::Graph &graph, const ContentsFlagsValue &flags);
62
63 void Scene_BrushSetFlags_Component_Selected(scene::Graph &graph, const ContentsFlagsValue &flags);
64
65 void Scene_BrushGetFlags_Selected(scene::Graph &graph, ContentsFlagsValue &flags);
66
67 void Scene_BrushGetFlags_Component_Selected(scene::Graph &graph, ContentsFlagsValue &flags);
68
69 void Scene_BrushShiftTexdef_Selected(scene::Graph &graph, float s, float t);
70
71 void Scene_BrushShiftTexdef_Component_Selected(scene::Graph &graph, float s, float t);
72
73 void Scene_BrushScaleTexdef_Selected(scene::Graph &graph, float s, float t);
74
75 void Scene_BrushScaleTexdef_Component_Selected(scene::Graph &graph, float s, float t);
76
77 void Scene_BrushRotateTexdef_Selected(scene::Graph &graph, float angle);
78
79 void Scene_BrushRotateTexdef_Component_Selected(scene::Graph &graph, float angle);
80
81 void Scene_BrushSetShader_Selected(scene::Graph &graph, const char *name);
82
83 void Scene_BrushSetShader_Component_Selected(scene::Graph &graph, const char *name);
84
85 void Scene_BrushGetShader_Selected(scene::Graph &graph, CopiedString &shader);
86
87 void Scene_BrushGetShader_Component_Selected(scene::Graph &graph, CopiedString &shader);
88
89 void Scene_BrushFindReplaceShader(scene::Graph &graph, const char *find, const char *replace);
90
91 void Scene_BrushFindReplaceShader_Selected(scene::Graph &graph, const char *find, const char *replace);
92
93 void Scene_BrushFindReplaceShader_Component_Selected(scene::Graph &graph, const char *find, const char *replace);
94
95 void Scene_BrushSelectByShader(scene::Graph &graph, const char *name);
96
97 void Scene_BrushSelectByShader_Component(scene::Graph &graph, const char *name);
98
99 void Scene_BrushFitTexture_Selected(scene::Graph &graph, float s_repeat, float t_repeat);
100
101 void Scene_BrushFitTexture_Component_Selected(scene::Graph &graph, float s_repeat, float t_repeat);
102
103 void Brush_constructMenu(ui::Menu menu);
104
105 extern Callback<void()> g_texture_lock_status_changed;
106
107 void BrushFilters_construct();
108
109 void Brush_registerCommands();
110
111 #endif