Implement storage for ribbon tab and content.
Inheritance: ComponentFactory.Krypton.Toolkit.Storage
Exemple #1
0
 /// <summary>
 /// Set the redirection states.
 /// </summary>
 /// <param name="disabled">Redirection for disabled state requests.</param>
 /// <param name="normal">Redirection for normal state requests.</param>
 /// <param name="pressed">Redirection for pressed state requests.</param>
 /// <param name="tracking">Redirection for tracking state requests.</param>
 /// <param name="selected">Redirection for selected states requests.</param>
 /// <param name="focusOverride">Redirection for focus override state requests.</param>
 public virtual void SetRedirectStates(PaletteRibbonTabContent disabled,
                                       PaletteRibbonTabContent normal,
                                       PaletteRibbonTabContent pressed,
                                       PaletteRibbonTabContent tracking,
                                       PaletteRibbonTabContent selected,
                                       PaletteRibbonTabContentRedirect focusOverride)
 {
     _disabledBack         = disabled.TabDraw;
     _disabledText         = disabled.TabDraw;
     _normalBack           = normal.TabDraw;
     _normalText           = normal.TabDraw;
     _pressedBack          = pressed.TabDraw;
     _pressedText          = pressed.TabDraw;
     _trackingBack         = tracking.TabDraw;
     _trackingText         = tracking.TabDraw;
     _selectedBack         = selected.TabDraw;
     _selectedText         = selected.TabDraw;
     _focusOverrideBack    = focusOverride.TabDraw;
     _focusOverrideText    = focusOverride.TabDraw;
     _disabledContent      = disabled.Content;
     _normalContent        = normal.Content;
     _pressedContent       = pressed.Content;
     _trackingContent      = tracking.Content;
     _selectedContent      = selected.Content;
     _focusOverrideContent = focusOverride.Content;
 }
 /// <summary>
 /// Initialize a new instance of the PaletteNavigatorOther class.
 /// </summary>
 /// <param name="redirect">Inheritence redirection instance.</param>
 /// <param name="needPaint">Delegate for notifying paint requests.</param>
 public PaletteNavigatorOther(PaletteNavigatorRedirect redirect,
                              NeedPaintHandler needPaint)
 {
     // Create the palette storage
     CheckButton    = new PaletteTriple(redirect.CheckButton, needPaint);
     OverflowButton = new PaletteTriple(redirect.OverflowButton, needPaint);
     MiniButton     = new PaletteTriple(redirect.MiniButton, needPaint);
     Tab            = new PaletteTabTriple(redirect.Tab, needPaint);
     RibbonTab      = new PaletteRibbonTabContent(redirect.RibbonTab.TabDraw, redirect.RibbonTab.TabDraw, redirect.RibbonTab.Content, needPaint);
 }
 /// <summary>
 /// Initialize a new instance of the PaletteNavigatorNormabled class.
 /// </summary>
 /// <param name="redirect">Inheritence redirection instance.</param>
 /// <param name="needPaint">Delegate for notifying paint requests.</param>
 public PaletteNavigator(PaletteNavigatorRedirect redirect,
                         NeedPaintHandler needPaint)
     : base(redirect, needPaint)
 {
     // Create the palette storage
     PalettePage    = new PalettePage(redirect.PalettePage, needPaint);
     HeaderGroup    = new PaletteNavigatorHeaderGroup(redirect.HeaderGroup, redirect.HeaderGroup.HeaderPrimary, redirect.HeaderGroup.HeaderSecondary, redirect.HeaderGroup.HeaderBar, redirect.HeaderGroup.HeaderOverflow, needPaint);
     CheckButton    = new PaletteTriple(redirect.CheckButton, needPaint);
     OverflowButton = new PaletteTriple(redirect.OverflowButton, needPaint);
     MiniButton     = new PaletteTriple(redirect.MiniButton, needPaint);
     BorderEdge     = new PaletteBorderEdge(redirect.BorderEdge, needPaint);
     Separator      = new PaletteSeparatorPadding(redirect.Separator, redirect.Separator, needPaint);
     Tab            = new PaletteTabTriple(redirect.Tab, needPaint);
     RibbonTab      = new PaletteRibbonTabContent(redirect.RibbonTab.TabDraw, redirect.RibbonTab.TabDraw, redirect.RibbonTab.Content, needPaint);
 }
 /// <summary>
 /// Initialize a new instance of the PaletteNavigatorNormabled class.
 /// </summary>
 /// <param name="redirect">Inheritence redirection instance.</param>
 /// <param name="needPaint">Delegate for notifying paint requests.</param>
 public PaletteNavigator(PaletteNavigatorRedirect redirect,
                         NeedPaintHandler needPaint)
     : base(redirect, needPaint)
 {
     // Create the palette storage
     _palettePage = new PalettePage(redirect.PalettePage, needPaint);
     _paletteHeaderGroup = new PaletteNavigatorHeaderGroup(redirect.HeaderGroup, redirect.HeaderGroup.HeaderPrimary, redirect.HeaderGroup.HeaderSecondary, redirect.HeaderGroup.HeaderBar, redirect.HeaderGroup.HeaderOverflow, needPaint);
     _paletteCheckButton = new PaletteTriple(redirect.CheckButton, needPaint);
     _paletteOverflowButton = new PaletteTriple(redirect.OverflowButton, needPaint);
     _paletteMiniButton = new PaletteTriple(redirect.MiniButton, needPaint);
     _paletteBorderEdge = new PaletteBorderEdge(redirect.BorderEdge, needPaint);
     _paletteSeparator = new PaletteSeparatorPadding(redirect.Separator, redirect.Separator, needPaint);
     _paletteTab = new PaletteTabTriple(redirect.Tab, needPaint);
     _paletteRibbonTab = new PaletteRibbonTabContent(redirect.RibbonTab.TabDraw, redirect.RibbonTab.TabDraw, redirect.RibbonTab.Content, needPaint);
 }
 /// <summary>
 /// Set the redirection states.
 /// </summary>
 /// <param name="disabled">Redirection for disabled state requests.</param>
 /// <param name="normal">Redirection for normal state requests.</param>
 /// <param name="pressed">Redirection for pressed state requests.</param>
 /// <param name="tracking">Redirection for tracking state requests.</param>
 /// <param name="selected">Redirection for selected states requests.</param>
 /// <param name="focusOverride">Redirection for focus override state requests.</param>
 public virtual void SetRedirectStates(PaletteRibbonTabContent disabled,
                                       PaletteRibbonTabContent normal,
                                       PaletteRibbonTabContent pressed,
                                       PaletteRibbonTabContent tracking,
                                       PaletteRibbonTabContent selected,
                                       PaletteRibbonTabContentRedirect focusOverride)
 {
     _disabledBack = disabled.TabDraw;
     _disabledText = disabled.TabDraw;
     _normalBack = normal.TabDraw;
     _normalText = normal.TabDraw;
     _pressedBack = pressed.TabDraw;
     _pressedText = pressed.TabDraw;
     _trackingBack = tracking.TabDraw;
     _trackingText = tracking.TabDraw;
     _selectedBack = selected.TabDraw;
     _selectedText = selected.TabDraw;
     _focusOverrideBack = focusOverride.TabDraw;
     _focusOverrideText = focusOverride.TabDraw;
     _disabledContent = disabled.Content;
     _normalContent = normal.Content;
     _pressedContent = pressed.Content;
     _trackingContent = tracking.Content;
     _selectedContent = selected.Content;
     _focusOverrideContent = focusOverride.Content;
 }