forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support for TextBox.Paste and PasswordBox.Paste on GTK
- Loading branch information
1 parent
d174ff9
commit e58e5bc
Showing
6 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#nullable enable | ||
|
||
using Gtk; | ||
using Windows.UI.Xaml.Controls; | ||
|
||
namespace Uno.UI.Runtime.Skia.Gtk.UI.Controls; | ||
|
||
internal class UnoGtkEntry : Entry | ||
{ | ||
protected override void OnClipboardPasted() | ||
{ | ||
var args = new TextControlPasteEventArgs(); | ||
Paste?.Invoke(this, args); | ||
if (!args.Handled) | ||
{ | ||
base.OnClipboardPasted(); | ||
} | ||
} | ||
|
||
public event TextControlPasteEventHandler? Paste; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#nullable enable | ||
|
||
using Gtk; | ||
using Windows.UI.Xaml.Controls; | ||
|
||
namespace Uno.UI.Runtime.Skia.Gtk.UI.Controls; | ||
internal class UnoGtkTextView : TextView | ||
{ | ||
protected override void OnPasteClipboard() | ||
{ | ||
var args = new TextControlPasteEventArgs(); | ||
Paste?.Invoke(this, args); | ||
if (!args.Handled) | ||
{ | ||
base.OnPasteClipboard(); | ||
} | ||
} | ||
|
||
public event TextControlPasteEventHandler? Paste; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters