Browse Source

Stylecop fixes.

pull/58/head
Steven Kirk 11 years ago
parent
commit
aef34f810d
  1. 16
      Cairo/Perspex.Cairo/CairoExtensions.cs
  2. 1
      Cairo/Perspex.Cairo/Media/FormattedTextImpl.cs
  3. 1
      Cairo/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs
  4. 3
      Cairo/Perspex.Cairo/Renderer.cs
  5. 2
      Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs
  6. 2
      Gtk/Perspex.Gtk/Input/GtkMouseDevice.cs
  7. 2
      Perspex.Base/Collections/IPerspexReadOnlyList.cs
  8. 39
      Perspex.Base/Collections/PerspexReadOnlyListView.cs
  9. 28
      Perspex.Base/Collections/PerspexSingleItemList.cs
  10. 62
      Perspex.Base/PerspexObject.cs
  11. 5
      Perspex.Base/PriorityBindingEntry.cs
  12. 4
      Perspex.Base/PriorityLevel.cs
  13. 2
      Perspex.Base/PriorityValue.cs
  14. 8
      Perspex.Base/Reactive/PerspexObservable.cs
  15. 19
      Perspex.Base/Threading/PerspexScheduler.cs
  16. 68
      Perspex.Controls/Control.cs
  17. 2
      Perspex.Controls/Deck.cs
  18. 5
      Perspex.Controls/TabControl.cs
  19. 6
      Perspex.Controls/TreeView.cs
  20. 2
      Perspex.Input/IKeyboardNavigation.cs
  21. 1
      Perspex.SceneGraph/Animation/CrossFade.cs
  22. 4
      Perspex.SceneGraph/Animation/PageSlide.cs
  23. 7
      Perspex.SceneGraph/Media/FontStyle.cs
  24. 12
      Perspex.SceneGraph/Media/Imaging/RenderTargetBitmap.cs
  25. 15
      Perspex.SceneGraph/Media/TextAlignment.cs
  26. 4
      Perspex.SceneGraph/Media/TranslateTransform.cs
  27. 1
      Perspex.SceneGraph/Perspex.SceneGraph.csproj
  28. 4
      Perspex.SceneGraph/Platform/IRenderTargetBitmapImpl.cs
  29. 2
      Windows/Perspex.Win32/Input/WindowsKeyboardDevice.cs

16
Cairo/Perspex.Cairo/CairoExtensions.cs

@ -37,22 +37,34 @@ namespace Perspex.Cairo
public static Pango.Weight ToCairo(this Perspex.Media.FontWeight weight) public static Pango.Weight ToCairo(this Perspex.Media.FontWeight weight)
{ {
if (weight == Perspex.Media.FontWeight.Light) if (weight == Perspex.Media.FontWeight.Light)
{
return Pango.Weight.Light; return Pango.Weight.Light;
}
if (weight == Perspex.Media.FontWeight.Normal || weight == Perspex.Media.FontWeight.Regular) if (weight == Perspex.Media.FontWeight.Normal || weight == Perspex.Media.FontWeight.Regular)
{
return Pango.Weight.Normal; return Pango.Weight.Normal;
}
if (weight == Perspex.Media.FontWeight.DemiBold || weight == Perspex.Media.FontWeight.Medium) if (weight == Perspex.Media.FontWeight.DemiBold || weight == Perspex.Media.FontWeight.Medium)
{
return Pango.Weight.Semibold; return Pango.Weight.Semibold;
}
if (weight == Perspex.Media.FontWeight.Bold) if (weight == Perspex.Media.FontWeight.Bold)
{
return Pango.Weight.Bold; return Pango.Weight.Bold;
}
if (weight == Perspex.Media.FontWeight.UltraBold || weight == Perspex.Media.FontWeight.ExtraBold) if (weight == Perspex.Media.FontWeight.UltraBold || weight == Perspex.Media.FontWeight.ExtraBold)
{
return Pango.Weight.Ultrabold; return Pango.Weight.Ultrabold;
}
if (weight == Perspex.Media.FontWeight.Black || weight == Perspex.Media.FontWeight.Heavy || weight == Perspex.Media.FontWeight.UltraBlack) if (weight == Perspex.Media.FontWeight.Black || weight == Perspex.Media.FontWeight.Heavy || weight == Perspex.Media.FontWeight.UltraBlack)
{
return Pango.Weight.Heavy; return Pango.Weight.Heavy;
}
return Pango.Weight.Ultralight; return Pango.Weight.Ultralight;
} }
@ -60,10 +72,14 @@ namespace Perspex.Cairo
public static Pango.Alignment ToCairo(this Perspex.Media.TextAlignment alignment) public static Pango.Alignment ToCairo(this Perspex.Media.TextAlignment alignment)
{ {
if (alignment == Perspex.Media.TextAlignment.Left) if (alignment == Perspex.Media.TextAlignment.Left)
{
return Pango.Alignment.Left; return Pango.Alignment.Left;
}
if (alignment == Perspex.Media.TextAlignment.Centered) if (alignment == Perspex.Media.TextAlignment.Centered)
{
return Pango.Alignment.Center; return Pango.Alignment.Center;
}
return Pango.Alignment.Right; return Pango.Alignment.Right;
} }

