size-based scrolling and right-click pages for editor notebook
[ardour.git] / gtk2_ardour / ardour_ui.h
index 38cbfc5fb64a42728cf008b2d36dd5a1d1295405..91ed6136c6c180284d2e62e6af8d4c252e9f889c 100644 (file)
@@ -71,7 +71,7 @@ class OptionEditor;
 class Mixer_UI;
 class ConnectionEditor;
 class RouteParams_UI;
-class SoundFileChooser;
+class SoundFileBrowser;
 class About;
 class AddRouteDialog;
 class NewSessionDialog;
@@ -99,16 +99,16 @@ class ARDOUR_UI : public Gtkmm2ext::UI
   public:
        ARDOUR_UI (int *argcp, char **argvp[], string rcfile);
        ~ARDOUR_UI();
-       
+
        void show ();
        bool shown() { return shown_flag; }
        
        void show_splash ();
        void hide_splash ();
        
-       int load_session (string path, string snapshot, string* mix_template = 0);
+       int load_session (ARDOUR::stringcr_t path, ARDOUR::stringcr_t snapshot, string* mix_template = 0);
        bool session_loaded;
-       int build_session (string path, string snapshot, 
+       int build_session (ARDOUR::stringcr_t path, ARDOUR::stringcr_t snapshot, 
                           uint32_t ctl_chns, 
                           uint32_t master_chns,
                           ARDOUR::Session::AutoConnectOption input_connect,
@@ -129,12 +129,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        }
 
        void new_session(bool startup = false, std::string path = string());
-       gint cmdline_new_session (std::string path);
+       gint cmdline_new_session (string path);
        int  unload_session ();
        void close_session() { unload_session(); }
 
        int  save_state_canfail (string state_name = "");
-       void save_state (string state_name = "");
+       void save_state (ARDOUR::stringcr_t state_name = "");
        void restore_state (string state_name = "");
 
        static double gain_to_slider_position (ARDOUR::gain_t g);
@@ -205,7 +205,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
   protected:
        friend class PublicEditor;
 
-       void toggle_metering ();
        void toggle_clocking ();
        void toggle_auto_play ();
        void toggle_auto_input ();
@@ -287,7 +286,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        void shutdown ();
 
        void finish();
-       int  ask_about_saving_session (string why);
+       int  ask_about_saving_session (ARDOUR::stringcr_t why);
        gint ask_about_save_deleted (GdkEventAny*);
        void save_session_choice_made (int);
        int  save_the_session;
@@ -329,9 +328,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        void         start_clocking ();
        void         stop_clocking ();
 
-       AudioClock               big_clock;
-       Gtk::Frame               big_clock_frame;
-       ArdourDialog*          big_clock_window;
+       void manage_window (Gtk::Window&);
+       
+       AudioClock   big_clock;
+       Gtk::Frame   big_clock_frame;
+       Gtk::Window* big_clock_window;
 
        /* Transport Control */
 
@@ -479,32 +480,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        void build_menu_bar ();
        void pack_toplevel_controls();
 
-       /* handles on the menu bar items that need to 
-          be sensitive to whether or not we have
-          a session loaded.
-       */
-
-       Gtk::MenuItem *add_track_item;
-       Gtk::MenuItem *save_item;
-       Gtk::MenuItem *snapshot_item;
-       Gtk::MenuItem *save_as_item;
-       Gtk::MenuItem *save_template_item;
-       Gtk::MenuItem *export_item;
-       Gtk::MenuItem *close_item;
-
-       Gtk::CheckMenuItem *connection_editor_check;
-       Gtk::CheckMenuItem *route_params_check;
-       Gtk::CheckMenuItem *locations_dialog_check;
-       Gtk::CheckMenuItem *big_clock_check;
-       Gtk::CheckMenuItem *tempo_editor_check;
-       Gtk::CheckMenuItem *sfdb_check;
-       Gtk::CheckMenuItem *options_window_check;
-       
-       /* <CMT Additions> */
-       Gtk::MenuItem *image_compositor_item ;
-       /* </CMT Additions> */
-
-
        Gtk::Label   wall_clock_label;
        Gtk::EventBox wall_clock_box;
        gint update_wall_clock ();
@@ -560,31 +535,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        Gtk::Menu *diskstream_menu;
        gint32 selected_dstream;
        
-       gint mouse_transport_goto_start (GdkEventButton *) {
-               transport_goto_start (); return TRUE;
-       }
-       gint mouse_transport_goto_end (GdkEventButton *) {
-               transport_goto_end (); return TRUE;
-       }
-       gint mouse_transport_record (GdkEventButton *) {
-               transport_record (); return TRUE;
-       }
-       gint mouse_transport_forward (GdkEventButton *) {
-               transport_forward (0); return TRUE;
-       }
-       gint mouse_transport_rewind (GdkEventButton *) {
-               transport_rewind (0); return TRUE;
-       }
-       gint mouse_transport_loop (GdkEventButton *) {
-               transport_loop (); return TRUE;
-       }
-       gint mouse_transport_play_selection (GdkEventButton *) {
-               transport_play_selection (); return TRUE;
-       }
-
-       gint mouse_transport_roll (GdkEventButton *);
-       gint mouse_transport_stop (GdkEventButton *);
-
        void set_transport_sensitivity (bool);
 
        void remove_last_capture ();
@@ -638,12 +588,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        LocationUI *location_ui;
        int         create_location_ui ();
 
-       void location_ui_hiding ();
-       void big_clock_hiding ();
-       void route_params_hiding ();
-       void connection_editor_hiding ();
-       void option_hiding ();
-
        /* Various options */
 
        void toggle_recording_plugins ();
@@ -658,7 +602,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        void add_route_dialog_done (int status);
 
        /* SoundFile Browser */
+       SoundFileBrowser *sfdb;
        void toggle_sound_file_browser ();
+       int create_sound_file_browser ();
        
        /* Keyboard Handling */
        
@@ -684,7 +630,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
 
        Gtk::MenuItem *cleanup_item;
 
-       void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title, string msg);
+       void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title, ARDOUR::stringcr_t msg);
        void cleanup ();
        void flush_trash ();
 
@@ -725,4 +671,5 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        Glib::RefPtr<Gtk::ActionGroup> common_actions;
 };
 
+
 #endif /* __ardour_gui_h__ */