projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No-op: remove all trailing whitespace.
[dcpomatic.git]
/
src
/
wx
/
content_widget.h
diff --git
a/src/wx/content_widget.h
b/src/wx/content_widget.h
index bbe16039998e9d22db60594cd5b3534d856538ef..3fa1f0ddc20c168d6d45d0cdf773c2d872f93db9 100644
(file)
--- a/
src/wx/content_widget.h
+++ b/
src/wx/content_widget.h
@@
-41,7
+41,7
@@
* @param V Data type of state as used by the view.
*/
template <class S, class T, typename U, typename V>
* @param V Data type of state as used by the view.
*/
template <class S, class T, typename U, typename V>
-class ContentWidget
+class ContentWidget
: public boost::noncopyable
{
public:
/** @param parent Parent window.
{
public:
/** @param parent Parent window.
@@
-90,7
+90,7
@@
public:
}
_connections.clear ();
}
_connections.clear ();
-
+
_content = content;
_wrapped->Enable (!_content.empty ());
_content = content;
_wrapped->Enable (!_content.empty ());
@@
-103,11
+103,12
@@
public:
}
/** Add this widget to a wxGridBagSizer */
}
/** Add this widget to a wxGridBagSizer */
- void add (wxGridBagSizer* sizer, wxGBPosition position)
+ void add (wxGridBagSizer* sizer, wxGBPosition position
, wxGBSpan span = wxDefaultSpan
)
{
_sizer = sizer;
_position = position;
{
_sizer = sizer;
_position = position;
- _sizer->Add (_wrapped, _position);
+ _span = span;
+ _sizer->Add (_wrapped, _position, _span);
}
/** Update the view from the model */
}
/** Update the view from the model */
@@
-140,9
+141,9
@@
public:
}
_ignore_model_changes = false;
}
}
_ignore_model_changes = false;
}
-
+
private:
private:
-
+
void set_single ()
{
if (_wrapped->IsShown ()) {
void set_single ()
{
if (_wrapped->IsShown ()) {
@@
-151,7
+152,7
@@
private:
_sizer->Detach (_button);
_button->Hide ();
_sizer->Detach (_button);
_button->Hide ();
- _sizer->Add (_wrapped, _position);
+ _sizer->Add (_wrapped, _position
, _span
);
_wrapped->Show ();
_sizer->Layout ();
}
_wrapped->Show ();
_sizer->Layout ();
}
@@
-161,11
+162,11
@@
private:
if (_button->IsShown ()) {
return;
}
if (_button->IsShown ()) {
return;
}
-
+
_wrapped->Hide ();
_sizer->Detach (_wrapped);
_button->Show ();
_wrapped->Hide ();
_sizer->Detach (_wrapped);
_button->Show ();
- _sizer->Add (_button, _position);
+ _sizer->Add (_button, _position
, _span
);
_sizer->Layout ();
}
_sizer->Layout ();
}
@@
-183,10
+184,11
@@
private:
update_from_model ();
}
}
update_from_model ();
}
}
-
+
T* _wrapped;
wxGridBagSizer* _sizer;
wxGBPosition _position;
T* _wrapped;
wxGridBagSizer* _sizer;
wxGBPosition _position;
+ wxGBSpan _span;
wxButton* _button;
List _content;
int _property;
wxButton* _button;
List _content;
int _property;