/*
- 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
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;
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;
};