/// <summary>
        /// Initialize a new instance of the ViewLayoutRibbonTabsArea class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="redirect">Reference to redirector for palette settings.</param>
        /// <param name="captionArea">Reference to the caption area.</param>
        /// <param name="layoutContexts">Reference to layout of the context area.</param>
        /// <param name="needPaintDelegate">Delegate for notifying paint/layout changes.</param>
        public ViewLayoutRibbonTabsArea(KryptonRibbon ribbon,
                                        PaletteRedirect redirect,
                                        ViewDrawRibbonCaptionArea captionArea,
                                        ViewLayoutRibbonContextTitles layoutContexts,
                                        NeedPaintHandler needPaintDelegate)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(redirect != null);
            Debug.Assert(layoutContexts != null);
            Debug.Assert(captionArea != null);
            Debug.Assert(needPaintDelegate != null);

            // Remember incoming references
            _ribbon              = ribbon;
            _captionArea         = captionArea;
            _appButtonController = captionArea.AppButtonController;
            _appTabController    = captionArea.AppTabController;
            _layoutContexts      = layoutContexts;
            _needPaintDelegate   = needPaintDelegate;

            // Default other state
            _setVisible         = true;
            _lastAppButtonClick = DateTime.MinValue;

            CreateController();
            CreateButtonSpecs();
            CreateViewElements(redirect);
            SetupParentMonitoring();
        }
        /// <summary>
        /// Initialize a new instance of the ViewLayoutRibbonContextTitles class.
        /// </summary>
        /// <param name="ribbon">Reference to source ribbon control.</param>
        /// <param name="captionArea">Reference to view element that tracks the top level form.</param>
        public ViewLayoutRibbonContextTitles(KryptonRibbon ribbon,
                                             ViewDrawRibbonCaptionArea captionArea)
        {
            Debug.Assert(captionArea != null);
            Debug.Assert(ribbon != null);
            _ribbon      = ribbon;
            _captionArea = captionArea;

            // Create cache of draw elements
            _contextTitlesCache = new ViewDrawRibbonContextTitleList();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initialize a new instance of the VisualPopupMinimized class.
        /// </summary>
        /// <param name="ribbon">Owning ribbon control instance.</param>
        /// <param name="viewManager">View manager instance for managing view display.</param>
        /// <param name="captionArea">View element that manages the custom chrome injection.</param>
        /// <param name="renderer">Drawing renderer.</param>
        public VisualPopupMinimized(KryptonRibbon ribbon,
                                    ViewManager viewManager,
                                    ViewDrawRibbonCaptionArea captionArea,
                                    IRenderer renderer)
            : base(viewManager, renderer, true)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(captionArea != null);

            // Remember incoming references
            _ribbon      = ribbon;
            _captionArea = captionArea;
        }