Exemple #1
0
        public override void OnMouseEnter(AssortedWidgets.Events.MouseEvent me)
        {
            //base.OnMouseEnter(me);

            isHover = true;
            status  = EStatus.Hover;
        }
Exemple #2
0
        internal void ProcessMouseReleased(MouseEvent me)
        {
            OnMouseRelease(me);

            if (MouseReleasedEvent != null)
                MouseReleasedEvent(me);
        }
Exemple #3
0
        public override void OnMouseExit(AssortedWidgets.Events.MouseEvent me)
        {
            //base.OnMouseExit(me);

            isHover = false;
            status  = EStatus.Normal;
        }
Exemple #4
0
        internal void ProcessMousePressed(MouseEvent me)
        {
            OnMousePress(me);

            if (MousePressedEvent != null)
                MousePressedEvent(me);
        }
Exemple #5
0
        public override void OnMouseRelease(AssortedWidgets.Events.MouseEvent me)
        {
            //base.OnMouseRelease(me);

            status = EStatus.Normal;
            MenuBar.Instance.SetShrink();
        }
 void button_DropReleasedEvent(MouseEvent me)
 {
     if (Dropped)
     {
         DropListManager.Instance.ShrinkBack();
         Dropped = false;
     }
     else
     {
         DropListManager.Instance.SetDropped(this, me.X, me.Y);
         Dropped = true;
     }
 }
Exemple #7
0
        public override void OnMousePress(AssortedWidgets.Events.MouseEvent me)
        {
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            if (Slider_.IsIn(mx, my))
            {
                MouseEvent ev = new MouseEvent(Slider_, (int)EMouseEventTypes.MOUSE_PRESSED,
                                               mx, my, me.MouseButton);
                Slider_.ProcessMousePressed(ev);
                return;
            }
        }
        public override void OnMouseEnter(AssortedWidgets.Events.MouseEvent me)
        {
            isHover = true;
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            if (button.IsIn(mx, my))
            {
                MouseEvent ev = new MouseEvent(button, (int)EMouseEventTypes.MOUSE_ENTERED, mx, my, me.MouseButton);
                button.ProcessMouseEntered(ev);
                return;
            }
        }
Exemple #9
0
        public override void OnMouseEnter(AssortedWidgets.Events.MouseEvent me)
        {
            isHover = true;
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            foreach (Component ele in childList)
            {
                if (ele.IsIn(mx, my))
                {
                    MouseEvent ev = new MouseEvent(ele, (int)EMouseEventTypes.MOUSE_ENTERED,
                                                   mx, my, me.MouseButton);
                    ele.ProcessMouseEntered(ev);

                    break;
                }
            }
        }
Exemple #10
0
        public override void OnMouseEnter(AssortedWidgets.Events.MouseEvent me)
        {
            isHover = true;
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            foreach (Component ele in childList)
            {
                if (ele.IsIn(mx, my))
                {
                    MouseEvent ev = new MouseEvent(ele, (int)EMouseEventTypes.MOUSE_ENTERED,
                                                   mx,my, me.MouseButton);
                    ele.ProcessMouseEntered(ev);

                    break;
                }
            }
        }
Exemple #11
0
        internal void ListMouseReleased(MouseEvent e)
        {
            int mx = e.X - Position.X;
            int my = e.Y - Position.Y;

            if (expand && menuList.IsIn(mx, my))
            {
                MouseEvent ev = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_RELEASED, mx, my,
                                               e.MouseButton);
                menuList.ProcessMouseReleased(ev);
            }

            if (menuList.IsExpand && menuList.ExpandMenu != null)
            {
                MouseEvent ev = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_RELEASED,
                                               mx - menuList.Position.X, my - menuList.Position.Y,
                                               e.MouseButton);
                menuList.ExpandMenu.ListMouseReleased(ev);
            }
        }
