Move reel markers to the top of the timeline (#846).
[dcpomatic.git] / src / wx / screens_panel.h
index 829208880e843cf1cb3cadcb0c62340fb6f3cef7..a982b8a2d4ff32bb02efed656c828150958f2939 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2015-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -41,16 +41,15 @@ public:
 private:
        void add_cinemas ();
        void add_cinema (boost::shared_ptr<Cinema>);
-       void add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<Screen>);
+       boost::optional<wxTreeItemId> add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<Screen>);
        void add_cinema_clicked ();
        void edit_cinema_clicked ();
        void remove_cinema_clicked ();
        void add_screen_clicked ();
        void edit_screen_clicked ();
        void remove_screen_clicked ();
-       std::list<std::pair<wxTreeItemId, boost::shared_ptr<Cinema> > > selected_cinemas () const;
-       std::list<std::pair<wxTreeItemId, boost::shared_ptr<Screen> > > selected_screens () const;
-       void selection_changed (wxTreeEvent &);
+       void selection_changed_shim (wxTreeEvent &);
+       void selection_changed ();
        void search_changed ();
 
        wxSearchCtrl* _search;
@@ -62,9 +61,14 @@ private:
        wxButton* _edit_screen;
        wxButton* _remove_screen;
        wxTreeItemId _root;
-       std::map<wxTreeItemId, boost::shared_ptr<Cinema> > _cinemas;
-       std::map<wxTreeItemId, boost::shared_ptr<Screen> > _screens;
-       std::list<boost::shared_ptr<Cinema> > _selected_cinemas;
-       std::list<boost::shared_ptr<Screen> > _selected_screens;
+
+       typedef std::map<wxTreeItemId, boost::shared_ptr<Cinema> > CinemaMap;
+       typedef std::map<wxTreeItemId, boost::shared_ptr<Screen> > ScreenMap;
+
+       CinemaMap _cinemas;
+       ScreenMap _screens;
+       CinemaMap _selected_cinemas;
+       ScreenMap _selected_screens;
+
        bool _ignore_selection_change;
 };