projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support PNG subs in DCPSubtitleDecoder (#1479).
[dcpomatic.git]
/
src
/
wx
/
editable_list.h
diff --git
a/src/wx/editable_list.h
b/src/wx/editable_list.h
index 681588215f539a28457caed75a4250218b2b7316..a7c1a610295da46c6fdad210b7afb58881d4600d 100644
(file)
--- a/
src/wx/editable_list.h
+++ b/
src/wx/editable_list.h
@@
-22,6
+22,7
@@
#define DCPOMATIC_EDITABLE_LIST_H
#include "wx_util.h"
#define DCPOMATIC_EDITABLE_LIST_H
#include "wx_util.h"
+#include "dcpomatic_button.h"
#include <wx/wx.h>
#include <wx/listctrl.h>
#include <boost/function.hpp>
#include <wx/wx.h>
#include <wx/listctrl.h>
#include <boost/function.hpp>
@@
-41,7
+42,8
@@
public:
boost::function<void (std::vector<T>)> set,
boost::function<std::string (T, int)> column,
bool can_edit = true,
boost::function<void (std::vector<T>)> set,
boost::function<std::string (T, int)> column,
bool can_edit = true,
- bool title = true
+ bool title = true,
+ int column_width = 200
)
: wxPanel (parent)
, _get (get)
)
: wxPanel (parent)
, _get (get)
@@
-57,13
+59,13
@@
public:
if (title) {
style |= wxLC_NO_HEADER;
}
if (title) {
style |= wxLC_NO_HEADER;
}
- _list = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxSize (columns.size() *
200
, 100), style);
+ _list = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxSize (columns.size() *
column_width
, 100), style);
for (size_t i = 0; i < columns.size(); ++i) {
wxListItem ip;
ip.SetId (i);
ip.SetText (std_to_wx (columns[i]));
for (size_t i = 0; i < columns.size(); ++i) {
wxListItem ip;
ip.SetId (i);
ip.SetText (std_to_wx (columns[i]));
- ip.SetWidth (
200
);
+ ip.SetWidth (
column_width
);
_list->InsertColumn (i, ip);
}
_list->InsertColumn (i, ip);
}
@@
-71,13
+73,13
@@
public:
{
wxSizer* s = new wxBoxSizer (wxVERTICAL);
{
wxSizer* s = new wxBoxSizer (wxVERTICAL);
- _add = new
wxButton (this, wxID_ANY
, _("Add..."));
+ _add = new
Button (this
, _("Add..."));
s->Add (_add, 0, wxTOP | wxBOTTOM, 2);
if (can_edit) {
s->Add (_add, 0, wxTOP | wxBOTTOM, 2);
if (can_edit) {
- _edit = new
wxButton (this, wxID_ANY
, _("Edit..."));
+ _edit = new
Button (this
, _("Edit..."));
s->Add (_edit, 0, wxTOP | wxBOTTOM, 2);
}
s->Add (_edit, 0, wxTOP | wxBOTTOM, 2);
}
- _remove = new
wxButton (this, wxID_ANY
, _("Remove"));
+ _remove = new
Button (this
, _("Remove"));
s->Add (_remove, 0, wxTOP | wxBOTTOM, 2);
_sizer->Add (s, 0, wxLEFT, DCPOMATIC_SIZER_X_GAP);
}
s->Add (_remove, 0, wxTOP | wxBOTTOM, 2);
_sizer->Add (s, 0, wxLEFT, DCPOMATIC_SIZER_X_GAP);
}