@@ -758,7 +758,21 @@ protected virtual Rect GetViewRect()
758
758
return viewRect ;
759
759
}
760
760
761
+ /// <inheritdoc />
761
762
bool IRenderWebBrowser . GetScreenPoint ( int viewX , int viewY , out int screenX , out int screenY )
763
+ {
764
+ return GetScreenPoint ( viewX , viewY , out screenX , out screenY ) ;
765
+ }
766
+
767
+ /// <summary>
768
+ /// Called to retrieve the translation from view coordinates to actual screen coordinates.
769
+ /// </summary>
770
+ /// <param name="viewX">x</param>
771
+ /// <param name="viewY">y</param>
772
+ /// <param name="screenX">screen x</param>
773
+ /// <param name="screenY">screen y</param>
774
+ /// <returns>Return true if the screen coordinates were provided.</returns>
775
+ protected virtual bool GetScreenPoint ( int viewX , int viewY , out int screenX , out int screenY )
762
776
{
763
777
screenX = 0 ;
764
778
screenY = 0 ;
@@ -779,6 +793,12 @@ bool IRenderWebBrowser.GetScreenPoint(int viewX, int viewY, out int screenX, out
779
793
return true ;
780
794
}
781
795
796
+ /// <inheritdoc />
797
+ bool IRenderWebBrowser . StartDragging ( IDragData dragData , DragOperationsMask allowedOps , int x , int y )
798
+ {
799
+ return StartDragging ( dragData , allowedOps , x , y ) ;
800
+ }
801
+
782
802
/// <summary>
783
803
/// Called when the user starts dragging content in the web view.
784
804
/// OS APIs that run a system message loop may be used within the StartDragging call.
@@ -790,7 +810,7 @@ bool IRenderWebBrowser.GetScreenPoint(int viewX, int viewY, out int screenX, out
790
810
/// <param name="x">is the drag start location in screen coordinates</param>
791
811
/// <param name="y">is the drag start location in screen coordinates</param>
792
812
/// <returns>Return true to handle the drag operation.</returns>
793
- bool IRenderWebBrowser . StartDragging ( IDragData dragData , DragOperationsMask allowedOps , int x , int y )
813
+ protected virtual bool StartDragging ( IDragData dragData , DragOperationsMask allowedOps , int x , int y )
794
814
{
795
815
var dataObject = new DataObject ( ) ;
796
816
@@ -833,6 +853,7 @@ bool IRenderWebBrowser.StartDragging(IDragData dragData, DragOperationsMask allo
833
853
return true ;
834
854
}
835
855
856
+ /// <inheritdoc />
836
857
void IRenderWebBrowser . UpdateDragCursor ( DragOperationsMask operation )
837
858
{
838
859
UpdateDragCursor ( operation ) ;
@@ -847,13 +868,7 @@ protected virtual void UpdateDragCursor(DragOperationsMask operation)
847
868
currentDragDropEffects = operation . GetDragEffects ( ) ;
848
869
}
849
870
850
- /// <summary>
851
- /// Called when an element has been rendered to the shared texture handle.
852
- /// This method is only called when <see cref="IWindowInfo.SharedTextureEnabled"/> is set to true
853
- /// </summary>
854
- /// <param name="type">indicates whether the element is the view or the popup widget.</param>
855
- /// <param name="dirtyRect">contains the set of rectangles in pixel coordinates that need to be repainted</param>
856
- /// <param name="sharedHandle">is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method.</param>
871
+ /// <inheritdoc />
857
872
void IRenderWebBrowser . OnAcceleratedPaint ( PaintElementType type , Rect dirtyRect , IntPtr sharedHandle )
858
873
{
859
874
OnAcceleratedPaint ( type == PaintElementType . Popup , dirtyRect , sharedHandle ) ;
@@ -871,14 +886,7 @@ protected virtual void OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr s
871
886
RenderHandler ? . OnAcceleratedPaint ( isPopup , dirtyRect , sharedHandle ) ;
872
887
}
873
888
874
- /// <summary>
875
- /// Called when an element should be painted.
876
- /// </summary>
877
- /// <param name="type">indicates whether the element is the view or the popup widget.</param>
878
- /// <param name="dirtyRect">contains the set of rectangles in pixel coordinates that need to be repainted</param>
879
- /// <param name="buffer">The bitmap will be will be width * height *4 bytes in size and represents a BGRA image with an upper-left origin</param>
880
- /// <param name="width">width</param>
881
- /// <param name="height">height</param>
889
+ /// <inheritdoc />
882
890
void IRenderWebBrowser . OnPaint ( PaintElementType type , Rect dirtyRect , IntPtr buffer , int width , int height )
883
891
{
884
892
OnPaint ( type == PaintElementType . Popup , dirtyRect , buffer , width , height ) ;
@@ -918,11 +926,17 @@ protected virtual void OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int
918
926
RenderHandler ? . OnPaint ( isPopup , dirtyRect , buffer , width , height , img ) ;
919
927
}
920
928
929
+ /// <inheritdoc />
930
+ void IRenderWebBrowser . OnPopupSize ( Rect rect )
931
+ {
932
+ OnPopupSize ( rect ) ;
933
+ }
934
+
921
935
/// <summary>
922
936
/// Sets the popup size and position.
923
937
/// </summary>
924
938
/// <param name="rect">The popup rectangle (size and position).</param>
925
- void IRenderWebBrowser . OnPopupSize ( Rect rect )
939
+ protected virtual void OnPopupSize ( Rect rect )
926
940
{
927
941
UiThreadRunAsync ( ( ) => SetPopupSizeAndPositionImpl ( rect ) ) ;
928
942
}
@@ -932,17 +946,32 @@ void IRenderWebBrowser.OnPopupSize(Rect rect)
932
946
/// </summary>
933
947
/// <param name="isOpen">if set to <c>true</c> [is open].</param>
934
948
void IRenderWebBrowser . OnPopupShow ( bool isOpen )
949
+ {
950
+ OnPopupShow ( isOpen ) ;
951
+ }
952
+
953
+ /// <summary>
954
+ /// Sets the popup is open.
955
+ /// </summary>
956
+ /// <param name="isOpen">if set to <c>true</c> [is open].</param>
957
+ protected virtual void OnPopupShow ( bool isOpen )
935
958
{
936
959
UiThreadRunAsync ( ( ) => { popupImage . Visibility = isOpen ? Visibility . Visible : Visibility . Hidden ; } ) ;
937
960
}
938
961
962
+ /// <inheritdoc />
963
+ void IRenderWebBrowser . OnCursorChange ( IntPtr handle , CursorType type , CursorInfo customCursorInfo )
964
+ {
965
+ OnCursorChange ( handle , type , customCursorInfo ) ;
966
+ }
967
+
939
968
/// <summary>
940
969
/// Sets the cursor.
941
970
/// </summary>
942
971
/// <param name="handle">The handle.</param>
943
972
/// <param name="type">The type.</param>
944
973
/// <param name="customCursorInfo">custom cursor information</param>
945
- void IRenderWebBrowser . OnCursorChange ( IntPtr handle , CursorType type , CursorInfo customCursorInfo )
974
+ protected virtual void OnCursorChange ( IntPtr handle , CursorType type , CursorInfo customCursorInfo )
946
975
{
947
976
//Custom cursors are handled differently, for now keep standard ones executing
948
977
//in an async fashion
@@ -966,6 +995,7 @@ void IRenderWebBrowser.OnCursorChange(IntPtr handle, CursorType type, CursorInfo
966
995
}
967
996
}
968
997
998
+ /// <inheritdoc />
969
999
void IRenderWebBrowser . OnImeCompositionRangeChanged ( Range selectedRange , Rect [ ] characterBounds )
970
1000
{
971
1001
OnImeCompositionRangeChanged ( selectedRange , characterBounds ) ;
@@ -985,6 +1015,7 @@ protected virtual void OnImeCompositionRangeChanged(Range selectedRange, Rect[]
985
1015
}
986
1016
}
987
1017
1018
+ /// <inheritdoc />
988
1019
void IRenderWebBrowser . OnVirtualKeyboardRequested ( IBrowser browser , TextInputMode inputMode )
989
1020
{
990
1021
OnVirtualKeyboardRequested ( browser , inputMode ) ;
@@ -1077,7 +1108,7 @@ partial void OnAfterBrowserCreated(IBrowser browser)
1077
1108
}
1078
1109
} ) ;
1079
1110
1080
- if ( initialFocus )
1111
+ if ( initialFocus )
1081
1112
{
1082
1113
browser . GetHost ( ) ? . SendFocusEvent ( true ) ;
1083
1114
}
0 commit comments