/
LightTextureChooser.h
55 lines (43 loc) · 1.03 KB
/
LightTextureChooser.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
#pragma once
#include "ui/common/ShaderSelector.h"
#include "wxutil/dialog/DialogBase.h"
#include <string>
// Forward decls
class Material;
namespace ui
{
/**
* A dialog containing a ShaderSelector widget combo and OK/Cancel
* buttons.
*/
class LightTextureChooser :
public wxutil::DialogBase
{
private:
// The ShaderSelector widget group, that contains the actual selection
// tools (treeview etc.)
ShaderSelector* _selector;
// The user's texture selection
std::string _selectedTexture;
private:
// Widget construction helpers
void createButtons(wxPanel* mainPanel, wxBoxSizer* dialogVBox);
public:
/**
* Construct the dialog window and its contents.
*/
LightTextureChooser();
/**
* Get the currently selected shader.
*
* @returns
* The selected shader name, or "" if there was no selection or the dialog
* was cancelled.
*/
std::string getSelectedTexture();
/**
* Highlights the given texture in the tree.
*/
void setSelectedTexture(const std::string& textureName);
};
} // namespace ui