X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftime_axis_view.h;h=e5e13a6c3f000e6318bdf78d646aa28efced1eec;hb=a7055e0863ff8cd9054eb88fcf3b292e385408a7;hp=d422b289707141c2a383462764351d742d552fbb;hpb=183f69970c6c436b102f8b2fbe1bc6070c9e9bfe;p=ardour.git diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index d422b28970..e5e13a6c3f 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -24,9 +24,12 @@ #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,6 +38,7 @@ #include "axis_view.h" #include "enums.h" #include "editing.h" +#include "canvas.h" namespace ARDOUR { class Session; @@ -44,6 +48,10 @@ namespace ARDOUR { class Playlist; } +namespace Gtk { + class Menu; +} + class PublicEditor; class AudioRegionSelection; class TimeSelection; @@ -67,28 +75,28 @@ class TimeAxisView : public virtual AxisView valued so that there is a precise middle. */ - Largest = 301, - Large = 201, - Larger = 101, - Normal = 51, - Smaller = 31, - Small = 21 + Largest = 307, + Large = 207, + Larger = 107, + Normal = 57, + Smaller = 37, + Small = 27 }; - TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* parent, Gtk::Widget *canvas); + TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView* parent, ArdourCanvas::Canvas& canvas); virtual ~TimeAxisView (); /* public data: XXX create accessor/mutators for these ?? */ PublicEditor& editor; - + guint32 height; /* in canvas units */ guint32 effective_height; /* in canvas units */ double y_position; int order; - Gnome::Canvas::Item *canvas_display; + ArdourCanvas::Group *canvas_display; Gtk::VBox *control_parent; /* The Standard LHS Controls */ @@ -169,7 +177,7 @@ class TimeAxisView : public virtual AxisView return 0; } - void order_selection_trims (Gnome::Canvas::Item *item, bool put_start_on_top); + void order_selection_trims (ArdourCanvas::Item *item, bool put_start_on_top); virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list& results); virtual void get_inverted_selectables (Selection&, list& results); @@ -184,33 +192,34 @@ class TimeAxisView : public virtual AxisView /* call this on the parent */ - virtual XMLNode* get_child_xml_node (std::string childname) { return 0; } + virtual XMLNode* get_child_xml_node (const string & childname) { return 0; } protected: string controls_base_unselected_name; string controls_base_selected_name; - /** - * Handle mouse press on our LHS control name entry. - * - * @param ev the event - */ - virtual bool name_entry_button_press (GdkEventButton *ev); + bool name_entry_button_press (GdkEventButton *ev); + bool name_entry_button_release (GdkEventButton *ev); + bool name_entry_key_release (GdkEventKey *ev); + void name_entry_activated (); + sigc::connection name_entry_key_timeout; + bool name_entry_key_timed_out (); + guint32 last_name_entry_key_press_event; + + /* derived classes can override these */ - /** - * Handle mouse relaese on our LHS control name entry. - * - *@ param ev the event - */ - virtual bool name_entry_button_release (GdkEventButton *ev); + virtual void name_entry_changed (); + virtual bool name_entry_focus_in (GdkEventFocus *ev); + virtual bool name_entry_focus_out (GdkEventFocus *ev); /** * Handle mouse relaese on our LHS control name ebox. * *@ param ev the event */ - virtual gint controls_ebox_button_release (GdkEventButton *ev); + virtual bool controls_ebox_button_release (GdkEventButton *ev); + virtual bool controls_ebox_scroll (GdkEventScroll *ev); /** * Displays the standard LHS control menu at when. @@ -230,7 +239,7 @@ class TimeAxisView : public virtual AxisView * Do anything that needs to be done to dynamically reset * the LHS control menu. */ - virtual gint handle_display_menu_map_event (GdkEventAny *ev) { return FALSE; } + virtual bool handle_display_menu_map_event (GdkEventAny *ev) { return false; } /** * Build the standard LHS control size menu for the default TrackHeight options. @@ -273,7 +282,7 @@ class TimeAxisView : public virtual AxisView /* selection display */ - Gnome::Canvas::Group *selection_group; + ArdourCanvas::Group *selection_group; list free_selection_rects; list used_selection_rects; @@ -285,6 +294,8 @@ class TimeAxisView : public virtual AxisView bool _hidden; bool _has_state; + void check_height (Gdk::Rectangle&); + }; /* class TimeAxisView */ #endif /* __ardour_gtk_time_axis_h__ */