+
+ _grid->AutoSize ();
+}
+
+/** @param c Number of DCP channels */
+void
+AudioMappingView::set_channels (int c)
+{
+ c++;
+
+ if (c < _grid->GetNumberCols ()) {
+ _grid->DeleteCols (c, _grid->GetNumberCols() - c);
+ } else if (c > _grid->GetNumberCols ()) {
+ _grid->InsertCols (_grid->GetNumberCols(), c - _grid->GetNumberCols());
+ set_column_labels ();
+ }
+
+ update_cells ();
+}
+
+void
+AudioMappingView::set_column_labels ()
+{
+ int const c = _grid->GetNumberCols ();
+
+ _grid->SetColLabelValue (0, _("Content"));
+
+#if MAX_DCP_AUDIO_CHANNELS != 12
+#warning AudioMappingView::set_column_labels() is expecting the wrong MAX_DCP_AUDIO_CHANNELS
+#endif
+
+ if (c > 0) {
+ _grid->SetColLabelValue (1, _("L"));
+ }
+
+ if (c > 1) {
+ _grid->SetColLabelValue (2, _("R"));
+ }
+
+ if (c > 2) {
+ _grid->SetColLabelValue (3, _("C"));
+ }
+
+ if (c > 3) {
+ _grid->SetColLabelValue (4, _("Lfe"));
+ }
+
+ if (c > 4) {
+ _grid->SetColLabelValue (5, _("Ls"));
+ }
+
+ if (c > 5) {
+ _grid->SetColLabelValue (6, _("Rs"));
+ }
+
+ if (c > 6) {
+ _grid->SetColLabelValue (7, _("HI"));
+ }
+
+ if (c > 7) {
+ _grid->SetColLabelValue (8, _("VI"));
+ }
+
+ if (c > 8) {
+ _grid->SetColLabelValue (9, _("Lc"));
+ }
+
+ if (c > 9) {
+ _grid->SetColLabelValue (10, _("Rc"));
+ }
+
+ if (c > 10) {
+ _grid->SetColLabelValue (11, _("BsL"));
+ }
+
+ if (c > 11) {
+ _grid->SetColLabelValue (12, _("BsR"));
+ }
+
+ _grid->AutoSize ();