- wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
- sizer->Add (_filters, 1, wxEXPAND | wxALL, 6);
+ auto panel = new wxPanel (this);
+ auto sizer = new wxBoxSizer (wxVERTICAL);
+
+ auto filters = Filter::all ();
+
+ map<string, list<Filter>> categories;
+
+ for (auto i: filters) {
+ auto j = categories.find(i.category());
+ if (j == categories.end ()) {
+ categories[i.category()] = { i };
+ } else {
+ j->second.push_back (i);
+ }
+ }
+
+ for (auto const& category: categories) {
+ auto c = new StaticText(panel, std_to_wx(category.first));
+ auto font = c->GetFont();
+ font.SetWeight(wxFONTWEIGHT_BOLD);
+ c->SetFont(font);
+ sizer->Add (c, 1, wxTOP | wxBOTTOM, DCPOMATIC_SIZER_GAP);