/// <summary> /// Initialize a new instance of the PaletteDataGridViewContentStates class. /// </summary> /// <param name="inherit">Source for inheriting defaulted values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteDataGridViewContentStates(IPaletteContent inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); // Remember inheritance _inherit = inherit; // Store the provided paint notification delegate NeedPaint = needPaint; // Default the initial values _draw = InheritBool.Inherit; _hint = PaletteTextHint.Inherit; _trim = PaletteTextTrim.Inherit; _color1 = Color.Empty; _color2 = Color.Empty; _colorStyle = PaletteColorStyle.Inherit; _colorAlign = PaletteRectangleAlign.Inherit; _colorAngle = -1; _imageStyle = PaletteImageStyle.Inherit; _imageAlign = PaletteRectangleAlign.Inherit; _multiLine = InheritBool.Inherit; _multiLineH = PaletteRelativeAlign.Inherit; }
/// <summary> /// Initialize a new instance of the NavigatorOutlook class. /// </summary> /// <param name="navigator">Reference to owning navigator instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public NavigatorOutlook(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); // Remember back reference _navigator = navigator; // Store the provided paint notification delegate NeedPaint = needPaint; // Create compound objects _full = new NavigatorOutlookFull(navigator, needPaint); _mini = new NavigatorOutlookMini(navigator, needPaint); // Default values _checkButtonStyle = ButtonStyle.NavigatorStack; _overflowButtonStyle = ButtonStyle.NavigatorOverflow; _borderEdgeStyle = PaletteBorderStyle.ControlClient; _orientation = Orientation.Vertical; _itemOrientation = ButtonOrientation.Auto; _headerSecondaryVisible = InheritBool.False; _textMoreButtons = _defaultMoreButtons; _textFewerButtons = _defaultFewerButtons; _textAddRemoveButtons = _defaultAddRemoveButtons; _showDropDownButton = true; }
/// <summary> /// Initialize a new instance of the KryptonColorTable2010 class. /// </summary> /// <param name="colors">Source of </param> /// <param name="roundedEdges">Should have rounded edges.</param> /// <param name="palette">Associated palette instance.</param> public KryptonColorTable2010(Color[] colors, InheritBool roundedEdges, IPalette palette) : base(palette) { Debug.Assert(colors != null); _colors = colors; _roundedEdges = roundedEdges; }
/// <summary> /// Initialize a new instance of the KryptonColorTableSparkle class. /// </summary> /// <param name="colors">Source of ribbon colors.</param> /// <param name="sparkleColors">Source of sparkle colors.</param> /// <param name="roundedEdges">Should have rounded edges.</param> /// <param name="palette">Associated palette instance.</param> public KryptonColorTableSparkle(Color[] colors, Color[] sparkleColors, InheritBool roundedEdges, IPalette palette) : base(palette) { Debug.Assert(colors != null); Debug.Assert(sparkleColors != null); _colors = colors; _sparkleColors = sparkleColors; _roundedEdges = roundedEdges; }
/// <summary> /// Initialize a new instance of the InternalStorage structure. /// </summary> public InternalStorage() { // Set to default values ContentTextHint = PaletteTextHint.Inherit; ContentTextTrim = PaletteTextTrim.Inherit; ContentTextPrefix = PaletteTextHotkeyPrefix.Inherit; ContentTextH = PaletteRelativeAlign.Inherit; ContentTextV = PaletteRelativeAlign.Inherit; ContentTextMultiLineH = PaletteRelativeAlign.Inherit; ContentTextMultiLine = InheritBool.Inherit; ContentTextColor1 = Color.Empty; ContentTextColor2 = Color.Empty; ContentTextColorStyle = PaletteColorStyle.Inherit; ContentTextColorAlign = PaletteRectangleAlign.Inherit; ContentTextColorAngle = -1; ContentTextImageStyle = PaletteImageStyle.Inherit; ContentTextImageAlign = PaletteRectangleAlign.Inherit; }
/// <summary> /// Initialize a new instance of the KryptonPaletteHeaderGroupState class. /// </summary> /// <param name="redirect">Redirection for inheriting values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public KryptonPaletteHeaderGroupState(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); // Remember redirection for inheritence _redirect = redirect; // Store the provided paint notification delegate NeedPaint = needPaint; // Define default values _primaryHeaderPadding = CommonHelper.InheritPadding; _secondaryHeaderPadding = CommonHelper.InheritPadding; _dockInactiveHeaderPadding = CommonHelper.InheritPadding; _dockActiveHeaderPadding = CommonHelper.InheritPadding; _overlayHeaders = InheritBool.Inherit; }
/// <summary> /// Gets the flag indicating if multiline text is allowed for long text. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>InheritBool value.</returns> public virtual InheritBool GetContentLongTextMultiLine(PaletteState state) { if (Apply) { InheritBool ret = _primaryContent.GetContentLongTextMultiLine(Override ? OverrideState : state); if (ret == InheritBool.Inherit) { ret = _backupContent.GetContentLongTextMultiLine(state); } return(ret); } else { return(_backupContent.GetContentLongTextMultiLine(state)); } }
/// <summary> /// Gets a value indicating if background should be drawn. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetBackDraw(PaletteState state) { if (Apply) { InheritBool ret = _primary.GetBackDraw(Override ? OverrideState : state); if (ret == InheritBool.Inherit) { ret = _backup.GetBackDraw(state); } return(ret); } else { return(_backup.GetBackDraw(state)); } }
/// <summary> /// Gets the flag indicating if multiline text is allowed for short text. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetContentShortTextMultiLine(PaletteState state) { if (Apply) { InheritBool ret = _primary.GetContentShortTextMultiLine(Override ? OverrideState : state); if (ret == InheritBool.Inherit) { ret = _backup.GetContentShortTextMultiLine(state); } return(ret); } else { return(_backup.GetContentShortTextMultiLine(state)); } }
/// <summary> /// Gets a value indicating if content should be drawn with focus indication. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetContentDrawFocus(PaletteState state) { if (_apply) { InheritBool ret = _primary.GetContentDrawFocus(_override ? _state : state); if (ret == InheritBool.Inherit) { ret = _backup.GetContentDrawFocus(state); } return(ret); } else { return(_backup.GetContentDrawFocus(state)); } }
/// <summary> /// Initialize a new instance of the PaletteFormRedirect class. /// </summary> /// <param name="redirectForm">Inheritence redirection for form group.</param> /// <param name="redirectHeader">Inheritence redirection for header.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteFormRedirect(PaletteRedirect redirectForm, PaletteRedirect redirectHeader, NeedPaintHandler needPaint) : base(redirectForm, PaletteBackStyle.FormMain, PaletteBorderStyle.FormMain, needPaint) { Debug.Assert(redirectForm != null); Debug.Assert(redirectHeader != null); // Remember the redirect reference _redirect = redirectForm; // Create the palette storage _paletteHeader = new PaletteHeaderButtonRedirect(redirectHeader, PaletteBackStyle.HeaderForm, PaletteBorderStyle.HeaderForm, PaletteContentStyle.HeaderForm, needPaint); // Default other values _overlayHeaders = InheritBool.Inherit; }
/// <summary> /// Initialize a new instance of the PaletteFormRedirect class. /// </summary> /// <param name="redirectForm">Inheritence redirection for form group.</param> /// <param name="redirectHeader">Inheritence redirection for header.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteFormRedirect(PaletteRedirect redirectForm, PaletteRedirect redirectHeader, NeedPaintHandler needPaint) : base(redirectForm, PaletteBackStyle.FormMain, PaletteBorderStyle.FormMain, needPaint) { Debug.Assert(redirectForm != null); Debug.Assert(redirectHeader != null); // Remember the redirect reference _redirect = redirectForm; // Create the palette storage Header = new PaletteHeaderButtonRedirect(redirectHeader, PaletteBackStyle.HeaderForm, PaletteBorderStyle.HeaderForm, PaletteContentStyle.HeaderForm, needPaint); // Default other values _overlayHeaders = InheritBool.Inherit; }
/// <summary> /// Initialize a new instance of the PaletteHeaderGroupRedirect class. /// </summary> /// <param name="redirectHeaderGroup">Inheritence redirection for header group.</param> /// <param name="redirectHeaderPrimary">Inheritence redirection for primary header.</param> /// <param name="redirectHeaderSecondary">Inheritence redirection for secondary header.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteHeaderGroupRedirect(PaletteRedirect redirectHeaderGroup, PaletteRedirect redirectHeaderPrimary, PaletteRedirect redirectHeaderSecondary, NeedPaintHandler needPaint) : base(redirectHeaderGroup, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient, needPaint) { Debug.Assert(redirectHeaderGroup != null); Debug.Assert(redirectHeaderSecondary != null); Debug.Assert(redirectHeaderPrimary != null); // Remember the redirect reference _redirect = redirectHeaderGroup; // Create the palette storage _paletteHeaderPrimary = new PaletteHeaderPaddingRedirect(redirectHeaderPrimary, PaletteBackStyle.HeaderPrimary, PaletteBorderStyle.HeaderPrimary, PaletteContentStyle.HeaderPrimary, needPaint); _paletteHeaderSecondary = new PaletteHeaderPaddingRedirect(redirectHeaderSecondary, PaletteBackStyle.HeaderSecondary, PaletteBorderStyle.HeaderSecondary, PaletteContentStyle.HeaderSecondary, needPaint); // Default other values _overlayHeaders = InheritBool.Inherit; }
/// <summary> /// Initialize a new instance of the KryptonInternalKCT class. /// </summary> /// <param name="baseKCT">Initial base KCT to inherit values from.</param> /// <param name="palette">Reference to associated palette.</param> public KryptonInternalKCT(KryptonColorTable baseKCT, IPalette palette) : base(palette) { Debug.Assert(baseKCT != null); // Remember the base used for inheriting _baseKCT = baseKCT; // Always assume the same use of system colors UseSystemColors = _baseKCT.UseSystemColors; // Create the array for storing colors _colors = new Color[(int)PaletteColorIndex.Count]; // Initialise all the colors to empty for (int i = 0; i < _colors.Length; i++) _colors[i] = Color.Empty; // Initialise other storage values _useRoundedEdges = InheritBool.Inherit; }
/// <summary> /// Initialize a new instance of the KryptonColorTable2010 class. /// </summary> /// <param name="colors">Source of </param> /// <param name="roundedEdges">Should have rounded edges.</param> /// <param name="palette">Associated palette instance.</param> public KryptonColorTableVisualStudio2020(Color[] colors, InheritBool roundedEdges, IPalette palette) : base(palette) { Debug.Assert(colors != null); _colors = colors; _roundedEdges = roundedEdges; }
/// <summary> /// Initialize a new instance of the InternalStorage structure. /// </summary> public InternalStorage() { // Set to default values BackDraw = InheritBool.Inherit; BackGraphicsHint = PaletteGraphicsHint.Inherit; BackColor1 = Color.Empty; BackColor2 = Color.Empty; BackColorStyle = PaletteColorStyle.Inherit; BackColorAlign = PaletteRectangleAlign.Inherit; BackColorAngle = -1; BackImageStyle = PaletteImageStyle.Inherit; BackImageAlign = PaletteRectangleAlign.Inherit; }
/// <summary> /// esets the UseRoundedEdges property to its default value. /// </summary> public void ResetUseRoundedEdges() { UseRoundedEdges = InheritBool.Inherit; }
/// <summary> /// Resets the OverlayHeaders property to its default value. /// </summary> public void ResetOverlayHeaders() { OverlayHeaders = InheritBool.Inherit; }
/// <summary> /// Resets the HeaderSecondaryVisible property to its default value. /// </summary> public void ResetHeaderSecondaryVisible() { HeaderSecondaryVisible = InheritBool.False; }
/// <summary> /// Initialize a new instance of the InternalStorage structure. /// </summary> public InternalStorage() { // Set to default values BorderDraw = InheritBool.Inherit; BorderDrawBorders = PaletteDrawBorders.All; BorderGraphicsHint = PaletteGraphicsHint.Inherit; BorderColor1 = Color.Empty; BorderColor2 = Color.Empty; BorderColorStyle = PaletteColorStyle.Inherit; BorderColorAlign = PaletteRectangleAlign.Inherit; BorderColorAngle = -1; BorderWidth = -1; BorderRounding = -1; BorderImageStyle = PaletteImageStyle.Inherit; BorderImageAlign = PaletteRectangleAlign.Inherit; }
/// <summary> /// Initialize a new instance of the InternalStorage structure. /// </summary> public InternalStorage() { // Set to default values ContentDraw = InheritBool.Inherit; ContentDrawFocus = InheritBool.Inherit; ContentPadding = CommonHelper.InheritPadding; ContentAdjacentGap = -1; }