Debian Codegraph @

plugins/dm.editing/AIHeadChooserDialog.h

raw
1 #pragma once
2
3 #include "wxutil/dialog/DialogBase.h"
4 #include "wxutil/preview/ModelPreview.h"
5 #include "wxutil/dataview/DeclarationTreeView.h"
6
7 namespace ui
8 {
9
10 class AIHeadChooserDialog :
11 public wxutil::DialogBase
12 {
13 private:
14 wxutil::DeclarationTreeView::Columns _columns;
15 wxutil::DeclarationTreeView* _headsView;
16
17 wxTextCtrl* _description;
18
19 // The model preview
20 std::unique_ptr<wxutil::ModelPreview> _preview;
21
22 // The name of the currently selected head
23 std::string _selectedHead;
24
25 public:
26 AIHeadChooserDialog();
27
28 // Set the selection to a given entityDef
29 void setSelectedHead(const std::string& headDef);
30
31 // Get the currently selected head (is empty when nothing is selected)
32 std::string getSelectedHead();
33
34 private:
35 void populateHeadStore();
36
37 void handleSelectionChanged();
38 void onHeadSelectionChanged(wxDataViewEvent& ev);
39 void _onItemActivated( wxDataViewEvent& ev );
40 };
41
42 } // namespace