/// <summary> /// Initialize a new instance of the PaletteNavigatorOtherRedirect class. /// </summary> /// <param name="redirectCheckButton">Inheritence redirection instance for the check button.</param> /// <param name="redirectOverflowButton">Inheritence redirection instance for the outlook overflow button.</param> /// <param name="redirectMiniButton">Inheritence redirection instance for the outlook mini button.</param> /// <param name="redirectTab">Inheritence redirection instance for the tab.</param> /// <param name="redirectRibbonTab">Inheritence redirection instance for the ribbon tab.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteNavigatorOtherRedirect(PaletteRedirect redirectCheckButton, PaletteRedirect redirectOverflowButton, PaletteRedirect redirectMiniButton, PaletteRedirect redirectTab, PaletteRedirect redirectRibbonTab, NeedPaintHandler needPaint) { // Create the palette storage _paletteCheckButton = new PaletteTripleRedirect(redirectCheckButton, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, needPaint); _paletteOverflowButton = new PaletteTripleRedirect(redirectCheckButton, PaletteBackStyle.ButtonNavigatorOverflow, PaletteBorderStyle.ButtonNavigatorOverflow, PaletteContentStyle.ButtonNavigatorOverflow, needPaint); _paletteMiniButton = new PaletteTripleRedirect(redirectMiniButton, PaletteBackStyle.ButtonNavigatorMini, PaletteBorderStyle.ButtonNavigatorMini, PaletteContentStyle.ButtonNavigatorMini, needPaint); _paletteTab = new PaletteTabTripleRedirect(redirectTab, PaletteBackStyle.TabHighProfile, PaletteBorderStyle.TabHighProfile, PaletteContentStyle.TabHighProfile, needPaint); _paletteRibbonTab = new PaletteRibbonTabContentRedirect(redirectRibbonTab, needPaint); }
/// <summary> /// Initialize a new instance of the KryptonPaletteTabButtons class. /// </summary> /// <param name="redirector">Palette redirector for sourcing inherited values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> internal KryptonPaletteTabButtons(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); // Create the button style specific and common palettes _tabCommon = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabHighProfile, PaletteBorderStyle.TabHighProfile, PaletteContentStyle.TabHighProfile, needPaint); _tabHighProfile = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabHighProfile, PaletteBorderStyle.TabHighProfile, PaletteContentStyle.TabHighProfile, needPaint); _tabStandardProfile = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabStandardProfile, PaletteBorderStyle.TabStandardProfile, PaletteContentStyle.TabStandardProfile, needPaint); _tabLowProfile = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabLowProfile, PaletteBorderStyle.TabLowProfile, PaletteContentStyle.TabLowProfile, needPaint); _tabDock = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabDock, PaletteBorderStyle.TabDock, PaletteContentStyle.TabDock, needPaint); _tabDockAutoHidden = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabDockAutoHidden, PaletteBorderStyle.TabDockAutoHidden, PaletteContentStyle.TabDockAutoHidden, needPaint); _tabOneNote = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabOneNote, PaletteBorderStyle.TabOneNote, PaletteContentStyle.TabOneNote, needPaint); _tabCustom1 = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabCustom1, PaletteBorderStyle.TabCustom1, PaletteContentStyle.TabCustom1, needPaint); _tabCustom2 = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabCustom2, PaletteBorderStyle.TabCustom2, PaletteContentStyle.TabCustom2, needPaint); _tabCustom3 = new KryptonPaletteTabButton(redirector, PaletteBackStyle.TabCustom3, PaletteBorderStyle.TabCustom3, PaletteContentStyle.TabCustom3, needPaint); // Create redirectors for inheriting from style specific to style common PaletteRedirectTriple redirectCommon = new PaletteRedirectTriple(redirector, _tabCommon.StateDisabled, _tabCommon.StateNormal, _tabCommon.StatePressed, _tabCommon.StateTracking, _tabCommon.StateSelected,_tabCommon.OverrideFocus); // Inform the button style to use the new redirector _tabHighProfile.SetRedirector(redirectCommon); _tabStandardProfile.SetRedirector(redirectCommon); _tabLowProfile.SetRedirector(redirectCommon); _tabDock.SetRedirector(redirectCommon); _tabDockAutoHidden.SetRedirector(redirectCommon); _tabOneNote.SetRedirector(redirectCommon); _tabCustom1.SetRedirector(redirectCommon); _tabCustom2.SetRedirector(redirectCommon); _tabCustom3.SetRedirector(redirectCommon); }
/// <summary> /// Initialize a new instance of the ButtonSpecView class. /// </summary> /// <param name="redirector">Palette redirector.</param> /// <param name="paletteMetric">Source for metric values.</param> /// <param name="metricPadding">Padding metric for border padding.</param> /// <param name="manager">Reference to owning manager.</param> /// <param name="buttonSpec">Access</param> public ButtonSpecView(PaletteRedirect redirector, IPaletteMetric paletteMetric, PaletteMetricPadding metricPadding, ButtonSpecManagerBase manager, ButtonSpec buttonSpec) { Debug.Assert(redirector != null); Debug.Assert(manager != null); Debug.Assert(buttonSpec != null); // Remember references _redirector = redirector; _manager = manager; _buttonSpec = buttonSpec; _finishDelegate = new EventHandler(OnFinishDelegate); // Create delegate for paint notifications NeedPaintHandler needPaint = new NeedPaintHandler(OnNeedPaint); // Intercept calls from the button for color remapping and instead use // the button spec defined map and the container foreground color _remapPalette = _manager.CreateButtonSpecRemap(redirector, buttonSpec); // Use a redirector to get button values directly from palette _palette = new PaletteTripleRedirect(_remapPalette, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint); // Create the view for displaying a button _viewButton = new ViewDrawButton(_palette, _palette, _palette, _palette, paletteMetric, this, VisualOrientation.Top, false); // Associate the view with the source component (for design time support) if (buttonSpec.AllowComponent) _viewButton.Component = buttonSpec; // Use a view center to place button in centre of given space _viewCenter = new ViewLayoutCenter(paletteMetric, metricPadding, VisualOrientation.Top); _viewCenter.Add(_viewButton); // Create a controller for managing button behavior ButtonSpecViewControllers controllers = CreateController(_viewButton, needPaint, new MouseEventHandler(OnClick)); _viewButton.MouseController = controllers.MouseController; _viewButton.SourceController = controllers.SourceController; _viewButton.KeyController = controllers.KeyController; // We need notifying whenever a button specification property changes _buttonSpec.ButtonSpecPropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged); // Associate the button spec with the view that is drawing it _buttonSpec.SetView(_viewButton); // Finally update view with current button spec settings UpdateButtonStyle(); UpdateVisible(); UpdateEnabled(); UpdateChecked(); }
/// <summary> /// Initialize a new instance of the PaletteMetricRedirect class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> public PaletteMetricRedirect(PaletteRedirect redirect) { Debug.Assert(redirect != null); // Remember the redirect reference _redirect = redirect; }
/// <summary> /// Initialize a new instance of the PaletteComboBoxRedirect class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteComboBoxRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); // Store the provided paint notification delegate NeedPaint = needPaint; // Create storage that maps onto the inherit instances _itemRedirect = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonListItem, PaletteBorderStyle.ButtonListItem, PaletteContentStyle.ButtonListItem, NeedPaint); _comboBoxRedirect = new PaletteInputControlTripleRedirect(redirect, PaletteBackStyle.InputControlStandalone, PaletteBorderStyle.InputControlStandalone, PaletteContentStyle.InputControlStandalone, NeedPaint); _dropBackRedirect = new PaletteDoubleRedirect(redirect, PaletteBackStyle.ControlClient, PaletteBorderStyle.ButtonStandalone, NeedPaint); }
/// <summary> /// Construct the view appropriate for this builder. /// </summary> /// <param name="navigator">Reference to navigator instance.</param> /// <param name="manager">Reference to current manager.</param> /// <param name="redirector">Palette redirector.</param> public override void Construct(KryptonNavigator navigator, ViewManager manager, PaletteRedirect redirector) { // Let base class perform common operations base.Construct(navigator, manager, redirector); // Get the current root element _oldRoot = ViewManager.Root; // Create a canvas for the background _drawPanel = new ViewDrawPanel(Navigator.StateNormal.Back); // Put the exisint root into the canvas _drawPanel.Add(_oldRoot); // Update the child panel to have panel appearance Navigator.ChildPanel.PanelBackStyle = Navigator.Panel.PanelBackStyle; // Set the correct palettes based on enabled state and selected page UpdateStatePalettes(); // Canvas becomes the new root ViewManager.Root = _drawPanel; // Need to monitor changes in the enabled state Navigator.EnabledChanged += new EventHandler(OnEnabledChanged); }
/// <summary> /// Initialize a new instance of the VisualContextMenu class. /// </summary> /// <param name="provider">Original source of provider details</param> /// <param name="items">Enabled state of the context menu.</param> /// <param name="keyboardActivated">Was the context menu activate by a keyboard action.</param> public VisualContextMenu(IContextMenuProvider provider, KryptonContextMenuCollection items, bool keyboardActivated) : base(true) { _redirector = provider.ProviderRedirector; // Create the view manager instance with root element ViewManager = new ViewContextMenuManager(this, new ViewLayoutNull()); // Set the initial resolved palette to the appropriate setting if (provider.ProviderPalette != null) SetPalette(provider.ProviderPalette); else SetPalette(KryptonManager.GetPaletteForMode(provider.ProviderPaletteMode)); // Set of context menu columns _viewColumns = new ViewLayoutStack(true); // Create provider instance _provider = new ContextMenuProvider(provider, (ViewContextMenuManager)ViewManager, _viewColumns, NeedPaintDelegate); _provider.Closing += new CancelEventHandler(OnProviderClosing); _provider.Close += new EventHandler<CloseReasonEventArgs>(OnProviderClose); _provider.Dispose += new EventHandler(OnProviderClose); Construct(items, keyboardActivated); }
/// <summary> /// Initialize a new instance of the PaletteTripleJustImageRedirect class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> /// <param name="backStyle">Initial background style.</param> /// <param name="borderStyle">Initial border style.</param> /// <param name="contentStyle">Initial content style.</param> public PaletteTripleJustImageRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle) : this(redirect, backStyle, borderStyle, contentStyle, null) { }
/// <summary> /// Initialize a new instance of the KryptonPaletteForm class. /// </summary> /// <param name="redirect">Redirector to inherit values from.</param> /// <param name="backStyle">Background style.</param> /// <param name="borderStyle">Border style.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public KryptonPaletteForm(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, NeedPaintHandler needPaint) : base(redirect, backStyle, borderStyle, needPaint) { }
/// <summary> /// Construct the view appropriate for this builder. /// </summary> /// <param name="navigator">Reference to navigator instance.</param> /// <param name="manager">Reference to current manager.</param> /// <param name="redirector">Palette redirector.</param> public override void Construct(KryptonNavigator navigator, ViewManager manager, PaletteRedirect redirector) { // Let base class perform common operations base.Construct(navigator, manager, redirector); }
/// <summary> /// Initialize a new instance of the KryptonPaletteHeaders class. /// </summary> /// <param name="redirector">Palette redirector for sourcing inherited values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> internal KryptonPaletteHeaders(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); // Create the button style specific and common palettes _headerCommon = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderPrimary, PaletteBorderStyle.HeaderPrimary, PaletteContentStyle.HeaderPrimary, needPaint); _headerPrimary = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderPrimary, PaletteBorderStyle.HeaderPrimary, PaletteContentStyle.HeaderPrimary, needPaint); _headerSecondary = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderSecondary, PaletteBorderStyle.HeaderSecondary, PaletteContentStyle.HeaderSecondary, needPaint); _headerDockInactive = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderDockInactive, PaletteBorderStyle.HeaderDockInactive, PaletteContentStyle.HeaderDockInactive, needPaint); _headerDockActive = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderDockActive, PaletteBorderStyle.HeaderDockActive, PaletteContentStyle.HeaderDockActive, needPaint); _headerCalendar = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderCalendar, PaletteBorderStyle.HeaderCalendar, PaletteContentStyle.HeaderCalendar, needPaint); _headerForm = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderForm, PaletteBorderStyle.HeaderForm, PaletteContentStyle.HeaderForm, needPaint); _headerCustom1 = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderCustom1, PaletteBorderStyle.HeaderCustom1, PaletteContentStyle.HeaderCustom1, needPaint); _headerCustom2 = new KryptonPaletteHeader(redirector, PaletteBackStyle.HeaderCustom2, PaletteBorderStyle.HeaderCustom2, PaletteContentStyle.HeaderCustom2, needPaint); // Create redirectors for inheriting from style specific to style common PaletteRedirectTripleMetric redirectCommon = new PaletteRedirectTripleMetric(redirector, _headerCommon.StateDisabled, _headerCommon.StateDisabled, _headerCommon.StateNormal, _headerCommon.StateNormal); // Inform the button style to use the new redirector _headerPrimary.SetRedirector(redirectCommon); _headerSecondary.SetRedirector(redirectCommon); _headerDockInactive.SetRedirector(redirectCommon); _headerDockActive.SetRedirector(redirectCommon); _headerCalendar.SetRedirector(redirectCommon); _headerForm.SetRedirector(redirectCommon); _headerCustom1.SetRedirector(redirectCommon); _headerCustom2.SetRedirector(redirectCommon); }
/// <summary> /// Initialize a new instance of the KryptonPaletteControls class. /// </summary> /// <param name="redirector">Palette redirector for sourcing inherited values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> internal KryptonPaletteControls(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); // Create the button style specific and common palettes _controlCommon = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient, needPaint); _controlClient = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient, needPaint); _controlAlternate = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlAlternate, PaletteBorderStyle.ControlAlternate, needPaint); _controlGroupBox = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlGroupBox, PaletteBorderStyle.ControlGroupBox, needPaint); _controlToolTip = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlToolTip, PaletteBorderStyle.ControlToolTip, needPaint); _controlRibbon = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlRibbon, PaletteBorderStyle.ControlRibbon, needPaint); _controlRibbonAppMenu = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlRibbonAppMenu, PaletteBorderStyle.ControlRibbonAppMenu, needPaint); _controlCustom1 = new KryptonPaletteControl(redirector, PaletteBackStyle.ControlCustom1, PaletteBorderStyle.ControlCustom1, needPaint); // Create redirectors for inheriting from style specific to style common PaletteRedirectDouble redirectCommon = new PaletteRedirectDouble(redirector, _controlCommon.StateDisabled, _controlCommon.StateNormal); // Inform the button style to use the new redirector _controlClient.SetRedirector(redirectCommon); _controlAlternate.SetRedirector(redirectCommon); _controlGroupBox.SetRedirector(redirectCommon); _controlToolTip.SetRedirector(redirectCommon); _controlRibbon.SetRedirector(redirectCommon); _controlRibbonAppMenu.SetRedirector(redirectCommon); _controlCustom1.SetRedirector(redirectCommon); }
/// <summary> /// Initialize a new instance of the ContextMenuProvider class. /// </summary> /// <param name="viewManager">View manager used to organize keyboard events.</param> /// <param name="menuCollection">Top level set of menu items.</param> /// <param name="viewColumns">Stack used for adding new columns.</param> /// <param name="palette">Local palette setting to use initially.</param> /// <param name="paletteMode">Palette mode setting to use initially.</param> /// <param name="redirector">Redirector used for obtaining palette values.</param> /// <param name="needPaintDelegate">Delegate used to when paint changes occur.</param> public AppButtonMenuProvider(ViewContextMenuManager viewManager, KryptonContextMenuItemCollection menuCollection, ViewLayoutStack viewColumns, IPalette palette, PaletteMode paletteMode, PaletteRedirect redirector, NeedPaintHandler needPaintDelegate) { // Store incoming state _viewManager = viewManager; _menuCollection = menuCollection; _viewColumns = viewColumns; _palette = palette; _paletteMode = paletteMode; _redirector = redirector; _needPaintDelegate = needPaintDelegate; // Create all other state _parent = null; _enabled = true; _canCloseMenu = true; _showHorz = KryptonContextMenuPositionH.After; _showVert = KryptonContextMenuPositionV.Top; _stateCommon = new PaletteContextMenuRedirect(redirector, needPaintDelegate); _stateNormal = new PaletteContextMenuItemState(_stateCommon); _stateDisabled = new PaletteContextMenuItemState(_stateCommon); _stateHighlight = new PaletteContextMenuItemStateHighlight(_stateCommon); _stateChecked = new PaletteContextMenuItemStateChecked(_stateCommon); _redirectorImages = new PaletteRedirectContextMenu(redirector, new ContextMenuImages(needPaintDelegate)); }
/// <summary> /// Construct the view appropriate for this builder. /// </summary> /// <param name="navigator">Reference to navigator instance.</param> /// <param name="manager">Reference to current manager.</param> /// <param name="redirector">Palette redirector.</param> public override void Construct(KryptonNavigator navigator, ViewManager manager, PaletteRedirect redirector) { // Let base class perform common operations base.Construct(navigator, manager, redirector); // Get the current root element _oldRoot = ViewManager.Root; // Create a canvas for the border and background using current enabled state _drawCanvas = new ViewDrawCanvas(Navigator.StateNormal.HeaderGroup.Back, Navigator.StateNormal.HeaderGroup.Border, VisualOrientation.Top); // Put the exising root into the canvas _drawCanvas.Add(_oldRoot); // Set the correct palettes based on enabled state and selected page UpdateStatePalettes(); // Canvas becomes the new root ViewManager.Root = _drawCanvas; // Need to monitor changes in the enabled state Navigator.EnabledChanged += new EventHandler(OnEnabledChanged); }
public MyUserControl() { // To remove flicker we use double buffering for drawing SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true); // Cache the current global palette setting _palette = KryptonManager.CurrentGlobalPalette; // Hook into palette events if (_palette != null) _palette.PalettePaint += new EventHandler<PaletteLayoutEventArgs>(OnPalettePaint); // We want to be notified whenever the global palette changes KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged); // Create redirection object to the base palette _paletteRedirect = new PaletteRedirect(_palette); // Create accessor objects for the back, border and content _paletteBack = new PaletteBackInheritRedirect(_paletteRedirect); _paletteBorder = new PaletteBorderInheritRedirect(_paletteRedirect); _paletteContent = new PaletteContentInheritRedirect(_paletteRedirect); }
/// <summary> /// Initialize a new instance of the PaletteRibbonBackInheritRedirect class. /// </summary> /// <param name="redirect">Source for inherit requests.</param> /// <param name="styleBack">Ribbon item background style.</param> public PaletteRibbonBackInheritRedirect(PaletteRedirect redirect, PaletteRibbonBackStyle styleBack) { Debug.Assert(redirect != null); _redirect = redirect; _styleBack = styleBack; }
/// <summary> /// Initialize a new instance of the ViewletHeaderGroupOutlook class. /// </summary> /// <param name="navigator">Reference to navigator instance.</param> /// <param name="redirector">Palette redirector.</param> /// <param name="needPaintDelegate">Delegate for notifying paint requests.</param> public ViewletHeaderGroupOutlook(KryptonNavigator navigator, PaletteRedirect redirector, NeedPaintHandler needPaintDelegate) : base(navigator, redirector, needPaintDelegate) { // Are we using the full or mini outlook mode. _full = (navigator.NavigatorMode == NavigatorMode.OutlookFull); }
/// <summary> /// Initialize a new instance of the PaletteRibbonTextInheritRedirect class. /// </summary> /// <param name="redirect">Source for inherit requests.</param> /// <param name="styleText">Ribbon item text style.</param> public PaletteRibbonTextInheritRedirect(PaletteRedirect redirect, PaletteRibbonTextStyle styleText) { Debug.Assert(redirect != null); _redirect = redirect; _styleText = styleText; }
/// <summary> /// Initialize a new instance of the ButtonSpecViewAppButton class. /// </summary> /// <param name="redirector">Palette redirector.</param> /// <param name="paletteMetric">Source for metric values.</param> /// <param name="metricPadding">Padding metric for border padding.</param> /// <param name="manager">Reference to owning manager.</param> /// <param name="buttonSpec">Access</param> public ButtonSpecViewAppButton(PaletteRedirect redirector, IPaletteMetric paletteMetric, PaletteMetricPadding metricPadding, ButtonSpecManagerBase manager, ButtonSpec buttonSpec) : base(redirector, paletteMetric, metricPadding, manager, buttonSpec) { }
/// <summary> /// Initialize a new instance of the KryptonPaletteNavigatorState class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public KryptonPaletteNavigatorState(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); // Create the storage objects _bar = new KryptonPaletteNavigatorStateBar(redirect, needPaint); }
/// <summary> /// Create the button spec view appropriate for the button spec. /// </summary> /// <param name="redirector">Redirector for acquiring palette values.</param> /// <param name="viewPaletteMetric">Target metric providers.</param> /// <param name="viewMetricPadding">Target metric padding.</param> /// <param name="buttonSpec">ButtonSpec instance.</param> /// <returns>ButtonSpecView derived class.</returns> protected override ButtonSpecView CreateButtonSpecView(PaletteRedirect redirector, IPaletteMetric viewPaletteMetric, PaletteMetricPadding viewMetricPadding, ButtonSpec buttonSpec) { return new ButtonSpecViewRibbon(redirector, viewPaletteMetric, viewMetricPadding, this, buttonSpec); }
/// <summary> /// Initialize a new instance of the PaletteElementColorInheritRedirect class. /// </summary> /// <param name="redirect">Source for inherit requests.</param> /// <param name="element">Element value..</param> public PaletteElementColorInheritRedirect(PaletteRedirect redirect, PaletteElement element) { Debug.Assert(redirect != null); _redirect = redirect; _element = element; }
/// <summary> /// Initialize a new instance of the KryptonPaletteHeaderGroup class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public KryptonPaletteHeaderGroup(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); // Create the storage objects _stateCommon = new KryptonPaletteHeaderGroupState(redirect, needPaint); }
/// <summary> /// Initialize a new instance of the PaletteTreeNodeTripleRedirect class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> /// <param name="backStyle">Initial background style.</param> /// <param name="borderStyle">Initial border style.</param> /// <param name="contentStyle">Initial content style.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteTreeNodeTripleRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); _nodeRedirect = new PaletteTripleRedirect(redirect, backStyle, borderStyle, contentStyle, needPaint); }
/// <summary> /// Initialize a new instance of the KryptonPaletteRibbonGroupArea class. /// </summary> /// <param name="redirect">Redirector to inherit values from.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public KryptonPaletteRibbonGroupArea(PaletteRedirect redirect, NeedPaintHandler needPaint) { // Create the storage objects _stateInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupArea); _stateCommon = new PaletteRibbonBack(_stateInherit, needPaint); _stateCheckedNormal = new PaletteRibbonBack(_stateCommon, needPaint); _stateContextCheckedTracking = new PaletteRibbonBack(_stateCommon, needPaint); }
/// <summary> /// Initialize a new instance of the PaletteElementColorRedirect class. /// </summary> /// <param name="redirect">Source for inheriting values.</param> /// <param name="element">Element value.</param> /// <param name="needPaint">Delegate for notifying changes in value.</param> public PaletteElementColorRedirect(PaletteRedirect redirect, PaletteElement element, NeedPaintHandler needPaint) : base(null, needPaint) { // Setup inheritence to recover values from the redirect instance _redirect = new PaletteElementColorInheritRedirect(redirect, element); SetInherit(_redirect); }
/// <summary> /// Initialize a new instance of the PaletteMonthCalendarRedirect class. /// </summary> /// <param name="redirect">Inheritence redirection for bread crumb level.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteMonthCalendarRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) : base(redirect, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient) { _paletteHeader = new PaletteTripleRedirect(redirect, PaletteBackStyle.HeaderCalendar, PaletteBorderStyle.HeaderCalendar, PaletteContentStyle.HeaderCalendar, needPaint); _paletteDayOfWeek = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonCalendarDay, PaletteBorderStyle.ButtonCalendarDay, PaletteContentStyle.ButtonCalendarDay, needPaint); _paletteDay = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonCalendarDay, PaletteBorderStyle.ButtonCalendarDay, PaletteContentStyle.ButtonCalendarDay, needPaint); }
/// <summary> /// Initialize a new instance of the VisualPopupTooltip class. /// </summary> /// <param name="redirector">Redirector for recovering palette values.</param> /// <param name="contentValues">Source of content values.</param> /// <param name="renderer">Drawing renderer.</param> public VisualPopupToolTip(PaletteRedirect redirector, IContentValues contentValues, IRenderer renderer) : this(redirector, contentValues, renderer, PaletteBackStyle.ControlToolTip, PaletteBorderStyle.ControlToolTip, PaletteContentStyle.LabelToolTip) { }
/// <summary> /// Initialize a new instance of the PaletteMonthCalendarStateRedirect class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteMonthCalendarStateRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) { _paletteDay = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonCalendarDay, PaletteBorderStyle.ButtonCalendarDay, PaletteContentStyle.ButtonCalendarDay, needPaint); }
/// <summary> /// Initialize a new instance of the KryptonPaletteRibbonQATMinibar class. /// </summary> /// <param name="redirect">Redirector to inherit values from.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public KryptonPaletteRibbonQATMinibar(PaletteRedirect redirect, NeedPaintHandler needPaint) { // Create the storage objects _stateInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonQATMinibar); _stateCommon = new PaletteRibbonBack(_stateInherit, needPaint); _stateActive = new PaletteRibbonBack(_stateCommon, needPaint); _stateInactive = new PaletteRibbonBack(_stateCommon, needPaint); }