/// <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 PaletteRibbonDoubleInheritRedirect class. /// </summary> /// <param name="redirect">Source for inherit requests.</param> /// <param name="styleBack">Ribbon item background style.</param> /// <param name="styleText">Ribbon item text style.</param> public PaletteRibbonDoubleInheritRedirect(PaletteRedirect redirect, PaletteRibbonBackStyle styleBack, PaletteRibbonTextStyle styleText) { Debug.Assert(redirect != null); _redirect = redirect; StyleBack = styleBack; StyleText = styleText; }
/// <summary> /// Initialize a new instance of the PaletteRibbonDoubleInheritRedirect class. /// </summary> /// <param name="redirect">Source for inherit requests.</param> /// <param name="styleBack">Ribbon item background style.</param> /// <param name="styleText">Ribbon item text style.</param> public PaletteRibbonDoubleInheritRedirect(PaletteRedirect redirect, PaletteRibbonBackStyle styleBack, PaletteRibbonTextStyle styleText) { Debug.Assert(redirect != null); _redirect = redirect; _styleBack = styleBack; _styleText = styleText; }
/// <summary> /// Gets the fifth background color for the ribbon item. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="style">Style of the ribbon color requested.</param> /// <returns>Color value.</returns> public override Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state) { IPaletteRibbonBack inherit = GetBackInherit(state); if (inherit != null) { return(inherit.GetRibbonBackColor5(state)); } else { return(Target.GetRibbonBackColor5(style, state)); } }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Tracking: case PaletteState.ContextTracking: return(PaletteRibbonColorStyle.RibbonTabGlowing); } break; } // Get style from the base class return(base.GetRibbonBackColorStyle(style, state)); }
/// <summary> /// Initialize a new instance of the PaletteRibbonBackRedirect class. /// </summary> /// <param name="redirect">Inheritence redirection instance.</param> /// <param name="backStyle">Inheritence ribbon back style.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteRibbonBackRedirect(PaletteRedirect redirect, PaletteRibbonBackStyle backStyle, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); // Store the provided paint notification delegate NeedPaint = needPaint; // Store the inherit instances _inheritBack = new PaletteRibbonBackInheritRedirect(redirect, backStyle); // Define default values _backColor1 = Color.Empty; _backColor2 = Color.Empty; _backColor3 = Color.Empty; _backColor4 = Color.Empty; _backColor5 = Color.Empty; }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonGroupArea: if (state == PaletteState.CheckedNormal) { return(PaletteRibbonColorStyle.RibbonGroupAreaBorder); } break; case PaletteRibbonBackStyle.RibbonGroupNormalBorder: if (state == PaletteState.Tracking) { return(PaletteRibbonColorStyle.RibbonGroupNormalBorderTrackingLight); } break; } return(base.GetRibbonBackColorStyle(style, state)); }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Tracking: case PaletteState.Pressed: case PaletteState.ContextTracking: return(PaletteRibbonColorStyle.RibbonTabTracking2010Alt); case PaletteState.CheckedNormal: case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: case PaletteState.ContextCheckedNormal: case PaletteState.ContextCheckedTracking: return(PaletteRibbonColorStyle.RibbonTabSelected2010Alt); } break; case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: case PaletteRibbonBackStyle.RibbonGroupNormalBorder: switch (state) { case PaletteState.Tracking: case PaletteState.ContextTracking: return(PaletteRibbonColorStyle.RibbonGroupNormalBorderSepTrackingDark); case PaletteState.Pressed: return(PaletteRibbonColorStyle.RibbonGroupNormalBorderSepPressedDark); } break; } return(base.GetRibbonBackColorStyle(style, state)); }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Tracking: case PaletteState.Pressed: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonTabTracking2010Alt; case PaletteState.CheckedNormal: case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: case PaletteState.ContextCheckedNormal: case PaletteState.ContextCheckedTracking: return PaletteRibbonColorStyle.RibbonTabSelected2010Alt; } break; case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: case PaletteRibbonBackStyle.RibbonGroupNormalBorder: switch (state) { case PaletteState.Tracking: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonGroupNormalBorderSepTrackingDark; case PaletteState.Pressed: return PaletteRibbonColorStyle.RibbonGroupNormalBorderSepPressedDark; } break; } return base.GetRibbonBackColorStyle(style, state); }
/// <summary> /// Gets the background drawing style for the ribbon item. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="style">Style of the ribbon back style requested.</param> /// <returns>Color value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { IPaletteRibbonBack inherit = GetBackInherit(state); if (inherit != null) return inherit.GetRibbonBackColorStyle(state); else return Target.GetRibbonBackColorStyle(style, state); }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch(style) { case PaletteRibbonBackStyle.RibbonAppMenuDocs: return PaletteRibbonColorStyle.Solid; case PaletteRibbonBackStyle.RibbonAppMenuInner: return PaletteRibbonColorStyle.RibbonAppMenuInner; case PaletteRibbonBackStyle.RibbonAppMenuOuter: return PaletteRibbonColorStyle.RibbonAppMenuOuter; case PaletteRibbonBackStyle.RibbonQATMinibar: if (state == PaletteState.CheckedNormal) return PaletteRibbonColorStyle.RibbonQATMinibarDouble; else return PaletteRibbonColorStyle.RibbonQATMinibarSingle; case PaletteRibbonBackStyle.RibbonQATFullbar: return PaletteRibbonColorStyle.RibbonQATFullbarRound; case PaletteRibbonBackStyle.RibbonQATOverflow: return PaletteRibbonColorStyle.RibbonQATOverflow; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder: return PaletteRibbonColorStyle.RibbonGroupCollapsedFrameBorder; case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: return PaletteRibbonColorStyle.RibbonGroupCollapsedBorder; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack: switch (state) { case PaletteState.ContextNormal: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonGroupGradientOne; default: return PaletteRibbonColorStyle.RibbonGroupCollapsedFrameBack; } case PaletteRibbonBackStyle.RibbonGroupCollapsedBack: switch (state) { case PaletteState.Normal: case PaletteState.Tracking: return PaletteRibbonColorStyle.RibbonGroupGradientTwo; case PaletteState.ContextNormal: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonGroupGradientOne; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupNormalBorder: switch (state) { case PaletteState.Normal: case PaletteState.ContextNormal: return PaletteRibbonColorStyle.RibbonGroupNormalBorder; case PaletteState.Tracking: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonGroupNormalBorderTracking; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupNormalTitle: return PaletteRibbonColorStyle.RibbonGroupNormalTitle; case PaletteRibbonBackStyle.RibbonGroupArea: switch (state) { case PaletteState.Normal: case PaletteState.CheckedNormal: return PaletteRibbonColorStyle.RibbonGroupAreaBorder2; case PaletteState.ContextCheckedNormal: return PaletteRibbonColorStyle.RibbonGroupAreaBorderContext; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Disabled: case PaletteState.Normal: return PaletteRibbonColorStyle.Empty; case PaletteState.Tracking: case PaletteState.Pressed: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonTabTracking2007; case PaletteState.CheckedNormal: return PaletteRibbonColorStyle.RibbonTabSelected2007; case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: return PaletteRibbonColorStyle.RibbonTabHighlight; case PaletteState.ContextCheckedNormal: case PaletteState.ContextCheckedTracking: case PaletteState.FocusOverride: return PaletteRibbonColorStyle.RibbonTabContextSelected; default: // Should never happen! Debug.Assert(false); break; } break; default: // Should never happen! Debug.Assert(false); break; } return PaletteRibbonColorStyle.Empty; }
/// <summary> /// Gets the fifth background color for the ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonAppMenuDocs: case PaletteRibbonBackStyle.RibbonAppMenuInner: case PaletteRibbonBackStyle.RibbonAppMenuOuter: case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder: case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack: case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: case PaletteRibbonBackStyle.RibbonGroupCollapsedBack: case PaletteRibbonBackStyle.RibbonGroupNormalBorder: case PaletteRibbonBackStyle.RibbonGroupNormalTitle: case PaletteRibbonBackStyle.RibbonQATFullbar: case PaletteRibbonBackStyle.RibbonQATOverflow: case PaletteRibbonBackStyle.RibbonGalleryBack: case PaletteRibbonBackStyle.RibbonGalleryBorder: return Color.Empty; case PaletteRibbonBackStyle.RibbonQATMinibar: if (state == PaletteState.Normal) return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini5]; else return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini5I]; case PaletteRibbonBackStyle.RibbonAppButton: switch (state) { case PaletteState.Normal: return _appButtonNormal[4]; case PaletteState.Tracking: return _appButtonTrack[4]; case PaletteState.Pressed: return _appButtonPressed[4]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupArea: if (state == PaletteState.ContextCheckedNormal) return Color.White; else return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupsArea5]; case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Disabled: return _disabledText; case PaletteState.Tracking: case PaletteState.Pressed: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabTracking2]; case PaletteState.CheckedNormal: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabSelected5]; case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabHighlight5]; case PaletteState.ContextTracking: case PaletteState.ContextCheckedNormal: case PaletteState.ContextCheckedTracking: case PaletteState.FocusOverride: case PaletteState.Normal: return Color.Empty; default: // Should never happen! Debug.Assert(false); break; } break; default: // Should never happen! Debug.Assert(false); break; } return Color.Red; }
/// <summary> /// Gets the second background color for the ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetRibbonBackColor2(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonAppMenuInner: return _ribbonColors[(int)SchemeOfficeColors.AppButtonInner2]; case PaletteRibbonBackStyle.RibbonAppMenuOuter: return _ribbonColors[(int)SchemeOfficeColors.AppButtonOuter2]; case PaletteRibbonBackStyle.RibbonQATMinibar: if (state == PaletteState.Normal) return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini2]; else return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini2I]; case PaletteRibbonBackStyle.RibbonQATFullbar: return _ribbonColors[(int)SchemeOfficeColors.RibbonQATFullbar2]; case PaletteRibbonBackStyle.RibbonQATOverflow: return _ribbonColors[(int)SchemeOfficeColors.RibbonQATOverflow2]; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupFrameBorder2]; case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBorder2]; case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBorderT2]; case PaletteState.ContextNormal: return _ribbonGroupCollapsedBorderContext[1]; case PaletteState.ContextTracking: case PaletteState.Pressed: return _ribbonGroupCollapsedBorderContextTracking[1]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack: switch (state) { case PaletteState.ContextNormal: case PaletteState.ContextTracking: return _contextGroupFrameBottom; default: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupFrameInside2]; } case PaletteRibbonBackStyle.RibbonGroupCollapsedBack: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBack2]; case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBackT2]; case PaletteState.ContextNormal: return _ribbonGroupCollapsedBackContext[1]; case PaletteState.ContextTracking: return _ribbonGroupCollapsedBackContextTracking[1]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupNormalTitle: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupTitle2]; case PaletteState.ContextNormal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupTitleContext2]; case PaletteState.Tracking: case PaletteState.ContextTracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupTitleTracking2]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupNormalBorder: switch (state) { case PaletteState.Normal: case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupBorder2]; case PaletteState.ContextNormal: case PaletteState.ContextTracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupBorderContext2]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonAppButton: switch (state) { case PaletteState.Normal: return _appButtonNormal[1]; case PaletteState.Tracking: return _appButtonTrack[1]; case PaletteState.Pressed: return _appButtonPressed[1]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupArea: if (state == PaletteState.ContextCheckedNormal) return _contextGroupAreaInside; else return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupsArea2]; case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Tracking: case PaletteState.Pressed: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabTracking2]; case PaletteState.CheckedNormal: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabSelected2]; case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabHighlight2]; case PaletteState.ContextCheckedTracking: return _contextCheckedTabFill; case PaletteState.FocusOverride: return _focusTabFill; case PaletteState.ContextTracking: case PaletteState.ContextCheckedNormal: return Color.Empty; case PaletteState.Normal: return Color.Empty; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonAppMenuDocs: case PaletteRibbonBackStyle.RibbonGalleryBack: case PaletteRibbonBackStyle.RibbonGalleryBorder: return Color.Empty; default: // Should never happen! Debug.Assert(false); break; } return Color.Red; }
/// <summary> /// Gets the first background color for the ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetRibbonBackColor1(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonGalleryBack: switch (state) { case PaletteState.Disabled: return _disabledBack; case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGalleryBackTracking]; case PaletteState.Normal: default: return _ribbonColors[(int)SchemeOfficeColors.RibbonGalleryBackNormal]; } case PaletteRibbonBackStyle.RibbonGalleryBorder: switch (state) { case PaletteState.Disabled: return _disabledBorder; case PaletteState.Normal: case PaletteState.Tracking: default: return _ribbonColors[(int)SchemeOfficeColors.RibbonGalleryBorder]; } case PaletteRibbonBackStyle.RibbonAppMenuDocs: return _ribbonColors[(int)SchemeOfficeColors.AppButtonMenuDocsBack]; case PaletteRibbonBackStyle.RibbonAppMenuInner: return _ribbonColors[(int)SchemeOfficeColors.AppButtonInner1]; case PaletteRibbonBackStyle.RibbonAppMenuOuter: return _ribbonColors[(int)SchemeOfficeColors.AppButtonOuter1]; case PaletteRibbonBackStyle.RibbonQATMinibar: if (state == PaletteState.Normal) return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini1]; else return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini1I]; case PaletteRibbonBackStyle.RibbonQATFullbar: return _ribbonColors[(int)SchemeOfficeColors.RibbonQATFullbar1]; case PaletteRibbonBackStyle.RibbonQATOverflow: return _ribbonColors[(int)SchemeOfficeColors.RibbonQATOverflow1]; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupFrameBorder1]; case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBorder1]; case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBorderT1]; case PaletteState.ContextNormal: return _ribbonGroupCollapsedBorderContext[0]; case PaletteState.ContextTracking: case PaletteState.Pressed: return _ribbonGroupCollapsedBorderContextTracking[0]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack: switch (state) { case PaletteState.ContextNormal: case PaletteState.ContextTracking: return _contextGroupFrameTop; default: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupFrameInside1]; } case PaletteRibbonBackStyle.RibbonGroupCollapsedBack: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBack1]; case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBackT1]; case PaletteState.ContextNormal: return _ribbonGroupCollapsedBackContext[0]; case PaletteState.ContextTracking: return _ribbonGroupCollapsedBackContextTracking[0]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupNormalTitle: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupTitle1]; case PaletteState.ContextNormal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupTitleContext1]; case PaletteState.Tracking: case PaletteState.ContextTracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupTitleTracking1]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupNormalBorder: switch (state) { case PaletteState.Normal: case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupBorder1]; case PaletteState.ContextNormal: case PaletteState.ContextTracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupBorderContext1]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonAppButton: switch (state) { case PaletteState.Normal: return _appButtonNormal[0]; case PaletteState.Tracking: return _appButtonTrack[0]; case PaletteState.Pressed: return _appButtonPressed[0]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupArea: if (state == PaletteState.ContextCheckedNormal) return _contextGroupAreaBorder; else return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupsArea1]; case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Tracking: case PaletteState.Pressed: case PaletteState.ContextTracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabTracking1]; case PaletteState.CheckedNormal: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabSelected1]; case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabHighlight1]; case PaletteState.ContextCheckedTracking: case PaletteState.ContextCheckedNormal: case PaletteState.FocusOverride: return _contextCheckedTabBorder; case PaletteState.Normal: return Color.Empty; default: // Should never happen! Debug.Assert(false); break; } break; default: // Should never happen! Debug.Assert(false); break; } return Color.Red; }
/// <summary> /// Gets the third background color for the ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetRibbonBackColor3(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonAppMenuOuter: return _ribbonColors[(int)SchemeOfficeColors.AppButtonOuter3]; case PaletteRibbonBackStyle.RibbonQATMinibar: if (state == PaletteState.Normal) return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini3]; else return _ribbonColors[(int)SchemeOfficeColors.RibbonQATMini3I]; case PaletteRibbonBackStyle.RibbonQATFullbar: return _ribbonColors[(int)SchemeOfficeColors.RibbonQATFullbar3]; case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBorder3]; case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBorderT3]; case PaletteState.ContextNormal: return _ribbonGroupCollapsedBorderContext[2]; case PaletteState.ContextTracking: case PaletteState.Pressed: return _ribbonGroupCollapsedBorderContextTracking[2]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack: switch (state) { case PaletteState.ContextNormal: case PaletteState.ContextTracking: return Color.Empty; case PaletteState.Tracking: case PaletteState.Pressed: return _sparkleColors[34]; default: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupFrameInside3]; } case PaletteRibbonBackStyle.RibbonGroupCollapsedBack: switch (state) { case PaletteState.Normal: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBack3]; case PaletteState.Tracking: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupCollapsedBackT3]; case PaletteState.ContextNormal: case PaletteState.ContextTracking: return Color.Empty; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonAppMenuDocs: case PaletteRibbonBackStyle.RibbonAppMenuInner: case PaletteRibbonBackStyle.RibbonQATOverflow: case PaletteRibbonBackStyle.RibbonGroupNormalBorder: case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder: case PaletteRibbonBackStyle.RibbonGroupNormalTitle: case PaletteRibbonBackStyle.RibbonGalleryBack: case PaletteRibbonBackStyle.RibbonGalleryBorder: return Color.Empty; case PaletteRibbonBackStyle.RibbonAppButton: switch (state) { case PaletteState.Normal: return _appButtonNormal[2]; case PaletteState.Tracking: return _appButtonTrack[2]; case PaletteState.Pressed: return _appButtonPressed[2]; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupArea: return _ribbonColors[(int)SchemeOfficeColors.RibbonGroupsArea3]; case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Tracking: case PaletteState.Pressed: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabTracking2]; case PaletteState.CheckedNormal: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabSelected3]; case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: return _ribbonColors[(int)SchemeOfficeColors.RibbonTabHighlight3]; case PaletteState.ContextTracking: case PaletteState.ContextCheckedNormal: case PaletteState.ContextCheckedTracking: case PaletteState.FocusOverride: case PaletteState.Normal: return Color.Empty; default: // Should never happen! Debug.Assert(false); break; } break; default: // Should never happen! Debug.Assert(false); break; } return Color.Red; }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonGroupArea: if (state == PaletteState.CheckedNormal) return PaletteRibbonColorStyle.RibbonGroupAreaBorder; break; case PaletteRibbonBackStyle.RibbonGroupNormalBorder: if (state == PaletteState.Tracking) return PaletteRibbonColorStyle.RibbonGroupNormalBorderTrackingLight; break; } return base.GetRibbonBackColorStyle(style, state); }
/// <summary> /// Gets the fifth background color for the ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public abstract Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state);
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch(style) { case PaletteRibbonBackStyle.RibbonAppMenuDocs: return PaletteRibbonColorStyle.Solid; case PaletteRibbonBackStyle.RibbonAppMenuInner: return PaletteRibbonColorStyle.RibbonAppMenuInner; case PaletteRibbonBackStyle.RibbonAppMenuOuter: return PaletteRibbonColorStyle.RibbonAppMenuOuter; case PaletteRibbonBackStyle.RibbonQATMinibar: if (state == PaletteState.CheckedNormal) return PaletteRibbonColorStyle.RibbonQATMinibarDouble; else return PaletteRibbonColorStyle.RibbonQATMinibarSingle; case PaletteRibbonBackStyle.RibbonQATFullbar: return PaletteRibbonColorStyle.RibbonQATFullbarSquare; case PaletteRibbonBackStyle.RibbonQATOverflow: return PaletteRibbonColorStyle.RibbonQATOverflow; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder: return PaletteRibbonColorStyle.LinearBorder; case PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack: if (state == PaletteState.Pressed) return PaletteRibbonColorStyle.Empty; else return PaletteRibbonColorStyle.Linear; case PaletteRibbonBackStyle.RibbonGroupNormalBorder: case PaletteRibbonBackStyle.RibbonGroupCollapsedBorder: switch (state) { case PaletteState.Normal: case PaletteState.ContextNormal: return PaletteRibbonColorStyle.RibbonGroupNormalBorderSep; case PaletteState.Tracking: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonGroupNormalBorderSepTrackingLight; case PaletteState.Pressed: case PaletteState.ContextPressed: return PaletteRibbonColorStyle.RibbonGroupNormalBorderSepPressedLight; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonGroupNormalTitle: case PaletteRibbonBackStyle.RibbonGroupCollapsedBack: return PaletteRibbonColorStyle.Empty; case PaletteRibbonBackStyle.RibbonGroupArea: switch (state) { case PaletteState.Normal: case PaletteState.CheckedNormal: return PaletteRibbonColorStyle.RibbonGroupAreaBorder3; case PaletteState.ContextCheckedNormal: return PaletteRibbonColorStyle.RibbonGroupAreaBorder4; default: // Should never happen! Debug.Assert(false); break; } break; case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Disabled: case PaletteState.Normal: return PaletteRibbonColorStyle.Empty; case PaletteState.Tracking: case PaletteState.Pressed: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonTabTracking2010; case PaletteState.FocusOverride: return PaletteRibbonColorStyle.RibbonTabFocus2010; case PaletteState.CheckedNormal: case PaletteState.CheckedTracking: case PaletteState.CheckedPressed: case PaletteState.ContextCheckedNormal: case PaletteState.ContextCheckedTracking: return PaletteRibbonColorStyle.RibbonTabSelected2010; default: // Should never happen! Debug.Assert(false); break; } break; default: // Should never happen! Debug.Assert(false); break; } return PaletteRibbonColorStyle.Empty; }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public abstract PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state);
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public virtual PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { return _target.GetRibbonBackColorStyle(style, state); }
/// <summary> /// Gets the fifth background color for the ribbon item. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="style">Style of the ribbon color requested.</param> /// <returns>Color value.</returns> public override Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state) { IPaletteRibbonBack inherit = GetBackInherit(state); return(inherit?.GetRibbonBackColor5(state) ?? Target.GetRibbonBackColor5(style, state)); }
/// <summary> /// Gets the method used to draw the background of a ribbon item. /// </summary> /// <param name="style">Background style.</param> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>PaletteRibbonBackStyle value.</returns> public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state) { switch (style) { case PaletteRibbonBackStyle.RibbonTab: switch (state) { case PaletteState.Tracking: case PaletteState.ContextTracking: return PaletteRibbonColorStyle.RibbonTabGlowing; } break; } // Get style from the base class return base.GetRibbonBackColorStyle(style, state); }