Exemple #12
0
        public override void OnMouseMove(MouseEvent me)
        {
            //base.OnMouseMove(me);

            foreach (Menu m in menuList)
            {
                if (m.IsIn(me.X, me.Y))
                {
                    if (m.isHover == false)
                    {
                        MouseEvent e = new MouseEvent(m, (int)EMouseEventTypes.MOUSE_ENTERED, me.X, me.Y,
                                                      MouseButton.Left);
                        m.ProcessMouseEntered(e);
                    }
                }
                else
                {
                    if (m.isHover == true)
                    {
                        MouseEvent e = new MouseEvent(m, (int)EMouseEventTypes.MOUSE_EXITED, me.X, me.Y,
                                                      MouseButton.Left);
                        m.ProcessMouseExited(e);
                    }
                }
            }
            if (expand && expandMenu != null)
            {
                expandMenu.ListMouseMotion(me);
            }
        }
Exemple #13
0
        public override void OnMouseRelease(MouseEvent me)
        {
            //base.OnMouseRelease(me);

            foreach (Menu m in menuList)
            {
                if (m.IsIn(me.X, me.Y))
                {
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_RELEASED, me.X, me.Y,
                                                  me.MouseButton);
                    m.ProcessMouseReleased(e);
                }
            }
            if (IsExpand && expandMenu != null)
            {
                expandMenu.ListMouseReleased(me);
            }
        }
Exemple #14
0
        public override void OnMouseExit(MouseEvent me)
        {
            //base.OnMouseExit(me);

            isHover = false;
            OnMouseMove(me);
        }
Exemple #15
0
        public override void OnMouseEnter(MouseEvent me)
        {
            //base.OnMouseEnter(me);

            isHover = true;
            if (menuBar.IsExpand)
            {
                menuBar.SetExpand(this);
                expand = true;
            }
            else
            {
                if (!expand)
                {
                    status = EStatus.Hover;
                }
            }
        }
Exemple #16
0
        public override void OnMouseExit(MouseEvent me)
        {
            base.OnMouseExit(me);

            isHover = false;
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            foreach (Component comp in childList)
            {
                if (comp.isHover)
                {
                    MouseEvent ev = new MouseEvent(comp, (int)EMouseEventTypes.MOUSE_EXITED,
                                                   mx, my, me.MouseButton);
                    comp.ProcessMouseExited(ev);
                    break;
                }
            }
        }
Exemple #17
0
        public override void OnMousePress(MouseEvent me)
        {
            //base.OnMousePress(me);

            status = EStatus.Pressed;
        }
		public void ImportMousePressed(MouseEvent e)
		{
            int mx = e.X - position.X;
            int my = e.Y - position.Y;

            List<DropListItem> itemList = Dropped.ItemList;

            foreach (DropListItem iter in itemList)
            {
				if(iter.IsIn(mx,my))
				{
					Dropped.SetSelection(iter);
					ShrinkBack();
					return;
				}
			}
			ShrinkBack();
		}
 public void ImportMouseEntered(MouseEvent e)
 {
     isHover = true;
     ImportMouseMotion(e);
 }
Exemple #20
0
        public override void OnMouseRelease(MouseEvent me)
        {
            //base.OnMouseRelease(me);

            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            foreach (MenuItem mi in itemList)
            {
                if (mi.IsIn(mx, my))
                {
                    MouseEvent ev = new MouseEvent(mi, (int)EMouseEventTypes.MOUSE_RELEASED, mx, my,
                                                   me.MouseButton);
                    mi.ProcessMouseReleased(ev);
                }
            }
        }
Exemple #21
0
 public override void OnMouseExit(MouseEvent me)
 {
     //base.OnMouseExit(me);
     isHover = false;
     status = EStatus.Normal;
 }
Exemple #22
0
        public override void OnMouseRelease(MouseEvent me)
        {
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            foreach (Component comp in childList)
            {
                if (comp.IsIn(mx, my))
                {
                    MouseEvent ev = new MouseEvent(comp, (int)EMouseEventTypes.MOUSE_RELEASED,
                                                   mx, my, me.MouseButton);
                    comp.ProcessMouseReleased(ev);
                    break;
                }
            }
        }
