Remove internal edit mode and add "content" tool.
[ardour.git] / gtk2_ardour / ardour_ui.h
index 9944a5353cf824fe7c91c947e6dcc969bb40d36c..f2cc1dde7909721f92d9e24bd9c82caba930db31 100644 (file)
@@ -63,6 +63,7 @@
 #include "ardour/utils.h"
 #include "ardour/plugin.h"
 #include "ardour/session_handle.h"
+#include "ardour/system_exec.h"
 
 #include "video_timeline.h"
 
@@ -73,7 +74,6 @@
 #include "editing.h"
 #include "engine_dialog.h"
 #include "meterbridge.h"
-#include "nsm.h"
 #include "ui_config.h"
 #include "enums.h"
 #include "visibility_group.h"
 #include "route_params_ui.h"
 #include "session_option_editor.h"
 #include "speaker_dialog.h"
-#include "theme_manager.h"
 
 class VideoTimeLine;
-class SystemExec;
 class ArdourKeyboard;
 class AudioClock;
 class ButtonJoiner;
@@ -109,13 +107,10 @@ class ShuttleControl;
 class Splash;
 class TimeInfoBox;
 class MidiTracer;
+class NSM_Client;
 class LevelMeterHBox;
 class GUIObjectState;
 
-namespace Gtkmm2ext {
-       class TearOff;
-}
-
 namespace ARDOUR {
        class ControlProtocolInfo;
        class IO;
@@ -126,9 +121,19 @@ namespace ARDOUR {
        class ProcessThread;
 }
 
+namespace Gtkmm2ext {
+       class TearOff;
+}
+
 class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 {
-  public:
+    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);
        ~ARDOUR_UI();
 
@@ -140,6 +145,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void launch_chat ();
        void launch_manual ();
        void launch_reference ();
+       void launch_tracker ();
+       void launch_cheat_sheet ();
+       void launch_website ();
+       void launch_website_dev ();
+       void launch_forums ();
+       void launch_howto_report ();
        void show_about ();
        void hide_about ();
 
@@ -167,13 +178,14 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        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; }
-
+       static UIConfiguration *config () { return theArdourUI->ui_config; }
+       
        PublicEditor&     the_editor(){return *editor;}
        Mixer_UI* the_mixer() { return mixer; }
 
        void new_midi_tracer_window ();
        void toggle_editing_space();
+       void toggle_mixer_space();
        void toggle_keep_tearoffs();
 
        Gtk::Tooltips& tooltips() { return _tooltips; }
@@ -189,6 +201,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        /** point_zero_something_seconds -- currently 25Hz ^= 40ms */
        static sigc::signal<void>      SuperRapidScreenUpdate;
 
+       /** every_fps -- see set_fps_timeout_connection() 25Hz < x < 120Hz */
+       static sigc::signal<void>      FPSUpdate;
+
        /** Emitted frequently with the audible frame, false, and the edit point as
         *  parameters respectively.
         *
@@ -212,7 +227,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void create_xrun_marker (framepos_t);
 
        GUIObjectState* gui_object_state;
-
+       
        MainClock* primary_clock;
        MainClock* secondary_clock;
        void focus_on_clock ();
@@ -276,6 +291,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void maximise_editing_space ();
        void restore_editing_space ();
 
+       void show_ui_prefs ();
+
        void update_tearoff_visibility ();
 
        void setup_profile ();
@@ -316,7 +333,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
   private:
        Gtk::Tooltips       _tooltips;
-       NSM_Client          *nsm;
+       NSM_Client*          nsm;
        bool                _was_dirty;
         bool                _mixer_on_top;
         bool first_time_engine_run;
@@ -374,10 +391,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        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;
@@ -423,7 +441,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        boost::shared_ptr<TransportControllable> play_selection_controllable;
        boost::shared_ptr<TransportControllable> rec_controllable;
 
-       void toggle_always_play_range ();
+       void toggle_follow_edits ();
 
        void set_transport_controllable_state (const XMLNode&);
        XMLNode& get_transport_controllable_state ();
@@ -463,6 +481,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void sync_blink (bool);
        void audition_blink (bool);
        void feedback_blink (bool);
+       
+       void set_flat_buttons();
 
        void soloing_changed (bool);
        void auditioning_changed (bool);
@@ -506,7 +526,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        struct RecentSessionsSorter {
                bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
-                   return cmp_nocase(a.first, b.first) == -1;
+                   return ARDOUR::cmp_nocase(a.first, b.first) == -1;
            }
        };
 
@@ -543,10 +563,14 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        gint every_second ();
        gint every_point_one_seconds ();
        gint every_point_zero_something_seconds ();
+       gint every_fps ();
 
        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 ();
@@ -560,6 +584,15 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void set_transport_sensitivity (bool);
 
+       //stuff for ProTools-style numpad
+       void transport_numpad_event (int num);
+       void transport_numpad_decimal ();
+       bool _numpad_locate_happening;
+       int _pending_locate_num;
+       gint transport_numpad_timeout ();
+       sigc::connection _numpad_timeout_connection;
+
+       void transport_goto_nth_marker (int nth);
        void transport_goto_zero ();
        void transport_goto_start ();
        void transport_goto_end ();
@@ -573,6 +606,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void transport_rewind (int option);
        void transport_loop ();
        void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
+       bool trx_record_enable_all_tracks ();
 
        bool _session_is_new;
        void set_session (ARDOUR::Session *);
@@ -585,6 +619,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void snapshot_session (bool switch_to_it);
        void rename_session ();
+       void setup_order_hint ();
 
        Mixer_UI   *mixer;
        int         create_mixer ();
@@ -597,7 +632,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
         /* 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;
@@ -623,9 +657,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
         BigClockWindow*         create_big_clock_window(); 
         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
 
-       static UIConfiguration *ui_config;
-
-       SystemExec *video_server_process;
+       ARDOUR::SystemExec *video_server_process;
 
        void handle_locations_change (ARDOUR::Location*);
 
@@ -665,6 +697,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
        void disk_overrun_handler ();
        void disk_underrun_handler ();
+       void gui_idle_handler ();
+
+       void cancel_plugin_scan ();
+       void cancel_plugin_timeout ();
+       void plugin_scan_dialog (std::string type, std::string plugin, bool);
+       void plugin_scan_timeout (int);
 
         void session_format_mismatch (std::string, std::string);
 
@@ -695,7 +733,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        bool first_idle ();
 
-       void no_memory_warning ();
        void check_memory_locking ();
 
        bool check_audioengine();