#include "ardour/plugin.h"
#include "ardour/session_handle.h"
-#include "ardour_dialog.h"
+#include "video_timeline.h"
+
#include "ardour_button.h"
+#include "ardour_dialog.h"
+#include "ardour_window.h"
#include "editing.h"
+#include "meterbridge.h"
+#include "nsm.h"
#include "ui_config.h"
-#include "window_proxy.h"
#include "enums.h"
#include "visibility_group.h"
+#include "window_manager.h"
class About;
class AddRouteDialog;
+class AddVideoDialog;
+class VideoTimeLine;
+class SystemExec;
class ArdourStartup;
class ArdourKeyboard;
class AudioClock;
+class BigClockWindow;
class BundleManager;
class ButtonJoiner;
class ConnectionEditor;
class ThemeManager;
class TimeInfoBox;
class MidiTracer;
-class WindowProxyBase;
class GlobalPortMatrixWindow;
class GUIObjectState;
class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
{
public:
- ARDOUR_UI (int *argcp, char **argvp[]);
+ ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
~ARDOUR_UI();
bool run_startup (bool should_be_new, std::string load_template);
PublicEditor& the_editor(){return *editor;}
Mixer_UI* the_mixer() { return mixer; }
- void toggle_key_editor ();
- void toggle_location_window ();
- void toggle_theme_manager ();
- void toggle_bundle_manager ();
- void toggle_big_clock_window ();
- void toggle_speaker_config_window ();
void new_midi_tracer_window ();
- void toggle_route_params_window ();
void toggle_editing_space();
void toggle_keep_tearoffs();
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.
+ *
+ * (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
*/
static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
+ static void close_all_dialogs () { CloseAllDialogs(); }
+ static sigc::signal<void> CloseAllDialogs;
+
XMLNode* editor_settings() const;
XMLNode* mixer_settings () const;
XMLNode* keyboard_settings () const;
MainClock* primary_clock;
MainClock* secondary_clock;
void focus_on_clock ();
+ AudioClock* big_clock;
TimeInfoBox* time_info_box;
+ VideoTimeLine *video_timeline;
+
void store_clock_modes ();
void restore_clock_modes ();
void reset_main_clocks ();
void add_routes_part_two ();
void add_routes_thread ();
+ void add_video (Gtk::Window* float_window);
+ void remove_video ();
+ void start_video_server_menu (Gtk::Window* float_window);
+ 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 session_add_audio_track (
int input_channels,
int32_t output_channels,
void set_shuttle_fract (double);
- void add_window_proxy (WindowProxyBase *);
- void remove_window_proxy (WindowProxyBase *);
-
void get_process_buffers ();
void drop_process_buffers ();
+ const std::string& announce_string() const { return _announce_string; }
+
protected:
friend class PublicEditor;
ArdourStartup* _startup;
ARDOUR::AudioEngine *engine;
Gtk::Tooltips _tooltips;
+ NSM_Client *nsm;
+ bool _was_dirty;
+ bool _mixer_on_top;
void goto_editor_window ();
void goto_mixer_window ();
void toggle_mixer_window ();
- void toggle_mixer_on_top ();
+ void toggle_meterbridge ();
+ void toggle_editor_mixer ();
int setup_windows ();
void setup_transport ();
void start_clocking ();
void stop_clocking ();
- void manage_window (Gtk::Window&);
-
- AudioClock* big_clock;
- 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 big_clock_realized ();
- bool big_clock_resize_in_progress;
- int big_clock_height;
- void big_clock_catch_focus ();
- void big_clock_reset_aspect_ratio ();
-
- void float_big_clock (Gtk::Window* parent);
bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
- ActionWindowProxy<SpeakerDialog>* speaker_config_window;
-
void update_transport_clocks (framepos_t pos);
void record_state_changed ();
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;
};
gint every_second ();
gint every_point_one_seconds ();
- gint every_point_zero_one_seconds ();
+ gint every_point_zero_something_seconds ();
sigc::connection second_connection;
sigc::connection point_one_second_connection;
- sigc::connection point_oh_five_second_connection;
- sigc::connection point_zero_one_second_connection;
+ sigc::connection point_zero_something_second_connection;
void open_session ();
void open_recent_session ();
PublicEditor *editor;
int create_editor ();
- RouteParams_UI *route_params;
- int create_route_params ();
-
- BundleManager *bundle_manager;
- void create_bundle_manager ();
-
- 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);
+ Meterbridge *meterbridge;
+ int create_meterbridge ();
+ /* Dialogs that can be created via new<T> */
- static UIConfiguration *ui_config;
- ThemeManager *theme_manager;
+ 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<About> about;
+ WM::Proxy<LocationUIWindow> location_ui;
+ WM::Proxy<RouteParams_UI> route_params;
- /* Key bindings editor */
+ /* Windows/Dialogs that require a creator method */
- KeyEditor *key_editor;
+ WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
+ WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
+ WM::ProxyWithConstructor<BundleManager> bundle_manager;
+ WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
+ WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
+ WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
- /* RC Options window */
+ /* creator methods */
- RCOptionEditor *rc_option_editor;
+ SessionOptionEditor* create_session_option_editor ();
+ BundleManager* create_bundle_manager ();
+ AddVideoDialog* create_add_video_dialog ();
+ BigClockWindow* create_big_clock_window();
+ GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
- SessionOptionEditor *session_option_editor;
+ static UIConfiguration *ui_config;
- /* route dialog */
+ SystemExec *video_server_process;
- AddRouteDialog *add_route_dialog;
+ void handle_locations_change (ARDOUR::Location*);
/* Keyboard Handling */
uint32_t rec_enabled_streams;
void count_recenabled_streams (ARDOUR::Route&);
- About* about;
Splash* splash;
void pop_back_splash (Gtk::Window&);
Gtk::MenuItem *cleanup_item;
- void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title,
- const std::string& plural_msg, const std::string& singular_msg);
+ void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
void cleanup ();
void flush_trash ();
void disk_overrun_handler ();
void disk_underrun_handler ();
+ void session_format_mismatch (std::string, std::string);
+
void session_dialog (std::string);
int pending_state_dialog ();
int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
void loading_message (const std::string& msg);
- void toggle_translations ();
-
PBD::ScopedConnectionList forever_connections;
void step_edit_status_change (bool);
void queue_finish ();
void fontconfig_dialog ();
- std::list<WindowProxyBase*> _window_proxies;
-
int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
- int ambiguous_file (std::string file, std::string path, std::vector<std::string> hits);
+ int ambiguous_file (std::string file, std::vector<std::string> hits);
bool click_button_clicked (GdkEventButton *);
bool _feedback_exists;
void resize_text_widgets ();
+
+ std::string _announce_string;
+ void check_announcements ();
};
#endif /* __ardour_gui_h__ */