| 1 |
#pragma once |
| 2 |
|
| 3 |
#include <set> |
| 4 |
|
| 5 |
#include "wxutil/dialog/DialogBase.h" |
| 6 |
#include "wxutil/dataview/DeclarationTreeView.h" |
| 7 |
|
| 8 |
#include "AIVocalSetPreview.h" |
| 9 |
|
| 10 |
class wxTextCtrl; |
| 11 |
|
| 12 |
namespace ui |
| 13 |
{ |
| 14 |
|
| 15 |
class AIVocalSetChooserDialog : |
| 16 |
public wxutil::DialogBase |
| 17 |
{ |
| 18 |
public: |
| 19 |
typedef std::set<std::string> SetList; |
| 20 |
|
| 21 |
private: |
| 22 |
wxutil::DeclarationTreeView::Columns _columns; |
| 23 |
wxutil::DeclarationTreeView* _setView; |
| 24 |
|
| 25 |
wxTextCtrl* _description; |
| 26 |
|
| 27 |
// The name of the currently selected set |
| 28 |
std::string _selectedSet; |
| 29 |
|
| 30 |
AIVocalSetPreview* _preview; |
| 31 |
|
| 32 |
public: |
| 33 |
AIVocalSetChooserDialog(); |
| 34 |
|
| 35 |
// Set the selection to a given entityDef |
| 36 |
void setSelectedVocalSet(const std::string& setName); |
| 37 |
|
| 38 |
// Get the currently selected set (is empty when nothing is selected) |
| 39 |
std::string getSelectedVocalSet(); |
| 40 |
|
| 41 |
private: |
| 42 |
void populateSetStore(); |
| 43 |
|
| 44 |
// Searches all entity classes for available sets |
| 45 |
static void findAvailableSets(); |
| 46 |
|
| 47 |
void handleSetSelectionChanged(); |
| 48 |
void onSetSelectionChanged(wxDataViewEvent& ev); |
| 49 |
void _onItemActivated( wxDataViewEvent& ev ); |
| 50 |
}; |
| 51 |
|
| 52 |
} // namespace ui |