1
Cairo/Perspex.Cairo/Media/FormattedTextImpl.cs

@ -46,7 +46,6 @@ namespace Perspex.Cairo.Media
set set
{ {
this.Layout.Width = Pango.Units.FromDouble(value.Width); this.Layout.Width = Pango.Units.FromDouble(value.Width);
} }
} }

1
Cairo/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs

@ -12,7 +12,6 @@ namespace Perspex.Cairo.Media.Imaging
public class RenderTargetBitmapImpl : BitmapImpl, IRenderTargetBitmapImpl public class RenderTargetBitmapImpl : BitmapImpl, IRenderTargetBitmapImpl
{ {
public RenderTargetBitmapImpl( public RenderTargetBitmapImpl(
Cairo.ImageSurface surface) Cairo.ImageSurface surface)
: base(surface) : base(surface)

3
Cairo/Perspex.Cairo/Renderer.cs

@ -20,6 +20,8 @@ namespace Perspex.Cairo
/// </summary> /// </summary>
public class Renderer : RendererBase public class Renderer : RendererBase
{ {
private ImageSurface surface;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Renderer"/> class. /// Initializes a new instance of the <see cref="Renderer"/> class.
/// </summary> /// </summary>
@ -30,7 +32,6 @@ namespace Perspex.Cairo
{ {
} }
private ImageSurface surface;
public Renderer(ImageSurface surface) public Renderer(ImageSurface surface)
{ {
this.surface = surface; this.surface = surface;

2
Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs

@ -22,7 +22,7 @@ namespace Perspex.Gtk
{ {
} }
public static GtkKeyboardDevice Instance public static new GtkKeyboardDevice Instance
{ {
get { return instance; } get { return instance; }
} }

2
Gtk/Perspex.Gtk/Input/GtkMouseDevice.cs

@ -22,7 +22,7 @@ namespace Perspex.Gtk
{ {
} }
public static GtkMouseDevice Instance public static new GtkMouseDevice Instance
{ {
get { return instance; } get { return instance; }
} }

2
Perspex.Base/Collections/IPerspexReadOnlyList.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="IReadOnlyPerspexList.cs" company="Steven Kirk"> // <copyright file="IPerspexReadOnlyList.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

39
Perspex.Base/Collections/PerspexReadOnlyListView.cs

@ -32,10 +32,9 @@ namespace Perspex.Collections
} }
} }
public T this[int index] public event NotifyCollectionChangedEventHandler CollectionChanged;
{
get { return this.source[index]; } public event PropertyChangedEventHandler PropertyChanged;
}
public int Count public int Count
{ {
@ -83,9 +82,10 @@ namespace Perspex.Collections
} }
} }
public event NotifyCollectionChangedEventHandler CollectionChanged; public T this[int index]
{
public event PropertyChangedEventHandler PropertyChanged; get { return this.source[index]; }
}
public void Dispose() public void Dispose()
{ {
@ -163,15 +163,9 @@ namespace Perspex.Collections
} }
} }
public TOut this[int index] public event NotifyCollectionChangedEventHandler CollectionChanged;
{
get public event PropertyChangedEventHandler PropertyChanged;
{
return (this.convert != null) ?
this.convert(this.source[index]) :
(TOut)(object)this.source[index];
}
}
public int Count public int Count
{ {
@ -219,9 +213,15 @@ namespace Perspex.Collections
} }
} }
public event NotifyCollectionChangedEventHandler CollectionChanged; public TOut this[int index]
{
public event PropertyChangedEventHandler PropertyChanged; get
{
return (this.convert != null) ?
this.convert(this.source[index]) :
(TOut)(object)this.source[index];
}
}
public void Dispose() public void Dispose()
{ {
@ -289,5 +289,4 @@ namespace Perspex.Collections
} }
} }
} }
} }

