#include "ardour_dialog.h"
#include "editing.h"
#include "ui_config.h"
+#include "window_proxy.h"
class About;
class AddRouteDialog;
class SessionOptionEditor;
class Splash;
class ThemeManager;
+class MidiTracer;
+class WindowProxyBase;
+class GlobalPortMatrixWindow;
namespace Gtkmm2ext {
class TearOff;
ARDOUR_UI (int *argcp, char **argvp[]);
~ARDOUR_UI();
- bool run_startup (bool should_be_new);
-
- void show ();
- bool shown() { return shown_flag; }
+ bool run_startup (bool should_be_new, std::string load_template);
void show_splash ();
void hide_splash ();
+ void launch_chat ();
+ void launch_manual ();
+ void launch_reference ();
void show_about ();
void hide_about ();
- void idle_load (const Glib::ustring& path);
+ void idle_load (const std::string& path);
void finish();
- int load_session (const Glib::ustring& path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring());
+ int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
bool session_loaded;
- int build_session (const Glib::ustring& path, const Glib::ustring& snapshot,
- uint32_t ctl_chns,
- uint32_t master_chns,
- ARDOUR::AutoConnectOption input_connect,
- ARDOUR::AutoConnectOption output_connect,
- uint32_t nphysin,
- uint32_t nphysout,
- nframes_t initial_length);
+ 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; }
_will_create_new_session_automatically = yn;
}
- int get_session_parameters (bool quit_on_cancel, bool should_be_new = false);
- void parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& session_name, Glib::ustring& session_path, bool& existing_session);
- int load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session);
- int build_session_from_nsd (const Glib::ustring& session_name, const Glib::ustring& session_path);
- bool ask_about_loading_existing_session (const Glib::ustring& session_path);
+ int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
+ void parse_cmdline_path (const std::string& cmdline_path, std::string& session_name, std::string& session_path, bool& existing_session);
+ int load_cmdline_session (const std::string& session_name, const std::string& session_path, bool& existing_session);
+ int build_session_from_nsd (const std::string& session_name, const std::string& session_path);
+ bool ask_about_loading_existing_session (const std::string& session_path);
/// @return true if session was successfully unloaded.
int unload_session (bool hide_stuff = false);
void close_session();
- int save_state_canfail (std::string state_name = "");
- void save_state (const std::string & state_name = "");
+ int save_state_canfail (std::string state_name = "", bool switch_to_it = false);
+ void save_state (const std::string & state_name = "", bool switch_to_it = false);
static double gain_to_slider_position (ARDOUR::gain_t g);
static ARDOUR::gain_t slider_position_to_gain (double pos);
void toggle_theme_manager ();
void toggle_bundle_manager ();
void toggle_big_clock_window ();
+ void new_midi_tracer_window ();
void toggle_route_params_window ();
void toggle_editing_space();
+ void toggle_keep_tearoffs();
Gtk::Tooltips& tooltips() { return _tooltips; }
XMLNode* editor_settings() const;
XMLNode* mixer_settings () const;
XMLNode* keyboard_settings () const;
+ XMLNode* tearoff_settings (const char*) const;
void save_ardour_state ();
gboolean configure_handler (GdkEventConfigure* conf);
- void do_transport_locate (nframes_t position);
+ void do_transport_locate (nframes_t, bool);
void halt_on_xrun_message ();
void xrun_handler (nframes_t);
void create_xrun_marker (nframes_t);
void restore_clock_modes ();
void reset_main_clocks ();
+ void synchronize_sync_source_and_video_pullup ();
+
void add_route (Gtk::Window* float_window);
void session_add_audio_track (int input_channels, int32_t output_channels, ARDOUR::TrackMode mode, ARDOUR::RouteGroup* route_group, uint32_t how_many) {
void set_shuttle_fract (double);
+ void add_window_proxy (WindowProxyBase *);
+ void remove_window_proxy (WindowProxyBase *);
+
protected:
friend class PublicEditor;
void goto_editor_window ();
void goto_mixer_window ();
- void toggle_editor_mixer_on_top ();
- bool _mixer_on_top;
+ void toggle_mixer_window ();
+ void toggle_mixer_on_top ();
Gtk::ToggleButton preroll_button;
Gtk::ToggleButton postroll_button;
void map_transport_state ();
int32_t do_engine_start ();
- void engine_halted ();
+ void engine_halted (const char* reason, bool free_reason);
void engine_stopped ();
void engine_running ();
void about_signal_response(int response);
- private:
Gtk::VBox top_packer;
sigc::connection clock_signal_connection;
void manage_window (Gtk::Window&);
AudioClock big_clock;
- Gtk::Window* big_clock_window;
- int original_big_clock_width;
- int original_big_clock_height;
- double original_big_clock_font_size;
+ ActionWindowProxy<Gtk::Window>* big_clock_window;
+ int original_big_clock_width;
+ int original_big_clock_height;
+ double original_big_clock_font_size;
void big_clock_size_allocate (Gtk::Allocation&);
bool idle_big_clock_text_resizer (int width, int height);
void update_transport_clocks (nframes_t pos);
void record_state_changed ();
+ std::list<MidiTracer*> _midi_tracer_windows;
+
/* Transport Control */
void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
};
TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
- void set_value (float);
- float get_value (void) const;
+ void set_value (double);
+ double get_value (void) const;
void set_id (const std::string&);
void auditioning_changed (bool);
void _auditioning_changed (bool);
- void solo_alert_toggle ();
- void audition_alert_toggle ();
+ bool solo_alert_press (GdkEventButton* ev);
+ bool audition_alert_press (GdkEventButton* ev);
void big_clock_value_changed ();
void primary_clock_value_changed ();
add (visible_name);
add (fullpath);
}
- Gtk::TreeModelColumn<Glib::ustring> visible_name;
- Gtk::TreeModelColumn<Glib::ustring> fullpath;
+ Gtk::TreeModelColumn<std::string> visible_name;
+ Gtk::TreeModelColumn<std::string> fullpath;
};
RecentSessionModelColumns recent_session_columns;
sigc::connection point_oh_five_second_connection;
sigc::connection point_zero_one_second_connection;
+ AudioClock _menu_bar_clock;
+ sigc::connection _menu_bar_clock_connection;
+ void menu_bar_clock_value_changed ();
+ void show_menu_bar_clock ();
+ void hide_menu_bar_clock ();
+
gint session_menu (GdkEventButton *);
bool _will_create_new_session_automatically;
guint32 last_key_press_time;
- void snapshot_session ();
+ void snapshot_session (bool switch_to_it);
Mixer_UI *mixer;
int create_mixer ();
BundleManager *bundle_manager;
void create_bundle_manager ();
- LocationUIWindow *location_ui;
+ ActionWindowProxy<LocationUIWindow>* location_ui;
int create_location_ui ();
void handle_locations_change (ARDOUR::Location*);
+ ActionWindowProxy<GlobalPortMatrixWindow>* _global_port_matrix[ARDOUR::DataType::num_types];
+ void toggle_global_port_matrix (ARDOUR::DataType);
+
static UIConfiguration *ui_config;
ThemeManager *theme_manager;
About* about;
Splash* splash;
void pop_back_splash ();
- bool shown_flag;
/* cleanup */
ARDOUR::microseconds_t last_peak_grab;
ARDOUR::microseconds_t last_shuttle_request;
- struct DiskBufferStat {
- time_t when;
- uint32_t capture;
- uint32_t playback;
-
- DiskBufferStat (time_t w, uint32_t c, uint32_t p)
- : when (w), capture (c), playback (p) {}
- };
-
- std::list<DiskBufferStat> disk_buffer_stats;
- void push_buffer_stats (uint32_t, uint32_t);
- void write_buffer_stats ();
-
bool have_disk_speed_dialog_displayed;
void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
void disk_overrun_handler ();
Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
const char *msg);
Gtk::Label status_bar_label;
+ bool status_bar_button_press (GdkEventButton*);
Gtk::ToggleButton error_log_button;
void loading_message (const std::string& msg);
void platform_specific ();
void platform_setup ();
void fontconfig_dialog ();
+ void toggle_translations ();
PBD::ScopedConnectionList forever_connections;
+
+ void step_edit_status_change (bool);
+
+ /* these are used only in response to a platform-specific "ShouldQuit" signal
+ */
+ bool idle_finish ();
+ void queue_finish ();
+
+ std::list<WindowProxyBase*> _window_proxies;
+
+ int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
};
#endif /* __ardour_gui_h__ */