Esempio n. 1
0
        /// <summary>
        /// Initialize a new instance of the ViewRibbonPopupGroupManager class.
        /// </summary>
        /// <param name="ribbon">Reference to original ribbon instance.</param>
        /// <param name="control">Owning control.</param>
        /// <param name="qatContents">View that will handle focus requests.</param>
        /// <param name="root">View for group we are tracking.</param>
        public ViewRibbonQATOverflowManager(KryptonRibbon ribbon,
                                            Control control,
                                            ViewLayoutRibbonQATContents qatContents,
                                            ViewBase root)
            : base(control, root)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(qatContents != null);

            _ribbon     = ribbon;
            QATContents = qatContents;
        }
Esempio n. 2
0
        /// <summary>
        /// Initialize a new instance of the ViewLayoutRibbonQATFromOverflow class.
        /// </summary>
        /// <param name="parentControl">Owning control used to find screen positions.</param>
        /// <param name="ribbon">Owning ribbon control instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        /// <param name="showExtraButton">Should the extra button be shown.</param>
        /// <param name="contents">Source for finding buttons that are overflowing.</param>
        public ViewLayoutRibbonQATFromOverflow(Control parentControl,
                                               KryptonRibbon ribbon,
                                               NeedPaintHandler needPaint,
                                               bool showExtraButton,
                                               ViewLayoutRibbonQATContents contents)
            : base(ribbon, needPaint, showExtraButton)
        {
            Debug.Assert(parentControl != null);
            Debug.Assert(contents != null);

            _contents      = contents;
            _parentControl = parentControl;
        }
Esempio n. 3
0
        /// <summary>
        /// Initialize a new instance of the VisualPopupQATOverflow class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="contents">Reference to original contents which has overflow items.</param>
        /// <param name="renderer">Drawing renderer.</param>
        public VisualPopupQATOverflow(KryptonRibbon ribbon,
                                      ViewLayoutRibbonQATContents contents,
                                      IRenderer renderer)
            : base(renderer, true)
        {
            Debug.Assert(ribbon != null);

            // Remember references needed later
            _ribbon = ribbon;

            // Create a view element for drawing the group
            _viewQAT = new ViewDrawRibbonQATOverflow(ribbon, NeedPaintDelegate);

            // Create and add the element used to synch and draw the actual contents
            _viewQATContents = new ViewLayoutRibbonQATFromOverflow(this, ribbon,
                                                                   NeedPaintDelegate,
                                                                   true, contents);
            _viewQAT.Add(_viewQATContents);

            // Attach the root to the view manager instance
            ViewManager = new ViewRibbonQATOverflowManager(ribbon, this, _viewQATContents, _viewQAT);
        }