X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=inline;f=gtk2_ardour%2Fstreamview.h;h=3c9bd4366626435f3e9790d24ea6216402ba6bc5;hb=1aba241919420198c82f31cffa11f6c8189747fb;hp=baa779ba67431f075d42c605138de9838420c64b;hpb=9d5d82b4df5b3510177fd31557ac765f46778fe8;p=ardour.git diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h index baa779ba67..3c9bd43666 100644 --- a/gtk2_ardour/streamview.h +++ b/gtk2_ardour/streamview.h @@ -20,14 +20,12 @@ #define __ardour_streamview_h__ #include -#include #include #include #include "enums.h" #include "simplerect.h" #include "canvas.h" -#include "color.h" namespace Gdk { class Color; @@ -44,8 +42,8 @@ namespace ARDOUR { struct RecBoxInfo { ArdourCanvas::SimpleRect* rectangle; - jack_nframes_t start; - jack_nframes_t length; + nframes_t start; + nframes_t length; }; class PublicEditor; @@ -68,11 +66,13 @@ public: void set_zoom_all(); int set_position (gdouble x, gdouble y); - virtual int set_height (gdouble); + virtual int set_height (double); virtual int set_samples_per_unit (gdouble spp); gdouble get_samples_per_unit () { return _samples_per_unit; } + void set_layer_display (LayerDisplay); + ArdourCanvas::Item* canvas_item() { return canvas_group; } enum ColorTarget { @@ -83,16 +83,18 @@ public: Gdk::Color get_region_color () const { return region_color; } void apply_color (Gdk::Color&, ColorTarget t); - RegionView* find_view (const ARDOUR::Region&); + RegionView* find_view (boost::shared_ptr); void foreach_regionview (sigc::slot slot); void set_selected_regionviews (RegionSelection&); - void get_selectables (jack_nframes_t start, jack_nframes_t end, list&); + void get_selectables (nframes_t start, nframes_t end, list&); void get_inverted_selectables (Selection&, list& results); - void add_region_view (ARDOUR::Region*); + void add_region_view (boost::shared_ptr); void region_layered (RegionView*); + virtual void redisplay_diskstream () = 0; + sigc::signal RegionViewAdded; protected: @@ -101,27 +103,28 @@ protected: //private: (FIXME?) void transport_changed(); - void rec_enable_changed(void* src = 0); + void transport_looped(); + void rec_enable_changed(); void sess_rec_enable_changed(); virtual void setup_rec_box () = 0; void update_rec_box (); - virtual void update_rec_regions () = 0; + //virtual void update_rec_regions () = 0; - virtual void add_region_view_internal (ARDOUR::Region*, bool wait_for_waves) = 0; - virtual void remove_region_view (ARDOUR::Region* ); - void remove_rec_region (ARDOUR::Region*); + virtual RegionView* add_region_view_internal (boost::shared_ptr, bool wait_for_waves) = 0; + virtual void remove_region_view (boost::weak_ptr ); + //void remove_rec_region (boost::shared_ptr); (unused) - void display_diskstream (ARDOUR::Diskstream* ); + void display_diskstream (boost::shared_ptr); virtual void undisplay_diskstream (); - virtual void redisplay_diskstream () = 0; - void diskstream_changed (void* ); + void diskstream_changed (); - void playlist_state_changed (ARDOUR::Change); - virtual void playlist_changed (ARDOUR::Diskstream* ); - virtual void playlist_modified (); + virtual void playlist_changed (boost::shared_ptr); + virtual void playlist_modified_weak (boost::weak_ptr); + virtual void playlist_modified (boost::shared_ptr); - virtual void color_handler (ColorID, uint32_t) = 0; + virtual void color_handler () = 0; + virtual void update_contents_y_position_and_height (); RouteTimeAxisView& _trackview; ArdourCanvas::Group* canvas_group; @@ -134,17 +137,23 @@ protected: sigc::connection screen_update_connection; vector rec_rects; - list rec_regions; + list< std::pair,RegionView* > > rec_regions; bool rec_updating; bool rec_active; bool use_rec_regions; - /* XXX why are these different? */ - Gdk::Color region_color; - uint32_t stream_base_color; + Gdk::Color region_color; ///< Contained region color + uint32_t stream_base_color; ///< Background color vector playlist_connections; sigc::connection playlist_change_connection; + + int layers; + double height; + LayerDisplay layer_display; + + list rec_data_ready_connections; + jack_nframes_t last_rec_data_frame; }; #endif /* __ardour_streamview_h__ */