Francisco Vallarino
7e4335700c
Rename ListView to SelectList
2021-05-16 22:23:50 -03:00
Francisco Vallarino
424c8a7dcb
Rename widgetFindByPath to widgetFindBranchByPath and return full branch of node info instead of only target. Fix nested scroll focus follow issue
2021-05-15 19:30:52 -03:00
Francisco Vallarino
e92b5b5c02
Add timeField widget
2021-05-15 12:02:29 -03:00
Francisco Vallarino
7d152c3501
Add date format support to dateField
2021-05-13 23:02:26 -03:00
Francisco Vallarino
360b801f35
Improve Maybe support for dateField
2021-05-12 23:26:03 -03:00
Francisco Vallarino
07c9f6600a
Copy numericField structure to dateField. Add unit tests
2021-05-12 01:11:41 -03:00
Francisco Vallarino
a177b844f8
Add support for Maybe values on numericField
2021-05-11 22:52:58 -03:00
Francisco Vallarino
4704ae36e2
Partial commit for supporting Maybe values in numericField and dateField
2021-05-11 09:57:21 -03:00
Francisco Vallarino
c2130a2231
Add wheel support to numericField. Dragging now updates continuosly
2021-05-08 20:23:13 -03:00
Francisco Vallarino
5b66593e6e
Add combinators common to scroll, dial and slider
2021-05-08 15:57:27 -03:00
Francisco Vallarino
a535e21c61
Add whell support to dial and slider
2021-05-08 14:50:05 -03:00
Francisco Vallarino
15b243cd00
Add optional thumb to slider
2021-05-07 17:32:01 -03:00
Francisco Vallarino
bb285b8c0b
Add colorPicker unit tests
2021-05-06 23:24:16 -03:00
Francisco Vallarino
9ed7f557e7
Add externalLink unit tests
2021-05-06 22:24:31 -03:00
Francisco Vallarino
6cdc44d825
Add unit tests for slider
2021-05-06 20:02:43 -03:00
Francisco Vallarino
08d0f73630
Fix unit tests
2021-05-06 15:14:12 -03:00
Francisco Vallarino
0c6d3f67a8
Add initial external link widget
2021-05-02 16:24:30 -03:00
Francisco Vallarino
ece7dc4dda
Move ListView and Dropdown to Containers
2021-04-26 12:32:27 -03:00
Francisco Vallarino
44b6141caf
Change order of parameters in Widget methods. It should always be wenv -> node -> etc
2021-04-25 02:05:58 -03:00
Francisco Vallarino
93692d5688
Rename widgetSave to widgetGetInstanceTree
2021-04-24 17:08:06 -03:00
Francisco Vallarino
acbe8f0549
Require Eq e for Eq (WidgetRequest s e)
2021-04-24 17:00:43 -03:00
Francisco Vallarino
14753e9f0f
Remove widgetRestore, related types and logic. Remove CBOR and Serialise dependencies
2021-04-24 15:09:47 -03:00
Francisco Vallarino
9ee0ce7f86
Add compositeMergeReqs config option to Composite. Use it on Confirm
2021-04-23 23:29:09 -03:00
Francisco Vallarino
70e3e37e06
Fix test cases
2021-04-22 20:02:38 -03:00
Francisco Vallarino
e27a6391e9
Remove global/local keys, keep a single (global) kind. Restrict Container merge to local widgets only. Fix associated issues
2021-03-10 23:18:07 -03:00
Francisco Vallarino
4b543e5c86
Remove counter from widgetId/path map. Add request to remove widgetId/path entry
2021-03-09 18:48:46 -03:00
Francisco Vallarino
2ef1bde4d9
Reorganize Widgets
2021-03-06 20:41:54 -03:00
Francisco Vallarino
aaf59bdd8f
Minor renaming
2021-03-06 18:05:15 -03:00
Francisco Vallarino
2168c669e2
Add slide tests
2021-03-06 17:58:58 -03:00
Francisco Vallarino
0519d9a9e9
Add onFinished event support on fadeIn/Out
2021-03-05 17:45:54 -03:00
Francisco Vallarino
1c98483a62
Improve fadeIn/Out widget, add tests
2021-03-05 16:14:32 -03:00
Francisco Vallarino
7080808583
Return init events/requests from nodeHandleEvents_ (keep nodeHandleEvents and related as before, without returning them)
2021-03-05 16:10:34 -03:00
Francisco Vallarino
e8285d4ca2
Add support for scroll position reset
2021-03-03 14:12:50 -03:00
Francisco Vallarino
d903932e0f
Change order of window/widget initialization. Do not raise resize event on init
2021-03-02 23:26:21 -03:00
Francisco Vallarino
22bb51184e
Add overlay attribute to node info. Use it to avoid autoscrolling (some override may be needed in the future)
2021-03-02 14:31:55 -03:00
Francisco Vallarino
2781116d48
Fix issue on stack when flex was zero. Make label use flex instead of expand. Update test cases and examples
2021-02-28 20:36:54 -03:00
Francisco Vallarino
1d15bda28b
Make SendMessage receive WidgetId instead of Path. Add findByPath to WidgetEnv to allow getting node information of an arbitrary path
2021-02-27 23:26:51 -03:00
Francisco Vallarino
aab5f5dd20
Remove text prefix from combinators
2021-02-27 17:07:08 -03:00
Francisco Vallarino
2acbf30bda
Change default for trim and ellipsis to false
2021-02-27 16:42:43 -03:00
Francisco Vallarino
65132dc9fe
Default multiline text to factor = 1 instead of 0.01
2021-02-27 16:37:46 -03:00
Francisco Vallarino
ca881e3d0d
Make button use label instead of duplicating the same text handling logic
2021-02-27 16:23:03 -03:00
Francisco Vallarino
b40e1406e4
Add concept of layout direction. Use it to restore single versions of spacer/filler
2021-02-26 13:54:47 -03:00
Francisco Vallarino
403faa7310
Generalize and (somehow) simplify SizeReq relate logic
2021-02-25 22:03:01 -03:00
Francisco Vallarino
f70874f9f8
Add support for maxLines in label
2021-02-23 22:13:44 -03:00
Francisco Vallarino
cd46fe544a
Add support to change child sizeReq in box
2021-02-23 19:54:25 -03:00
Francisco Vallarino
94f2ec3387
Handle box child size with same logic as stack
2021-02-23 19:27:55 -03:00
Francisco Vallarino
e27cbc7d21
Improve label multi line support. Fixed width is no longer needed for it to work
2021-02-23 13:22:17 -03:00
Francisco Vallarino
1be5016f3c
Change resize factor default for label
2021-02-22 16:37:26 -03:00
Francisco Vallarino
5cef4eb754
Make boolean combinators have a default non-argument version and one with underscore that receives a boolean
2021-02-21 23:33:55 -03:00
Francisco Vallarino
8ffda485a7
Add support for underline, overline and throughline text styles. Refactor text handling code
2021-02-21 22:18:24 -03:00
Francisco Vallarino
6f7c27f8cb
Change default width of slider. Minor improvement to cursor glitch
2021-02-21 10:43:47 -03:00
Francisco Vallarino
a15cc0a438
Fix issue with cursor icon. Add unit tests
2021-02-19 16:25:13 -03:00
Francisco Vallarino
e8817d0bbb
Make overlay use a StyleState instead of a single color
2021-02-19 16:24:57 -03:00
Francisco Vallarino
bc822df5c3
Have both alert and confirm receive a widget as its content. Add alertMsg and confirmMsg to handle text
2021-02-18 10:51:13 -03:00
Francisco Vallarino
ef7f794a4c
Handle current focus internally using widgetId
2021-02-16 23:09:56 -03:00
Francisco Vallarino
2c8943ad2e
Make box active style consider active children items
2021-02-16 00:22:35 -03:00
Francisco Vallarino
6f7a673700
Add image loading unit tests
2021-02-11 13:11:31 -03:00
Francisco Vallarino
10867e8661
Improve testing utilities
2021-02-11 12:47:03 -03:00
Francisco Vallarino
7a332f6e02
Update button glyphs if style changed. Add tests for button and label
2021-02-10 18:00:20 -03:00
Francisco Vallarino
467f08c1e4
Add support to customize inputField default size and resize on input behavior. Do not resize on input change by default on textField/numericField
2021-02-10 17:18:28 -03:00
Francisco Vallarino
831772605b
Minor refactoring on window resize
2021-02-07 19:03:57 -03:00
Francisco Vallarino
84c4aa6df0
Add config to choose auto scroll on focus change. Defaults to True
2021-02-07 14:55:16 -03:00
Francisco Vallarino
dfff3b0954
Add option to make scroll bar overlay on top of content. Default to False
2021-02-07 12:21:51 -03:00
Francisco Vallarino
edf8c83f53
Improve todo example
2021-02-06 18:49:51 -03:00
Francisco Vallarino
416155c245
Make key generate a globak key and replace globalKey with localKey
2021-02-06 18:46:53 -03:00
Francisco Vallarino
177cebfd25
Fix WidgetModel/Serialise instances. Add more tests.
2021-02-05 12:29:35 -03:00
Francisco Vallarino
ab2104f357
Add WidgetModel typeclass, which provides a way of optionally serializing/deserializing the state of a widget
2021-02-04 23:27:26 -03:00
Francisco Vallarino
51fdd1c4a0
Change return type of widgetFindNextFocus to WidgetNodeInfo
2021-02-03 20:39:55 -03:00
Francisco Vallarino
c66263ef97
Add findWidgetByPath. Add unit tests for both findWidgetByPoint and findWidgetByPath
2021-02-03 16:36:01 -03:00
Francisco Vallarino
b67447ef43
Add option to avoid adding outer area to size req in Container and Single (main use case is tooltip, since it is non visible in place)
2021-02-02 21:11:59 -03:00
Francisco Vallarino
4fffcbc988
Avoid scissoring if not needed
2021-02-02 17:33:57 -03:00
Francisco Vallarino
ed80c5bb6d
Rename references of renderArea to viewport
2021-02-01 18:27:37 -03:00
Francisco Vallarino
99d6856ac3
Handle scrolling based on offset instead of resize of children nodes
2021-02-01 18:05:10 -03:00
Francisco Vallarino
596c423873
Add support for modifying wenv passed to children in Container. Use it to create ThemeSwitcher
2021-02-01 00:15:49 -03:00
Francisco Vallarino
0f089c603e
Put config arguments before children arguments in widgets that receive other widgets at creation time
2021-01-31 18:40:51 -03:00
Francisco Vallarino
1c7932b892
Do not save context in NanoVGRenderer actions. Instead, delegate that responsibility to consumers
2021-01-31 17:57:53 -03:00
Francisco Vallarino
8654e28066
Add transformation to Renderer
2021-01-31 15:30:16 -03:00
Francisco Vallarino
63da394281
Add unit tests for Drag & Drop
2021-01-30 17:04:52 -03:00
Francisco Vallarino
f5b21d0599
Add Drag&Drop infrastructure. Add initial versions of Draggable and DropTarget
2021-01-30 00:08:49 -03:00
Francisco Vallarino
c9de4fbd87
Add onDispose and onResize event handlers to composite
2021-01-28 19:47:56 -03:00
Francisco Vallarino
5650d21e7b
Use WidgetId in WidgetRequest instead of Path when possible. Minor code reorganization
2021-01-26 15:11:17 -03:00
Francisco Vallarino
289993f569
Accumulate requests in WidgetStep, to be able to validate them in tests (ignored by main)
2021-01-26 00:03:58 -03:00
Francisco Vallarino
273742ce1a
Handle multiple lines in tooltip
2021-01-25 22:50:03 -03:00
Francisco Vallarino
89aa1ef9c5
Add (optional) max repetitions to RenderEvery request. Improvements/additions to tooltip
2021-01-25 13:52:39 -03:00
Francisco Vallarino
7f60e3e8e5
Add tooltip widget (initial commit)
2021-01-24 16:16:04 -03:00
Francisco Vallarino
ed83cbce83
Unify integralField and floatingField into numericField. Rename to FromFractional and reduce constraints in Dial.
2021-01-24 12:23:21 -03:00
Francisco Vallarino
c05b70cdc4
Default cursor position to end for input field
2021-01-23 15:02:23 -03:00
Francisco Vallarino
dc5b4978cc
Rename modKC/modKA to reflect the expected keys, and clarify tests are written asumming macOS (it was confusing). Add clipboard test
2021-01-23 14:43:45 -03:00
Francisco Vallarino
c2fc4d56d2
Improve handling of mod keys in keystroke. Add configuration option to ignore matching children events
2021-01-23 13:56:48 -03:00
Francisco Vallarino
f64c3c7758
Add keystroke component
2021-01-22 20:15:36 -03:00
Francisco Vallarino
1e5cbae32c
Add test for visibility/focus handling when switching layers in stack/composite
2021-01-21 15:52:36 -03:00
Francisco Vallarino
af016e48c6
Add test for focus handling when switching layers in zstack. Fix issue that discarded events when resizing
2021-01-21 15:30:32 -03:00
Francisco Vallarino
eecaa4b7e3
Add node to arguments of handleEvent. Make confirm set focus to accept button if visible and focused
2021-01-21 00:25:21 -03:00
Francisco Vallarino
95bf96174b
Add onVisibleChange and onEnableChange to composite. Also add onInit, to replace the previous Maybe parameter. Update alert/confirm
2021-01-20 23:17:26 -03:00
Francisco Vallarino
3a742073a6
Rename updateSizeReq/nodeUpdateSizeReq to getSizeReq/nodeGetSizeReq in tests
2021-01-20 00:14:54 -03:00
Francisco Vallarino
9ae305496b
Add dial unit tests
2021-01-20 00:11:04 -03:00
Francisco Vallarino
9588d82ebd
Complete split tests
2021-01-19 20:09:12 -03:00
Francisco Vallarino
2d04b132ab
Initial split unit tests
2021-01-19 14:47:10 -03:00
Francisco Vallarino
51edb21f78
Fix issue when releasing drag on integral/floating field (clicks == 0 when dragging)
2021-01-19 00:31:04 -03:00
Francisco Vallarino
0f4bfe34ff
Make widgetResize return WidgetResult instead of WidgetNode
2021-01-16 15:38:48 -03:00
Francisco Vallarino
18946ef8e3
Fix split issues when sizeReq change dinamically
2021-01-16 10:57:13 -03:00
Francisco Vallarino
a5475f0e2e
Improve handling of space in split. Add vsplit.
2021-01-15 20:29:03 -03:00
Francisco Vallarino
a9502408fc
Add function to immediately render new image data
2021-01-14 14:06:44 -03:00
Francisco Vallarino
7bb3d3a454
Handle WidgetId/Path changes automatically in Single/Container
2021-01-13 18:35:56 -03:00
Francisco Vallarino
7b35e80913
Make widget tree serialization configurable
2021-01-13 14:02:45 -03:00
Francisco Vallarino
a2d926a71e
Rename getInstanceTree/restoreInstanceTree to shorter versions
2021-01-12 16:58:04 -03:00
Francisco Vallarino
0517dd7d14
Add serialization support
2021-01-12 14:34:39 -03:00
Francisco Vallarino
c746318170
Simplify state handling on Single
2021-01-12 11:43:08 -03:00
Francisco Vallarino
7282abe13c
Rename rootPath -> emptyPath
2021-01-12 10:02:24 -03:00
Francisco Vallarino
eb85a22d3b
Fix unit tests. 300!
2021-01-06 18:43:25 -03:00
Francisco Vallarino
b47d49dc10
Make hover style take precedence over focus
2021-01-04 10:07:47 -03:00
Francisco Vallarino
45f7490ead
Remove widgetUpdateSizeReq. Update sizeReq when necessary on init/merge/handleEvent/handleMessage
2021-01-03 22:01:26 -03:00
Francisco Vallarino
d11452bf8c
Temporary commit for removal of updateSizeReq
2021-01-02 11:51:23 -03:00
Francisco Vallarino
92d10fea73
Fix unit tests
2021-01-01 14:27:25 -03:00
Francisco Vallarino
19595aee5d
Improve handling of lower layers in zstack. Add option to ignore events in a container
2020-12-29 14:07:15 -03:00
Francisco Vallarino
acff0fffd4
Make zstack handle mouse according to used regions. Make stack adjust its size to its content. Simplify related settings
2020-12-28 23:00:25 -03:00
Francisco Vallarino
babbd865bd
Add UpdateWidgetId request, handle it in Handlers/WidgetTask
2020-12-27 22:12:24 -03:00
Francisco Vallarino
a13da072bd
Add concept of WidgetId. Handle updates in Composite/Container
2020-12-27 00:37:50 -03:00
Francisco Vallarino
d49a29e4be
Add scroll resize test. Add pending value drag tests for integralField. Complete original testing plan
2020-12-26 17:03:03 -03:00
Francisco Vallarino
35e2431ca9
Fix multi blur issue on dropdown. Update composite test to account for correct initial path
2020-12-26 16:31:32 -03:00
Francisco Vallarino
723bcb4e84
Add dropdown tests
2020-12-26 15:21:21 -03:00
Francisco Vallarino
c726c835af
Re enable pending tests. Add handleMessage test in composite
2020-12-25 23:18:12 -03:00
Francisco Vallarino
91d1edd564
Add unit tests to inputField dragging. Add typeclass for dragRate
2020-12-25 22:34:16 -03:00
Francisco Vallarino
a69ad00e76
Fix two unit tests
2020-12-25 01:27:43 -03:00
Francisco Vallarino
58cd92a40b
Refactor event preprocessing logic (move from Core to Handlers). Add text selection unit tests
2020-12-22 18:23:01 -03:00
Francisco Vallarino
a597abd96d
Add support for cutting text
2020-12-20 20:54:54 -03:00
Francisco Vallarino
323db8f1df
Text clipboard related actions. Initialize SDL for tests
2020-12-20 20:10:08 -03:00
Francisco Vallarino
d4e6cc3d9d
Fix inputField history handling not setting model. Add unit tests. Fix inverted clipboard handling from previous commit. Refactor
2020-12-20 16:56:06 -03:00
Francisco Vallarino
1963bd38e7
Fix unit tests
2020-12-19 16:37:11 -03:00
Francisco Vallarino
64712dc96e
Provide wenv parameter to Composites handleEvent
2020-12-18 00:57:02 -03:00
Francisco Vallarino
15261c3df8
Fix unit tests. Remove hedgehog-classes dependency and related utilities module
2020-12-18 00:22:29 -03:00
Francisco Vallarino
c97dce766c
Set focus when ButtonAction (PressedBtn) is received, not on click (most applications/OS follow this pattern)
2020-12-15 14:38:05 -03:00
Francisco Vallarino
e9da76f812
Go back to old widgetUpdateSizeReq signature
2020-12-13 21:13:59 -03:00
Francisco Vallarino
b2343816dc
Fix size/location issue on dropdown after resize. Add missing strictness annotations (fixes the issue of dropdown list not being evaluated until shown, causing it to be evaluated multiple times at once)
2020-12-08 13:37:58 -03:00
Francisco Vallarino
a8b1aa25b3
Add missing file changes
2020-12-07 23:21:12 -03:00
Francisco Vallarino
7d69207d86
Rename WidgetInstance to WidgetNodeInfo. Rename lenses, and most inst/Inst references to info/Info
2020-12-07 23:17:04 -03:00
Francisco Vallarino
04b8ba09bd
Fix issue of hovering while dragging a different widget
2020-12-07 14:24:58 -03:00
Francisco Vallarino
14b92e0636
Restore globalKeys
2020-12-07 09:14:25 -03:00
Francisco Vallarino
c002b59833
Revert "Add WidgetModel/WidgetEvent type aliases. Add widgetNode to WidgetInstanceNode. Update all widgets"
...
This reverts commit 3b7a90f9be
.
2020-12-07 00:54:39 -03:00
Francisco Vallarino
918b865d48
Revert "Add globalKeys handling"
...
This reverts commit d8c40972dc
.
2020-12-07 00:54:28 -03:00
Francisco Vallarino
d8c40972dc
Add globalKeys handling
2020-12-07 00:48:19 -03:00
Francisco Vallarino
3b7a90f9be
Add WidgetModel/WidgetEvent type aliases. Add widgetNode to WidgetInstanceNode. Update all widgets
2020-12-06 23:05:37 -03:00
Francisco Vallarino
34f1e95c3a
Revert "Modify WidgetResult so it provides finer grained control over what is allowed to be changed"
...
This reverts commit 9730e451b0
.
Reverted since getSizeReq/resize still return WidgetNode and it's not easy to change. The benefits of this changeset are also limited
2020-12-06 17:46:32 -03:00
Francisco Vallarino
9730e451b0
Modify WidgetResult so it provides finer grained control over what is allowed to be changed
2020-12-06 17:46:28 -03:00
Francisco Vallarino
71bdb05f7c
Revert "Use list instead of Sequence for WidgetResult"
...
This reverts commit 28ee370d02
.
2020-12-05 22:55:12 -03:00
Francisco Vallarino
28ee370d02
Use list instead of Sequence for WidgetResult
2020-12-05 19:49:00 -03:00
Francisco Vallarino
f717827969
Add WidgetNode type. Replace usage of WidgetInstance with WidgetNode (in some cases, temporarily). Rename inst/Inst to node/Node
2020-12-05 16:47:19 -03:00
Francisco Vallarino
954d48ac38
Have Container use local keys instead of global (temporary change, later global will also be considered)
2020-12-03 23:47:13 -03:00
Francisco Vallarino
c5b2a7721e
Add WidgetSizeReq type, update widgetUpdateSizeReq signature (now widgetGetSizeReq)
2020-12-03 15:12:40 -03:00
Francisco Vallarino
e3b9193906
Reorder fields in WidgetResult, rename helper functions
2020-12-02 23:59:12 -03:00