/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { IPaletteMetric inherit = GetInherit(state); if (inherit != null) return inherit.GetMetricBool(state, metric); else return Target.GetMetricBool(state, metric); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { IPaletteMetric inherit = GetInherit(state); return(inherit?.GetMetricBool(state, metric) ?? Target.GetMetricBool(state, metric)); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Pass onto the inheritance return(_redirect.GetMetricBool(state, metric)); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public virtual InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Always pass onto the inheritance return(_inherit.GetMetricBool(state, metric)); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public abstract InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric);
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Pass onto the inheritance return(_inherit.GetMetricBool(state, metric)); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public virtual InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) => // Pass onto the inheritance _redirect.GetMetricBool(state, metric);
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public virtual InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Is this the metric we provide? if (metric == PaletteMetricBool.HeaderGroupOverlay) { // If the user has defined an actual value to use if (OverlayHeaders != InheritBool.Inherit) return OverlayHeaders; } // Pass onto the inheritance return _redirect.GetMetricBool(state, metric); }
/// <summary> /// Initialize a new instance of the ViewDrawDocker class. /// </summary> /// <param name="paletteBack">Palette source for the background.</param> /// <param name="paletteBorder">Palette source for the border.</param> /// <param name="paletteMetric">Palette source for metrics.</param> /// <param name="metricOverlay">Metric to use for border overlay.</param> public ViewDrawDocker(IPaletteBack paletteBack, IPaletteBorder paletteBorder, IPaletteMetric paletteMetric, PaletteMetricBool metricOverlay) : this(paletteBack, paletteBorder, paletteMetric, metricOverlay, PaletteMetricPadding.None, VisualOrientation.Top) { }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) => // Pass onto the inheritance _inherit.GetMetricBool(state, metric);
/// <summary> /// Initialize a new instance of the ViewDrawDocker class. /// </summary> /// <param name="paletteBack">Palette source for the background.</param> /// <param name="paletteBorder">Palette source for the border.</param> /// <param name="paletteMetric">Palette source for metric values.</param> /// <param name="metricOverlay">Metric to use for border overlay.</param> /// <param name="metricPadding">Matric used to get padding values.</param> /// <param name="orientation">Visual orientation of the content.</param> public ViewDrawDocker(IPaletteBack paletteBack, IPaletteBorder paletteBorder, IPaletteMetric paletteMetric, PaletteMetricBool metricOverlay, PaletteMetricPadding metricPadding, VisualOrientation orientation) : base(paletteBack, paletteBorder, paletteMetric, metricPadding, orientation) { // Cache the starting values _metricOverlay = metricOverlay; // Create other state _childDocking = new ViewDockStyleLookup(); _fillRectangle = Rectangle.Empty; _ignoreBorderSpace = false; _removeChildBorders = false; _preferredSizeAll = false; }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public virtual InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { return _target.GetMetricBool(state, metric); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { return _metricRedirect.GetMetricBool(state, metric); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { switch (metric) { case PaletteMetricBool.HeaderGroupOverlay: case PaletteMetricBool.SplitWithFading: return InheritBool.True; case PaletteMetricBool.RibbonTabsSpareCaption: case PaletteMetricBool.TreeViewLines: return InheritBool.False; default: // Should never happen! Debug.Assert(false); break; } return InheritBool.Inherit; }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { return(_metricRedirect.GetMetricBool(state, metric)); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public override InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Always pass onto the inheritance return _redirect.GetMetricBool(state, metric); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public virtual InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Pass onto the inheritance return _redirect.GetMetricBool(state, metric); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Pass onto the inheritance return _inherit.GetMetricBool(state, metric); }
/// <summary> /// Gets a boolean metric value. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <param name="metric">Requested metric.</param> /// <returns>InheritBool value.</returns> public virtual InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) { // Always pass onto the inheritance return _inherit.GetMetricBool(state, metric); }