/** @param parent Parent window.
* @param wrapped Control widget that we are wrapping.
* @param property ContentProperty that the widget is handling.
+ * @param part Part of Content that the property is in (e.g. &Content::video)
* @param model_getter Function on the Content to get the value.
* @param model_setter Function on the Content to set the value.
+ * @param view_to_model Function to convert a view value to a model value.
+ * @param model_to_view Function to convert a model value to a view value.
*/
ContentWidget (
wxWindow* parent,
update_from_model ();
for (typename List::iterator i = _content.begin(); i != _content.end(); ++i) {
- _connections.push_back ((*i)->Changed.connect (boost::bind (&ContentWidget::model_changed, this, _2)));
+ _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, _1, _3)));
}
}
_ignore_model_changes = false;
}
+ void show (bool s)
+ {
+ _wrapped->Show (s);
+ }
+
private:
void set_single ()
{
- if (_wrapped->IsShown ()) {
+ if (_wrapped->IsShown() || !_sizer) {
return;
}
void set_multiple ()
{
- if (_button->IsShown ()) {
+ if (_button->IsShown() || !_sizer) {
return;
}
}
}
- void model_changed (int property)
+ void model_changed (ChangeType type, int property)
{
- if (property == _property && !_ignore_model_changes) {
+ if (type == CHANGE_TYPE_DONE && property == _property && !_ignore_model_changes) {
update_from_model ();
}
}