David Vanderson
c36324433e
textEntry: show cursor at end of line with newline
2023-05-22 16:30:00 -04:00
David Vanderson
0274be1ded
horizontal scrolling: first parts
2023-05-22 09:45:51 -04:00
David Vanderson
f9436d475d
remove workaround for sdl bug
2023-05-22 09:45:28 -04:00
David Vanderson
f5ef8f43ab
cueFrame() -> refresh()
2023-05-16 16:39:19 -04:00
David Vanderson
4e9739a1b1
cleanup
2023-05-16 16:33:50 -04:00
David Vanderson
36eaf9e8b3
slider: don't use ButtonWidget
2023-05-16 15:55:16 -04:00
David Vanderson
1b6208e062
vertical sliders
2023-05-16 11:54:06 -04:00
David Vanderson
5f7fde489c
TextEntry: move cursor with arrow keys
2023-05-15 22:00:42 -04:00
David Vanderson
aad4190019
demo: add TextEntry example and fix scroll to cursor
2023-05-14 22:01:09 -04:00
David Vanderson
a5952d9c67
toastInfo() -> toast() and use options struct for args
2023-05-10 16:24:37 -04:00
David Vanderson
6e04eb4f48
fix bug where toasts were not sticking above their parent window
2023-05-10 14:16:40 -04:00
David Vanderson
cfb1eb29cf
move id_extra inside Options
2023-05-10 13:51:54 -04:00
David Vanderson
a8aad2a2cb
exempt mouse wheel events from mouse capture
...
This allows scrolling with the wheel while dragging to select text in a
TextLayoutWidget.
2023-05-10 08:44:30 -04:00
David Vanderson
9405912ccc
add bubbling arg to processEvents()
...
ScrollContainerWidget needs this so it can handle up/down key press
either when being bubbled from a child widget or if it has keyboard
focus.
2023-05-09 23:32:27 -04:00
David Vanderson
70f449016e
scrollBar: add focus target
...
When you click on a scrollbar, you want to focus a different widget,
usually the scrollContainer but sometimes a parent (like
TextEntryWidget).
2023-05-09 17:13:27 -04:00
David Vanderson
1211475cdc
textEntry: draw the cursor ourselves instead of in TextLayout
2023-05-09 15:37:32 -04:00
David Vanderson
5107b1616b
textLayout: show in demo how to be able to click on corner widgets
2023-05-09 14:36:21 -04:00
David Vanderson
d66e6cc381
textEntry: text insertion and backspace working
2023-05-09 11:09:23 -04:00
David Vanderson
229f37974f
strip(): expand and gravity should be reset
2023-05-06 22:49:57 -04:00
David Vanderson
95a240ef8e
textEntry: working on using textLayout under the hood
2023-05-06 22:49:36 -04:00
David Vanderson
ddd0e09148
EventIterator: add separate capture_id parameter
...
This lets a compound widget's top-most widget get all events and forward
them to an internal widget even when the internal widget captures the
mouse.
2023-05-06 22:46:56 -04:00
David Vanderson
4fbd5cb7d8
use event_num instead of EventIterator to focus remaining events
...
This way we don't have to pass the EventIterator all over the place.
Instead each normal Event gets an incrementing num value. Then to focus
remaining events we focus any events that have a larger num than the
event that caused the focus.
2023-05-05 11:07:51 -04:00
David Vanderson
9caedc4d0f
fold bubbleEvent into processEvent
2023-05-04 23:21:32 -04:00
David Vanderson
0a4c738435
move event types inside Event
2023-05-04 21:34:34 -04:00
David Vanderson
3d48a4b43a
textLayout: fix scrolling by using local coords
...
Storing screen coords for local stuff is wrong, because when a scroll happens
they are no longer correct.
2023-05-04 11:52:05 -04:00
David Vanderson
f6012cd31a
textLayout: shift-up/down use new ScrollTo bubble event to scroll
2023-05-04 08:39:27 -04:00
David Vanderson
5ba3150af9
textLayout: fix shift-up/down when text is zoomed
2023-05-04 08:17:27 -04:00
David Vanderson
597790ab2d
textSizeEx: add option to stop at nearest glyph
2023-05-03 20:44:17 -04:00
David Vanderson
01e7dba38b
textLayout: shift-up/down search in middle of line, auto addTextDone
2023-05-03 20:16:49 -04:00
David Vanderson
f2cc1cbbb4
textLayout: shift-up/down moves selection up and down lines
2023-05-03 20:07:30 -04:00
David Vanderson
53fc67ea7c
rework KeyEvent so you can switch on code or action
2023-05-02 22:18:53 -04:00
David Vanderson
9b0ccad8fb
textLayout: changing selection moves cursor
2023-05-02 21:15:14 -04:00
David Vanderson
2916223023
textLayout: render cursor
2023-05-01 22:19:29 -04:00
David Vanderson
036f31da2e
floatingWindow - change to use options struct
2023-05-01 13:39:21 -04:00
David Vanderson
dd68303d8c
rename CursorKind to Cursor
2023-04-28 12:38:29 -04:00
David Vanderson
d472f7c048
rename some dialog stuff, make built-in dialog more useful
2023-04-28 12:19:36 -04:00
David Vanderson
dad5120ea9
detect when a widget id is reused - debug message and highlight
2023-04-28 12:17:58 -04:00
David Vanderson
45f88a87a1
scrolling by dragging will scroll all the way
2023-04-27 11:45:09 -04:00
David Vanderson
7a0bab775a
deduplicate RectScale rectToScreen logic
2023-04-27 11:32:11 -04:00
David Vanderson
abf8b51ebd
dialogOk: use options struct
2023-04-27 11:01:54 -04:00
David Vanderson
592a8da8c2
extend selection background down if text was snapped down to pixel
2023-04-27 10:59:44 -04:00
David Vanderson
7e33f63be5
dragging a text layout to scroll will continuously scroll
...
Needs a better api but unsure if injecting events will be a bigger thing
than just this. Will run with this hacky solution for now.
2023-04-26 22:00:51 -04:00
David Vanderson
da099e8b2d
renderText: fix (for real) gap between multiple selected lines
2023-04-26 22:00:01 -04:00
David Vanderson
1cddf3df0a
renderText: fix gap between selected lines due to pixel snapping
2023-04-26 21:11:49 -04:00
David Vanderson
ca2a220386
animation rate assumes at least 1 microsecond between frames
2023-04-26 21:01:40 -04:00
David Vanderson
2472c07106
mouse dragging a widget can scroll a containing scrollarea
2023-04-26 20:49:03 -04:00
David Vanderson
f34a6aa612
textlayout: can use mouse to select text
2023-04-26 15:17:21 -04:00
David Vanderson
aef8cd0e23
renderText: can highlight selected text
2023-04-25 22:30:54 -04:00
David Vanderson
c97274819b
spread ?*Window first arg pattern to toasts and dataSet/Get
...
Window.end() shows any toasts with null subwindow_id
2023-04-24 22:38:00 -04:00
David Vanderson
1882fa6057
fix dialogOk to work from non gui thread, update examples
2023-04-16 21:47:58 -04:00