/// <summary>
 /// Initialize a new instance of the PaletteContextMenuItemState class.
 /// </summary>
 /// <param name="redirectItemHighlight">Redirector for ItemHighlight.</param>
 /// <param name="redirectItemImage">Redirector for ItemImage.</param>
 /// <param name="redirectItemShortcutText">Redirector for ItemShortcutText.</param>
 /// <param name="redirectItemSplit">Redirector for ItemSplit.</param>
 /// <param name="redirectItemTextAlternate">Redirector for ItemTextStandard.</param>
 /// <param name="redirectItemTextStandard">Redirector for ItemTextAlternate.</param>
 public PaletteContextMenuItemState(PaletteDoubleMetricRedirect redirectItemHighlight,
                                    PaletteTripleJustImageRedirect redirectItemImage,
                                    PaletteContentInheritRedirect redirectItemShortcutText,
                                    PaletteDoubleRedirect redirectItemSplit,
                                    PaletteContentInheritRedirect redirectItemTextStandard,
                                    PaletteContentInheritRedirect redirectItemTextAlternate)
 {
     _paletteItemHighlight     = new PaletteDoubleMetric(redirectItemHighlight);
     _paletteItemImage         = new PaletteTripleJustImage(redirectItemImage);
     _paletteItemShortcutText  = new PaletteContentJustShortText(redirectItemShortcutText);
     _paletteItemSplit         = new PaletteDouble(redirectItemSplit);
     _paletteItemTextStandard  = new PaletteContentJustText(redirectItemTextStandard);
     _paletteItemTextAlternate = new PaletteContentJustText(redirectItemTextAlternate);
 }
        /// <summary>
        /// Initialize a new instance of the PaletteContextMenuItemStateRedirect class.
        /// </summary>
        public PaletteContextMenuItemStateRedirect()
        {
            _itemHighlight    = new PaletteRedirectDouble();
            _itemImage        = new PaletteRedirectTriple();
            _itemShortcutText = new PaletteRedirectContent();
            _itemSplit        = new PaletteRedirectDouble();
            _itemStandard     = new PaletteRedirectContent();
            _itemAlternate    = new PaletteRedirectContent();

            _redirectItemHighlight     = new PaletteDoubleMetricRedirect(_itemHighlight, PaletteBackStyle.ContextMenuItemHighlight, PaletteBorderStyle.ContextMenuItemHighlight);
            _redirectItemImage         = new PaletteTripleJustImageRedirect(_itemImage, PaletteBackStyle.ContextMenuItemImage, PaletteBorderStyle.ContextMenuItemImage, PaletteContentStyle.ContextMenuItemImage);
            _redirectItemShortcutText  = new PaletteContentInheritRedirect(_itemShortcutText, PaletteContentStyle.ContextMenuItemShortcutText);
            _redirectItemSplit         = new PaletteDoubleRedirect(_itemSplit, PaletteBackStyle.ContextMenuSeparator, PaletteBorderStyle.ContextMenuSeparator);
            _redirectItemTextStandard  = new PaletteContentInheritRedirect(_itemStandard, PaletteContentStyle.ContextMenuItemTextStandard);
            _redirectItemTextAlternate = new PaletteContentInheritRedirect(_itemAlternate, PaletteContentStyle.ContextMenuItemTextAlternate);
        }
Example #3
0
        /// <summary>
        /// Initialize a new instance of the PaletteContextMenuRedirect class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteContextMenuRedirect(PaletteRedirect redirect,
                                          NeedPaintHandler needPaint)
        {
            Debug.Assert(redirect != null);

            // Create the palette storage
            _paletteControlInner              = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuInner, PaletteBorderStyle.ContextMenuInner, needPaint);
            _paletteControlOuter              = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuOuter, PaletteBorderStyle.ContextMenuOuter, needPaint);
            _paletteHeading                   = new PaletteTripleRedirect(redirect, PaletteBackStyle.ContextMenuHeading, PaletteBorderStyle.ContextMenuHeading, PaletteContentStyle.ContextMenuHeading, needPaint);
            _paletteItemHighlight             = new PaletteDoubleMetricRedirect(redirect, PaletteBackStyle.ContextMenuItemHighlight, PaletteBorderStyle.ContextMenuItemHighlight, needPaint);
            _paletteItemImage                 = new PaletteTripleJustImageRedirect(redirect, PaletteBackStyle.ContextMenuItemImage, PaletteBorderStyle.ContextMenuItemImage, PaletteContentStyle.ContextMenuItemImage, needPaint);
            _paletteItemImageColumn           = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuItemImageColumn, PaletteBorderStyle.ContextMenuItemImageColumn, needPaint);
            _paletteItemShortcutTextRedirect  = new PaletteContentInheritRedirect(redirect, PaletteContentStyle.ContextMenuItemShortcutText);
            _paletteItemShortcutText          = new PaletteContentJustShortText(_paletteItemShortcutTextRedirect, needPaint);
            _paletteItemSplit                 = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuItemSplit, PaletteBorderStyle.ContextMenuItemSplit, needPaint);
            _paletteItemTextAlternateRedirect = new PaletteContentInheritRedirect(redirect, PaletteContentStyle.ContextMenuItemTextAlternate);
            _paletteItemTextAlternate         = new PaletteContentJustText(_paletteItemTextAlternateRedirect, needPaint);
            _paletteItemTextStandardRedirect  = new PaletteContentInheritRedirect(redirect, PaletteContentStyle.ContextMenuItemTextStandard);
            _paletteItemTextStandard          = new PaletteContentJustText(_paletteItemTextStandardRedirect, needPaint);
            _paletteSeparator                 = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuSeparator, PaletteBorderStyle.ContextMenuSeparator, needPaint);
        }
Example #4
0
 /// <summary>
 /// Initialize a new instance of the PaletteContextMenuItemStateChecked class.
 /// </summary>
 public PaletteContextMenuItemStateChecked(PaletteTripleJustImageRedirect redirectItemImage)
 {
     _paletteItemImage = new PaletteTripleJustImage(redirectItemImage);
 }