}
+void
+Choice::add(wxString const& entry, wxString const& data)
+{
+ if (_needs_clearing) {
+ Clear();
+ _needs_clearing = false;
+ }
+
+ Append(entry, new wxStringClientData(data));
+}
+
+
void
Choice::set(int index)
{
return sel;
}
+
+optional<wxString>
+Choice::get_data() const
+{
+ auto index = get();
+ if (!index) {
+ return {};
+ }
+
+ return dynamic_cast<wxStringClientData*>(GetClientObject(*index))->GetData();
+}
+