+ if (search.empty()) {
+ return true;
+ }
+
+ auto name = base->name();
+ transform(name.begin(), name.end(), name.begin(), ::tolower);
+ if (name.find(search) != string::npos) {
+ return true;
+ }
+
+ auto group = dynamic_pointer_cast<DKDMGroup>(base);
+ if (!group) {
+ return false;
+ }
+
+ auto const children = group->children();
+ return std::any_of(children.begin(), children.end(), [this, search](shared_ptr<DKDMBase> child) {
+ return matches(child, search);
+ });
+ }
+
+ /** Add DKDMs to the view that match the current search */
+ void add_dkdm_to_view(shared_ptr<DKDMBase> base)
+ {
+ auto search = wx_to_std(_dkdm_search->GetValue());
+ transform(search.begin(), search.end(), search.begin(), ::tolower);
+
+ optional<wxTreeItemId> group_to_expand;
+