Dan Walmsley
0148106f54
Seperate RenderScaling from DesktopScaling.
6 years ago
Steven Kirk
2807cbe6cb
Make LayoutManager disposable.
And dispose it on `TopLevel` close: this allows layout passes to be run before a window/popup is shown but prevents it being run after close.
6 years ago
Steven Kirk
d3c3741bec
No longer need to pass root to ExecuteInitialLayoutPass.
6 years ago
Steven Kirk
7694fc0484
Don't run layout passes on hidden TopLevels.
To do this we need to pass the root to `LayoutManager`.
Fixes #4161
6 years ago
Steven Kirk
4d01dacd77
Remove copyright headers.
Some of our files had them, some didn't. They serve no purpose legally so best to remove the ceremony.
6 years ago
Steven Kirk
119a975610
Handle adding/removing application styles.
6 years ago
Steven Kirk
a70da659f6
Reafactor logical tree attach/detach events.
- When detaching set `Parent` to `null` before raising the `DetachedFromLogicalTree` event
- To do this, we need to store the logical root in the control so that e.g. a child control can be detached in a `DetachedFromLogicalTree` handler
- Add `Source` and `Parent` properties to `LogicalTreeAttachmentEventArgs` to give more context on what caused the attachment/detachment
6 years ago
Steven Kirk
fb173b30e2
Send keypresses to toplevel if no focused control.
- Added `IInputRoot Root` property to `RawInputEventArgs`
- Removed `InputRoot` and `Root` properties from `RawDragEvent` and `RawPointerEvent` as its now in the base class
- `InputRoot` in `RawDragEvent` was incorrectly using the type `IInputElement` instead of `IInputRoot`, fix callers that were using the wrong type
- Pass the input root to all raw input event constructors
- If no control is focused in `KeyboardDevice.ProcessRawEvent` then raise the event on the root
7 years ago
Steven Kirk
d7357ec876
Remove ContentControlMixin.
And implement the functionality in the content controls themselves. `ContentControlMixin` was too complex and even with its complexity had bugs (such as in #2821 ). By moving the functionality to the content controls there is some repeated code but it's much more straightforward.
7 years ago
Steven Kirk
bd354143ca
Notify MouseDevice when TopLevel closed.
So it can remove pointerover state.
7 years ago
Nikita Tsukanov
3d4a2781b0
Switched key events to use KeyModifiers
7 years ago
Nikita Tsukanov
1ab923c02e
Removed WithNameScope
7 years ago
Nikita Tsukanov
fa55755b71
Manually handle name scope registrations
7 years ago
Nikita Tsukanov
b33601ee9b
Refactored lifetime control into separate lifetime classes
7 years ago
Benedikt Schroeder
5557829950
Initial
7 years ago
Steven Kirk
e54f48b63c
React to application resources changing.
9 years ago
Steven Kirk
a232b137b5
Allow reuse of existing tooltip popup.
To do this, had to fix a problem where templated children weren't notified of being re-attached to a logical tree.
9 years ago
Nikita Tsukanov
eb6bfd3de8
Moved layout manager from service locator to ILayoutRoot
9 years ago
Steven Kirk
4e719262c4
Make WindowBase.IsVisible return correct value.
`WindowBase.IsVisible` now tracks the visibility of the window. Still
needs to call `Show` and `Hide` when changed.
9 years ago
Nikita Tsukanov
886a65beaa
Use dotnet test for layout and controls tests
9 years ago
Nikita Tsukanov
026c943055
Fixed tests
9 years ago
Nikita Tsukanov
d17b32d7bd
Fixed tests
9 years ago
Steven Kirk
6d3ca92a4c
WIP: Getting resizing working.
9 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
015054a8fd
Added a pre-process hook to InputManager,
And some documentation.
10 years ago
Jeremy Koritzinsky
eea178500a
Added test and fixed implementation.
10 years ago
Steven Kirk
a03dad9bab
Removed a bunch of unused members/classes.
10 years ago
Steven Kirk
9a0df79ec5
Use UnitTestApplication in some more places.
Also removed service registration from some tests that now don't require
it.
10 years ago
Steven Kirk
b1f0ac8c97
Revert "Added InputRoot to all raw input events."
This reverts commit ae747c6dc7 .
10 years ago
Steven Kirk
1cd7f46315
Revert "Added InputRoot to all raw input events."
This reverts commit ae747c6dc7 .
10 years ago
Steven Kirk
ae747c6dc7
Added InputRoot to all raw input events.
10 years ago
Steven Kirk
93b4d810b9
Moved scaling to per-window.
Always returning a scaling factor of 1 currently.
10 years ago
Steven Kirk
5489487131
Make LayoutManager global.
Also made a few other changes along the way:
- Add MaxClientSize to ILayoutRoot
- Store IRenderRoot in Visual and use that to calculate
IsAttachedToVisualTree
- Make Affects* methods take multiple properties
10 years ago
Steven Kirk
e85178e0c5
Unwrap TargetInvocationExceptions.
Calling Delegate.DynamicInvoke wraps any exception - we want to expose
the actual exception to callers.
10 years ago
Steven Kirk
c810f95904
Don't ApplyTemplate on nested templated controls...
...during ApplyTemplate. This was so that ItemsControls could their find
ItemsPresenters nested in other templated controls. Instead use
IItemsPresenterHost to make the presenter register itself with its
TemplatedParent.
10 years ago
Steven Kirk
01417ba883
Renamed ControlTemplate -> FuncControlTemplate
11 years ago
Steven Kirk
663e760fda
Throw exception if TopLevel added as child.
Closes #262 .
11 years ago
Nikita Tsukanov
a61fdc86b2
Removed IPlatformThreadingInterface mock since it's broken anyway
11 years ago
Nikita Tsukanov
c8e617231c
Moved render-related code from TopLevel to a separate class
(needed for wm stuff)
11 years ago
Nikita Tsukanov
79f8f76351
ref #198
11 years ago
Nikita Tsukanov
323c1a49c1
Removed core dependency on Splat
11 years ago
Nikita Tsukanov
01e2c90bc5
Removed this.
11 years ago
Steven Kirk
145411020b
Ran .net core code formatter.
11 years ago
Steven Kirk
6151aef188
Removed file headers.
11 years ago
Nikita Tsukanov
f0e154ac90
ModifierKeys are now stored inside events
Ceterum censeo StyleCopum esse delendum
11 years ago
Nikita Tsukanov
70dcfd652a
Now using TextInput event, WM_CHAR and GtkIMContext
11 years ago
Steven Kirk
d11d779414
Trying to fix capitalization of tests and docs AGAIN.
11 years ago
Steven Kirk
1a2fba4798
Revert "Fixed casing of Docs and Tests directories."
This reverts commit 845b28a2c2 .
11 years ago
Steven Kirk
845b28a2c2
Fixed casing of Docs and Tests directories.
11 years ago
Steven Kirk
18682a74f7
Use client size for top-level arrange.
Fixes #23 .
11 years ago