Happy new year.
[dcpomatic.git] / src / wx / audio_mapping_view.h
index 2a2bacb00f48a757ef3827d6d689afc900b8e1e6..6d2265784b1fd64aaa373538d3c62861f9da232f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -52,15 +52,38 @@ public:
        void set_input_channels (std::vector<std::string> const & names);
        void set_output_channels (std::vector<std::string> const & names);
 
+       struct Group
+       {
+               Group (int f, int t, std::string n)
+                       : from (f)
+                       , to (t)
+                       , name (n)
+               {}
+
+               /** First channel index (from 0) */
+               int from;
+               /** Last channel index (from 0) */
+               int to;
+               /** Name of this group */
+               std::string name;
+       };
+
+       void set_input_groups (std::vector<Group> const & groups);
+
        boost::signals2::signal<void (AudioMapping)> Changed;
 
 private:
        void left_click (wxGridEvent &);
        void right_click (wxGridEvent &);
-       void mouse_moved (wxMouseEvent &);
+       void mouse_moved_grid (wxMouseEvent &);
        void update_cells ();
        void map_values_changed ();
        void sized (wxSizeEvent &);
+       void paint_left_labels ();
+       void paint_top_labels ();
+       void mouse_moved_left_labels (wxMouseEvent &);
+       void setup_sizes ();
+       void grid_scrolled ();
 
        void off ();
        void full ();
@@ -68,13 +91,17 @@ private:
        void edit ();
 
        wxGrid* _grid;
-       wxSizer* _sizer;
+       wxPanel* _left_labels;
+       wxPanel* _top_labels;
        AudioMapping _map;
 
        wxMenu* _menu;
        int _menu_row;
        int _menu_column;
 
+       std::vector<Group> _input_groups;
+       std::vector<std::pair<int, int> > _input_group_positions;
+
        int _last_tooltip_row;
        int _last_tooltip_column;
 };