X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontent_widget.h;h=62561192d6ebf7e27fb3b6a8ab98d2034b2a868c;hb=313319ba2d8544bc25524e02e634804a503b54f1;hp=1a9c85dde762f9cec226714ea96a3f78156c4897;hpb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;p=dcpomatic.git diff --git a/src/wx/content_widget.h b/src/wx/content_widget.h index 1a9c85dde..62561192d 100644 --- a/src/wx/content_widget.h +++ b/src/wx/content_widget.h @@ -22,17 +22,19 @@ * @brief ContentWidget class. */ + #ifndef DCPOMATIC_CONTENT_WIDGET_H #define DCPOMATIC_CONTENT_WIDGET_H + #include "wx_util.h" #include "lib/content.h" -#include #include #include -#include +#include #include + /** @class ContentWidget * @brief A widget which represents some Content state and which can be used * when multiple pieces of content are selected. @@ -43,7 +45,7 @@ * @param V Data type of state as used by the view. */ template -class ContentWidget : public boost::noncopyable +class ContentWidget { public: /** @param parent Parent window. @@ -60,12 +62,12 @@ public: wxWindow* parent, T* wrapped, int property, - boost::function (Content*)> part, - boost::function model_getter, - boost::function model_setter, - boost::function view_changed, - boost::function view_to_model, - boost::function model_to_view + std::function (Content*)> part, + std::function model_getter, + std::function model_setter, + std::function view_changed, + std::function view_to_model, + std::function model_to_view ) : _wrapped (wrapped) , _sizer (0) @@ -84,6 +86,9 @@ public: _button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentWidget::button_clicked, this)); } + ContentWidget (ContentWidget const&) = delete; + ContentWidget& operator= (ContentWidget const&) = delete; + /** @return the widget that we are wrapping */ T* wrapped () const { @@ -214,12 +219,12 @@ private: wxButton* _button; List _content; int _property; - boost::function (Content *)> _part; - boost::function _model_getter; - boost::function _model_setter; - boost::function _view_changed; - boost::function _view_to_model; - boost::function _model_to_view; + std::function (Content *)> _part; + std::function _model_getter; + std::function _model_setter; + std::function _view_changed; + std::function _view_to_model; + std::function _model_to_view; std::list _connections; bool _ignore_model_changes; }; @@ -238,10 +243,10 @@ public: wxWindow* parent, wxSpinCtrl* wrapped, int property, - boost::function (Content *)> part, - boost::function getter, - boost::function setter, - boost::function view_changed = boost::function() + std::function (Content *)> part, + std::function getter, + std::function setter, + std::function view_changed = std::function() ) : ContentWidget ( parent, @@ -266,10 +271,10 @@ public: wxWindow* parent, wxSpinCtrlDouble* wrapped, int property, - boost::function (Content *)> part, - boost::function getter, - boost::function setter, - boost::function view_changed = boost::function() + std::function (Content *)> part, + std::function getter, + std::function setter, + std::function view_changed = std::function() ) : ContentWidget ( parent, @@ -294,12 +299,12 @@ public: wxWindow* parent, wxChoice* wrapped, int property, - boost::function (Content *)> part, - boost::function getter, - boost::function setter, - boost::function view_to_model, - boost::function model_to_view, - boost::function view_changed = boost::function() + std::function (Content *)> part, + std::function getter, + std::function setter, + std::function view_to_model, + std::function model_to_view, + std::function view_changed = std::function() ) : ContentWidget ( parent,