#include <gtkmm/menubar.h>
#include <gtkmm/textbuffer.h>
#include <gtkmm/adjustment.h>
-#include <gtkmm2ext/gtk_ui.h>
-#include <gtkmm2ext/click_box.h>
-#include <gtkmm2ext/stateful_button.h>
-#include <gtkmm2ext/bindable_button.h>
+
+#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 "ardour/ardour.h"
#include "ardour/types.h"
class PublicEditor;
class SaveAsDialog;
class SessionDialog;
-class SessionOptionEditor;
+class SessionOptionEditorWindow;
class ShuttleControl;
class Splash;
class TimeInfoBox;
class Meterbridge;
+class LuaWindow;
+class LuaScriptManager;
class MidiTracer;
class NSM_Client;
class LevelMeterHBox;
class ProcessThread;
}
-namespace Gtkmm2ext {
- class TearOff;
-}
-
namespace Gtk {
class ProgressBar;
}
+namespace Gtkmm2ext {
+ class Tabbable;
+}
+
class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
{
public:
void new_midi_tracer_window ();
void toggle_editing_space();
void toggle_mixer_space();
+ void toggle_mixer_list();
+ void toggle_monitor_section_visibility ();
void toggle_keep_tearoffs();
+ void lua_script_manager();
+
static PublicEditor* _instance;
/** Emitted frequently with the audible frame, false, and the edit point as
static void close_all_dialogs () { CloseAllDialogs(); }
static sigc::signal<void> CloseAllDialogs;
+ XMLNode* main_window_settings() const;
XMLNode* editor_settings() const;
XMLNode* mixer_settings () const;
XMLNode* keyboard_settings () const;
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);
bool check_audioengine(Gtk::Window&);
- void update_tearoff_visibility ();
-
void setup_profile ();
void setup_tooltips ();
void hide_application ();
+ Gtk::Notebook& tabs();
+ Gtk::Window& main_window () { return _main_window; }
+
+ void setup_toplevel_window (Gtk::Window&, const std::string& name, void* owner);
+
+ /* called from a static C function */
+
+ GtkNotebook* tab_window_root_drop (GtkNotebook* src,
+ GtkWidget* w,
+ gint x,
+ gint y,
+ gpointer user_data);
+
+ bool tabbed_window_state_event_handler (GdkEventWindowState*, void* object);
+ bool key_event_handler (GdkEventKey*, Gtk::Window* window);
+
+ Gtkmm2ext::ActionMap global_actions;
+
protected:
friend class PublicEditor;
void toggle_session_options_window ();
private:
- PublicEditor* editor;
- Mixer_UI* mixer;
- NSM_Client* nsm;
- bool _was_dirty;
- bool _mixer_on_top;
- bool _initial_verbose_plugin_scan;
- bool first_time_engine_run;
-
- void goto_editor_window ();
- void goto_mixer_window ();
- void toggle_mixer_window ();
+ Gtk::Window _main_window;
+ Gtk::VBox main_vpacker;
+ Gtk::HBox status_bar_hpacker;
+ Gtk::Notebook _tabs;
+ PublicEditor* editor;
+ Mixer_UI* mixer;
+ Gtk::Tooltips _tooltips;
+ NSM_Client* nsm;
+ bool _was_dirty;
+ bool _mixer_on_top;
+ 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 toggle_editor_and_mixer ();
+
+ void tabbable_state_change (Gtkmm2ext::Tabbable&);
+
void toggle_meterbridge ();
- void toggle_editor_mixer ();
+ void toggle_luawindow ();
int setup_windows ();
void setup_transport ();
void setup_clock ();
static ARDOUR_UI *theArdourUI;
+ SessionDialog *_session_dialog;
int starting ();
void update_autosave();
sigc::connection _autosave_connection;
+ void session_dirty_changed ();
+ void update_title ();
+
void map_transport_state ();
int32_t do_engine_start ();
void start_clocking ();
void stop_clocking ();
- bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
-
void update_transport_clocks (framepos_t pos);
void record_state_changed ();
std::list<MidiTracer*> _midi_tracer_windows;
- 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 transport_hbox;
Gtk::Fixed transport_base;
Gtk::Fixed transport_button_base;
};
TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
- void set_value (double);
+ void set_value (double, PBD::Controllable::GroupControlDisposition group_override);
double get_value (void) const;
ARDOUR_UI& ui;
bool process_snapshot_session_prompter (ArdourPrompter& 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
+
SaveAsDialog* save_as_dialog;
bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
int create_mixer ();
int create_editor ();
+ int create_meterbridge ();
+ int create_luawindow ();
Meterbridge *meterbridge;
- int create_meterbridge ();
+ LuaWindow *luawindow;
+
/* Dialogs that can be created via new<T> */
+ RCOptionEditor* rc_option_editor;
+ Gtk::HBox rc_option_editor_placeholder;
+
WM::Proxy<SpeakerDialog> speaker_config_window;
- 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;
WM::Proxy<EngineControl> audio_midi_setup;
WM::Proxy<ExportVideoDialog> export_video_dialog;
+ WM::Proxy<LuaScriptManager> lua_script_window;
/* Windows/Dialogs that require a creator method */
WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
+ WM::ProxyWithConstructor<KeyEditor> key_editor;
/* creator methods */
AddVideoDialog* create_add_video_dialog ();
BigClockWindow* create_big_clock_window();
GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
+ KeyEditor* create_key_editor ();
ARDOUR::SystemExec *video_server_process;
void audioengine_became_silent ();
DuplicateRouteDialog* duplicate_routes_dialog;
+
+ void grab_focus_after_dialog ();
+
+ 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;
+
+ 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);
+
+ bool main_window_delete_event (GdkEventAny*);
+ bool idle_ask_about_quit ();
+
+ void load_bindings ();
+ bool tabbable_visibility_button_press (GdkEventButton* ev, std::string const& tabbable_name);
};
#endif /* __ardour_gui_h__ */