PerformNeedPaint() public method

Fires the NeedPaint event.
public PerformNeedPaint ( bool needLayout, Rectangle invalidRect ) : void
needLayout bool Does the palette change require a layout.
invalidRect System.Drawing.Rectangle Rectangle to invalidate.
return void
Exemplo n.º 1
0
        /// <summary>
        /// Perform mouse movement handling.
        /// </summary>
        /// <param name="e">A MouseEventArgs that contains the event data.</param>
        /// <param name="rawPt">The actual point provided from the windows message.</param>
        public override void MouseMove(MouseEventArgs e, Point rawPt)
        {
            Debug.Assert(e != null);

            // Validate incoming reference
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            if (!_ribbon.InDesignMode)
            {
                // Only interested if the application window we are inside is active or a docking floating window is active
                if (_active || (CommonHelper.ActiveFloatingWindow != null))
                {
                    // Only hot track groups if in the correct mode
                    if (_minimizedMode == _ribbon.RealMinimizedMode)
                    {
                        // Get the view group instance that matches this point
                        ViewDrawRibbonGroup viewGroup = _viewGroups.ViewGroupFromPoint(new Point(e.X, e.Y));

                        // Is there a change in active group?
                        if (viewGroup != _activeGroup)
                        {
                            if (_activeGroup != null)
                            {
                                _activeGroup.Tracking = false;
                                _activeGroup.PerformNeedPaint(false, _activeGroup.ClientRectangle);
                            }

                            _activeGroup = viewGroup;

                            if (_activeGroup != null)
                            {
                                _activeGroup.Tracking = true;
                                _activeGroup.PerformNeedPaint(false, _activeGroup.ClientRectangle);
                            }
                        }
                    }
                }
            }

            // Remember to call base class for standard mouse processing
            base.MouseMove(e, rawPt);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Perform mouse movement handling.
        /// </summary>
        /// <param name="e">A MouseEventArgs that contains the event data.</param>
        /// <param name="rawPt">The actual point provided from the windows message.</param>
        public override void MouseMove(MouseEventArgs e, Point rawPt)
        {
            Debug.Assert(e != null);

            // Validate incoming reference
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            // Should the group be active
            bool tracking = _viewGroup.ClientRectangle.Contains(new Point(e.X, e.Y));

            // Is there a change in active group?
            if (tracking != _viewGroup.Tracking)
            {
                _viewGroup.Tracking = tracking;
                _viewGroup.PerformNeedPaint(false, _viewGroup.ClientRectangle);
            }

            // Remember to call base class for standard mouse processing
            base.MouseMove(e, rawPt);
        }
        /// <summary>
        /// Perform mouse movement handling.
        /// </summary>
        /// <param name="e">A MouseEventArgs that contains the event data.</param>
        /// <param name="rawPt">The actual point provided from the windows message.</param>
        public override void MouseMove(MouseEventArgs e, Point rawPt)
        {
            Debug.Assert(e != null);

            // Validate incoming reference
            if (e == null) throw new ArgumentNullException("e");

            // Only interested if the application window we are inside is active
            if (_active)
            {
                // Only hot track groups if in the correct mode
                if (_minimizedMode == _ribbon.RealMinimizedMode)
                {
                    // Get the view group instance that matches this point
                    ViewDrawRibbonGroup viewGroup = _viewGroups.ViewGroupFromPoint(new Point(e.X, e.Y));

                    // Is there a change in active group?
                    if (viewGroup != _activeGroup)
                    {
                        if (_activeGroup != null)
                        {
                            _activeGroup.Tracking = false;
                            _activeGroup.PerformNeedPaint(false, _activeGroup.ClientRectangle);
                        }

                        _activeGroup = viewGroup;

                        if (_activeGroup != null)
                        {
                            _activeGroup.Tracking = true;
                            _activeGroup.PerformNeedPaint(false, _activeGroup.ClientRectangle);
                        }
                    }
                }
            }

            // Remember to call base class for standard mouse processing
            base.MouseMove(e, rawPt);
        }