- wxTreeItemId _root;
-
- typedef std::map<wxTreeItemId, boost::shared_ptr<Cinema> > CinemaMap;
- typedef std::map<wxTreeItemId, boost::shared_ptr<dcpomatic::Screen> > ScreenMap;
-
- CinemaMap _cinemas;
- ScreenMap _screens;
- CinemaMap _selected_cinemas;
- ScreenMap _selected_screens;
-
- bool _ignore_selection_change;
+ wxButton* _check_all;
+ wxButton* _uncheck_all;
+
+ /* We want to be able to search (and so remove selected things from the view)
+ * but not deselect them, so we maintain lists of selected cinemas and screens.
+ */
+ std::vector<std::shared_ptr<Cinema>> _selected_cinemas;
+ std::vector<std::shared_ptr<dcpomatic::Screen>> _selected_screens;
+ /* Likewise with checked screens, except that we can work out which cinemas
+ * are checked from which screens are checked, so we don't need to store the
+ * cinemas.
+ */
+ std::set<std::shared_ptr<dcpomatic::Screen>> _checked_screens;
+
+ std::map<wxTreeListItem, std::shared_ptr<Cinema>> _item_to_cinema;
+ std::map<wxTreeListItem, std::shared_ptr<dcpomatic::Screen>> _item_to_screen;
+ std::map<std::shared_ptr<Cinema>, wxTreeListItem> _cinema_to_item;
+ std::map<std::shared_ptr<dcpomatic::Screen>, wxTreeListItem> _screen_to_item;
+
+ bool _ignore_selection_change = false;
+ bool _ignore_check_change = false;
+
+ Collator _collator;
+
+ boost::signals2::scoped_connection _config_connection;
+ bool _ignore_cinemas_changed = false;