X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Faudio_mapping_view.h;h=fd8a16d5c667d3645c1b02e4aaabe1d12104d136;hb=78471c43c0c55fb9b25b4beb03dd861439da4f40;hp=6d2265784b1fd64aaa373538d3c62861f9da232f;hpb=c57c320a47aeb4d921ade5e3ed6a3f0ac59f6238;p=dcpomatic.git diff --git a/src/wx/audio_mapping_view.h b/src/wx/audio_mapping_view.h index 6d2265784..fd8a16d5c 100644 --- a/src/wx/audio_mapping_view.h +++ b/src/wx/audio_mapping_view.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington + Copyright (C) 2013-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -25,7 +25,6 @@ #include #include -#include #include "lib/audio_mapping.h" /** @class AudioMappingView @@ -46,7 +45,7 @@ class AudioMappingView : public wxPanel { public: - AudioMappingView (wxWindow *); + explicit AudioMappingView (wxWindow *); void set (AudioMapping); void set_input_channels (std::vector const & names); @@ -73,35 +72,44 @@ public: boost::signals2::signal Changed; private: - void left_click (wxGridEvent &); - void right_click (wxGridEvent &); - 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 paint (); + void paint_static (wxDC& dc, wxGraphicsContext* gc); + void paint_column_labels (wxDC& dc, wxGraphicsContext* gc); + void paint_column_lines (wxGraphicsContext* gc); + void paint_row_labels (wxDC& dc, wxGraphicsContext* gc); + void paint_row_lines (wxGraphicsContext* gc); + void paint_indicators (wxDC& dc); + void size (wxSizeEvent &); + void scroll (); + void left_down (wxMouseEvent &); + void right_down (wxMouseEvent &); + void motion (wxMouseEvent &); + void mouse_wheel (wxMouseEvent &); + boost::optional > mouse_event_to_channels (wxMouseEvent& ev) const; + boost::optional mouse_event_to_input_group_name (wxMouseEvent& ev) const; + void setup (); + wxString safe_input_channel_name (int n) const; + wxString safe_output_channel_name (int n) const; void off (); void full (); void minus6dB (); void edit (); - wxGrid* _grid; - wxPanel* _left_labels; - wxPanel* _top_labels; AudioMapping _map; wxMenu* _menu; - int _menu_row; - int _menu_column; - + wxPanel* _body; + wxScrollBar* _vertical_scroll; + wxScrollBar* _horizontal_scroll; + int _menu_input; + int _menu_output; + + std::vector _input_channels; + std::vector _output_channels; std::vector _input_groups; - std::vector > _input_group_positions; - int _last_tooltip_row; - int _last_tooltip_column; + boost::optional > _last_tooltip_channels; };