Skip to content

Commit 0e4ad11

Browse files
committed
Added SciterAPIHost.ScrollToElement
1 parent b65d683 commit 0e4ad11

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/EmptyFlow.SciterAPI/Client/HostElementAPI.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ public void SetElementStyleProperty ( nint element, string name, string value )
172172

173173
public void UpdateElement ( nint element, bool forceRender ) => m_basicApi.SciterUpdateElement ( element, forceRender );
174174

175+
public void ScrollToElement ( nint element, SciterScrollFlags scrollPosition ) => m_basicApi.SciterScrollToView ( element, (uint) scrollPosition );
176+
175177
}
176178

177179
}

src/EmptyFlow.SciterAPI/EmptyFlow.SciterAPI.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
WindowEventHandler now obsolete, it redundant class please use SciterEventHandler instead in all cases
2828
SciterAPIHost.AddWindowEventHandler added argument behaviours for change tracked behaviours
2929
SciterAPIHost.UpdateElement for (re)render element
30+
SciterAPIHost.ScrollToElement scroll to element
3031
Fixed issue in showing different from main window
3132
</PackageReleaseNotes>
3233
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace EmptyFlow.SciterAPI.Enums {
2+
3+
[Flags]
4+
public enum SciterScrollFlags : uint { // original SCITER_SCROLL_FLAGS
5+
6+
ScrollToTop = 0x01, // SCROLL_TO_TOP
7+
8+
ScrollSmooth = 0x10, // SCROLL_SMOOTH
9+
10+
};
11+
12+
}

0 commit comments

Comments
 (0)