X-Git-Url: http://git.maemo.org/git/?p=fillmore;a=blobdiff_plain;f=src%2Ffillmore%2FFillmoreClassFactory.vala;fp=src%2Ffillmore%2FFillmoreClassFactory.vala;h=9fd2d0798769b03c12def4f916501f7b73e613b5;hp=0000000000000000000000000000000000000000;hb=a712cd772f4f3db8bed7037bb95c4de94767b230;hpb=2f0296582bf5d3f51db40d299f434fc8240ca6a5 diff --git a/src/fillmore/FillmoreClassFactory.vala b/src/fillmore/FillmoreClassFactory.vala new file mode 100644 index 0000000..9fd2d07 --- /dev/null +++ b/src/fillmore/FillmoreClassFactory.vala @@ -0,0 +1,56 @@ +/* Copyright 2009-2010 Yorba Foundation + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +class TrackSeparator : Gtk.HSeparator { +//this class is referenced in the resource file +} + +class FillmoreTrackView : Gtk.VBox, TrackView { + TrackView track_view; + public FillmoreTrackView(TrackView track_view) { + this.track_view = track_view; + track_view.clip_view_added.connect(on_clip_view_added); + + pack_start(track_view, true, true, 0); + pack_start(new TrackSeparator(), false, false, 0); + can_focus = false; + } + + public void move_to_top(ClipView clip_view) { + track_view.move_to_top(clip_view); + } + + public void resize() { + track_view.resize(); + } + + public Model.Track get_track() { + return track_view.get_track(); + } + + public int get_track_height() { + return track_view.get_track_height(); + } + + void on_clip_view_added(ClipView clip_view) { + clip_view_added(clip_view); + } + + Gtk.Widget? find_child(double x, double y) { + return track_view.find_child(x, y); + } + + void select_all() { + track_view.select_all(); + } +} + +public class FillmoreClassFactory : ClassFactory { + public override TrackView get_track_view(Model.Track track, TimeLine timeline) { + TrackView track_view = base.get_track_view(track, timeline); + return new FillmoreTrackView(track_view); + } +}