Nikita Tsukanov
be73db7beb
Dispose the renderer before detaching visuals from the tree (perf)
See https://github.com/AvaloniaUI/Avalonia/issues/3622
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
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
479d480ad9
Parameterize logger on area as well as level.
So we can filter our more logging calls early.
6 years ago
Dan Walmsley
ea2fc54590
initialise render target transparency in toplevel.
6 years ago
Dan Walmsley
730862b753
Add acrylic blur level with fallbacks to blur reported.
6 years ago
Dan Walmsley
3e7b8933b2
whitespace fixes.
6 years ago
Dan Walmsley
cfbd6991f6
always give fallback if you dont get the setting asked for.
6 years ago
Dan Walmsley
aff7815d98
HandleTransparencyChanged when Hint changes.
6 years ago
Dan Walmsley
2354db6306
take into account the requested transparency hint when setting the fallback.
6 years ago
Dan Walmsley
d1049fd79f
dont use property for setting transparency level hint.
6 years ago
Dan Walmsley
4011cb3f49
Use Hint/Actual naming
6 years ago
Dan Walmsley
58c518c573
Add Hint / Actual properties for Transparency.
6 years ago
Dan Walmsley
a30e6d8cf6
Add framework support for TopLevel transparency level.
6 years ago
Dan Walmsley
cbd89289ab
add TransparencyLevel property to TopLevel
6 years ago
Steven Kirk
42859fae89
Refactored resources.
Split resource nodes into two types:
- `IResourceHost` represents controls and `Application`
- `IResourceProvider` represents resource dictionaries and styles, these are owned by `IResourceHost`s
Dynamic resources are now always resolved from an `IResourceHost`: if an `IResourceProvider` doesn't have a host then a dynamic resource in the resource provider will not be resolved. Resource providers no longer have a `ResourcesChanged` event, instead they notify their `IResourceHost` owner of a resource change by calling the `NotifyHostedResourcesChanged` method.
6 years ago
Nikita Tsukanov
636c6800cf
Merged LostFocus to ITopLevelImpl
6 years ago
Nikita Tsukanov
8f73baf507
Ported native embedding PR to master
6 years ago
Steven Kirk
95735d239b
Measure Window to MaxAutoSizeHint.
- Renamed `MaxClientSize` to `MaxAutoSizeHint`
- On Windows get its value from `WM_GETMINMAXINFO` message
- Remove `ILayoutRoot.MaxClientSize` as it's not used any more
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
ae1475ad43
Rename IStyleRoot -> ILogicalRoot.
The root of our logical tree is denoted by `IStyleRoot` for historical reasons: before #1594 , styling was defined in `Avalonia.Styling` but the logical tree was defined in `Avalonia.Controls`. The styling system needed a root but because it was lower-level than the logical tree it had to define its own root type which was then repurposed for use by the logical tree.
Since #1594 the logical tree is defined in `Avalonia.Styling` as well so we might as well call `IStyleRoot` what it is: the logical tree root.
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
Dariusz Komosinski
b6ed3bdbae
Move invalidation function to LayoutHelper.
7 years ago
Dariusz Komosinski
7c7f6022cb
Cleanup event args locals.
7 years ago
Dariusz Komosinski
11a67d5b10
Make sure window and its children get detached from visual and logical trees when closing.
7 years ago
Dariusz Komosinski
7a13d819fd
Optimize and add new efficient visual tree extensions.
7 years ago
Steven Kirk
d600ffcb7e
Added Window.OnClosed and sealed HandleClosed.
7 years ago
Dariusz Komosinski
5814bd7163
Remove direct logging functions.
7 years ago
Steven Kirk
bd354143ca
Notify MouseDevice when TopLevel closed.
So it can remove pointerover state.
7 years ago
Nikita Tsukanov
b33601ee9b
Refactored lifetime control into separate lifetime classes
7 years ago
Dan Walmsley
e14cc277d7
dont use properties on toplevel
7 years ago
Dan Walmsley
f8f5610b8c
polish notifications
7 years ago
Dan Walmsley
ddbe82652f
allow binding of notification managers
7 years ago
Dan Walmsley
65a47c845e
set binding mode in xaml
7 years ago
Dan Walmsley
feba03d113
attempt to bind to local notification manager.
7 years ago
Dan Walmsley
962ed29bb6
remove need for seperate NotificationManager class.
7 years ago
Dan Walmsley
2b7e3db469
correctly set notification manager properties.
7 years ago
Dan Walmsley
0201f90051
add notification managers to toplevel.
7 years ago
Benedikt Schroeder
5557829950
Initial
7 years ago
Steven Kirk
81846e87ec
Added TopLevel.Opened event.
And raise the event when a window is opened.
7 years ago
Steven Kirk
4ec2b1c554
Use PixelPoint and PixelRect for device points/rects.
The affected members are:
- `IWindowBaseImpl.Position`
- `IWindowBaseImpl.PositionChanged`
- `ITopLevelImpl.PointToClient`
- `ITopLevelImpl.PointToScreen`
- `IMouseDevice.Position`
- `Screen.Bounds`
- `Screen.WorkingArea`
7 years ago
Steven Kirk
65234e8e43
Allow for null renderer.
This can happen in unit tests.
7 years ago
Steven Kirk
38a3db18cb
Added IRenderer.SceneInvalidated event.
And use this event to trigger an update of the mouse pointer-over state.
7 years ago
ahopper
7c5802efcf
change name and check invalidate rect
8 years ago
ahopper
e11af71e9f
allow for content changes with no mouse movement
8 years ago
Jeremy Koritzinsky
5fce271ff8
PR Feedback
8 years ago
Steven Kirk
0b4e6b8471
Make centralized RenderLoop.
- Renamed `RenderLoop` to `RenderTimer`
- Added new `RenderLoop` which `DeferredRenderer`s register themselves with for updates
8 years ago
Steven Kirk
fad2e317ba
Make AffectsMeasure/Arrange/Render typed.
8 years ago
Miha Markič
1524cb1aba
Spellchecks comments and members, removes unused using statements and sorts them
8 years ago