Use strcoll() to compare cinemas/screens in the KDM dialog (#1904).
[dcpomatic.git] / src / wx / screens_panel.h
index 70b12a1d656451b4e8eb666bc9ce0c2f2f0a7492..7703d69aad1cec27e1ebf90ec5a6fc6272d02036 100644 (file)
@@ -32,8 +32,29 @@ namespace dcpomatic {
        class Screen;
 }
 
+
 class Cinema;
 
+
+/** Shim around wxTreeCtrl so we can use strcoll() to compare things */
+class TreeCtrl : public wxTreeCtrl
+{
+public:
+       wxDECLARE_DYNAMIC_CLASS (TreeCtrl);
+
+       TreeCtrl () {}
+
+       TreeCtrl (wxWindow* parent)
+               : wxTreeCtrl (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_HIDE_ROOT | wxTR_MULTIPLE | wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT)
+       {}
+
+       virtual ~TreeCtrl () {}
+
+private:
+       int OnCompareItems (wxTreeItemId const& a, wxTreeItemId const& b);
+};
+
+
 class ScreensPanel : public wxPanel
 {
 public:
@@ -60,7 +81,7 @@ private:
        void search_changed ();
 
        wxSearchCtrl* _search;
-       wxTreeCtrl* _targets;
+       TreeCtrl* _targets;
        wxButton* _add_cinema;
        wxButton* _edit_cinema;
        wxButton* _remove_cinema;