Exemple #23
0
        public override void OnMouseMove(MouseEvent me)
        {
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            foreach (Component comp in childList)
            {
                if (comp.IsIn(mx, my))
                {
                    if (comp.isHover)
                    {
                        MouseEvent ev = new MouseEvent(comp, (int)EMouseEventTypes.MOUSE_MOTION,
                                                      mx, my, me.MouseButton);
                        comp.ProcessMouseMoved(ev);
                        break;
                    }
                    else
                    {
                        MouseEvent ev = new MouseEvent(comp, (int)EMouseEventTypes.MOUSE_ENTERED,
                                                      mx, my, me.MouseButton);
                        comp.ProcessMouseEntered(ev);
                        break;
                    }
                }
                else
                {
                    if (comp.isHover)
                    {
                        MouseEvent ev = new MouseEvent(comp, (int)EMouseEventTypes.MOUSE_EXITED,
                                                       mx, my, me.MouseButton);
                        comp.ProcessMouseExited(ev);
                        break;
                    }
                }
            }
        }
Exemple #24
0
        internal void ListMouseMotion(MouseEvent me)
        {
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            if (expand && menuList.IsIn(mx, my))
            {
                if (menuList.isHover)
                {
                    MouseEvent e = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_MOTION, mx, my,
                                                  MouseButton.Left);
                    menuList.ProcessMouseMoved(e);
                }
                else
                {
                    MouseEvent e = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_ENTERED, mx, my,
                                                  MouseButton.Left);
                    menuList.ProcessMouseEntered(e);
                }
            }
            else
            {
                if (menuList.isHover)
                {
                    MouseEvent e = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_EXITED, mx, my,
                                                  MouseButton.Left);
                    menuList.ProcessMouseExited(e);
                }
            }

            if (menuList.IsExpand && menuList.ExpandMenu != null)
            {
                MouseEvent e = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_MOTION,
                                              mx - menuList.Position.X, my - menuList.Position.Y,
                                              MouseButton.Left);
                menuList.ExpandMenu.ListMouseMotion(e);
            }
        }
        public override void OnMouseMove(MouseEvent me)
        {
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            if (button.IsIn(mx, my))
            {
                if (button.isHover == false)
                {
                    MouseEvent ev = new MouseEvent(button, (int)EMouseEventTypes.MOUSE_ENTERED, mx, my, me.MouseButton);
                    button.ProcessMouseEntered(ev);
                }
            }
            else
            {
                if (button.isHover)
                {
                    MouseEvent ev = new MouseEvent(button, (int)EMouseEventTypes.MOUSE_EXITED, mx, my, me.MouseButton);
                    button.ProcessMouseExited(ev);
                }
            }
        }
Exemple #26
0
        public override void OnMouseRelease(MouseEvent me)
        {
            //base.OnMouseRelease(me);

            if (expand)
            {
                parentMenuList.SetShrink();
                expand = false;
            }
            else
            {
                parentMenuList.SetExpand(this);
                expand = true;
            }
            status = EStatus.Hover;
        }
Exemple #27
0
        public override void OnMouseRelease(MouseEvent me)
        {
            //base.OnMouseRelease(me);

            status = EStatus.Hover;
            if (expand)
            {
                menuBar.SetShrink();
                expand = false;
            }
            else
            {
                menuBar.SetExpand(this);
                expand = true;
            }
        }
Exemple #28
0
 public override void OnMouseEnter(MouseEvent me)
 {
     //base.OnMouseEnter(me);
     isHover = true;
     status = EStatus.Hover;
 }
Exemple #29
0
        public override void OnMousePress(AssortedWidgets.Events.MouseEvent me)
        {
            //base.OnMousePress(me);

            status = EStatus.Pressed;
        }
Exemple #30
0
        public override void OnMouseEnter(MouseEvent me)
        {
            //base.OnMouseEnter(me);

            isHover = true;
            OnMouseMove(me);
        }
