#include "ardour_window.h"
#include "editing.h"
#include "engine_dialog.h"
+#include "export_video_dialog.h"
#include "meterbridge.h"
#include "ui_config.h"
#include "enums.h"
#include "route_params_ui.h"
#include "session_option_editor.h"
#include "speaker_dialog.h"
-#include "theme_manager.h"
class VideoTimeLine;
class ArdourKeyboard;
class PublicEditor;
class RCOptionEditor;
class RouteParams_UI;
+class SaveAsDialog;
class SessionDialog;
class SessionOptionEditor;
class ShuttleControl;
class LevelMeterHBox;
class GUIObjectState;
-namespace Gtkmm2ext {
- class TearOff;
-}
-
namespace ARDOUR {
class ControlProtocolInfo;
class IO;
class ProcessThread;
}
+namespace Gtkmm2ext {
+ class TearOff;
+}
+
+namespace Gtk {
+ class ProgressBar;
+}
+
class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
{
- public:
- ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
+ private:
+ /* This must be the first data element because constructor ordering
+ relies on it.
+ */
+ UIConfiguration* ui_config;
+
+ public:
+ ARDOUR_UI (int *argcp, char **argvp[], const char* localedir, UIConfiguration*);
~ARDOUR_UI();
bool run_startup (bool should_be_new, std::string load_template);
void launch_chat ();
void launch_manual ();
void launch_reference ();
+ void launch_tracker ();
+ void launch_subscribe ();
+ void launch_cheat_sheet ();
+ void launch_website ();
+ void launch_website_dev ();
+ void launch_forums ();
+ void launch_howto_report ();
void show_about ();
void hide_about ();
- void idle_load (const std::string& path);
+ void load_from_application_api (const std::string& path);
void finish();
int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
void save_state (const std::string & state_name = "", bool switch_to_it = false);
static ARDOUR_UI *instance () { return theArdourUI; }
- static UIConfiguration *config () { return ui_config; }
-
- PublicEditor& the_editor(){return *editor;}
+ static UIConfiguration *config () { return theArdourUI->ui_config; }
+
+ PublicEditor& the_editor() { return *editor;}
Mixer_UI* the_mixer() { return mixer; }
void new_midi_tracer_window ();
Gtk::Tooltips& tooltips() { return _tooltips; }
- Gtk::HBox& editor_transport_box() { return _editor_transport_box; }
-
static PublicEditor* _instance;
- static sigc::signal<void,bool> Blink;
-
- /** point_zero_one_seconds -- 10Hz ^= 100ms */
- static sigc::signal<void> RapidScreenUpdate;
-
- /** point_zero_something_seconds -- currently 25Hz ^= 40ms */
- static sigc::signal<void> SuperRapidScreenUpdate;
/** Emitted frequently with the audible frame, false, and the edit point as
* parameters respectively.
void create_xrun_marker (framepos_t);
GUIObjectState* gui_object_state;
-
+
MainClock* primary_clock;
MainClock* secondary_clock;
void focus_on_clock ();
bool start_video_server (Gtk::Window* float_window, bool popup_msg);
void stop_video_server (bool ask_confirm=false);
void flush_videotimeline_cache (bool localcacheonly=false);
+ void export_video (bool range = false);
void session_add_audio_track (
int input_channels,
void maximise_editing_space ();
void restore_editing_space ();
+ void show_ui_prefs ();
+
void update_tearoff_visibility ();
void setup_profile ();
int disconnect_from_engine ();
int reconnect_to_engine ();
+ void hide_application ();
protected:
friend class PublicEditor;
void toggle_session_options_window ();
private:
+ PublicEditor* editor;
+ Mixer_UI* mixer;
Gtk::Tooltips _tooltips;
- NSM_Client *nsm;
+ NSM_Client* nsm;
bool _was_dirty;
bool _mixer_on_top;
+ bool _initial_verbose_plugin_scan;
bool first_time_engine_run;
void goto_editor_window ();
int ask_about_saving_session (const std::vector<std::string>& actions);
+ void save_session_at_its_request (std::string);
/* periodic safety backup, to be precise */
gint autosave_session();
void update_autosave();
void use_config ();
- static gint _blink (void *);
- void blink ();
- gint blink_timeout_tag;
- bool blink_on;
- void start_blinking ();
- void stop_blinking ();
-
void about_signal_response(int response);
Gtk::VBox top_packer;
std::list<MidiTracer*> _midi_tracer_windows;
- /* Transport Control */
-
void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
+ void reattach_all_tearoffs ();
+
+ /* Transport Control */
Gtkmm2ext::TearOff* transport_tearoff;
Gtk::Frame transport_frame;
Gtk::HBox transport_tearoff_hbox;
- Gtk::HBox _editor_transport_box;
Gtk::HBox transport_hbox;
Gtk::Fixed transport_base;
Gtk::Fixed transport_button_base;
ArdourButton auditioning_alert_button;
ArdourButton solo_alert_button;
ArdourButton feedback_alert_button;
+ ArdourButton error_alert_button;
Gtk::VBox alert_box;
Gtk::VBox meter_box;
ArdourButton editor_meter_peak_display;
bool editor_meter_peak_button_release (GdkEventButton*);
+ void blink_handler (bool);
+ sigc::connection blink_connection;
+
void solo_blink (bool);
void sync_blink (bool);
void audition_blink (bool);
void feedback_blink (bool);
+ void error_blink (bool);
+
+ void set_flat_buttons();
void soloing_changed (bool);
void auditioning_changed (bool);
bool solo_alert_press (GdkEventButton* ev);
bool audition_alert_press (GdkEventButton* ev);
bool feedback_alert_press (GdkEventButton *);
+ bool error_alert_press (GdkEventButton *);
void big_clock_value_changed ();
void primary_clock_value_changed ();
Gtk::Menu* session_popup_menu;
- struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
- RecentSessionModelColumns() {
- add (visible_name);
- add (tip);
- add (fullpath);
- }
- Gtk::TreeModelColumn<std::string> visible_name;
- Gtk::TreeModelColumn<std::string> tip;
- Gtk::TreeModelColumn<std::string> fullpath;
- };
-
- RecentSessionModelColumns recent_session_columns;
- Gtk::TreeView recent_session_display;
- Glib::RefPtr<Gtk::TreeStore> recent_session_model;
-
- ArdourDialog* session_selector_window;
- Gtk::FileChooserDialog* open_session_selector;
-
- void build_session_selector();
- void redisplay_recent_sessions();
- void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
-
- struct RecentSessionsSorter {
- bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
- return ARDOUR::cmp_nocase(a.first, b.first) == -1;
- }
- };
-
/* menu bar and associated stuff */
Gtk::MenuBar* menu_bar;
Gtk::Label cpu_load_label;
void update_cpu_load ();
+ Gtk::Label xrun_label;
+ void update_xrun_count ();
+
+ Gtk::Label peak_thread_work_label;
+ void update_peak_thread_work ();
+
Gtk::Label buffer_load_label;
void update_buffer_load ();
Gtk::Label format_label;
void update_format ();
- gint every_second ();
- gint every_point_one_seconds ();
- gint every_point_zero_something_seconds ();
+ void every_second ();
+ void every_point_one_seconds ();
+ void every_point_zero_something_seconds ();
sigc::connection second_connection;
sigc::connection point_one_second_connection;
sigc::connection point_zero_something_second_connection;
+ sigc::connection fps_connection;
+
+ void set_fps_timeout_connection ();
void open_session ();
void open_recent_session ();
guint32 last_key_press_time;
void snapshot_session (bool switch_to_it);
+
+ SaveAsDialog* save_as_dialog;
+
+ bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
+ void save_session_as ();
void rename_session ();
- void setup_order_hint ();
+ void setup_order_hint (AddRouteDialog::InsertAt);
- Mixer_UI *mixer;
int create_mixer ();
-
- PublicEditor *editor;
int create_editor ();
Meterbridge *meterbridge;
/* Dialogs that can be created via new<T> */
WM::Proxy<SpeakerDialog> speaker_config_window;
- WM::Proxy<ThemeManager> theme_manager;
WM::Proxy<KeyEditor> key_editor;
WM::Proxy<RCOptionEditor> rc_option_editor;
WM::Proxy<AddRouteDialog> add_route_dialog;
WM::Proxy<LocationUIWindow> location_ui;
WM::Proxy<RouteParams_UI> route_params;
WM::Proxy<EngineControl> audio_midi_setup;
+ WM::Proxy<ExportVideoDialog> export_video_dialog;
/* Windows/Dialogs that require a creator method */
BigClockWindow* create_big_clock_window();
GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
- static UIConfiguration *ui_config;
-
ARDOUR::SystemExec *video_server_process;
void handle_locations_change (ARDOUR::Location*);
void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
void cleanup ();
+ void cleanup_peakfiles ();
void flush_trash ();
bool have_configure_timeout;
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 successful_graph_sort ();
bool _feedback_exists;
+ enum ArdourLogLevel {
+ LogLevelNone = 0,
+ LogLevelInfo,
+ LogLevelWarning,
+ LogLevelError
+ };
+
+ ArdourLogLevel _log_not_acknowledged;
+
void resize_text_widgets ();
+ bool xrun_button_release (GdkEventButton* ev);
+
std::string _announce_string;
void check_announcements ();
int do_audio_midi_setup (uint32_t);
+ void audioengine_became_silent ();
};
#endif /* __ardour_gui_h__ */