X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontent_panel.h;h=13393f632701edab5a13107a962363ffc1d931da;hb=ac25cd82d5d29c79b46033a742aaea33c700a524;hp=e177c0f1ebe5ee4fadac330e771bbb7553bb2a1d;hpb=0bd80b641875632b9b2b17530d00e4546bba8088;p=dcpomatic.git diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h index e177c0f1e..13393f632 100644 --- a/src/wx/content_panel.h +++ b/src/wx/content_panel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2018 Carl Hetherington + Copyright (C) 2012-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -18,17 +18,19 @@ */ -#include -#include +#include "content_menu.h" #include "lib/types.h" #include "lib/film.h" -#include "content_menu.h" +#include +#include +#include class wxNotebook; class wxPanel; class wxSizer; class wxListCtrl; class wxListEvent; +class wxSplitterWindow; class TimelineDialog; class FilmEditor; class ContentSubPanel; @@ -42,7 +44,7 @@ class FilmViewer; class ContentPanel : public boost::noncopyable { public: - ContentPanel (wxNotebook *, boost::shared_ptr, FilmViewer* viewer); + ContentPanel (wxNotebook *, boost::shared_ptr, boost::weak_ptr viewer); boost::shared_ptr film () const { return _film; @@ -56,8 +58,8 @@ public: void film_changed (Film::Property p); void film_content_changed (int p); - wxPanel* panel () const { - return _panel; + wxWindow* window () const { + return _splitter; } wxNotebook* notebook () const { @@ -74,14 +76,17 @@ public: bool remove_clicked (bool hotkey); void timeline_clicked (); - FilmViewer* film_viewer () const { + boost::weak_ptr film_viewer () const { return _film_viewer; } boost::signals2::signal SelectionChanged; private: - void selection_changed (); + void item_selected (); + void item_deselected (); + void item_deselected_idle (); + void check_selection (); void add_folder_clicked (); void add_dcp_clicked (); void earlier_clicked (); @@ -95,8 +100,7 @@ private: void add_files (std::list); std::list panels () const; - wxPanel* _panel; - wxSizer* _sizer; + wxSplitterWindow* _splitter; wxNotebook* _notebook; wxListCtrl* _content; wxButton* _add_file; @@ -113,10 +117,11 @@ private: ContentMenu* _menu; TimelineDialog* _timeline_dialog; wxNotebook* _parent; - ContentList _last_selected; wxWindow* _last_selected_tab; boost::shared_ptr _film; - FilmViewer* _film_viewer; + boost::weak_ptr _film_viewer; bool _generally_sensitive; + bool _ignore_deselect; + bool _no_check_selection; };