/// <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)
 {
     ItemHighlight     = new PaletteDoubleMetric(redirectItemHighlight);
     ItemImage         = new PaletteTripleJustImage(redirectItemImage);
     ItemShortcutText  = new PaletteContentJustShortText(redirectItemShortcutText);
     ItemSplit         = new PaletteDouble(redirectItemSplit);
     ItemTextStandard  = new PaletteContentJustText(redirectItemTextStandard);
     ItemTextAlternate = new PaletteContentJustText(redirectItemTextAlternate);
 }
Esempio n. 2
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
            ControlInner              = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuInner, PaletteBorderStyle.ContextMenuInner, needPaint);
            ControlOuter              = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuOuter, PaletteBorderStyle.ContextMenuOuter, needPaint);
            Heading                   = new PaletteTripleRedirect(redirect, PaletteBackStyle.ContextMenuHeading, PaletteBorderStyle.ContextMenuHeading, PaletteContentStyle.ContextMenuHeading, needPaint);
            ItemHighlight             = new PaletteDoubleMetricRedirect(redirect, PaletteBackStyle.ContextMenuItemHighlight, PaletteBorderStyle.ContextMenuItemHighlight, needPaint);
            ItemImage                 = new PaletteTripleJustImageRedirect(redirect, PaletteBackStyle.ContextMenuItemImage, PaletteBorderStyle.ContextMenuItemImage, PaletteContentStyle.ContextMenuItemImage, needPaint);
            ItemImageColumn           = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuItemImageColumn, PaletteBorderStyle.ContextMenuItemImageColumn, needPaint);
            ItemShortcutTextRedirect  = new PaletteContentInheritRedirect(redirect, PaletteContentStyle.ContextMenuItemShortcutText);
            ItemShortcutText          = new PaletteContentJustShortText(ItemShortcutTextRedirect, needPaint);
            ItemSplit                 = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuItemSplit, PaletteBorderStyle.ContextMenuItemSplit, needPaint);
            ItemTextAlternateRedirect = new PaletteContentInheritRedirect(redirect, PaletteContentStyle.ContextMenuItemTextAlternate);
            ItemTextAlternate         = new PaletteContentJustText(ItemTextAlternateRedirect, needPaint);
            ItemTextStandardRedirect  = new PaletteContentInheritRedirect(redirect, PaletteContentStyle.ContextMenuItemTextStandard);
            ItemTextStandard          = new PaletteContentJustText(ItemTextStandardRedirect, needPaint);
            Separator                 = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ContextMenuSeparator, PaletteBorderStyle.ContextMenuSeparator, needPaint);
        }