Make Dropdown menus at least as wide as the button
[ardour.git] / gtk2_ardour / editor.h
index 0e651b5dad6fc22018956dc2695f33f158590295..d45545b4a703495835b8744e0053aa44c4a771e9 100644 (file)
 #include <gtkmm/comboboxtext.h>
 #include <gtkmm/layout.h>
 
-#include "gtkmm2ext/selector.h"
+#include "gtkmm2ext/bindings.h"
 #include "gtkmm2ext/click_box.h"
 #include "gtkmm2ext/dndtreeview.h"
+#include "gtkmm2ext/pane.h"
+#include "gtkmm2ext/selector.h"
 #include "gtkmm2ext/stateful_button.h"
-#include "gtkmm2ext/bindings.h"
 
 #include "pbd/stateful.h"
 #include "pbd/signals.h"
@@ -329,6 +330,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        unsigned get_grid_beat_divisions(framepos_t position);
        Evoral::Beats get_grid_type_as_beats (bool& success, framepos_t position);
 
+       unsigned get_grid_music_divisions (uint32_t event_state);
+
        void nudge_forward (bool next, bool force_playhead);
        void nudge_backward (bool next, bool force_playhead);
 
@@ -531,7 +534,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        /* editing operations that need to be public */
        void mouse_add_new_marker (framepos_t where, bool is_cd=false);
-       void split_regions_at (framepos_t, RegionSelection&);
+       void split_regions_at (framepos_t, RegionSelection&, const int32_t sub_num);
        void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
        RegionSelection get_regions_from_selection_and_mouse (framepos_t);
 
@@ -610,17 +613,15 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void update_join_object_range_location (double);
 
-       boost::optional<int>  pre_notebook_shrink_pane_width;
-
-       void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
+       boost::optional<float>  pre_notebook_shrink_pane_width;
 
        Gtk::Notebook _the_notebook;
        bool _notebook_shrunk;
        void add_notebook_page (std::string const &, Gtk::Widget &);
        bool notebook_tab_clicked (GdkEventButton *, Gtk::Widget *);
 
-       Gtk::HPaned   edit_pane;
-       Gtk::VPaned   editor_summary_pane;
+       Gtkmm2ext::HPane   edit_pane;
+       Gtkmm2ext::VPane   editor_summary_pane;
 
        Gtk::EventBox meter_base;
        Gtk::HBox     meter_box;
@@ -773,6 +774,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void popup_note_context_menu (ArdourCanvas::Item *, GdkEvent *);
        Gtk::Menu _note_context_menu;
 
+       void add_stripables (ARDOUR::StripableList&);
        void add_routes (ARDOUR::RouteList&);
        void timeaxisview_deleted (TimeAxisView *);
        void add_vcas (ARDOUR::VCAList&);
@@ -1089,7 +1091,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void control_step_tracks_down ();
        void control_view (uint32_t);
        void control_scroll (float);
-       void control_select (ARDOUR::PresentationInfo::global_order_t which, Selection::Operation);
+       void control_select (boost::shared_ptr<ARDOUR::Stripable>, Selection::Operation);
        void control_unselect ();
        void access_action (std::string,std::string);
        bool deferred_control_scroll (framepos_t);
@@ -1131,7 +1133,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        /* track views */
        TrackViewList track_views;
        std::pair<TimeAxisView*, double> trackview_by_y_position (double, bool trackview_relative_offset = true) const;
-       RouteTimeAxisView* axis_view_from_route (boost::shared_ptr<ARDOUR::Route>) const;
+       TimeAxisView* axis_view_from_stripable (boost::shared_ptr<ARDOUR::Stripable>) const;
 
        TrackViewList get_tracks_for_range_action () const;
 
@@ -1188,7 +1190,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void cut_copy_midi (Editing::CutCopyOp);
 
        void mouse_paste ();
-       void paste_internal (framepos_t position, float times);
+       void paste_internal (framepos_t position, float times, const int32_t sub_num);
 
        /* EDITING OPERATIONS */
 
@@ -1281,7 +1283,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void delete_ ();
        void cut ();
        void copy ();
-       void paste (float times, bool from_context_menu = false);
+       void paste (float times, bool from_context_menu);
 
        void place_transient ();
        void remove_transient (ArdourCanvas::Item* item);