X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fimageframe_time_axis_group.h;h=c1ec26e912b8a391e919221bc163f52436a6c07e;hb=5b520324ceab2559723b4ef5127301fa61ff4846;hp=4619ae448a4da54016e40f636c46d2e336dc6085;hpb=fedf3d34f32264ac57c6a222b678dc90f2bb1a88;p=ardour.git diff --git a/gtk2_ardour/imageframe_time_axis_group.h b/gtk2_ardour/imageframe_time_axis_group.h index 4619ae448a..c1ec26e912 100644 --- a/gtk2_ardour/imageframe_time_axis_group.h +++ b/gtk2_ardour/imageframe_time_axis_group.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Paul Davis + Copyright (C) 2003 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #ifndef __ardour_imageframe_time_axis_group_h__ @@ -28,7 +27,7 @@ #include #include -#include +#include "ardour/types.h" #include "imageframe_time_axis_view.h" class PublicEditor ; @@ -47,33 +46,33 @@ class ImageFrameTimeAxisGroup : public sigc::trackable public: //---------------------------------------------------------------------------------------// // Constructor / Desctructor - + /** * Constructs a new ImageFrameTimeAxisGroup. * * @param iftav the parent ImageFrameTimeAxis of this view helper * @param group_id the unique name/id of this group */ - ImageFrameTimeAxisGroup(ImageFrameTimeAxisView& iftav, const string & group_id) ; - + ImageFrameTimeAxisGroup(ImageFrameTimeAxisView& iftav, const std::string & group_id) ; + /** * Destructor * Responsible for destroying any Items that may have been added to this group * */ virtual ~ImageFrameTimeAxisGroup() ; - - + + //---------------------------------------------------------------------------------------// // Name/Id Accessors/Mutators - + /** * Set the name/Id of this group. * * @param new_name the new name of this group * @param src the identity of the object that initiated the change */ - void set_group_name(const string & new_name, void* src) ; + void set_group_name(const std::string & new_name, void* src) ; /** * Returns the id of this group @@ -82,49 +81,49 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @return the id of this group */ std::string get_group_name() const ; - - + + //---------------------------------------------------------------------------------------// // Parent/Child helper object accessors - + /** * Returns the TimeAxisView thatt his object is acting as a helper for * * @return the TimeAxisView that this object is acting as a view helper for */ ImageFrameTimeAxisView& get_view() const { return _view_helper ; } - - - + + + //---------------------------------------------------------------------------------------// // ui methods & data - + /** * Sets the height of the time axis view and the item upon it * * @param height the new height */ int set_item_heights(gdouble) ; - + /** * Sets the current samples per unit. * this method tells each item upon the time axis of the change - * + * * @param spu the new samples per canvas unit value */ int set_item_samples_per_units(gdouble spu) ; - + /** * Sets the color of the items contained uopn this view helper * * @param color the new base color */ void apply_item_color(Gdk::Color&) ; - - + + //---------------------------------------------------------------------------------------// // child ImageFrameView methods - + /** * Adds an ImageFrameView to the list of items upon this time axis view helper * the new ImageFrameView is returned @@ -139,16 +138,16 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param num_channels the number of channles within the rgb_data * @param src the identity of the object that initiated the change */ - ImageFrameView* add_imageframe_item(const string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ; - + ImageFrameView* add_imageframe_item(const std::string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ; + /** * Returns the named ImageFrameView or 0 if the named view does not exist on this view helper * * @param item_id the unique id of the item to search for * @return the named ImageFrameView, or 0 if it is not held upon this view */ - ImageFrameView* get_named_imageframe_item(const string & item_id) ; - + ImageFrameView* get_named_imageframe_item(const std::string & item_id) ; + /** * Removes the currently selected ImageFrameView * @@ -156,7 +155,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @see add_imageframe_view */ void remove_selected_imageframe_item(void* src) ; - + /** * Removes and returns the named ImageFrameView from the list of ImageFrameViews held by this view helper * @@ -164,8 +163,8 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param src the identity of the object that initiated the change * @see add_imageframe_view */ - ImageFrameView* remove_named_imageframe_item(const string & item_id, void* src) ; - + ImageFrameView* remove_named_imageframe_item(const std::string & item_id, void* src) ; + /** * Removes ifv from the list of ImageFrameViews upon this TimeAxis. * if ifv is not upon this TimeAxis, this method takes no action @@ -173,23 +172,23 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param ifv the ImageFrameView to remove */ void remove_imageframe_item(ImageFrameView*, void* src) ; - - + + //---------------------------------------------------------------------------------------// // Selected group methods - + // removed in favour of a track level selectewd item // this is simply easier to manage a singularly selected item, rather than // a selected item within each group - + /** * Sets the currently selected item upon this time axis * * @param ifv the item to set selected */ //void set_selected_imageframe_item(ImageFrameView* ifv) ; - + /** * Sets the currently selected item upon this time axis to the named item * @@ -201,26 +200,26 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * Returns the currently selected item upon this time axis * * @return the currently selected item pon this time axis - */ + */ //ImageFrameView* get_selected_imageframe_item() ; - + /** * Returns whether this grou pis currently selected * * @returns true if this group is currently selected */ bool get_selected() const ; - + /** * Sets he selected state of this group * * @param yn set true if this group is selected, false otherwise */ void set_selected(bool yn) ; - + //---------------------------------------------------------------------------------------// // Handle group removal - + /** * Handles the Removal of this VisualTimeAxis * This _needs_ to be called to alert others of the removal properly, ie where the source @@ -235,27 +234,27 @@ class ImageFrameTimeAxisGroup : public sigc::trackable //---------------------------------------------------------------------------------// // Emitted Signals - - sigc::signal GoingAway ; - + + static sigc::signal CatchDeletion; + /** * Emitted when this Group has been removed - * This is different to the GoingAway signal in that this signal + * This is different to the CatchDeletion signal in that this signal * is emitted during the deletion of this Time Axis, and not during * the destructor, this allows us to capture the source of the deletion * event */ sigc::signal GroupRemoved ; - + /** Emitted when we have changed the name of this TimeAxis */ sigc::signal NameChanged ; - + /** Emitted when an ImageFrameView is added to this group */ sigc::signal ImageFrameAdded ; - + /** Emitted when an ImageFrameView is removed from this group */ - sigc::signal ImageFrameRemoved ; - + sigc::signal ImageFrameRemoved ; + protected: @@ -265,7 +264,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * */ void reset_samples_per_unit() ; - + /** * Callback used to remove this group during the gtk idle loop * This is used to avoid deleting the obejct while inside the remove_this_group @@ -275,27 +274,27 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param src the identity of the object that initiated the change */ static gint idle_remove_this_group(ImageFrameTimeAxisGroup* group, void* src) ; - + /** The list of ImageFrameViews held by this view helper */ typedef std::list ImageFrameViewList ; ImageFrameViewList imageframe_views ; - + /** the currently selected time axis item upon this time axis */ ImageFrameView* selected_imageframe_item ; - + /** the view helper that this object is acting as a container upon on */ ImageFrameTimeAxisView& _view_helper ; - - /** the is of this group */ + + /** the is of this group */ std::string _group_id ; - + /* XXX why are these different? */ Gdk::Color region_color ; uint32_t stream_base_color ; - + /** indicates if this group is currently selected */ bool is_selected ; - + } ; /* class ImageFrameTimeAxisGroup */ #endif /* __ardour_imageframe_time_axis_group_h__ */