public TextureDisplay (BrowsablePointer item)
		{
			this.item = item;
			DoubleBuffered = false;
			AppPaintable = true;
			CanFocus = true;

			item.Changed += HandleItemChanged;
			flip = new Animator (6000, 6000, delegate { flip.Start (); item.MoveNext (true); }); 
			flip.RunWhenStarted = false;
		}
		protected override void OnUnrealized ()
		{
			Animator = null;
			flip.Stop ();

			base.OnUnrealized ();

			if (glx != null)
				glx.Destroy ();
			
			glx = null;
		}
		private void HandleItemChanged (BrowsablePointer p, BrowsablePointerChangedArgs args)
		{
			Animator = new Animator (3000, 20, HandleTick);

			if (glx == null)
				return;

			//Console.WriteLine ("Begin previous = {0} texture = {1}", 
			//		   previous != null ? previous.Id.ToString () : "null", 
			//		   next != null ? next.Id.ToString () : "null");

			if (!item.IsValid || item.Collection.Count < 0)
				return;

			Next = null;
			PreloadNext ();

			//Console.WriteLine ("End previous = {0} texture = {1}", 
			//		   previous != null ? previous.Id.ToString () : "null", 
			//		   next != null ? next.Id.ToString () : "null");

			if (IsRealized)
				Animator.Start ();
		}
		public void HandleTick (object sender, EventArgs args)
		{
			if (!IsRealized) {
				System.Console.WriteLine ("animation running without active window");
				return;
			}

			if (Animator.Percent >= 1.0) {
				Transition.Percent = 1.0f;
				Animator = null;
			} else {
				Transition.Percent = Animator.Percent;
			}

			QueueDraw (); 
			GdkWindow.ProcessUpdates (false);
		}
		private void HandleItemChanged (BrowsablePointer p, BrowsablePointerChangedArgs args)
		{
			Animator = new Animator (3000, 20, HandleTick);

			if (glx == null)
				return;

			if (!item.IsValid || item.Collection.Count < 0)
				return;

			//Next = null;
			PreloadNext ();

			if (running)
				Animator.Start ();
		}