예제 #1
0
        /// <summary>
        /// Gets a value indicating if content should be drawn.
        /// </summary>
        /// <param name="state">Palette value should be applicable to this state.</param>
        /// <returns>InheritBool value.</returns>
        public virtual InheritBool GetContentDraw(PaletteState state)
        {
            if (Apply)
            {
                InheritBool ret = _primaryContent.GetContentDraw(Override ? OverrideState : state);

                if (ret == InheritBool.Inherit)
                {
                    ret = _backupContent.GetContentDraw(state);
                }

                return(ret);
            }
            else
            {
                return(_backupContent.GetContentDraw(state));
            }
        }
예제 #2
0
        /// <summary>
        /// Gets a value indicating if content should be drawn.
        /// </summary>
        /// <param name="state">Palette value should be applicable to this state.</param>
        /// <returns>InheritBool value.</returns>
        public override InheritBool GetContentDraw(PaletteState state)
        {
            if (_apply)
            {
                InheritBool ret = _primary.GetContentDraw(_override ? _state : state);

                if (ret == InheritBool.Inherit)
                {
                    ret = _backup.GetContentDraw(state);
                }

                return(ret);
            }
            else
            {
                return(_backup.GetContentDraw(state));
            }
        }
예제 #3
0
 /// <summary>
 /// Gets the actual content draw value.
 /// </summary>
 /// <param name="state">Palette value should be applicable to this state.</param>
 /// <returns>InheritBool value.</returns>
 public InheritBool GetContentDraw(PaletteState state)
 {
     if (Draw != InheritBool.Inherit)
     {
         return(Draw);
     }
     else
     {
         return(_inherit.GetContentDraw(state));
     }
 }
        /// <summary>
        /// Gets a value indicating if content should be drawn.
        /// </summary>
        /// <param name="style">Content style.</param>
        /// <param name="state">Palette value should be applicable to this state.</param>
        /// <returns>InheritBool value.</returns>
        public override InheritBool GetContentDraw(PaletteContentStyle style, PaletteState state)
        {
            IPaletteContent inherit = GetInherit(state);

            if (inherit != null)
            {
                return(inherit.GetContentDraw(state));
            }
            else
            {
                return(Target.GetContentDraw(style, state));
            }
        }
예제 #5
0
        /// <summary>
		/// Get a value indicating if the content image is being displayed.
		/// </summary>
        /// <param name="context">ViewLayoutContext context.</param>
        public bool IsImageDisplayed(ViewContext context)
        {
            Debug.Assert(context != null);

            // Validate incoming reference
            if (context == null) throw new ArgumentNullException(nameof(context));

            bool isDisplayed = false;

			// If we have some content to investigate
            if (_paletteContent.GetContentDraw(State) == InheritBool.True)
                isDisplayed = context.Renderer.RenderStandardContent.GetContentImageDisplayed(_memento);

            return isDisplayed;
        }
예제 #6
0
 /// <summary>
 /// Gets a value indicating if content should be drawn.
 /// </summary>
 /// <param name="state">Palette value should be applicable to this state.</param>
 /// <returns>InheritBool value.</returns>
 public override InheritBool GetContentDraw(PaletteState state)
 {
     return(_inherit.GetContentDraw(state));
 }
예제 #7
0
        /// <summary>
        /// Gets a value indicating if content should be drawn.
        /// </summary>
        /// <param name="style">Content style.</param>
        /// <param name="state">Palette value should be applicable to this state.</param>
        /// <returns>InheritBool value.</returns>
        public override InheritBool GetContentDraw(PaletteContentStyle style, PaletteState state)
        {
            IPaletteContent inherit = GetInherit(state);

            return(inherit?.GetContentDraw(state) ?? Target.GetContentDraw(style, state));
        }
예제 #8
0
 /// <summary>
 /// Gets a value indicating if content should be drawn.
 /// </summary>
 /// <param name="state">Palette value should be applicable to this state.</param>
 /// <returns>InheritBool value.</returns>
 public override InheritBool GetContentDraw(PaletteState state) => _inherit.GetContentDraw(state);
 /// <summary>
 /// Gets a value indicating if content should be drawn.
 /// </summary>
 /// <param name="state">Palette value should be applicable to this state.</param>
 /// <returns>InheritBool value.</returns>
 public InheritBool GetContentDraw(PaletteState state)
 {
     return(_content.GetContentDraw(state));
 }