revert UIConfiguration back to a normal member of ARDOUR_UI
[ardour.git] / gtk2_ardour / ardour_ui.h
index 8f4432f8e2c7ec7e3c91a0b0bc63ee1ba1a38efd..f752295f7892b9503aff8bf32a5b8b21d0576867 100644 (file)
@@ -35,7 +35,6 @@
 #include <list>
 #include <cmath>
 
-#include <libgnomecanvasmm/canvas.h>
 
 #include "pbd/xml++.h"
 #include "pbd/controllable.h"
 #include "ardour/utils.h"
 #include "ardour/plugin.h"
 #include "ardour/session_handle.h"
+#include "ardour/system_exec.h"
 
 #include "video_timeline.h"
 
+#include "about.h"
 #include "ardour_button.h"
 #include "ardour_dialog.h"
 #include "ardour_window.h"
 #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 "window_manager.h"
 
-class About;
-class AddRouteDialog;
-class AddVideoDialog;
+#include "add_route_dialog.h"
+#include "add_video_dialog.h"
+#include "big_clock_window.h"
+#include "bundle_manager.h"
+#include "global_port_matrix.h"
+#include "keyeditor.h"
+#include "location_ui.h"
+#include "rc_option_editor.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 BigClockWindow;
-class BundleManager;
 class ButtonJoiner;
 class ConnectionEditor;
-class EngineControl;
-class KeyEditor;
-class LocationUIWindow;
 class MainClock;
 class Mixer_UI;
 class PublicEditor;
@@ -101,18 +107,12 @@ class SessionDialog;
 class SessionOptionEditor;
 class ShuttleControl;
 class Splash;
-class SpeakerDialog;
-class ThemeManager;
 class TimeInfoBox;
 class MidiTracer;
+class NSM_Client;
 class LevelMeterHBox;
-class GlobalPortMatrixWindow;
 class GUIObjectState;
 
-namespace Gtkmm2ext {
-       class TearOff;
-}
-
 namespace ARDOUR {
        class ControlProtocolInfo;
        class IO;
@@ -123,9 +123,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();
 
@@ -164,13 +174,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; }
@@ -186,6 +197,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.
         *
@@ -209,7 +223,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 ();
@@ -273,6 +287,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 ();
@@ -313,7 +329,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;
@@ -371,10 +387,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;
@@ -420,7 +437,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 ();
@@ -460,6 +477,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);
@@ -503,7 +522,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;
            }
        };
 
@@ -540,10 +559,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 ();
@@ -557,6 +580,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 ();
@@ -570,6 +602,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 *);
@@ -582,6 +615,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 ();
@@ -620,9 +654,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*);
 
@@ -662,6 +694,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);
 
@@ -692,7 +730,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        bool first_idle ();
 
-       void no_memory_warning ();
        void check_memory_locking ();
 
        bool check_audioengine();