Example #1
0
        /// <summary>
        /// Initialize a new instance of the ViewRibbonManager class.
        /// </summary>
        /// <param name="control">Owning control.</param>
        /// <param name="viewGroups">Group view elements.</param>
        /// <param name="root">Root of the view hierarchy.</param>
        /// <param name="minimizedMode">Is this manager for handling the minimized mode popup.</param>
        /// <param name="needPaintDelegate">Delegate for requesting paint changes.</param>
        public ViewRibbonManager(KryptonRibbon control,
                                 ViewDrawRibbonGroupsBorderSynch viewGroups,
                                 ViewBase root,
                                 bool minimizedMode,
                                 NeedPaintHandler needPaintDelegate)
            : base(control, root)
        {
            Debug.Assert(viewGroups != null);
            Debug.Assert(root != null);
            Debug.Assert(needPaintDelegate != null);

            _ribbon            = control;
            _viewGroups        = viewGroups;
            _needPaintDelegate = needPaintDelegate;
            _active            = true;
            _minimizedMode     = minimizedMode;
        }
Example #2
0
        /// <summary>
        /// Initialize a new instance of the ViewLayoutRibbonGroupsArea class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="redirect">Reference to redirector for palette settings.</param>
        /// <param name="needPaintDelegate">Delegate for notifying paint/layout changes.</param>
        public ViewLayoutRibbonGroupsArea(KryptonRibbon ribbon,
                                          PaletteRedirect redirect,
                                          NeedPaintHandler needPaintDelegate)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(redirect != null);
            Debug.Assert(needPaintDelegate != null);

            // Remember the incoming reference
            _ribbon = ribbon;

            // Create access to the redirector and use as our palette source
            _backInherit = new PaletteBackInheritRedirect(redirect, PaletteBackStyle.PanelClient);
            SetPalettes(_backInherit);

            // Create and add the only child we need, the groups area border element
            _viewGroups = new ViewDrawRibbonGroupsBorderSynch(ribbon, needPaintDelegate);
            Add(_viewGroups);
        }