示例#1
0
文件: Crumbs.cs 项目: thbin/TraceLab
 private void PrepareCrumb(Crumb crumb)
 {
     crumb.Crumbs              = this;
     crumb.Widget.Parent       = this;
     crumb.Widget.ParentWindow = this.GdkWindow;
     crumb.Widget.Realize();
 }
示例#2
0
文件: Crumbs.cs 项目: thbin/TraceLab
        private void UnprepareCrumb(Crumb crumb)
        {
            if (crumb.Widget.IsRealized)
            {
                crumb.Widget.Unrealize();
            }

            crumb.Widget.ParentWindow = null;
            crumb.Widget.Parent       = null;
            crumb.Crumbs = null;
        }
示例#3
0
文件: Crumbs.cs 项目: thbin/TraceLab
        public void Insert(int index, Crumb crumb)
        {
            this.m_Crumbs.Insert(index, crumb);

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

            this.QueueResize();
        }
示例#4
0
文件: Crumbs.cs 项目: thbin/TraceLab
        public void Append(Crumb crumb)
        {
            this.m_Crumbs.Add(crumb);

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

            this.QueueResize();
        }
示例#5
0
文件: Crumbs.cs 项目: thbin/TraceLab
        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));
        }
示例#6
0
文件: Crumbs.cs 项目: thbin/TraceLab
 public void Remove(Crumb crumb)
 {
     this.m_Crumbs.Remove(crumb);
     this.UnprepareCrumb(crumb);
 }
示例#7
0
 private void UnprepareCrumb (Crumb crumb)
 {
     if (crumb.Widget.IsRealized)
         crumb.Widget.Unrealize ();
     
     crumb.Widget.ParentWindow = null;
     crumb.Widget.Parent = null;
     crumb.Crumbs = null;
 }
示例#8
0
 private void PrepareCrumb (Crumb crumb)
 {
     crumb.Crumbs = this;
     crumb.Widget.Parent = this;
     crumb.Widget.ParentWindow = this.GdkWindow;
     crumb.Widget.Realize ();
 }
示例#9
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);
 }
示例#10
0
 public void Remove (Crumb crumb)
 {
     this.m_Crumbs.Remove (crumb);
     this.UnprepareCrumb (crumb);
 }
示例#11
0
 public void Insert (int index, Crumb crumb)
 {
     this.m_Crumbs.Insert (index, crumb);
     
     if (this.IsRealized) {
         this.PrepareCrumb (crumb);
     }
     
     this.QueueResize ();
 }
示例#12
0
 public void Append (Crumb crumb)
 {
     this.m_Crumbs.Add (crumb);
     
     if (this.IsRealized) {
         this.PrepareCrumb (crumb);
     }
     
     this.QueueResize ();
 }