Beispiel #1
0
 private void PrepareCrumb(Crumb crumb)
 {
     crumb.Crumbs              = this;
     crumb.Widget.Parent       = this;
     crumb.Widget.ParentWindow = this.GdkWindow;
     crumb.Widget.Realize();
 }
Beispiel #2
0
        private void UnprepareCrumb(Crumb crumb)
        {
            if (crumb.Widget.IsRealized)
            {
                crumb.Widget.Unrealize();
            }

            crumb.Widget.ParentWindow = null;
            crumb.Widget.Parent       = null;
            crumb.Crumbs = null;
        }
Beispiel #3
0
        public void Insert(int index, Crumb crumb)
        {
            this.m_Crumbs.Insert(index, crumb);

            if (this.IsRealized)
            {
                this.PrepareCrumb(crumb);
            }

            this.QueueResize();
        }
Beispiel #4
0
        public void Append(Crumb crumb)
        {
            this.m_Crumbs.Add(crumb);

            if (this.IsRealized)
            {
                this.PrepareCrumb(crumb);
            }

            this.QueueResize();
        }
Beispiel #5
0
        protected override bool OnMotionNotifyEvent(EventMotion evnt)
        {
            foreach (Crumb crumb in this.m_Crumbs)
            {
                Gdk.Rectangle area = this.m_Coords[crumb];

                if (evnt.X >= area.X && evnt.X <= area.X + area.Width &&
                    evnt.Y >= area.Y && evnt.Y <= area.Y + area.Height)
                {
                    if (crumb != Hover)
                    {
                        this.m_Hover = crumb;
                        this.QueueDraw();
                    }

                    return(true);
                }
            }

            this.m_Hover = null;
            this.QueueDraw();

            return(base.OnMotionNotifyEvent(evnt));
        }
Beispiel #6
0
 public void Remove(Crumb crumb)
 {
     this.m_Crumbs.Remove(crumb);
     this.UnprepareCrumb(crumb);
 }
 private void UnprepareCrumb (Crumb crumb)
 {
     if (crumb.Widget.IsRealized)
         crumb.Widget.Unrealize ();
     
     crumb.Widget.ParentWindow = null;
     crumb.Widget.Parent = null;
     crumb.Crumbs = null;
 }
 private void PrepareCrumb (Crumb crumb)
 {
     crumb.Crumbs = this;
     crumb.Widget.Parent = this;
     crumb.Widget.ParentWindow = this.GdkWindow;
     crumb.Widget.Realize ();
 }
 protected override bool OnMotionNotifyEvent (EventMotion evnt)
 {
     foreach (Crumb crumb in this.m_Crumbs) {
         Gdk.Rectangle area = this.m_Coords[crumb];
         
         if (evnt.X >= area.X && evnt.X <= area.X + area.Width &&
             evnt.Y >= area.Y && evnt.Y <= area.Y + area.Height)
         {
             if (crumb != Hover) {
                 this.m_Hover = crumb;
                 this.QueueDraw ();
             }
             
             return true;
         }
     }
     
     this.m_Hover = null;
     this.QueueDraw ();
     
     return base.OnMotionNotifyEvent (evnt);
 }
Beispiel #10
0
 public void Remove (Crumb crumb)
 {
     this.m_Crumbs.Remove (crumb);
     this.UnprepareCrumb (crumb);
 }
Beispiel #11
0
 public void Insert (int index, Crumb crumb)
 {
     this.m_Crumbs.Insert (index, crumb);
     
     if (this.IsRealized) {
         this.PrepareCrumb (crumb);
     }
     
     this.QueueResize ();
 }
Beispiel #12
0
 public void Append (Crumb crumb)
 {
     this.m_Crumbs.Add (crumb);
     
     if (this.IsRealized) {
         this.PrepareCrumb (crumb);
     }
     
     this.QueueResize ();
 }