Commit 6ddacb9
authored
Implement View.onHover modifier (+ HoverExample) (#212)
* Added .onHover for AppKit Backend
Added:
- onHover(_ action: (Bool) -> Void) View Extension
- OnHoverModifier TypeSafeView
- createHoverTarget(wrapping: Widget) -> Widget to AppBackend Protocol
- updateHoverTarget(_: Widget, environment: EnvironmentValues, action: (Bool) -> Void) to AppBackend Protocol
- corresponding default implementations
- AppKitBackend hover implementation
- createHoverTarget implementation
- updateHoverTarget implementation
- NSCustomHoverTarget (NSView notifying about hovers)
- HoverExample
Fixed:
- AppKitBackend
- fixed reference removing for NSClickGestureRecognizer in NSCustomTapGestureTarget
* Fixed Default Hover implementation
* Added UIKit .onHover + minor consistency improvement | fixed minor Naming fixes in AppKitBackend
- tapGestureRecognizer and longPressGestureRecognizer now get removed if their corresponding handler is set to nil.
- Added Hoverable Widget
- Added hovertarget creation & update functions
- added macCalatalyst as compatible for UISlider since it supports it
* Added UIKit .onHover + minor consistency improvement | fixed minor Naming fixes in AppKitBackend
- tapGestureRecognizer and longPressGestureRecognizer now get removed if their corresponding handler is set to nil.
- Added Hoverable Widget
- Added hovertarget creation & update functions
- added macCalatalyst as compatible for UISlider since it supports it
* added gtk4 support
* added winUI backend support
* post format_and_lint
* slight quality improvement in HoverExample
* implemented requested changes
* implemented requested changes
# Conflicts:
# Sources/GtkCodeGen/GtkCodeGen.swift
* format_and_lint
* Comment Style, Pad Action exclusion Name changed
added both "GtkPadActionDial" and "PadActionDial" because I couldn't find a definitive answer what its called
* Comment Style, Pad Action exclusion Name changed
added both "GtkPadActionDial" and "PadActionDial" because I couldn't find a definitive answer what its called
# Conflicts:
# Sources/GtkCodeGen/GtkCodeGen.swift
* requested change on gtk codegen
* I'm so sorry1 parent 38c650e commit 6ddacb9
File tree
22 files changed
+729
-218
lines changed- Examples
- Sources/HoverExample
- Sources
- AppKitBackend
- Gtk3/Generated
- GtkBackend
- GtkCodeGen
- Gtk
- Generated
- Widgets
- SwiftCrossUI
- Backend
- Views
- Modifiers/Handlers
- UIKitBackend
- WinUIBackend
22 files changed
+729
-218
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1425 | 1425 | | |
1426 | 1426 | | |
1427 | 1427 | | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1428 | 1462 | | |
1429 | 1463 | | |
1430 | 1464 | | |
| |||
1663 | 1697 | | |
1664 | 1698 | | |
1665 | 1699 | | |
1666 | | - | |
| 1700 | + | |
1667 | 1701 | | |
1668 | 1702 | | |
1669 | 1703 | | |
| |||
1678 | 1712 | | |
1679 | 1713 | | |
1680 | 1714 | | |
1681 | | - | |
| 1715 | + | |
1682 | 1716 | | |
1683 | 1717 | | |
1684 | 1718 | | |
| |||
1724 | 1758 | | |
1725 | 1759 | | |
1726 | 1760 | | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
1727 | 1806 | | |
1728 | 1807 | | |
1729 | 1808 | | |
| |||
0 commit comments