X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fardour_ui.h;h=bc63d79d807278d46b89b9a0ef2098efaafe331a;hb=a02d8d254aca3c5f29395833458b4c8516c638d4;hp=c375bf89e29125af885dc836a2b9cfc18edfa864;hpb=17d54a0d1cac0ee698c85609030958ffaea0050a;p=ardour.git diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index c375bf89e2..bc63d79d80 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -47,6 +47,8 @@ #include #include #include +#include +#include #include #include #include @@ -55,9 +57,6 @@ #include #include "gtkmm2ext/gtk_ui.h" -#include "gtkmm2ext/click_box.h" -#include "gtkmm2ext/stateful_button.h" -#include "gtkmm2ext/bindable_button.h" #include "gtkmm2ext/bindings.h" #include "gtkmm2ext/visibility_tracker.h" @@ -70,10 +69,11 @@ #include "video_timeline.h" +#include "widgets/ardour_button.h" +#include "widgets/ardour_spacer.h" + #include "add_route_dialog.h" -#include "ardour_button.h" #include "ardour_dialog.h" -#include "ardour_spacer.h" #include "ardour_window.h" #include "editing.h" #include "enums.h" @@ -90,6 +90,7 @@ #include "engine_dialog.h" #include "export_video_dialog.h" #include "global_port_matrix.h" +#include "idleometer.h" #include "keyeditor.h" #include "location_ui.h" #include "lua_script_manager.h" @@ -114,18 +115,16 @@ class RouteParams_UI; class SessionOptionEditor; class SpeakerDialog; class GlobalPortMatrixWindow; +class IdleOMeter; #endif class VideoTimeLine; class ArdourKeyboard; -class ArdourVSpacer; class AudioClock; -class ButtonJoiner; class ConnectionEditor; class DuplicateRouteDialog; class MainClock; class Mixer_UI; -class ArdourPrompter; class PublicEditor; class SaveAsDialog; class SessionDialog; @@ -153,7 +152,8 @@ namespace Gtk { class ProgressBar; } -namespace Gtkmm2ext { +namespace ArdourWidgets { + class Prompter; class Tabbable; } @@ -186,7 +186,8 @@ public: int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string()); bool session_loaded; - int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile&); + bool session_load_in_progress; + int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile*); bool session_is_new() const { return _session_is_new; } ARDOUR::Session* the_session() { return _session; } @@ -266,16 +267,13 @@ public: void synchronize_sync_source_and_video_pullup (); void add_route (); - void add_route_dialog_finished (int); + void add_route_dialog_response (int); void add_routes_part_two (); void add_routes_thread (); void start_duplicate_routes (); - void add_lua_script (); - void remove_lua_script (); - void add_video (Gtk::Window* float_window); void remove_video (); void start_video_server_menu (Gtk::Window* float_window); @@ -392,7 +390,6 @@ protected: bool ignore_dual_punch; void toggle_punch_in (); void toggle_punch_out (); - bool ignore_session_monitoring; void toggle_session_monitoring_in (); void toggle_session_monitoring_disk (); void show_loop_punch_ruler_and_disallow_hide (); @@ -419,15 +416,15 @@ private: bool _initial_verbose_plugin_scan; bool first_time_engine_run; - void show_tabbable (Gtkmm2ext::Tabbable*); - void hide_tabbable (Gtkmm2ext::Tabbable*); - void detach_tabbable (Gtkmm2ext::Tabbable*); - void attach_tabbable (Gtkmm2ext::Tabbable*); - void button_change_tabbable_visibility (Gtkmm2ext::Tabbable*); - void key_change_tabbable_visibility (Gtkmm2ext::Tabbable*); + void show_tabbable (ArdourWidgets::Tabbable*); + void hide_tabbable (ArdourWidgets::Tabbable*); + void detach_tabbable (ArdourWidgets::Tabbable*); + void attach_tabbable (ArdourWidgets::Tabbable*); + void button_change_tabbable_visibility (ArdourWidgets::Tabbable*); + void key_change_tabbable_visibility (ArdourWidgets::Tabbable*); void toggle_editor_and_mixer (); - void tabbable_state_change (Gtkmm2ext::Tabbable&); + void tabbable_state_change (ArdourWidgets::Tabbable&); void toggle_meterbridge (); void toggle_luawindow (); @@ -436,8 +433,6 @@ private: void setup_transport (); void setup_clock (); - bool transport_expose (GdkEventExpose*); - static ARDOUR_UI *theArdourUI; SessionDialog *_session_dialog; @@ -465,7 +460,7 @@ private: void about_signal_response(int response); - Gtk::VBox top_packer; + Gtk::VBox top_packer; sigc::connection clock_signal_connection; void update_clocks (); @@ -483,27 +478,27 @@ private: Gtk::Frame transport_frame; Gtk::HBox transport_hbox; - ArdourVSpacer *secondary_clock_spacer; + ArdourWidgets::ArdourVSpacer* secondary_clock_spacer; void repack_transport_hbox (); void update_clock_visibility (); struct TransportControllable : public PBD::Controllable { - enum ToggleType { - Roll = 0, - Stop, - RecordEnable, - GotoStart, - GotoEnd, - AutoLoop, - PlaySelection, - }; - - TransportControllable (std::string name, ARDOUR_UI&, ToggleType); - void set_value (double, PBD::Controllable::GroupControlDisposition group_override); - double get_value (void) const; - - ARDOUR_UI& ui; - ToggleType type; + enum ToggleType { + Roll = 0, + Stop, + RecordEnable, + GotoStart, + GotoEnd, + AutoLoop, + PlaySelection, + }; + + TransportControllable (std::string name, ARDOUR_UI&, ToggleType); + void set_value (double, PBD::Controllable::GroupControlDisposition group_override); + double get_value (void) const; + + ARDOUR_UI& ui; + ToggleType type; }; boost::shared_ptr roll_controllable; @@ -519,23 +514,23 @@ private: void set_transport_controllable_state (const XMLNode&); XMLNode& get_transport_controllable_state (); - ArdourButton roll_button; - ArdourButton stop_button; - ArdourButton goto_start_button; - ArdourButton goto_end_button; - ArdourButton auto_loop_button; - ArdourButton play_selection_button; - ArdourButton rec_button; - ArdourButton punch_in_button; - ArdourButton punch_out_button; - ArdourButton layered_button; + ArdourWidgets::ArdourButton roll_button; + ArdourWidgets::ArdourButton stop_button; + ArdourWidgets::ArdourButton goto_start_button; + ArdourWidgets::ArdourButton goto_end_button; + ArdourWidgets::ArdourButton auto_loop_button; + ArdourWidgets::ArdourButton play_selection_button; + ArdourWidgets::ArdourButton rec_button; + ArdourWidgets::ArdourButton punch_in_button; + ArdourWidgets::ArdourButton punch_out_button; + ArdourWidgets::ArdourButton layered_button; - ArdourVSpacer recpunch_spacer; - ArdourVSpacer monitoring_spacer; + ArdourWidgets::ArdourVSpacer recpunch_spacer; + ArdourWidgets::ArdourVSpacer monitoring_spacer; - ArdourButton monitor_in_button; - ArdourButton monitor_disk_button; - ArdourButton auto_input_button; + ArdourWidgets::ArdourButton monitor_in_button; + ArdourWidgets::ArdourButton monitor_disk_button; + ArdourWidgets::ArdourButton auto_input_button; Gtk::Label punch_label; Gtk::Label layered_label; @@ -551,25 +546,30 @@ private: MiniTimeline mini_timeline; TimeInfoBox *time_info_box; - ArdourButton auto_return_button; - ArdourButton follow_edits_button; - ArdourButton click_button; - ArdourButton sync_button; + ArdourWidgets::ArdourButton auto_return_button; + ArdourWidgets::ArdourButton follow_edits_button; + ArdourWidgets::ArdourButton click_button; + ArdourWidgets::ArdourButton sync_button; - ArdourButton auditioning_alert_button; - ArdourButton solo_alert_button; - ArdourButton feedback_alert_button; - ArdourButton error_alert_button; + ArdourWidgets::ArdourButton auditioning_alert_button; + ArdourWidgets::ArdourButton solo_alert_button; + ArdourWidgets::ArdourButton feedback_alert_button; + ArdourWidgets::ArdourButton error_alert_button; - ArdourButton action_script_call_btn[10]; + ArdourWidgets::ArdourButton action_script_call_btn[10]; Gtk::Table action_script_table; Gtk::VBox alert_box; Gtk::VBox meter_box; - LevelMeterHBox * editor_meter; - float editor_meter_max_peak; - ArdourButton editor_meter_peak_display; - bool editor_meter_peak_button_release (GdkEventButton*); + ArdourWidgets::ArdourButton editor_meter_peak_display; + LevelMeterHBox * editor_meter; + float editor_meter_max_peak; + bool editor_meter_peak_button_release (GdkEventButton*); + + bool editor_meter_button_press (GdkEventButton* ev); + void popup_editor_meter_menu (GdkEventButton* ev); + void add_editor_meter_type_item (Gtk::Menu_Helpers::MenuList&, Gtk::RadioMenuItem::Group&, std::string const &, ARDOUR::MeterType); + bool _suspend_editor_meter_callbacks; void blink_handler (bool); sigc::connection blink_connection; @@ -652,12 +652,16 @@ private: void open_session (); void open_recent_session (); - bool process_save_template_prompter (ArdourPrompter& prompter); + bool process_save_template_prompter (ArdourWidgets::Prompter& prompter); void save_template (); + void manage_templates (); + + void meta_session_setup (const std::string& script_path); void edit_metadata (); void import_metadata (); + void set_loop_sensitivity (); void set_transport_sensitivity (bool); //stuff for ProTools-style numpad @@ -678,6 +682,8 @@ private: void transport_roll (); void transport_play_selection(); void transport_play_preroll(); + void transport_rec_preroll(); + void transport_rec_count_in(); void transport_forward (int option); void transport_rewind (int option); void transport_loop (); @@ -693,7 +699,7 @@ private: guint32 last_key_press_time; - bool process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it); + bool process_snapshot_session_prompter (ArdourWidgets::Prompter& prompter, bool switch_to_it); void snapshot_session (bool switch_to_it); void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file @@ -727,6 +733,7 @@ private: WM::Proxy audio_midi_setup; WM::Proxy export_video_dialog; WM::Proxy lua_script_window; + WM::Proxy idleometer; /* Windows/Dialogs that require a creator method */ @@ -838,6 +845,7 @@ private: PBD::ScopedConnectionList forever_connections; PBD::ScopedConnection halt_connection; + PBD::ScopedConnection editor_meter_connection; void step_edit_status_change (bool); @@ -850,6 +858,7 @@ private: int ambiguous_file (std::string file, std::vector hits); bool click_button_clicked (GdkEventButton *); + bool click_button_scroll (GdkEventScroll *); bool sync_button_clicked (GdkEventButton *); VisibilityGroup _status_bar_visibility; @@ -861,7 +870,7 @@ private: void feedback_detected (); - ArdourButton midi_panic_button; + ArdourWidgets::ArdourButton midi_panic_button; void midi_panic (); void successful_graph_sort (); @@ -893,9 +902,9 @@ private: void tabs_switch (GtkNotebookPage*, guint page_number); void tabs_page_added (Gtk::Widget*, guint); void tabs_page_removed (Gtk::Widget*, guint); - ArdourButton editor_visibility_button; - ArdourButton mixer_visibility_button; - ArdourButton prefs_visibility_button; + ArdourWidgets::ArdourButton editor_visibility_button; + ArdourWidgets::ArdourButton mixer_visibility_button; + ArdourWidgets::ArdourButton prefs_visibility_button; bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev, Gtkmm2ext::Bindings*); bool try_gtk_accel_binding (GtkWindow* win, GdkEventKey* ev, bool translate, GdkModifierType modifier); @@ -912,6 +921,9 @@ private: void escape (); void close_current_dialog (); void pre_release_dialog (); + + bool bind_lua_action_script (GdkEventButton*, int); + void update_action_script_btn (int i, const std::string&); }; #endif /* __ardour_gui_h__ */