| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "TextSpecifierPanel.h" |
| 4 |
|
| 5 |
namespace objectives |
| 6 |
{ |
| 7 |
|
| 8 |
namespace ce |
| 9 |
{ |
| 10 |
|
| 11 |
/** |
| 12 |
* SpecifierPanel subclass for the SPEC_GROUP specifier type. |
| 13 |
* It provides a text entry box with auto-completion functionality |
| 14 |
* for a few special cases like "loot_gold" etc. |
| 15 |
*/ |
| 16 |
class GroupSpecifierPanel : |
| 17 |
public TextSpecifierPanel |
| 18 |
{ |
| 19 |
private: |
| 20 |
// Map registration |
| 21 |
static struct RegHelper { |
| 22 |
RegHelper() { |
| 23 |
SpecifierPanelFactory::registerType( |
| 24 |
SpecifierType::SPEC_GROUP().getName(), |
| 25 |
SpecifierPanelPtr(new GroupSpecifierPanel()) |
| 26 |
); |
| 27 |
} |
| 28 |
} _regHelper; |
| 29 |
|
| 30 |
GroupSpecifierPanel() |
| 31 |
{} |
| 32 |
|
| 33 |
/** |
| 34 |
* Construct a GroupSpecifierPanel. |
| 35 |
*/ |
| 36 |
GroupSpecifierPanel(wxWindow* parent); |
| 37 |
|
| 38 |
public: |
| 39 |
// SpecifierPanel implementation |
| 40 |
SpecifierPanelPtr create(wxWindow* parent) const |
| 41 |
{ |
| 42 |
return SpecifierPanelPtr(new GroupSpecifierPanel(parent)); |
| 43 |
} |
| 44 |
}; |
| 45 |
|
| 46 |
} // namespace objectives |
| 47 |
|
| 48 |
} // namespace ce |