X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmarina%2FClassFactory.vala;fp=src%2Fmarina%2FClassFactory.vala;h=53ccfbb632bb97824d32988ec9f856b6c9250de5;hb=a712cd772f4f3db8bed7037bb95c4de94767b230;hp=0000000000000000000000000000000000000000;hpb=2f0296582bf5d3f51db40d299f434fc8240ca6a5;p=fillmore diff --git a/src/marina/ClassFactory.vala b/src/marina/ClassFactory.vala new file mode 100644 index 0000000..53ccfbb --- /dev/null +++ b/src/marina/ClassFactory.vala @@ -0,0 +1,37 @@ +/* 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. + */ + +public interface TrackView : Gtk.Widget { + public signal void clip_view_added(ClipView clip_view); + public abstract void move_to_top(ClipView clip_view); + public abstract void resize(); + public abstract Model.Track get_track(); + public abstract int get_track_height(); + public abstract Gtk.Widget? find_child(double x, double y); + public abstract void select_all(); +} + +public class ClassFactory { + static ClassFactory class_factory = null; + static TransportDelegate transport_delegate = null; + + public static ClassFactory get_class_factory() { + return class_factory; + } + + public virtual TrackView get_track_view(Model.Track track, TimeLine timeline) { + assert(transport_delegate != null); + return new TrackViewConcrete(transport_delegate, track, timeline); + } + + public static void set_class_factory(ClassFactory class_factory) { + ClassFactory.class_factory = class_factory; + } + + public static void set_transport_delegate(TransportDelegate transport_delegate) { + ClassFactory.transport_delegate = transport_delegate; + } +}