Exemple #31
0
        public void ImportMouseMotion(int mx, int my)
        {
            MouseX = mx;
            MouseY = my;

            if (mx == OldMouseX && my == OldMouseY)
                return;
            else
            {
                OldMouseX = mx;
                OldMouseY = my;
            }
            if (pressed && DragManager.Instance.IsOnDrag())
            {
                DragManager.Instance.ProcessDrag(mx, my);
                return;
            }
			if(DropListManager.Instance.IsDropped)
			{
				if(DropListManager.Instance.IsIn(mx,my))
				{
					if(DropListManager.Instance.isHover)
					{
                        MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_MOTION,
                                                      mx, my, MouseButton.Left);
                        DropListManager.Instance.ImportMouseMotion(e);
                    }
					else
					{
                        MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_ENTERED,
                                                      mx, my, MouseButton.Left);
                        DropListManager.Instance.ImportMouseEntered(e);
                    }
				
				}
				else
				{
                    if (DropListManager.Instance.isHover)
					{
                        MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_EXITED,
                                                      mx, my, MouseButton.Left);
                        DropListManager.Instance.ImportMouseExited(e);
                    }
				}
			}
            if (MenuBar.Instance.IsIn(mx, my))
            {
                if (MenuBar.Instance.isHover)
                {
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_MOTION, mx, my,
                                                  MouseButton.Left);
                    MenuBar.Instance.ProcessMouseMoved(e);
                }
                else
                {
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_ENTERED, mx, my,
                                                  MouseButton.Left);
                    MenuBar.Instance.ProcessMouseEntered(e);
                }
            }
            else
            {
                if (MenuBar.Instance.isHover)
                {
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_EXITED, mx, my,
                                                  MouseButton.Left);
                    MenuBar.Instance.ProcessMouseExited(e);
                }
                if (MenuBar.Instance.IsExpand)
                {
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_MOTION, mx, my,
                                                  MouseButton.Left);
                    MenuBar.Instance.ProcessMouseMoved(e);
                }
            }

            DialogManager.Instance.ImportMouseMotion(mx, my);

            if (componentList.Count > 0)
            {
                foreach (Component c in componentList)
                {
                    if (c.IsIn(mx, my))
                    {
                        if (c.isHover)
                        {
                            MouseEvent ev = new MouseEvent(c, (int)EMouseEventTypes.MOUSE_MOTION, mx, my,
                                                           MouseButton.Left);
                            c.ProcessMouseMoved(ev);
                        }
                        else
                        {
                            MouseEvent ev = new MouseEvent(c, (int)EMouseEventTypes.MOUSE_ENTERED, mx, my,
                                                           MouseButton.Left);
                            c.ProcessMouseEntered(ev);
                        }
                    }
                    else
                    {
                        if (c.isHover)
                        {
                            MouseEvent ev = new MouseEvent(c, (int)EMouseEventTypes.MOUSE_EXITED, mx, my,
                                                          MouseButton.Left);
                            c.ProcessMouseExited(ev);
                        }
                    }
                }
            }
        }
Exemple #32
0
        public override void OnMouseMove(MouseEvent me)
        {
            //base.OnMouseMove(me);

            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            foreach (MenuItem mi in itemList)
            {
                if (mi.IsIn(mx, my))
                {
                    if (mi.isHover)
                    {
                        MouseEvent ev = new MouseEvent(mi, (int)EMouseEventTypes.MOUSE_MOTION, mx, my,
                                                       me.MouseButton);
                        mi.ProcessMouseMoved(ev);
                    }
                    else
                    {
                        MouseEvent ev = new MouseEvent(mi, (int)EMouseEventTypes.MOUSE_ENTERED, mx, my,
                                                      me.MouseButton);
                        mi.ProcessMouseEntered(ev);
                    }
                }
                else
                {
                    if (mi.isHover)
                    {
                        MouseEvent ev = new MouseEvent(mi, (int)EMouseEventTypes.MOUSE_EXITED, mx, my,
                                                      me.MouseButton);
                        mi.ProcessMouseExited(ev);
                    }
                }
            }
        }
