Exemplo n.º 1
0
        public static BarRenderer FindOwnerBarRenderer(ElementRenderer renderer)
        {
            var owner = renderer.Owner;

            while (owner != null && !(owner is BarRenderer))
            {
                owner = owner.Owner;
            }

            return(owner as BarRenderer);
        }
Exemplo n.º 2
0
        public virtual TRenderingContext GetRenderingContext <TRenderingContext>(ElementRenderer renderer)
            where TRenderingContext : RenderingContextBase
        {
            RenderingContextBase renderingContext;

            if (!_renderingContextLookup.TryGetValue(renderer, out renderingContext))
            {
                return(null);
            }

            return((TRenderingContext)renderingContext);
        }
Exemplo n.º 3
0
        public static IBeatElementRenderer Create(ElementRenderer owner, IBeatElement element)
        {
            var beat = element as Beat;

            if (beat != null)
            {
                return(new BeatRenderer(owner, beat));
            }

            var beam = element as Beam;

            if (beam != null)
            {
                return(new BeamRenderer(owner, beam));
            }

            throw new InvalidOperationException();
        }
Exemplo n.º 4
0
 public BeamRenderer(ElementRenderer owner, Beam beam)
     : base(owner, beam)
 {
     _beatElementRenderers = new List <IBeatElementRenderer>();
 }
Exemplo n.º 5
0
 public virtual void AssignRenderingContext(ElementRenderer renderer, RenderingContextBase renderingContext)
 {
     _renderingContextLookup[renderer] = renderingContext;
 }
Exemplo n.º 6
0
 public BeatRenderer(ElementRenderer owner, Beat beat)
     : base(owner, beat)
 {
     _noteRenderers = new List <NoteRenderer>();
 }
Exemplo n.º 7
0
 protected internal ElementRenderer(ElementRenderer owner)
 {
     this.Owner = owner;
 }
Exemplo n.º 8
0
 void IRootElementRenderer.RegisterRenderer <TElement>(TElement element, ElementRenderer <TElement> renderer)
 {
     // _rendererLookup will be null if we are in our own constructor
     _rendererLookup?.Add(element, renderer);
 }
Exemplo n.º 9
0
 public BarColumnRenderer(ElementRenderer owner, BarColumn element)
     : base(owner, element)
 {
 }