/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 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
*/
+/** @file src/wx/content_widget.h
+ * @brief ContentWidget class.
+ */
+
#ifndef DCPOMATIC_MULTIPLE_WIDGET_H
#define DCPOMATIC_MULTIPLE_WIDGET_H
#include <boost/function.hpp>
#include "wx_util.h"
-/** A widget which represents some Content state and which can be used
+/** @class ContentWidget
+ * @brief A widget which represents some Content state and which can be used
* when multiple pieces of content are selected.
*
* @param S Type containing the content being represented (e.g. VideoContent)
}
};
+template <class S>
+class ContentSpinCtrlDouble : public ContentWidget<S, wxSpinCtrlDouble, double, double>
+{
+public:
+ ContentSpinCtrlDouble (
+ wxWindow* parent,
+ wxSpinCtrlDouble* wrapped,
+ int property,
+ boost::function<double (S*)> getter,
+ boost::function<void (S*, double)> setter
+ )
+ : ContentWidget<S, wxSpinCtrlDouble, double, double> (
+ parent,
+ wrapped,
+ property,
+ getter, setter,
+ &caster<double, double>,
+ &caster<double, double>
+ )
+ {
+ wrapped->Bind (wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, boost::bind (&ContentWidget<S, wxSpinCtrlDouble, double, double>::view_changed, this));
+ }
+};
+
template <class S, class U>
class ContentChoice : public ContentWidget<S, wxChoice, U, int>
{