28
Perspex.Base/Collections/PerspexSingleItemList.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="PerspexList.cs" company="Steven Kirk"> // <copyright file="PerspexSingleItemList.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@ -36,18 +36,9 @@ namespace Perspex.Collections
this.item = item; this.item = item;
} }
public T this[int index] public event NotifyCollectionChangedEventHandler CollectionChanged;
{
get
{
if (index < 0 || index >= this.Count)
{
throw new ArgumentOutOfRangeException();
}
return item; public event PropertyChangedEventHandler PropertyChanged;
}
}
public int Count public int Count
{ {
@ -96,9 +87,18 @@ namespace Perspex.Collections
} }
} }
public event NotifyCollectionChangedEventHandler CollectionChanged; public T this[int index]
{
get
{
if (index < 0 || index >= this.Count)
{
throw new ArgumentOutOfRangeException();
}
public event PropertyChangedEventHandler PropertyChanged; return this.item;
}
}
public IEnumerator<T> GetEnumerator() public IEnumerator<T> GetEnumerator()
{ {

62
Perspex.Base/PerspexObject.cs

@ -6,15 +6,15 @@
namespace Perspex namespace Perspex
{ {
using Splat;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Reflection; using System.Reflection;
using Perspex.Diagnostics; using Perspex.Diagnostics;
using Splat;
using System.Reactive.Disposables;
using Perspex.Reactive; using Perspex.Reactive;
/// <summary> /// <summary>
@ -306,25 +306,27 @@ namespace Perspex
{ {
Contract.Requires<NullReferenceException>(property != null); Contract.Requires<NullReferenceException>(property != null);
return new PerspexObservable<object>(observer => return new PerspexObservable<object>(
{ observer =>
EventHandler<PerspexPropertyChangedEventArgs> handler = (s, e) =>
{ {
if (e.Property == property) EventHandler<PerspexPropertyChangedEventArgs> handler = (s, e) =>
{ {
observer.OnNext(e.NewValue); if (e.Property == property)
} {
}; observer.OnNext(e.NewValue);
}
};
observer.OnNext(this.GetValue(property)); observer.OnNext(this.GetValue(property));
this.PropertyChanged += handler; this.PropertyChanged += handler;
return Disposable.Create(() => return Disposable.Create(() =>
{ {
this.PropertyChanged -= handler; this.PropertyChanged -= handler;
}); });
}, this.GetObservableDescription(property)); },
this.GetObservableDescription(property));
} }
/// <summary> /// <summary>
@ -348,23 +350,25 @@ namespace Perspex
/// <returns></returns> /// <returns></returns>
public IObservable<Tuple<T, T>> GetObservableWithHistory<T>(PerspexProperty<T> property) public IObservable<Tuple<T, T>> GetObservableWithHistory<T>(PerspexProperty<T> property)
{ {
return new PerspexObservable<Tuple<T, T>>(observer => return new PerspexObservable<Tuple<T, T>>(
{ observer =>
EventHandler<PerspexPropertyChangedEventArgs> handler = (s, e) =>
{ {
if (e.Property == property) EventHandler<PerspexPropertyChangedEventArgs> handler = (s, e) =>
{ {
observer.OnNext(Tuple.Create((T)e.OldValue, (T)e.NewValue)); if (e.Property == property)
} {
}; observer.OnNext(Tuple.Create((T)e.OldValue, (T)e.NewValue));
}
};
this.PropertyChanged += handler; this.PropertyChanged += handler;
return Disposable.Create(() => return Disposable.Create(() =>
{ {
this.PropertyChanged -= handler; this.PropertyChanged -= handler;
}); });
}, this.GetObservableDescription(property)); },
this.GetObservableDescription(property));
} }
/// <summary> /// <summary>

5
Perspex.Base/PriorityBindingEntry.cs

@ -1,12 +1,11 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="PriorityValue.cs" company="Steven Kirk"> // <copyright file="PriorityBindingEntry.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2015 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
namespace Perspex namespace Perspex
{ {
using Perspex.Diagnostics;
using System; using System;
/// <summary> /// <summary>

4
Perspex.Base/PriorityLevel.cs

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="PriorityValueTests.cs" company="Steven Kirk"> // <copyright file="PriorityLevel.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information. // Copyright 2015 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

2
Perspex.Base/PriorityValue.cs

@ -6,12 +6,12 @@
namespace Perspex namespace Perspex
{ {
using Perspex.Diagnostics;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reactive.Subjects; using System.Reactive.Subjects;
using System.Reflection; using System.Reflection;
using Perspex.Diagnostics;
/// <summary> /// <summary>
/// Maintains a list of prioritised bindings together with a current value. /// Maintains a list of prioritised bindings together with a current value.

8
Perspex.Base/Reactive/PerspexObservable.cs

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="PerspexObject.cs" company="Steven Kirk"> // <copyright file="PerspexObservable.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2015 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@ -14,8 +14,6 @@ namespace Perspex.Reactive
{ {
private readonly Func<IObserver<T>, IDisposable> subscribe; private readonly Func<IObserver<T>, IDisposable> subscribe;
public string Description { get; }
public PerspexObservable(Func<IObserver<T>, IDisposable> subscribe, string description) public PerspexObservable(Func<IObserver<T>, IDisposable> subscribe, string description)
{ {
if (subscribe == null) if (subscribe == null)
@ -27,6 +25,8 @@ namespace Perspex.Reactive
this.Description = description; this.Description = description;
} }
public string Description { get; }
protected override IDisposable SubscribeCore(IObserver<T> observer) protected override IDisposable SubscribeCore(IObserver<T> observer)
{ {
return this.subscribe(observer) ?? Disposable.Empty; return this.subscribe(observer) ?? Disposable.Empty;

19
Perspex.Base/Threading/PerspexScheduler.cs

@ -12,20 +12,17 @@ namespace Perspex.Threading
public class PerspexScheduler : LocalScheduler public class PerspexScheduler : LocalScheduler
{ {
private static readonly PerspexScheduler instance = new PerspexScheduler(); public static readonly PerspexScheduler Instance = new PerspexScheduler();
public static PerspexScheduler Instance
{
get { return instance; }
}
public override IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action) public override IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)
{ {
return DispatcherTimer.Run(() => return DispatcherTimer.Run(
{ () =>
action(this, state); {
return false; action(this, state);
}, dueTime); return false;
},
dueTime);
} }
} }
} }

68
Perspex.Controls/Control.cs

@ -192,6 +192,40 @@ namespace Perspex.Controls
this.RaiseEvent(ev); this.RaiseEvent(ev);
} }
protected static void PseudoClass(PerspexProperty<bool> property, string className)
{
PseudoClass(property, x => x, className);
}
protected static void PseudoClass<T>(
PerspexProperty<T> property,
Func<T, bool> selector,
string className)
{
Contract.Requires<ArgumentNullException>(property != null);
Contract.Requires<ArgumentNullException>(selector != null);
Contract.Requires<ArgumentNullException>(className != null);
Contract.Requires<ArgumentNullException>(property != null);
if (string.IsNullOrWhiteSpace(className))
{
throw new ArgumentException("Cannot supply an empty className.");
}
Observable.Merge(property.Changed, property.Initialized)
.Subscribe(e =>
{
if (selector((T)e.NewValue))
{
((Control)e.Sender).Classes.Add(className);
}
else
{
((Control)e.Sender).Classes.Remove(className);
}
});
}
protected override void OnGotFocus(GotFocusEventArgs e) protected override void OnGotFocus(GotFocusEventArgs e)
{ {
base.OnGotFocus(e); base.OnGotFocus(e);
@ -233,40 +267,6 @@ namespace Perspex.Controls
} }
} }
protected static void PseudoClass(PerspexProperty<bool> property, string className)
{
PseudoClass(property, x => x, className);
}
protected static void PseudoClass<T>(
PerspexProperty<T> property,
Func<T, bool> selector,
string className)
{
Contract.Requires<ArgumentNullException>(property != null);
Contract.Requires<ArgumentNullException>(selector != null);
Contract.Requires<ArgumentNullException>(className != null);
Contract.Requires<ArgumentNullException>(property != null);
if (string.IsNullOrWhiteSpace(className))
{
throw new ArgumentException("Cannot supply an empty className.");
}
Observable.Merge(property.Changed, property.Initialized)
.Subscribe(e =>
{
if (selector((T)e.NewValue))
{
((Control)e.Sender).Classes.Add(className);
}
else
{
((Control)e.Sender).Classes.Remove(className);
}
});
}
protected override void OnAttachedToVisualTree(IRenderRoot root) protected override void OnAttachedToVisualTree(IRenderRoot root)
{ {
base.OnAttachedToVisualTree(root); base.OnAttachedToVisualTree(root);

2
Perspex.Controls/Deck.cs

@ -7,11 +7,11 @@
namespace Perspex.Controls namespace Perspex.Controls
{ {
using System.Collections; using System.Collections;
using Perspex.Animation;
using Perspex.Controls.Generators; using Perspex.Controls.Generators;
using Perspex.Controls.Primitives; using Perspex.Controls.Primitives;
using Perspex.Controls.Utils; using Perspex.Controls.Utils;
using Perspex.Input; using Perspex.Input;
using Perspex.Animation;
/// <summary> /// <summary>
/// A selecting items control that displays a single item that fills the control. /// A selecting items control that displays a single item that fills the control.

5
Perspex.Controls/TabControl.cs

@ -7,15 +7,12 @@
namespace Perspex.Controls namespace Perspex.Controls
{ {
using System; using System;
using System.Linq;
using System.Reactive.Linq; using System.Reactive.Linq;
using Perspex.Animation;
using Perspex.Collections; using Perspex.Collections;
using Perspex.Controls.Generators;
using Perspex.Controls.Presenters;
using Perspex.Controls.Primitives; using Perspex.Controls.Primitives;
using Perspex.Controls.Templates; using Perspex.Controls.Templates;
using Perspex.Input; using Perspex.Input;
using Perspex.Animation;
public class TabControl : SelectingItemsControl, ILogical public class TabControl : SelectingItemsControl, ILogical
{ {

6
Perspex.Controls/TreeView.cs

@ -7,12 +7,12 @@
namespace Perspex.Controls namespace Perspex.Controls
{ {
using System; using System;
using Perspex.Controls.Generators;
using Perspex.Input;
using Perspex.VisualTree;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Perspex.Controls.Generators;
using Perspex.Input;
using Perspex.VisualTree;
public class TreeView : ItemsControl public class TreeView : ItemsControl
{ {

2
Perspex.Input/IKeyboardNavigation.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="KeyboardNavigation.cs" company="Steven Kirk"> // <copyright file="IKeyboardNavigation.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

1
Perspex.SceneGraph/Animation/CrossFade.cs

@ -52,7 +52,6 @@ namespace Perspex.Animation
1, 1,
LinearEasing.For<double>(), LinearEasing.For<double>(),
this.Duration).ToTask()); this.Duration).ToTask());
} }
await Task.WhenAll(tasks.ToArray()); await Task.WhenAll(tasks.ToArray());

4
Perspex.SceneGraph/Animation/PageSlide.cs

@ -6,12 +6,12 @@
namespace Perspex.Animation namespace Perspex.Animation
{ {
using Perspex.Media;
using Perspex.VisualTree;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reactive.Threading.Tasks; using System.Reactive.Threading.Tasks;
using System.Threading.Tasks; using System.Threading.Tasks;
using Perspex.Media;
using Perspex.VisualTree;
public class PageSlide : IPageTransition public class PageSlide : IPageTransition
{ {

7
Perspex.SceneGraph/Media/FontStyle.cs

@ -12,11 +12,4 @@ namespace Perspex.Media
Oblique, Oblique,
Italic, Italic,
} }
public enum TextAlignment
{
Left,
Centered,
Right,
}
} }

12
Perspex.SceneGraph/Media/Imaging/RenderTargetBitmap.cs

@ -6,9 +6,9 @@
namespace Perspex.Media.Imaging namespace Perspex.Media.Imaging
{ {
using System;
using Perspex.Platform; using Perspex.Platform;
using Splat; using Splat;
using System;
public class RenderTargetBitmap : Bitmap, IDisposable public class RenderTargetBitmap : Bitmap, IDisposable
{ {
@ -27,15 +27,15 @@ namespace Perspex.Media.Imaging
this.PlatformImpl.Render(visual); this.PlatformImpl.Render(visual);
} }
private static IBitmapImpl CreateImpl(int width, int height) public void Dispose()
{ {
IPlatformRenderInterface factory = Locator.Current.GetService<IPlatformRenderInterface>(); this.PlatformImpl.Dispose();
return factory.CreateRenderTargetBitmap(width, height);
} }
public void Dispose() private static IBitmapImpl CreateImpl(int width, int height)
{ {
this.PlatformImpl.Dispose(); IPlatformRenderInterface factory = Locator.Current.GetService<IPlatformRenderInterface>();
return factory.CreateRenderTargetBitmap(width, height);
} }
} }
} }

15
Perspex.SceneGraph/Media/TextAlignment.cs

@ -0,0 +1,15 @@
// -----------------------------------------------------------------------
// <copyright file="TextAlignment.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Media
{
public enum TextAlignment
{
Left,
Centered,
Right,
}
}

4
Perspex.SceneGraph/Media/TranslateTransform.cs

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="MatrixTransform.cs" company="Steven Kirk"> // <copyright file="TranslateTransform.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information. // Copyright 2015 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

1
Perspex.SceneGraph/Perspex.SceneGraph.csproj

@ -53,6 +53,7 @@
<Compile Include="Media\Brushes.cs" /> <Compile Include="Media\Brushes.cs" />
<Compile Include="Media\Color.cs" /> <Compile Include="Media\Color.cs" />
<Compile Include="Media\Colors.cs" /> <Compile Include="Media\Colors.cs" />
<Compile Include="Media\TextAlignment.cs" />
<Compile Include="Media\FontWeight.cs" /> <Compile Include="Media\FontWeight.cs" />
<Compile Include="Media\FontStyle.cs" /> <Compile Include="Media\FontStyle.cs" />
<Compile Include="Media\FormattedTextLine.cs" /> <Compile Include="Media\FormattedTextLine.cs" />

4
Perspex.SceneGraph/Platform/IRenderTargetBitmapImpl.cs

@ -4,10 +4,10 @@
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
using System;
namespace Perspex.Platform namespace Perspex.Platform
{ {
using System;
public interface IRenderTargetBitmapImpl : IBitmapImpl, IDisposable public interface IRenderTargetBitmapImpl : IBitmapImpl, IDisposable
{ {
void Render(IVisual visual); void Render(IVisual visual);

2
Windows/Perspex.Win32/Input/WindowsKeyboardDevice.cs

@ -17,7 +17,7 @@ namespace Perspex.Win32.Input
private byte[] keyStates = new byte[256]; private byte[] keyStates = new byte[256];
public static WindowsKeyboardDevice Instance public static new WindowsKeyboardDevice Instance
{ {
get { return instance; } get { return instance; }
} }

Loading…
Cancel
Save