Exemplo n.º 1
0
        protected void UpdateHoverEditor(MouseEventArgs e)
        {
            PropertyEditor lastHoverEditor = this.hoverEditor;

            this.hoverEditor = this.PickEditorAt(e.X, e.Y, true);
            if (this.hoverEditor == this)
            {
                this.hoverEditor = null;
            }

            if (lastHoverEditor != this.hoverEditor && lastHoverEditor != null)
            {
                lastHoverEditor.OnMouseLeave(EventArgs.Empty);
            }
            if (lastHoverEditor != this.hoverEditor && this.hoverEditor != null)
            {
                // Indent expand button
                if (this.UseIndentChildExpand)
                {
                    int curY = this.headerHeight;
                    foreach (PropertyEditor child in this.propertyEditors)
                    {
                        this.IndentChildExpandOnMouseLeave(EventArgs.Empty, child as GroupedPropertyEditor, curY);
                        curY += child.Height;
                    }
                }

                this.hoverEditor.OnMouseEnter(EventArgs.Empty);
            }
        }
Exemplo n.º 2
0
        protected internal override void OnMouseLeave(EventArgs e)
        {
            base.OnMouseLeave(e);
            if (this.hoverEditor != null)
            {
                PropertyEditor lastHoverEditor = this.hoverEditor;
                this.hoverEditor = null;

                if (lastHoverEditor != this.hoverEditor && lastHoverEditor != null)
                {
                    lastHoverEditor.OnMouseLeave(EventArgs.Empty);
                }
            }

            if (this.expandCheckHovered)
            {
                this.Invalidate();
            }
            if (this.activeCheckHovered)
            {
                this.Invalidate();
            }
            this.expandCheckHovered = false;
            this.expandCheckPressed = false;
            this.activeCheckHovered = false;
            this.activeCheckPressed = false;

            // Indent expand button
            if (this.UseIndentChildExpand)
            {
                int curY = this.headerHeight;
                foreach (PropertyEditor child in this.propertyEditors)
                {
                    this.IndentChildExpandOnMouseLeave(e, child as GroupedPropertyEditor, curY);
                    curY += child.Height;
                }
            }
        }