public FlowBehaviour(CoverManager coverManager)
 {
     this.coverManager = coverManager;
     CoverManager.VisibleCoversChanged += HandleVisibleCoversChanged;
     CoverManager.TargetIndexChanged   += HandleTargetIndexChanged;
     CoverManager.Timeline.NewFrame    += HandleNewFrame;
 }
 public FlowBehaviour(CoverManager coverManager)
 {
     this.coverManager = coverManager;
     CoverManager.VisibleCoversChanged += HandleVisibleCoversChanged;
     CoverManager.TargetIndexChanged += HandleTargetIndexChanged;
     CoverManager.Timeline.NewFrame += HandleNewFrame;
 }
 public ArtworkLookup(CoverManager cover_manager)
 {
     //Log.Debug ("ArtworkLookup ctor ()");
     this.cover_manager = cover_manager;
     this.cover_manager.TargetIndexChanged += HandleTargetIndexChanged;
     artwork_manager = ServiceManager.Get<ArtworkManager> ();
     artwork_manager.AddCachedSize (cover_manager.TextureSize);
 }
Exemple #4
0
        public ClutterFlowActor(CoverManager cover_manager) : base(cover_manager)
        {
            this.ParentSet          += HandleParentSet;
            this.LeaveEvent         += HandleLeaveEvent;
            this.ButtonPressEvent   += HandleButtonPressEvent;
            this.ButtonReleaseEvent += HandleButtonReleaseEvent;

            SetupActors();
        }
        public ClutterFlowActor(CoverManager cover_manager)
            : base(cover_manager)
        {
            this.ParentSet += HandleParentSet;
            this.LeaveEvent += HandleLeaveEvent;
            this.ButtonPressEvent += HandleButtonPressEvent;
            this.ButtonReleaseEvent += HandleButtonReleaseEvent;

            SetupActors ();
        }
        public ArtworkLookup(CoverManager coverManager)
        {
            //Log.Debug ("ArtworkLookup ctor ()");
             	this.coverManager = coverManager;
            CoverManager.TargetIndexChanged += HandleTargetIndexChanged;
            artwork_manager = ServiceManager.Get<ArtworkManager> ();
            artwork_manager.AddCachedSize (CoverManager.TextureSize);

            threaded = ClutterFlowSchemas.ThreadedArtwork.Get ();
            //Start ();
        }
        public ClutterFlowSlider(float width, float height, CoverManager coverManager)
        {
            this.Reactive = true;
            this.coverManager = coverManager;
            CoverManager.CoversChanged += HandleCoversChanged;
            CoverManager.TargetIndexChanged += HandleTargetIndexChanged;
            CoverManager.LetterLookupChanged += HandleLetterLookupChanged;

            this.SetSize (width, height);
            this.Entered += HandleEnterEvent;
            this.LeaveEvent += HandleLeaveEvent;

            InitChildren ();
            Update ();
        }
Exemple #8
0
 protected virtual void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args)
 {
     if (args.Event.Button == 3)
     {
         SlideIn();
     }
     else
     {
         if (Index >= 0 && Opacity > 0)
         {
             if (CoverManager.CurrentCover == this || args.Event.ClickCount == 3)
             {
                 CreateClickClone();
                 CoverManager.InvokeActorActivated(this);
             }
             else
             {
                 GLib.Timeout.Add((uint)(CoverManager.DoubleClickTime * 0.75), new GLib.TimeoutHandler(
                                      delegate { CoverManager.TargetIndex = Index; return(false); }));
             }
         }
     }
     args.RetVal = true;
 }
        public ClutterFlowView()
            : base()
        {
            SetSizeRequest (300, 200);
            Clutter.Global.MotionEventsEnabled = true;

            coverManager = new CoverManager();
            albumLoader = new AlbumLoader (coverManager);

            AttachEvents ();

            SetupViewport ();
            SetupSlider ();
            SetupLabels ();
            SetupWidgetBar ();
        }
        public ClutterFlowView()
            : base()
        {
            SetSizeRequest (300, 200);
            Clutter.Global.MotionEventsEnabled = true;

            album_loader = new AlbumLoader ();
            cover_manager = new CoverManager (album_loader, GetDefaultSurface, ClutterFlowSchemas.TextureSize.Get ());

            AttachEvents ();

            SetupViewport ();
            SetupSlider ();
            SetupLabels ();
            SetupWidgetBar ();
        }
Exemple #11
0
 public ClutterFlowBaseActor(CoverManager cover_manager) : base()
 {
     this.cover_manager = cover_manager;
     this.cover_manager.AddActor(this);
 }
 public ClutterFlowTimeline(CoverManager coverManager)
     : base((uint) coverManager.TotalCovers, 1 / (double) CoverManager.MaxAnimationSpan)
 {
     this.coverManager = coverManager;
 }
 public ClutterFlowFixedActor(CoverManager cover_manager)
     : base(cover_manager)
 {
     IsReactive = false;
 }
 private ClutterFlowBaseActor AddActorToList(AlbumInfo generator, SortedList<AlbumInfo, ClutterFlowBaseActor> list, CoverManager cover_manager)
 {
     if (generator == null) {
         generator = new AlbumInfo (AlbumInfo.UnknownAlbumTitle);
     }
     string key = ClutterFlowAlbum.CreateCacheKey(generator);
     ClutterFlowBaseActor actor = null;
     if (!Cache.TryGetValue (key, out actor)) {
         actor = new ClutterFlowAlbum (generator, cover_manager);
         actor.Hide ();
         Cache.Add (key, actor);
     }
     actor.SortLabel = Comparer.GetSortLabel (generator);
     list[generator] = actor;
     actor.Index = list.Count;
     return actor;
 }
 public List<ClutterFlowBaseActor> GetActors(CoverManager cover_manager)
 {
     SortedList<AlbumInfo, ClutterFlowBaseActor> list =
         new SortedList<AlbumInfo, ClutterFlowBaseActor>(Comparer);
     if (Model != null) {
         for (int i = 1; i < Model.Count; i++) {
             AddActorToList(Model[i], list, cover_manager);
         }
         index_map = new List<int>(list.Values.Count);
         for (int i = 0; i < list.Values.Count; i++) {
             ClutterFlowBaseActor actor = list.Values[i];
             index_map.Add(actor.Index);
             actor.Index = i;
         }
     }
     return new List<ClutterFlowBaseActor>(list.Values);
 }
 public ClutterFlowTimeline(CoverManager coverManager) : base((uint)coverManager.TotalCovers, 1 / (double)CoverManager.MaxAnimationSpan)
 {
     this.coverManager = coverManager;
 }