mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Surface editor - Selection improvements
This commit is contained in:
parent
c168edd9fc
commit
9bbab5f9f8
@ -54,7 +54,7 @@
|
|||||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
|
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
<PackageReference Include="SkiaSharp" Version="2.80.3" />
|
<PackageReference Include="SkiaSharp" Version="2.88.0-preview.178" />
|
||||||
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
||||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
|
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
|
||||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||||
|
|||||||
@ -132,10 +132,12 @@
|
|||||||
},
|
},
|
||||||
"SkiaSharp": {
|
"SkiaSharp": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[2.80.3, )",
|
"requested": "[2.88.0-preview.178, )",
|
||||||
"resolved": "2.80.3",
|
"resolved": "2.88.0-preview.178",
|
||||||
"contentHash": "qX6tGNP3+MXNYe2pKm0PCRiJ/cx+LTeLaggwZifB7sUMXhECfKKKHJq45VqZKt37xQegnCCdf1jHXwmHeJQs5Q==",
|
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
||||||
|
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
||||||
"System.Memory": "4.5.3"
|
"System.Memory": "4.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -393,6 +395,16 @@
|
|||||||
"resolved": "4.3.0",
|
"resolved": "4.3.0",
|
||||||
"contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg=="
|
"contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg=="
|
||||||
},
|
},
|
||||||
|
"SkiaSharp.NativeAssets.macOS": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "+Hs3ku4buimzBHuc8FoyjOcE6eU5r98zcG7WH/s+doYQ1bFIjk+dKfqthgZ2o0NRAv8D3esq9rWrZTj12q+m1w=="
|
||||||
|
},
|
||||||
|
"SkiaSharp.NativeAssets.Win32": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "9og9GCkdZc/NYrmbsRzohmIBRlS1oFegJiBMsoG93qYjhh2o6q5QBYxd61zw5Mgeytl3qj4YM+6BNIF4tcF+6w=="
|
||||||
|
},
|
||||||
"System.AppContext": {
|
"System.AppContext": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "4.3.0",
|
"resolved": "4.3.0",
|
||||||
|
|||||||
@ -209,16 +209,6 @@
|
|||||||
Defines the <see cref="P:Artemis.UI.Shared.Controls.SelectionRectangle.InputElement" /> property.
|
Defines the <see cref="P:Artemis.UI.Shared.Controls.SelectionRectangle.InputElement" /> property.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionUpdatedProperty">
|
|
||||||
<summary>
|
|
||||||
Defines the <see cref="P:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionUpdated" /> property.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionFinishedProperty">
|
|
||||||
<summary>
|
|
||||||
Defines the <see cref="P:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionFinished" /> property.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Artemis.UI.Shared.Controls.SelectionRectangle.#ctor">
|
<member name="M:Artemis.UI.Shared.Controls.SelectionRectangle.#ctor">
|
||||||
<inheritdoc />
|
<inheritdoc />
|
||||||
</member>
|
</member>
|
||||||
@ -242,16 +232,28 @@
|
|||||||
Gets or sets the element that captures input for the selection rectangle.
|
Gets or sets the element that captures input for the selection rectangle.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionUpdated">
|
<member name="E:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionUpdated">
|
||||||
<summary>
|
<summary>
|
||||||
Gets or sets the command to execute when the selection has been updated.
|
Occurs when the selection rect is being updated, indicating the user is dragging.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionFinished">
|
<member name="E:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionFinished">
|
||||||
<summary>
|
<summary>
|
||||||
Gets or sets the command to execute when the selection has finished.
|
Occurs when the selection has finished, indicating the user stopped dragging.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Artemis.UI.Shared.Controls.SelectionRectangle.OnSelectionUpdated(Artemis.UI.Shared.Events.SelectionRectangleEventArgs)">
|
||||||
|
<summary>
|
||||||
|
Invokes the <see cref="E:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionUpdated" /> event
|
||||||
|
</summary>
|
||||||
|
<param name="e"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:Artemis.UI.Shared.Controls.SelectionRectangle.OnSelectionFinished(Artemis.UI.Shared.Events.SelectionRectangleEventArgs)">
|
||||||
|
<summary>
|
||||||
|
Invokes the <see cref="E:Artemis.UI.Shared.Controls.SelectionRectangle.SelectionFinished" /> event
|
||||||
|
</summary>
|
||||||
|
<param name="e"></param>
|
||||||
|
</member>
|
||||||
<member name="M:Artemis.UI.Shared.Controls.SelectionRectangle.Render(Avalonia.Media.DrawingContext)">
|
<member name="M:Artemis.UI.Shared.Controls.SelectionRectangle.Render(Avalonia.Media.DrawingContext)">
|
||||||
<inheritdoc />
|
<inheritdoc />
|
||||||
</member>
|
</member>
|
||||||
@ -783,6 +785,26 @@
|
|||||||
If applicable, the previous active profile element before the event was raised
|
If applicable, the previous active profile element before the event was raised
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Artemis.UI.Shared.Events.SelectionRectangleEventArgs">
|
||||||
|
<summary>
|
||||||
|
Provides data on selection events raised by the <see cref="T:Artemis.UI.Shared.Controls.SelectionRectangle" />.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Artemis.UI.Shared.Events.SelectionRectangleEventArgs.#ctor(Avalonia.Rect,Avalonia.Input.KeyModifiers)">
|
||||||
|
<summary>
|
||||||
|
Creates a new instance of the <see cref="T:Artemis.UI.Shared.Events.SelectionRectangleEventArgs" /> class.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Artemis.UI.Shared.Events.SelectionRectangleEventArgs.Rectangle">
|
||||||
|
<summary>
|
||||||
|
Gets the rectangle that was selected when the event occurred.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Artemis.UI.Shared.Events.SelectionRectangleEventArgs.KeyModifiers">
|
||||||
|
<summary>
|
||||||
|
Gets the key modifiers that where pressed when the event occurred.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:Artemis.UI.Shared.ArtemisSharedUIException">
|
<member name="T:Artemis.UI.Shared.ArtemisSharedUIException">
|
||||||
<summary>
|
<summary>
|
||||||
Represents errors that occur within the Artemis Shared UI library
|
Represents errors that occur within the Artemis Shared UI library
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
<PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0" />
|
<PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0" />
|
||||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease7" />
|
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease7" />
|
||||||
<PackageReference Include="SharpVectors.Reloaded" Version="1.7.5" />
|
<PackageReference Include="SharpVectors.Reloaded" Version="1.7.5" />
|
||||||
<PackageReference Include="SkiaSharp" Version="2.80.3" />
|
<PackageReference Include="SkiaSharp" Version="2.88.0-preview.178" />
|
||||||
<PackageReference Include="SkiaSharp.Views.WPF" Version="2.80.3" />
|
<PackageReference Include="SkiaSharp.Views.WPF" Version="2.80.3" />
|
||||||
<PackageReference Include="Stylet" Version="1.3.6" />
|
<PackageReference Include="Stylet" Version="1.3.6" />
|
||||||
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
||||||
|
|||||||
@ -66,10 +66,12 @@
|
|||||||
},
|
},
|
||||||
"SkiaSharp": {
|
"SkiaSharp": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[2.80.3, )",
|
"requested": "[2.88.0-preview.178, )",
|
||||||
"resolved": "2.80.3",
|
"resolved": "2.88.0-preview.178",
|
||||||
"contentHash": "qX6tGNP3+MXNYe2pKm0PCRiJ/cx+LTeLaggwZifB7sUMXhECfKKKHJq45VqZKt37xQegnCCdf1jHXwmHeJQs5Q==",
|
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
||||||
|
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
||||||
"System.Memory": "4.5.3"
|
"System.Memory": "4.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -422,6 +424,16 @@
|
|||||||
"Serilog": "2.10.0"
|
"Serilog": "2.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"SkiaSharp.NativeAssets.macOS": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "+Hs3ku4buimzBHuc8FoyjOcE6eU5r98zcG7WH/s+doYQ1bFIjk+dKfqthgZ2o0NRAv8D3esq9rWrZTj12q+m1w=="
|
||||||
|
},
|
||||||
|
"SkiaSharp.NativeAssets.Win32": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "9og9GCkdZc/NYrmbsRzohmIBRlS1oFegJiBMsoG93qYjhh2o6q5QBYxd61zw5Mgeytl3qj4YM+6BNIF4tcF+6w=="
|
||||||
|
},
|
||||||
"SkiaSharp.Views.Desktop.Common": {
|
"SkiaSharp.Views.Desktop.Common": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.80.3",
|
"resolved": "2.80.3",
|
||||||
@ -1332,7 +1344,7 @@
|
|||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
|
|||||||
@ -565,12 +565,24 @@
|
|||||||
},
|
},
|
||||||
"SkiaSharp": {
|
"SkiaSharp": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.80.3",
|
"resolved": "2.88.0-preview.178",
|
||||||
"contentHash": "qX6tGNP3+MXNYe2pKm0PCRiJ/cx+LTeLaggwZifB7sUMXhECfKKKHJq45VqZKt37xQegnCCdf1jHXwmHeJQs5Q==",
|
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
||||||
|
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
||||||
"System.Memory": "4.5.3"
|
"System.Memory": "4.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"SkiaSharp.NativeAssets.macOS": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "+Hs3ku4buimzBHuc8FoyjOcE6eU5r98zcG7WH/s+doYQ1bFIjk+dKfqthgZ2o0NRAv8D3esq9rWrZTj12q+m1w=="
|
||||||
|
},
|
||||||
|
"SkiaSharp.NativeAssets.Win32": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "9og9GCkdZc/NYrmbsRzohmIBRlS1oFegJiBMsoG93qYjhh2o6q5QBYxd61zw5Mgeytl3qj4YM+6BNIF4tcF+6w=="
|
||||||
|
},
|
||||||
"SkiaSharp.Views.Desktop.Common": {
|
"SkiaSharp.Views.Desktop.Common": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.80.3",
|
"resolved": "2.80.3",
|
||||||
@ -1479,7 +1491,7 @@
|
|||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
@ -1506,7 +1518,7 @@
|
|||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease7",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"SharpVectors.Reloaded": "1.7.5",
|
"SharpVectors.Reloaded": "1.7.5",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"SkiaSharp.Views.WPF": "2.80.3",
|
"SkiaSharp.Views.WPF": "2.80.3",
|
||||||
"Stylet": "1.3.6",
|
"Stylet": "1.3.6",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
@ -1522,7 +1534,7 @@
|
|||||||
"MaterialDesignThemes": "4.1.0",
|
"MaterialDesignThemes": "4.1.0",
|
||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"NoStringEvaluating": "2.2.2",
|
"NoStringEvaluating": "2.2.2",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"Stylet": "1.3.6"
|
"Stylet": "1.3.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
<PackageReference Include="MaterialDesignThemes" Version="4.1.0" />
|
<PackageReference Include="MaterialDesignThemes" Version="4.1.0" />
|
||||||
<PackageReference Include="Ninject" Version="3.3.4" />
|
<PackageReference Include="Ninject" Version="3.3.4" />
|
||||||
<PackageReference Include="NoStringEvaluating" Version="2.2.2" />
|
<PackageReference Include="NoStringEvaluating" Version="2.2.2" />
|
||||||
<PackageReference Include="SkiaSharp" Version="2.80.3" />
|
<PackageReference Include="SkiaSharp" Version="2.88.0-preview.178" />
|
||||||
<PackageReference Include="Stylet" Version="1.3.6" />
|
<PackageReference Include="Stylet" Version="1.3.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@ -38,10 +38,12 @@
|
|||||||
},
|
},
|
||||||
"SkiaSharp": {
|
"SkiaSharp": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[2.80.3, )",
|
"requested": "[2.88.0-preview.178, )",
|
||||||
"resolved": "2.80.3",
|
"resolved": "2.88.0-preview.178",
|
||||||
"contentHash": "qX6tGNP3+MXNYe2pKm0PCRiJ/cx+LTeLaggwZifB7sUMXhECfKKKHJq45VqZKt37xQegnCCdf1jHXwmHeJQs5Q==",
|
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
||||||
|
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
||||||
"System.Memory": "4.5.3"
|
"System.Memory": "4.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -248,23 +250,23 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Core": {
|
"RGB.NET.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "aaCPk++kr1TaV/qWYeol5975IN3XifDuuQ9wrCD+nw1cy05BMdGVhuQ72ITb0YRBedssd/btkM51ZABsBd8CEQ=="
|
"contentHash": "IIja5sC4QZ5pbSNckRCG7TlY4U6j/dRbrl4e2FZqsTGgsevaVB3IqonUQLFY1GGst4xNSl2oh0A23coXQxXGbQ=="
|
||||||
},
|
},
|
||||||
"RGB.NET.Layout": {
|
"RGB.NET.Layout": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "nbaHbcY59tzFSeTDbImhrcR1ZyJpoC0x6WawXdtGXO7x3F91ajM7kM5SJwi/5jHdD61vGV0ARuznmR8ErAWegQ==",
|
"contentHash": "S0kfWVa8EfMOAl2WPHsq98dwaO+SNz9TWr1AtMkdo8aZuYIVhaJ1c+mSAMMnH1V+mSbxDWPHWkNzi9ITszJucA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RGB.NET.Presets": {
|
"RGB.NET.Presets": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "XU8XeI0fQF26fd0pQHgoe9RaROuvENmZlX/1QyyaN9P3j0LtYmy6ycWZbsXp8byLT0UcGbS+odMiQQAnK+kxgg==",
|
"contentHash": "NgShvOPQM0miOsdqMKjkNunngJUZMwr8KR8ME2/Ksir7wgIQfgJj1YwZy8aIj+ar7fDo6VZJZenAshs/Ul+04A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
||||||
@ -408,6 +410,16 @@
|
|||||||
"resolved": "1.7.5",
|
"resolved": "1.7.5",
|
||||||
"contentHash": "v9U5sSMGFE2zCMbh42BYHkaRYkmwwhsKMGcNRdHAKqD1ryOf4mhqnJR0o07hwg5KIEmCI9bDdrgYSmiZWlL+eA=="
|
"contentHash": "v9U5sSMGFE2zCMbh42BYHkaRYkmwwhsKMGcNRdHAKqD1ryOf4mhqnJR0o07hwg5KIEmCI9bDdrgYSmiZWlL+eA=="
|
||||||
},
|
},
|
||||||
|
"SkiaSharp.NativeAssets.macOS": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "+Hs3ku4buimzBHuc8FoyjOcE6eU5r98zcG7WH/s+doYQ1bFIjk+dKfqthgZ2o0NRAv8D3esq9rWrZTj12q+m1w=="
|
||||||
|
},
|
||||||
|
"SkiaSharp.NativeAssets.Win32": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "9og9GCkdZc/NYrmbsRzohmIBRlS1oFegJiBMsoG93qYjhh2o6q5QBYxd61zw5Mgeytl3qj4YM+6BNIF4tcF+6w=="
|
||||||
|
},
|
||||||
"SkiaSharp.Views.Desktop.Common": {
|
"SkiaSharp.Views.Desktop.Common": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.80.3",
|
"resolved": "2.80.3",
|
||||||
@ -1330,14 +1342,14 @@
|
|||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"Ninject.Extensions.ChildKernel": "3.3.0",
|
"Ninject.Extensions.ChildKernel": "3.3.0",
|
||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Presets": "1.0.0-prerelease1",
|
"RGB.NET.Presets": "1.0.0-prerelease7",
|
||||||
"Serilog": "2.10.0",
|
"Serilog": "2.10.0",
|
||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
@ -1362,9 +1374,9 @@
|
|||||||
"Microsoft.Xaml.Behaviors.Wpf": "1.1.31",
|
"Microsoft.Xaml.Behaviors.Wpf": "1.1.31",
|
||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"SharpVectors.Reloaded": "1.7.5",
|
"SharpVectors.Reloaded": "1.7.5",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"SkiaSharp.Views.WPF": "2.80.3",
|
"SkiaSharp.Views.WPF": "2.80.3",
|
||||||
"Stylet": "1.3.6",
|
"Stylet": "1.3.6",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
|
|||||||
@ -542,23 +542,23 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Core": {
|
"RGB.NET.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "aaCPk++kr1TaV/qWYeol5975IN3XifDuuQ9wrCD+nw1cy05BMdGVhuQ72ITb0YRBedssd/btkM51ZABsBd8CEQ=="
|
"contentHash": "IIja5sC4QZ5pbSNckRCG7TlY4U6j/dRbrl4e2FZqsTGgsevaVB3IqonUQLFY1GGst4xNSl2oh0A23coXQxXGbQ=="
|
||||||
},
|
},
|
||||||
"RGB.NET.Layout": {
|
"RGB.NET.Layout": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "nbaHbcY59tzFSeTDbImhrcR1ZyJpoC0x6WawXdtGXO7x3F91ajM7kM5SJwi/5jHdD61vGV0ARuznmR8ErAWegQ==",
|
"contentHash": "S0kfWVa8EfMOAl2WPHsq98dwaO+SNz9TWr1AtMkdo8aZuYIVhaJ1c+mSAMMnH1V+mSbxDWPHWkNzi9ITszJucA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RGB.NET.Presets": {
|
"RGB.NET.Presets": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "XU8XeI0fQF26fd0pQHgoe9RaROuvENmZlX/1QyyaN9P3j0LtYmy6ycWZbsXp8byLT0UcGbS+odMiQQAnK+kxgg==",
|
"contentHash": "NgShvOPQM0miOsdqMKjkNunngJUZMwr8KR8ME2/Ksir7wgIQfgJj1YwZy8aIj+ar7fDo6VZJZenAshs/Ul+04A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
||||||
@ -1719,14 +1719,14 @@
|
|||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"Ninject.Extensions.ChildKernel": "3.3.0",
|
"Ninject.Extensions.ChildKernel": "3.3.0",
|
||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Presets": "1.0.0-prerelease1",
|
"RGB.NET.Presets": "1.0.0-prerelease7",
|
||||||
"Serilog": "2.10.0",
|
"Serilog": "2.10.0",
|
||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
@ -1756,10 +1756,11 @@
|
|||||||
"Flurl.Http": "3.2.0",
|
"Flurl.Http": "3.2.0",
|
||||||
"Live.Avalonia": "1.3.1",
|
"Live.Avalonia": "1.3.1",
|
||||||
"Material.Icons.Avalonia": "1.0.2",
|
"Material.Icons.Avalonia": "1.0.2",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"ReactiveUI": "16.3.10",
|
"ReactiveUI": "16.3.10",
|
||||||
"ReactiveUI.Validation": "2.2.1",
|
"ReactiveUI.Validation": "2.2.1",
|
||||||
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"Splat.Ninject": "14.1.17"
|
"Splat.Ninject": "14.1.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1775,9 +1776,10 @@
|
|||||||
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
||||||
"FluentAvaloniaUI": "1.1.8",
|
"FluentAvaloniaUI": "1.1.8",
|
||||||
"Material.Icons.Avalonia": "1.0.2",
|
"Material.Icons.Avalonia": "1.0.2",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"ReactiveUI": "16.3.10",
|
"ReactiveUI": "16.3.10",
|
||||||
"ReactiveUI.Validation": "2.2.1"
|
"ReactiveUI.Validation": "2.2.1",
|
||||||
|
"SkiaSharp": "2.88.0-preview.178"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -542,23 +542,23 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Core": {
|
"RGB.NET.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "aaCPk++kr1TaV/qWYeol5975IN3XifDuuQ9wrCD+nw1cy05BMdGVhuQ72ITb0YRBedssd/btkM51ZABsBd8CEQ=="
|
"contentHash": "IIja5sC4QZ5pbSNckRCG7TlY4U6j/dRbrl4e2FZqsTGgsevaVB3IqonUQLFY1GGst4xNSl2oh0A23coXQxXGbQ=="
|
||||||
},
|
},
|
||||||
"RGB.NET.Layout": {
|
"RGB.NET.Layout": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "nbaHbcY59tzFSeTDbImhrcR1ZyJpoC0x6WawXdtGXO7x3F91ajM7kM5SJwi/5jHdD61vGV0ARuznmR8ErAWegQ==",
|
"contentHash": "S0kfWVa8EfMOAl2WPHsq98dwaO+SNz9TWr1AtMkdo8aZuYIVhaJ1c+mSAMMnH1V+mSbxDWPHWkNzi9ITszJucA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RGB.NET.Presets": {
|
"RGB.NET.Presets": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "XU8XeI0fQF26fd0pQHgoe9RaROuvENmZlX/1QyyaN9P3j0LtYmy6ycWZbsXp8byLT0UcGbS+odMiQQAnK+kxgg==",
|
"contentHash": "NgShvOPQM0miOsdqMKjkNunngJUZMwr8KR8ME2/Ksir7wgIQfgJj1YwZy8aIj+ar7fDo6VZJZenAshs/Ul+04A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
||||||
@ -1719,14 +1719,14 @@
|
|||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"Ninject.Extensions.ChildKernel": "3.3.0",
|
"Ninject.Extensions.ChildKernel": "3.3.0",
|
||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Presets": "1.0.0-prerelease1",
|
"RGB.NET.Presets": "1.0.0-prerelease7",
|
||||||
"Serilog": "2.10.0",
|
"Serilog": "2.10.0",
|
||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
@ -1756,10 +1756,11 @@
|
|||||||
"Flurl.Http": "3.2.0",
|
"Flurl.Http": "3.2.0",
|
||||||
"Live.Avalonia": "1.3.1",
|
"Live.Avalonia": "1.3.1",
|
||||||
"Material.Icons.Avalonia": "1.0.2",
|
"Material.Icons.Avalonia": "1.0.2",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"ReactiveUI": "16.3.10",
|
"ReactiveUI": "16.3.10",
|
||||||
"ReactiveUI.Validation": "2.2.1",
|
"ReactiveUI.Validation": "2.2.1",
|
||||||
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"Splat.Ninject": "14.1.17"
|
"Splat.Ninject": "14.1.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1775,9 +1776,10 @@
|
|||||||
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
||||||
"FluentAvaloniaUI": "1.1.8",
|
"FluentAvaloniaUI": "1.1.8",
|
||||||
"Material.Icons.Avalonia": "1.0.2",
|
"Material.Icons.Avalonia": "1.0.2",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"ReactiveUI": "16.3.10",
|
"ReactiveUI": "16.3.10",
|
||||||
"ReactiveUI.Validation": "2.2.1"
|
"ReactiveUI.Validation": "2.2.1",
|
||||||
|
"SkiaSharp": "2.88.0-preview.178"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,8 @@
|
|||||||
<PackageReference Include="Material.Icons.Avalonia" Version="1.0.2" />
|
<PackageReference Include="Material.Icons.Avalonia" Version="1.0.2" />
|
||||||
<PackageReference Include="ReactiveUI" Version="16.3.10" />
|
<PackageReference Include="ReactiveUI" Version="16.3.10" />
|
||||||
<PackageReference Include="ReactiveUI.Validation" Version="2.2.1" />
|
<PackageReference Include="ReactiveUI.Validation" Version="2.2.1" />
|
||||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease1" />
|
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease7" />
|
||||||
|
<PackageReference Include="SkiaSharp" Version="2.88.0-preview.178" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Include="DefaultTypes\DataModel\Display\DefaultDataModelDisplayView.xaml">
|
<Page Include="DefaultTypes\DataModel\Display\DefaultDataModelDisplayView.xaml">
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows.Input;
|
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
|
using Artemis.UI.Shared.Events;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
using FluentAvalonia.Styling;
|
|
||||||
|
|
||||||
namespace Artemis.UI.Shared.Controls
|
namespace Artemis.UI.Shared.Controls
|
||||||
{
|
{
|
||||||
@ -18,15 +17,13 @@ namespace Artemis.UI.Shared.Controls
|
|||||||
/// Defines the <see cref="Background" /> property.
|
/// Defines the <see cref="Background" /> property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly StyledProperty<IBrush> BackgroundProperty =
|
public static readonly StyledProperty<IBrush> BackgroundProperty =
|
||||||
AvaloniaProperty.Register<SelectionRectangle, IBrush>(nameof(Background),
|
AvaloniaProperty.Register<SelectionRectangle, IBrush>(nameof(Background), new SolidColorBrush(Colors.CadetBlue, 0.25));
|
||||||
new SolidColorBrush(AvaloniaLocator.Current.GetService<FluentAvaloniaTheme>()?.CustomAccentColor ?? Colors.Transparent, 0.25));
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the <see cref="BorderBrush" /> property.
|
/// Defines the <see cref="BorderBrush" /> property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly StyledProperty<IBrush> BorderBrushProperty =
|
public static readonly StyledProperty<IBrush> BorderBrushProperty =
|
||||||
AvaloniaProperty.Register<SelectionRectangle, IBrush>(nameof(BorderBrush),
|
AvaloniaProperty.Register<SelectionRectangle, IBrush>(nameof(BorderBrush), new SolidColorBrush(Colors.CadetBlue));
|
||||||
new SolidColorBrush(AvaloniaLocator.Current.GetService<FluentAvaloniaTheme>()?.CustomAccentColor ?? Colors.Transparent));
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the <see cref="BorderBrush" /> property.
|
/// Defines the <see cref="BorderBrush" /> property.
|
||||||
@ -40,18 +37,6 @@ namespace Artemis.UI.Shared.Controls
|
|||||||
public static readonly StyledProperty<IControl?> InputElementProperty =
|
public static readonly StyledProperty<IControl?> InputElementProperty =
|
||||||
AvaloniaProperty.Register<SelectionRectangle, IControl?>(nameof(InputElement), notifying: OnInputElementChanged);
|
AvaloniaProperty.Register<SelectionRectangle, IControl?>(nameof(InputElement), notifying: OnInputElementChanged);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines the <see cref="SelectionUpdated" /> property.
|
|
||||||
/// </summary>
|
|
||||||
public static readonly StyledProperty<ICommand?> SelectionUpdatedProperty
|
|
||||||
= AvaloniaProperty.Register<SelectionRectangle, ICommand?>(nameof(SelectionUpdated));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines the <see cref="SelectionFinished" /> property.
|
|
||||||
/// </summary>
|
|
||||||
public static readonly StyledProperty<ICommand?> SelectionFinishedProperty
|
|
||||||
= AvaloniaProperty.Register<SelectionRectangle, ICommand?>(nameof(SelectionUpdated));
|
|
||||||
|
|
||||||
private Rect? _displayRect;
|
private Rect? _displayRect;
|
||||||
private IControl? _oldInputElement;
|
private IControl? _oldInputElement;
|
||||||
private Point _startPosition;
|
private Point _startPosition;
|
||||||
@ -100,21 +85,31 @@ namespace Artemis.UI.Shared.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the command to execute when the selection has been updated.
|
/// Occurs when the selection rect is being updated, indicating the user is dragging.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ICommand? SelectionUpdated
|
public event EventHandler<SelectionRectangleEventArgs>? SelectionUpdated;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when the selection has finished, indicating the user stopped dragging.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler<SelectionRectangleEventArgs>? SelectionFinished;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invokes the <see cref="SelectionUpdated" /> event
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected virtual void OnSelectionUpdated(SelectionRectangleEventArgs e)
|
||||||
{
|
{
|
||||||
get => GetValue(SelectionUpdatedProperty);
|
SelectionUpdated?.Invoke(this, e);
|
||||||
set => SetValue(SelectionUpdatedProperty, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the command to execute when the selection has finished.
|
/// Invokes the <see cref="SelectionFinished" /> event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ICommand? SelectionFinished
|
/// <param name="e"></param>
|
||||||
|
protected virtual void OnSelectionFinished(SelectionRectangleEventArgs e)
|
||||||
{
|
{
|
||||||
get => GetValue(SelectionFinishedProperty);
|
SelectionFinished?.Invoke(this, e);
|
||||||
set => SetValue(SelectionFinishedProperty, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnInputElementChanged(IAvaloniaObject sender, bool before)
|
private static void OnInputElementChanged(IAvaloniaObject sender, bool before)
|
||||||
@ -143,8 +138,7 @@ namespace Artemis.UI.Shared.Controls
|
|||||||
new Point(Math.Min(_startPosition.X, currentPosition.X), Math.Min(_startPosition.Y, currentPosition.Y)),
|
new Point(Math.Min(_startPosition.X, currentPosition.X), Math.Min(_startPosition.Y, currentPosition.Y)),
|
||||||
new Point(Math.Max(_startPosition.X, currentPosition.X), Math.Max(_startPosition.Y, currentPosition.Y))
|
new Point(Math.Max(_startPosition.X, currentPosition.X), Math.Max(_startPosition.Y, currentPosition.Y))
|
||||||
);
|
);
|
||||||
SelectionUpdated?.Execute(_displayRect.Value);
|
OnSelectionUpdated(new SelectionRectangleEventArgs(_displayRect.Value, e.KeyModifiers));
|
||||||
|
|
||||||
InvalidateVisual();
|
InvalidateVisual();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +150,7 @@ namespace Artemis.UI.Shared.Controls
|
|||||||
e.Pointer.Capture(null);
|
e.Pointer.Capture(null);
|
||||||
|
|
||||||
if (_displayRect != null)
|
if (_displayRect != null)
|
||||||
SelectionFinished?.Execute(_displayRect.Value);
|
OnSelectionFinished(new SelectionRectangleEventArgs(_displayRect.Value, e.KeyModifiers));
|
||||||
|
|
||||||
_displayRect = null;
|
_displayRect = null;
|
||||||
InvalidateVisual();
|
InvalidateVisual();
|
||||||
@ -187,7 +181,7 @@ namespace Artemis.UI.Shared.Controls
|
|||||||
public override void Render(DrawingContext drawingContext)
|
public override void Render(DrawingContext drawingContext)
|
||||||
{
|
{
|
||||||
if (_displayRect != null)
|
if (_displayRect != null)
|
||||||
drawingContext.DrawRectangle(Background, new Pen(BorderBrush, BorderThickness), _displayRect.Value);
|
drawingContext.DrawRectangle(Background, new Pen(BorderBrush, BorderThickness), _displayRect.Value, 4, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using Artemis.UI.Shared.Controls;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Input;
|
||||||
|
|
||||||
|
namespace Artemis.UI.Shared.Events
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides data on selection events raised by the <see cref="SelectionRectangle" />.
|
||||||
|
/// </summary>
|
||||||
|
public class SelectionRectangleEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of the <see cref="SelectionRectangleEventArgs" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public SelectionRectangleEventArgs(Rect rectangle, KeyModifiers keyModifiers)
|
||||||
|
{
|
||||||
|
KeyModifiers = keyModifiers;
|
||||||
|
Rectangle = rectangle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the rectangle that was selected when the event occurred.
|
||||||
|
/// </summary>
|
||||||
|
public Rect Rectangle { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the key modifiers that where pressed when the event occurred.
|
||||||
|
/// </summary>
|
||||||
|
public KeyModifiers KeyModifiers { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -112,9 +112,20 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Core": {
|
"RGB.NET.Core": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[1.0.0-prerelease1, )",
|
"requested": "[1.0.0-prerelease7, )",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "aaCPk++kr1TaV/qWYeol5975IN3XifDuuQ9wrCD+nw1cy05BMdGVhuQ72ITb0YRBedssd/btkM51ZABsBd8CEQ=="
|
"contentHash": "IIja5sC4QZ5pbSNckRCG7TlY4U6j/dRbrl4e2FZqsTGgsevaVB3IqonUQLFY1GGst4xNSl2oh0A23coXQxXGbQ=="
|
||||||
|
},
|
||||||
|
"SkiaSharp": {
|
||||||
|
"type": "Direct",
|
||||||
|
"requested": "[2.88.0-preview.178, )",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
||||||
|
"dependencies": {
|
||||||
|
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
||||||
|
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
||||||
|
"System.Memory": "4.5.3"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Avalonia.Angle.Windows.Natives": {
|
"Avalonia.Angle.Windows.Natives": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@ -522,18 +533,18 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Layout": {
|
"RGB.NET.Layout": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "nbaHbcY59tzFSeTDbImhrcR1ZyJpoC0x6WawXdtGXO7x3F91ajM7kM5SJwi/5jHdD61vGV0ARuznmR8ErAWegQ==",
|
"contentHash": "S0kfWVa8EfMOAl2WPHsq98dwaO+SNz9TWr1AtMkdo8aZuYIVhaJ1c+mSAMMnH1V+mSbxDWPHWkNzi9ITszJucA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RGB.NET.Presets": {
|
"RGB.NET.Presets": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "XU8XeI0fQF26fd0pQHgoe9RaROuvENmZlX/1QyyaN9P3j0LtYmy6ycWZbsXp8byLT0UcGbS+odMiQQAnK+kxgg==",
|
"contentHash": "NgShvOPQM0miOsdqMKjkNunngJUZMwr8KR8ME2/Ksir7wgIQfgJj1YwZy8aIj+ar7fDo6VZJZenAshs/Ul+04A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
||||||
@ -677,16 +688,6 @@
|
|||||||
"resolved": "0.5.11",
|
"resolved": "0.5.11",
|
||||||
"contentHash": "a04YHHKRK1xY8ccSgpa6HOmOw9Kuivo2b2qejp9CK00ykdCBK3Mmc+ekBx954+zPQBksN6aLhvn1SEL7QG2s8Q=="
|
"contentHash": "a04YHHKRK1xY8ccSgpa6HOmOw9Kuivo2b2qejp9CK00ykdCBK3Mmc+ekBx954+zPQBksN6aLhvn1SEL7QG2s8Q=="
|
||||||
},
|
},
|
||||||
"SkiaSharp": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "2.88.0-preview.178",
|
|
||||||
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
|
||||||
"dependencies": {
|
|
||||||
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
|
||||||
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
|
||||||
"System.Memory": "4.5.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"SkiaSharp.HarfBuzz": {
|
"SkiaSharp.HarfBuzz": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.88.0-preview.178",
|
"resolved": "2.88.0-preview.178",
|
||||||
@ -1685,14 +1686,14 @@
|
|||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"Ninject.Extensions.ChildKernel": "3.3.0",
|
"Ninject.Extensions.ChildKernel": "3.3.0",
|
||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Presets": "1.0.0-prerelease1",
|
"RGB.NET.Presets": "1.0.0-prerelease7",
|
||||||
"Serilog": "2.10.0",
|
"Serilog": "2.10.0",
|
||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
|
|||||||
@ -558,23 +558,23 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Core": {
|
"RGB.NET.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "aaCPk++kr1TaV/qWYeol5975IN3XifDuuQ9wrCD+nw1cy05BMdGVhuQ72ITb0YRBedssd/btkM51ZABsBd8CEQ=="
|
"contentHash": "IIja5sC4QZ5pbSNckRCG7TlY4U6j/dRbrl4e2FZqsTGgsevaVB3IqonUQLFY1GGst4xNSl2oh0A23coXQxXGbQ=="
|
||||||
},
|
},
|
||||||
"RGB.NET.Layout": {
|
"RGB.NET.Layout": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "nbaHbcY59tzFSeTDbImhrcR1ZyJpoC0x6WawXdtGXO7x3F91ajM7kM5SJwi/5jHdD61vGV0ARuznmR8ErAWegQ==",
|
"contentHash": "S0kfWVa8EfMOAl2WPHsq98dwaO+SNz9TWr1AtMkdo8aZuYIVhaJ1c+mSAMMnH1V+mSbxDWPHWkNzi9ITszJucA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RGB.NET.Presets": {
|
"RGB.NET.Presets": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "XU8XeI0fQF26fd0pQHgoe9RaROuvENmZlX/1QyyaN9P3j0LtYmy6ycWZbsXp8byLT0UcGbS+odMiQQAnK+kxgg==",
|
"contentHash": "NgShvOPQM0miOsdqMKjkNunngJUZMwr8KR8ME2/Ksir7wgIQfgJj1YwZy8aIj+ar7fDo6VZJZenAshs/Ul+04A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
||||||
@ -1735,14 +1735,14 @@
|
|||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"Ninject.Extensions.ChildKernel": "3.3.0",
|
"Ninject.Extensions.ChildKernel": "3.3.0",
|
||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Presets": "1.0.0-prerelease1",
|
"RGB.NET.Presets": "1.0.0-prerelease7",
|
||||||
"Serilog": "2.10.0",
|
"Serilog": "2.10.0",
|
||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
@ -1772,10 +1772,11 @@
|
|||||||
"Flurl.Http": "3.2.0",
|
"Flurl.Http": "3.2.0",
|
||||||
"Live.Avalonia": "1.3.1",
|
"Live.Avalonia": "1.3.1",
|
||||||
"Material.Icons.Avalonia": "1.0.2",
|
"Material.Icons.Avalonia": "1.0.2",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"ReactiveUI": "16.3.10",
|
"ReactiveUI": "16.3.10",
|
||||||
"ReactiveUI.Validation": "2.2.1",
|
"ReactiveUI.Validation": "2.2.1",
|
||||||
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"Splat.Ninject": "14.1.17"
|
"Splat.Ninject": "14.1.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1791,9 +1792,10 @@
|
|||||||
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
||||||
"FluentAvaloniaUI": "1.1.8",
|
"FluentAvaloniaUI": "1.1.8",
|
||||||
"Material.Icons.Avalonia": "1.0.2",
|
"Material.Icons.Avalonia": "1.0.2",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"ReactiveUI": "16.3.10",
|
"ReactiveUI": "16.3.10",
|
||||||
"ReactiveUI.Validation": "2.2.1"
|
"ReactiveUI.Validation": "2.2.1",
|
||||||
|
"SkiaSharp": "2.88.0-preview.178"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,8 +26,9 @@
|
|||||||
<PackageReference Include="Material.Icons.Avalonia" Version="1.0.2" />
|
<PackageReference Include="Material.Icons.Avalonia" Version="1.0.2" />
|
||||||
<PackageReference Include="ReactiveUI" Version="16.3.10" />
|
<PackageReference Include="ReactiveUI" Version="16.3.10" />
|
||||||
<PackageReference Include="ReactiveUI.Validation" Version="2.2.1" />
|
<PackageReference Include="ReactiveUI.Validation" Version="2.2.1" />
|
||||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease1" />
|
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease7" />
|
||||||
<PackageReference Include="RGB.NET.Layout" Version="1.0.0-prerelease1" />
|
<PackageReference Include="RGB.NET.Layout" Version="1.0.0-prerelease7" />
|
||||||
|
<PackageReference Include="SkiaSharp" Version="2.88.0-preview.178" />
|
||||||
<PackageReference Include="Splat.Ninject" Version="14.1.17" />
|
<PackageReference Include="Splat.Ninject" Version="14.1.17" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -11,13 +11,6 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
AvaloniaXamlLoader.Load(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Overrides of InputElement
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void OnPointerEnter(PointerEventArgs e)
|
protected override void OnPointerEnter(PointerEventArgs e)
|
||||||
{
|
{
|
||||||
@ -42,15 +35,9 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
base.OnPointerLeave(e);
|
base.OnPointerLeave(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
private void InitializeComponent()
|
||||||
protected override void OnPointerPressed(PointerPressedEventArgs e)
|
|
||||||
{
|
{
|
||||||
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed && ViewModel != null)
|
AvaloniaXamlLoader.Load(this);
|
||||||
ViewModel.SelectionStatus = SelectionStatus.Selected;
|
|
||||||
|
|
||||||
base.OnPointerPressed(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,7 +88,12 @@
|
|||||||
|
|
||||||
<controls:SelectionRectangle Name="SelectionRectangle"
|
<controls:SelectionRectangle Name="SelectionRectangle"
|
||||||
InputElement="{Binding #ZoomBorder}"
|
InputElement="{Binding #ZoomBorder}"
|
||||||
SelectionUpdated="{Binding UpdateSelection}" />
|
SelectionUpdated="SelectionRectangle_OnSelectionUpdated"
|
||||||
|
BorderBrush="{DynamicResource SystemAccentColor}">
|
||||||
|
<controls:SelectionRectangle.Background>
|
||||||
|
<SolidColorBrush Color="{DynamicResource SystemAccentColor}" Opacity="0.2"></SolidColorBrush>
|
||||||
|
</controls:SelectionRectangle.Background>
|
||||||
|
</controls:SelectionRectangle>
|
||||||
|
|
||||||
<Border Name="SurfaceBounds"
|
<Border Name="SurfaceBounds"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
using System.Reactive;
|
||||||
using Artemis.UI.Shared.Controls;
|
using Artemis.UI.Shared.Controls;
|
||||||
|
using Artemis.UI.Shared.Events;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.PanAndZoom;
|
using Avalonia.Controls.PanAndZoom;
|
||||||
@ -15,6 +17,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
private readonly SelectionRectangle _selectionRectangle;
|
private readonly SelectionRectangle _selectionRectangle;
|
||||||
private readonly Border _surfaceBounds;
|
private readonly Border _surfaceBounds;
|
||||||
private readonly ZoomBorder _zoomBorder;
|
private readonly ZoomBorder _zoomBorder;
|
||||||
|
private bool _dragging;
|
||||||
|
|
||||||
public SurfaceEditorView()
|
public SurfaceEditorView()
|
||||||
{
|
{
|
||||||
@ -52,15 +55,12 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_dragging = false;
|
||||||
|
|
||||||
if (e.Source is Border {Name: "SurfaceDeviceBorder"})
|
if (e.Source is Border {Name: "SurfaceDeviceBorder"})
|
||||||
{
|
{
|
||||||
e.Pointer.Capture(_zoomBorder);
|
e.Pointer.Capture(_zoomBorder);
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
ViewModel?.StartMouseDrag(e.GetPosition(_containerGrid));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ViewModel?.ClearSelection();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,14 +70,27 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (ReferenceEquals(e.Pointer.Captured, sender))
|
if (ReferenceEquals(e.Pointer.Captured, sender))
|
||||||
|
{
|
||||||
|
if (!_dragging)
|
||||||
|
ViewModel?.StartMouseDrag(e.GetPosition(_containerGrid));
|
||||||
ViewModel?.UpdateMouseDrag(e.GetPosition(_containerGrid));
|
ViewModel?.UpdateMouseDrag(e.GetPosition(_containerGrid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_dragging = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void ZoomBorder_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
|
private void ZoomBorder_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.InitialPressMouseButton != MouseButton.Left)
|
if (e.InitialPressMouseButton != MouseButton.Left)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// If the mouse didn't move, apply selection
|
||||||
|
if (!_dragging)
|
||||||
|
{
|
||||||
|
ViewModel?.SelectFirstDeviceAtPoint(e.GetPosition(_containerGrid), e.KeyModifiers.HasFlag(KeyModifiers.Shift));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ReferenceEquals(e.Pointer.Captured, sender))
|
if (ReferenceEquals(e.Pointer.Captured, sender))
|
||||||
{
|
{
|
||||||
ViewModel?.StopMouseDrag(e.GetPosition(_containerGrid));
|
ViewModel?.StopMouseDrag(e.GetPosition(_containerGrid));
|
||||||
@ -85,6 +98,11 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SelectionRectangle_OnSelectionUpdated(object? sender, SelectionRectangleEventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel?.UpdateSelection(e.Rectangle, e.KeyModifiers.HasFlag(KeyModifiers.Shift));
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateZoomBorderBackground()
|
private void UpdateZoomBorderBackground()
|
||||||
{
|
{
|
||||||
if (_zoomBorder.Background is VisualBrush visualBrush)
|
if (_zoomBorder.Background is VisualBrush visualBrush)
|
||||||
|
|||||||
@ -16,7 +16,6 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
{
|
{
|
||||||
public class SurfaceEditorViewModel : MainScreenViewModel
|
public class SurfaceEditorViewModel : MainScreenViewModel
|
||||||
{
|
{
|
||||||
private readonly IInputService _inputService;
|
|
||||||
private readonly IRgbService _rgbService;
|
private readonly IRgbService _rgbService;
|
||||||
private readonly ISettingsService _settingsService;
|
private readonly ISettingsService _settingsService;
|
||||||
private bool _saving;
|
private bool _saving;
|
||||||
@ -24,22 +23,18 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
public SurfaceEditorViewModel(IScreen hostScreen,
|
public SurfaceEditorViewModel(IScreen hostScreen,
|
||||||
IRgbService rgbService,
|
IRgbService rgbService,
|
||||||
SurfaceVmFactory surfaceVmFactory,
|
SurfaceVmFactory surfaceVmFactory,
|
||||||
IInputService inputService,
|
|
||||||
ISettingsService settingsService) : base(hostScreen, "surface-editor")
|
ISettingsService settingsService) : base(hostScreen, "surface-editor")
|
||||||
{
|
{
|
||||||
_rgbService = rgbService;
|
_rgbService = rgbService;
|
||||||
_inputService = inputService;
|
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
DisplayName = "Surface Editor";
|
DisplayName = "Surface Editor";
|
||||||
SurfaceDeviceViewModels = new ObservableCollection<SurfaceDeviceViewModel>(rgbService.Devices.Select(surfaceVmFactory.SurfaceDeviceViewModel));
|
SurfaceDeviceViewModels = new ObservableCollection<SurfaceDeviceViewModel>(rgbService.Devices.OrderBy(d => d.ZIndex).Select(surfaceVmFactory.SurfaceDeviceViewModel));
|
||||||
ListDeviceViewModels = new ObservableCollection<ListDeviceViewModel>(rgbService.Devices.Select(surfaceVmFactory.ListDeviceViewModel));
|
ListDeviceViewModels = new ObservableCollection<ListDeviceViewModel>(rgbService.Devices.OrderBy(d => d.ZIndex).Select(surfaceVmFactory.ListDeviceViewModel));
|
||||||
|
|
||||||
BringToFront = ReactiveCommand.Create<ArtemisDevice>(ExecuteBringToFront);
|
BringToFront = ReactiveCommand.Create<ArtemisDevice>(ExecuteBringToFront);
|
||||||
BringForward = ReactiveCommand.Create<ArtemisDevice>(ExecuteBringForward);
|
BringForward = ReactiveCommand.Create<ArtemisDevice>(ExecuteBringForward);
|
||||||
SendToBack = ReactiveCommand.Create<ArtemisDevice>(ExecuteSendToBack);
|
SendToBack = ReactiveCommand.Create<ArtemisDevice>(ExecuteSendToBack);
|
||||||
SendBackward = ReactiveCommand.Create<ArtemisDevice>(ExecuteSendBackward);
|
SendBackward = ReactiveCommand.Create<ArtemisDevice>(ExecuteSendBackward);
|
||||||
|
|
||||||
UpdateSelection = ReactiveCommand.Create<Rect>(ExecuteUpdateSelection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<SurfaceDeviceViewModel> SurfaceDeviceViewModels { get; }
|
public ObservableCollection<SurfaceDeviceViewModel> SurfaceDeviceViewModels { get; }
|
||||||
@ -50,8 +45,6 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
public ReactiveCommand<ArtemisDevice, Unit> SendToBack { get; }
|
public ReactiveCommand<ArtemisDevice, Unit> SendToBack { get; }
|
||||||
public ReactiveCommand<ArtemisDevice, Unit> SendBackward { get; }
|
public ReactiveCommand<ArtemisDevice, Unit> SendBackward { get; }
|
||||||
|
|
||||||
public ReactiveCommand<Rect, Unit> UpdateSelection { get; }
|
|
||||||
|
|
||||||
public double MaxTextureSize => 4096 / _settingsService.GetSetting("Core.RenderScale", 0.25).Value;
|
public double MaxTextureSize => 4096 / _settingsService.GetSetting("Core.RenderScale", 0.25).Value;
|
||||||
|
|
||||||
public void ClearSelection()
|
public void ClearSelection()
|
||||||
@ -62,6 +55,15 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
|
|
||||||
public void StartMouseDrag(Point mousePosition)
|
public void StartMouseDrag(Point mousePosition)
|
||||||
{
|
{
|
||||||
|
SurfaceDeviceViewModel? startedOn = GetViewModelAtPoint(mousePosition);
|
||||||
|
if (startedOn != null && startedOn.SelectionStatus != SelectionStatus.Selected)
|
||||||
|
{
|
||||||
|
startedOn.SelectionStatus = SelectionStatus.Selected;
|
||||||
|
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels.Where(vm => vm != startedOn))
|
||||||
|
device.SelectionStatus = SelectionStatus.None;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
foreach (SurfaceDeviceViewModel surfaceDeviceViewModel in SurfaceDeviceViewModels)
|
foreach (SurfaceDeviceViewModel surfaceDeviceViewModel in SurfaceDeviceViewModels)
|
||||||
surfaceDeviceViewModel.StartMouseDrag(mousePosition);
|
surfaceDeviceViewModel.StartMouseDrag(mousePosition);
|
||||||
}
|
}
|
||||||
@ -80,7 +82,6 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
if (_saving)
|
if (_saving)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: Figure out why the UI still locks up here
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -95,14 +96,35 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExecuteUpdateSelection(Rect rect)
|
public void SelectFirstDeviceAtPoint(Point point, bool expand)
|
||||||
|
{
|
||||||
|
SurfaceDeviceViewModel? toSelect = GetViewModelAtPoint(point);
|
||||||
|
if (toSelect != null)
|
||||||
|
toSelect.SelectionStatus = SelectionStatus.Selected;
|
||||||
|
|
||||||
|
if (!expand)
|
||||||
|
{
|
||||||
|
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels.Where(vm => vm != toSelect))
|
||||||
|
device.SelectionStatus = SelectionStatus.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplySurfaceSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
private SurfaceDeviceViewModel? GetViewModelAtPoint(Point point)
|
||||||
|
{
|
||||||
|
SKPoint hitTestPoint = point.ToSKPoint();
|
||||||
|
return SurfaceDeviceViewModels.OrderByDescending(vm => vm.Device.ZIndex).FirstOrDefault(d => d.Device.Rectangle.Contains(hitTestPoint));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateSelection(Rect rect, bool expand)
|
||||||
{
|
{
|
||||||
SKRect hitTestRect = rect.ToSKRect();
|
SKRect hitTestRect = rect.ToSKRect();
|
||||||
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels)
|
foreach (SurfaceDeviceViewModel device in SurfaceDeviceViewModels)
|
||||||
{
|
{
|
||||||
if (device.Device.Rectangle.IntersectsWith(hitTestRect))
|
if (device.Device.Rectangle.IntersectsWith(hitTestRect))
|
||||||
device.SelectionStatus = SelectionStatus.Selected;
|
device.SelectionStatus = SelectionStatus.Selected;
|
||||||
else if (!_inputService.IsKeyDown(KeyboardKey.LeftShift) && !_inputService.IsKeyDown(KeyboardKey.RightShift))
|
else if (!expand)
|
||||||
device.SelectionStatus = SelectionStatus.None;
|
device.SelectionStatus = SelectionStatus.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -136,17 +136,28 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Core": {
|
"RGB.NET.Core": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[1.0.0-prerelease1, )",
|
"requested": "[1.0.0-prerelease7, )",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "aaCPk++kr1TaV/qWYeol5975IN3XifDuuQ9wrCD+nw1cy05BMdGVhuQ72ITb0YRBedssd/btkM51ZABsBd8CEQ=="
|
"contentHash": "IIja5sC4QZ5pbSNckRCG7TlY4U6j/dRbrl4e2FZqsTGgsevaVB3IqonUQLFY1GGst4xNSl2oh0A23coXQxXGbQ=="
|
||||||
},
|
},
|
||||||
"RGB.NET.Layout": {
|
"RGB.NET.Layout": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[1.0.0-prerelease1, )",
|
"requested": "[1.0.0-prerelease7, )",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "nbaHbcY59tzFSeTDbImhrcR1ZyJpoC0x6WawXdtGXO7x3F91ajM7kM5SJwi/5jHdD61vGV0ARuznmR8ErAWegQ==",
|
"contentHash": "S0kfWVa8EfMOAl2WPHsq98dwaO+SNz9TWr1AtMkdo8aZuYIVhaJ1c+mSAMMnH1V+mSbxDWPHWkNzi9ITszJucA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SkiaSharp": {
|
||||||
|
"type": "Direct",
|
||||||
|
"requested": "[2.88.0-preview.178, )",
|
||||||
|
"resolved": "2.88.0-preview.178",
|
||||||
|
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
||||||
|
"dependencies": {
|
||||||
|
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
||||||
|
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
||||||
|
"System.Memory": "4.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Splat.Ninject": {
|
"Splat.Ninject": {
|
||||||
@ -574,10 +585,10 @@
|
|||||||
},
|
},
|
||||||
"RGB.NET.Presets": {
|
"RGB.NET.Presets": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "1.0.0-prerelease1",
|
"resolved": "1.0.0-prerelease7",
|
||||||
"contentHash": "XU8XeI0fQF26fd0pQHgoe9RaROuvENmZlX/1QyyaN9P3j0LtYmy6ycWZbsXp8byLT0UcGbS+odMiQQAnK+kxgg==",
|
"contentHash": "NgShvOPQM0miOsdqMKjkNunngJUZMwr8KR8ME2/Ksir7wgIQfgJj1YwZy8aIj+ar7fDo6VZJZenAshs/Ul+04A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1"
|
"RGB.NET.Core": "1.0.0-prerelease7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": {
|
||||||
@ -721,16 +732,6 @@
|
|||||||
"resolved": "0.5.11",
|
"resolved": "0.5.11",
|
||||||
"contentHash": "a04YHHKRK1xY8ccSgpa6HOmOw9Kuivo2b2qejp9CK00ykdCBK3Mmc+ekBx954+zPQBksN6aLhvn1SEL7QG2s8Q=="
|
"contentHash": "a04YHHKRK1xY8ccSgpa6HOmOw9Kuivo2b2qejp9CK00ykdCBK3Mmc+ekBx954+zPQBksN6aLhvn1SEL7QG2s8Q=="
|
||||||
},
|
},
|
||||||
"SkiaSharp": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "2.88.0-preview.178",
|
|
||||||
"contentHash": "arzd/44ykiBPqGWUuQqNTuJ49rhsXOg4Zw1p2Mm3B/5PZzV1wcTH4V+J+4ra8RS0KbIoy4KWeNF+zHAifNsiRg==",
|
|
||||||
"dependencies": {
|
|
||||||
"SkiaSharp.NativeAssets.Win32": "2.88.0-preview.178",
|
|
||||||
"SkiaSharp.NativeAssets.macOS": "2.88.0-preview.178",
|
|
||||||
"System.Memory": "4.5.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"SkiaSharp.HarfBuzz": {
|
"SkiaSharp.HarfBuzz": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.88.0-preview.178",
|
"resolved": "2.88.0-preview.178",
|
||||||
@ -1729,14 +1730,14 @@
|
|||||||
"Ninject": "3.3.4",
|
"Ninject": "3.3.4",
|
||||||
"Ninject.Extensions.ChildKernel": "3.3.0",
|
"Ninject.Extensions.ChildKernel": "3.3.0",
|
||||||
"Ninject.Extensions.Conventions": "3.3.0",
|
"Ninject.Extensions.Conventions": "3.3.0",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Layout": "1.0.0-prerelease1",
|
"RGB.NET.Layout": "1.0.0-prerelease7",
|
||||||
"RGB.NET.Presets": "1.0.0-prerelease1",
|
"RGB.NET.Presets": "1.0.0-prerelease7",
|
||||||
"Serilog": "2.10.0",
|
"Serilog": "2.10.0",
|
||||||
"Serilog.Sinks.Console": "4.0.0",
|
"Serilog.Sinks.Console": "4.0.0",
|
||||||
"Serilog.Sinks.Debug": "2.0.0",
|
"Serilog.Sinks.Debug": "2.0.0",
|
||||||
"Serilog.Sinks.File": "5.0.0",
|
"Serilog.Sinks.File": "5.0.0",
|
||||||
"SkiaSharp": "2.80.3",
|
"SkiaSharp": "2.88.0-preview.178",
|
||||||
"System.Buffers": "4.5.1",
|
"System.Buffers": "4.5.1",
|
||||||
"System.IO.FileSystem.AccessControl": "5.0.0",
|
"System.IO.FileSystem.AccessControl": "5.0.0",
|
||||||
"System.Numerics.Vectors": "4.5.0",
|
"System.Numerics.Vectors": "4.5.0",
|
||||||
@ -1763,9 +1764,10 @@
|
|||||||
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
"Avalonia.Xaml.Interactivity": "0.10.11.5",
|
||||||
"FluentAvaloniaUI": "1.1.8",
|
"FluentAvaloniaUI": "1.1.8",
|
||||||
"Material.Icons.Avalonia": "1.0.2",
|
"Material.Icons.Avalonia": "1.0.2",
|
||||||
"RGB.NET.Core": "1.0.0-prerelease1",
|
"RGB.NET.Core": "1.0.0-prerelease7",
|
||||||
"ReactiveUI": "16.3.10",
|
"ReactiveUI": "16.3.10",
|
||||||
"ReactiveUI.Validation": "2.2.1"
|
"ReactiveUI.Validation": "2.2.1",
|
||||||
|
"SkiaSharp": "2.88.0-preview.178"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user