Exemple #33
0
        public void ImportMousePress(MouseButton button, int x, int y)
        {
            pressed = true;

            DragManager.Instance.SetCurrent(x, y);

            if(DropListManager.Instance.IsDropped)
			{
				if(DropListManager.Instance.IsIn(x,y))
				{
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_PRESSED, x, y, button);
                    DropListManager.Instance.ImportMousePressed(e);
                }
				else
				{
					DropListManager.Instance.ShrinkBack();
				}
			}

            if (MenuBar.Instance.IsIn(x, y))
            {
                MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_PRESSED, x, y, button);
                MenuBar.Instance.ProcessMousePressed(e);
            }
            else
            {
                if (MenuBar.Instance.IsExpand)
                {
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_PRESSED, x, y, button);
                    MenuBar.Instance.ProcessMousePressed(e);
                }
            }

            DialogManager.Instance.ImportMousePressed(x, y);

            if (componentList.Count > 0)
            {
                foreach (Component c in componentList)
                {
                    if (c.IsIn(x, y))
                    {
                        MouseEvent ev = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_PRESSED, x, y,
                                                       button);
                        c.ProcessMousePressed(ev);
                    }
                }
            }
        }
 public void ImportMouseExited(MouseEvent e)
 {
     isHover = false;
     ImportMouseMotion(e);
 }
Exemple #35
0
        public void ImportMouseRelease(MouseButton button, int x, int y)
        {
 			DropListManager.Instance.SetCurrent(x,y);

            if (pressed && DragManager.Instance.IsOnDrag())
            {
                DragManager.Instance.DragEnd();
            }

            pressed = false;

            if (MenuBar.Instance.IsIn(x, y))
            {
                MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_RELEASED, x, y, button);
                MenuBar.Instance.ProcessMouseReleased(e);
            }
            else
            {
                if (MenuBar.Instance.IsExpand)
                {
                    MouseEvent e = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_RELEASED, x, y, button);
                    MenuBar.Instance.ProcessMouseReleased(e);
                }
            }

            DialogManager.Instance.ImportMouseReleased(x, y);

            if (componentList.Count > 0)
            {
                foreach (Component c in componentList)
                {
                    if (c.IsIn(x, y))
                    {
                        MouseEvent ev = new MouseEvent(null, (int)EMouseEventTypes.MOUSE_RELEASED, x, y,
                                                       button);
                        c.ProcessMouseReleased(ev);
                    }
                }
            }
        }
        public void ImportMouseMotion(MouseEvent e)
        {
            int mx = e.X - position.X;
            int my = e.Y - position.Y;

            List<DropListItem> itemList = Dropped.ItemList;

            foreach (DropListItem iter in itemList)
            {
                if (iter.IsIn(mx, my))
                {
                    if (iter.isHover)
                    {

                    }
                    else
                    {
                        MouseEvent ev = new MouseEvent(iter, (int)EMouseEventTypes.MOUSE_ENTERED, mx, my, e.MouseButton);
                        iter.ProcessMouseEntered(ev);
                    }
                }
                else
                {
                    if (iter.isHover)
                    {
                        MouseEvent ev = new MouseEvent(iter, (int)EMouseEventTypes.MOUSE_EXITED, mx, my, e.MouseButton);
                        iter.ProcessMouseExited(ev);
                    }
                }
            }
        }
Exemple #37
0
        internal void ListMousePressed(MouseEvent me)
        {
            int mx = me.X - Position.X;
            int my = me.Y - Position.Y;

            if (expand && menuList.IsIn(mx, my))
            {
                MouseEvent e = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_PRESSED, mx, my,
                                              me.MouseButton);
                menuList.ProcessMousePressed(e);
            }

            if (menuList.IsExpand && menuList.ExpandMenu != null)
            {
                MouseEvent e = new MouseEvent(menuList, (int)EMouseEventTypes.MOUSE_PRESSED,
                                              mx - menuList.Position.X, my - menuList.Position.Y,
                                              me.MouseButton);
                menuList.ExpandMenu.ListMousePressed(e);
            }
        }