/
iusercontrol.h
59 lines (48 loc) · 2.15 KB
/
iusercontrol.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include <memory>
#include <string>
class wxWindow;
namespace ui
{
/**
* User control interface, to be implemented by all widgets that
* can be packed into DarkRadiant's main frame or group dialog tabs.
*/
class IUserControl
{
public:
virtual ~IUserControl() {}
using Ptr = std::shared_ptr<IUserControl>;
// Returns the name of this control. This is an identifier corresponding to the
// UserControl enumeration, like UserControl::Camera, or a plugin-defined identifier
virtual std::string getControlName() = 0;
// A visible, localised identifier used for tab captions and window titles
virtual std::string getDisplayName() = 0;
// Optional icon file name to use for tab captions, e.g. "icon_texture.png"
virtual std::string getIcon() { return {}; }
// Creates a new wxWidget window for packing into a dialog or sizer
// Widget ownership is transferred to the caller, IUserControl implementations
// will not delete the returned window
virtual wxWindow* createWidget(wxWindow* parent) = 0;
};
// Predefined known user control names
struct UserControl
{
constexpr static const char* Camera = "Camera";
constexpr static const char* Console = "Console";
constexpr static const char* FavouritesBrowser = "FavouritesBrowser";
constexpr static const char* EntityInspector = "EntityInspector";
constexpr static const char* EntityList = "EntityList";
constexpr static const char* MediaBrowser = "MediaBrowser";
constexpr static const char* OrthoView = "OrthoView";
constexpr static const char* TextureBrowser = "TextureBrowser";
constexpr static const char* SurfaceInspector = "SurfaceInspector";
constexpr static const char* PatchInspector = "PatchInspector";
constexpr static const char* LightInspector = "LightInspector";
constexpr static const char* LayerControlPanel = "LayerControlPanel";
constexpr static const char* TextureTool = "TextureTool";
constexpr static const char* TransformPanel = "TransformPanel";
constexpr static const char* MapMergePanel = "MapMergePanel";
constexpr static const char* AasVisualisationPanel = "AasVisualisationPanel";
};
}