Elias Naur
0316a27a45
apps/gophers: add editor hint
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-01 13:38:02 +02:00
Elias Naur
d720fa6233
ui/text: add Hint and HintImage to Editor
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-07-01 13:36:54 +02:00
Elias Naur
0546683720
ui/text: add LayoutOptions
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-30 23:58:05 +02:00
Elias Naur
28f53d8708
ui/text: add Label.MaxLines
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-30 23:51:11 +02:00
Elias Naur
3092a72089
apps/gophers: update to latest gioui.org/ui
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-27 12:47:33 +02:00
Elias Naur
ef9384ceee
ui/layout: allow one-line initialization of Flex and Stack
...
Returning itself from the Init methods allows the client to
initialize the layout instance on one line.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-27 12:44:15 +02:00
Elias Naur
bf96bb8bdd
cmd: update to latest gioui.org/ui version
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-22 17:38:25 +02:00
Elias Naur
4f94f1078a
ui/gesture: rename Scroller.Update to Scroller.Scroll
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-22 17:36:57 +02:00
Elias Naur
bebfd822d8
ui/gesture: convert Click to single step events for symmetry
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-22 17:33:29 +02:00
Elias Naur
b94119d093
cmd: update to latest API
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 17:15:44 +02:00
Elias Naur
0b6dd4efd9
ui: change events to have "Event" suffixed, not prefixed
...
Match the Go error naming convention (FooError).
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 17:14:16 +02:00
Elias Naur
de5d5e19f5
cmd: update to latest API
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 17:03:31 +02:00
Elias Naur
7aa7bb3be4
ui: rename ops to have Op suffixed, not prefixed
...
Match Go's FooError name pattern.
While we're here, rename RedrawOp to InvalidateOp.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 17:01:45 +02:00
Elias Naur
b981ccf9ed
ui/input: support single stepping through events
...
Change input.Events interface to return one event at a time until
the queue is empty.
Change text.Editor and gestures to match.
Re-add Editor.Submit while we're here; we don't want to enable
submit mode always.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 16:30:20 +02:00
Elias Naur
893b7f3c9f
cmd/gophers,cmd/hello: update to latest API
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 16:18:44 +02:00
Elias Naur
898c3c5d7d
ui/layout: unexport List.Update and move its parameters to state
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 16:17:29 +02:00
Elias Naur
d4eb86a9b5
ui/text: replace Editor.Update with Next for stepping through events
...
Before this change, the Editor cleared its content after each
Submission event. If it didn't multiple submits for a frame would
not result in the cleared text for clients that wants to clear the
Editor between submits.
However, for clients that do not want to clear the content or that
wants to validate the text before accepting it were not supported.
Instead, switch to a event stepping model, where the client can
call Next to receive each EditorEvent (that is, Submit event) in
turn.
We can then delete the Submit flag on Editor and always report Submit
events.
We can also make Layout flush the pending events now that Editor
always has access to its Config and input queue.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 16:17:29 +02:00
Elias Naur
98d4d926f6
ui/text: move input.Events parameter from Update to Editor state
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 15:35:45 +02:00
Elias Naur
dda9e3486d
ui/text: move Config parameter from Editor.Update to Editor state
...
Assume the user will set a Config pointer once at init.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 15:27:57 +02:00
Elias Naur
a695a115ce
ui/measure: rename Faces.Cfg to Config
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 15:22:30 +02:00
Elias Naur
47c5859d87
ui/app: make Draw.Config a value, not a pointer
...
We are going to encourage a model where pointers to a central
(program global) Configs are passed to widgets at setup time, and
not pass Configs at every frame.
That way, the global Gonfig can change, but the pointers won't need
updating.
This change only switches the Draw event's Config pointer to a value
to avoid tempting programs to use the event Config instead of
updating their own central Configs.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 15:02:37 +02:00
Elias Naur
b10a6938cd
ui/app: update comment and fix typo
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-21 14:54:34 +02:00
Elias Naur
173d56a67a
ui/app: (ios) relay system focus events
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-20 19:05:06 +02:00
Elias Naur
b9205d9965
uis/app: (macos) relay system focus events
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-20 18:45:46 +02:00
Elias Naur
a9199c6d23
ui/app: (android) relay system focus events
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-20 16:07:19 +02:00
Elias Naur
a92b97e236
ui/app: (js) relay system focus events
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-20 15:55:49 +02:00
Elias Naur
659419738c
ui/app: (windows) relay system focus events
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-20 15:53:04 +02:00
Elias Naur
c73d3b59e6
ui/app: (wayland) relay system focus events
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-20 15:49:29 +02:00
Elias Naur
c1e129a87d
ui/layout: implement List.Invert for end aligned lists
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-19 19:46:11 +02:00
Elias Naur
f474282a31
ui/app: (wayland) avoid excessive key repeats
...
Wayland requires its clients to handle key repeating themselves.
Our strategy is simple: start a timer on key down and fire key
events at regular intervals until another key event arrives.
However, if the program blocks the event loop while processing a
synchronous event, key repeats might pile up before the stopping
key event is processed.
This change use the timestamp of the stopping key event to only
dispatch the repeats queued up before the stop time.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-19 12:46:59 +02:00
Elias Naur
0e332f8d65
apps/gophers: update to latest gio version and use Modifiers.Contain
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 21:32:44 +02:00
Elias Naur
7354874bb5
ui/text: add submit events to Editor
...
Add Editor.Text() and fix a reset while here.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 21:30:19 +02:00
Elias Naur
474b1e8e17
ui/key: add Modifiers.Contain
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 21:10:01 +02:00
Elias Naur
3d1e16c4d2
ui/text: unexport Editor.Command
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 20:26:52 +02:00
Elias Naur
e24f19ecba
ui/key,ui/app: introduce ModShift modifier
...
And add desktop implementations.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 20:20:57 +02:00
Elias Naur
535f61fbeb
README.md: update mailing list name and fix todo address
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-18 17:41:41 +02:00
Elias Naur
c511858d30
ui/layout: add sanity checks to Insets/Align Begin/End
...
Would have caught the invalid layout re-use fixed by a recent commit.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-17 17:36:47 +02:00
Elias Naur
d67b7eca6c
ui/draw,ui/layout: export OpClip
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-17 16:45:49 +02:00
Elias Naur
1765a66fd6
cmd/gophers: fix layout re-use
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-17 16:41:46 +02:00
Elias Naur
067d493e60
apps/gophers/android: delete
...
With gio -buildmode=exe, we don't need the Android scaffold anymore.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-17 16:39:35 +02:00
Elias Naur
839faf2b7e
website: force https and bump to Go 1.12 app engine runtime
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-12 14:38:33 +02:00
Elias Naur
d61a717ca8
apps: go get gioui.org/ui@latest
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-11 16:46:24 +02:00
Elias Naur
503c417544
ui/app: (android) enable IME dummy mode
...
We don't have full IME-aware editor yet. Fortunately, the BaseInputConnection
has a "dummy mode" setting to allow us to receive input from the fancier keyboards
without implementing the full IME interface.
Fixes gio#7 (I hope; I tested with SwiftKey that had the same symptoms)
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-11 16:35:43 +02:00
Elias Naur
94162f8f24
apps/gophers: go get gioui.org/ui@latest
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-10 01:27:12 +02:00
Elias Naur
1f809234b8
ui/app/internal/gpu: replace look up texture with calculation
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-10 01:18:23 +02:00
Elias Naur
8917cb33bc
apps: go get gioui.org/ui@latest
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 22:22:43 +02:00
Elias Naur
eddc0c948e
ui/app/internal/gpu: fix stenciling on the iOS simulator
...
It seems that the iOS simulator can return NaN from texture2D, so
even though width == 0, the resulting cover is not.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 22:21:25 +02:00
Elias Naur
0138544242
ui/app/internal/gl: fix GetProgramInfoLog and GetShaderInfoLog
...
I should read the manual more carefully.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 21:19:50 +02:00
Elias Naur
d142a8c89d
README.md: use example.com instead of gmail.com for example
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 16:37:15 +02:00
Elias Naur
cf99b9b487
README.md: describe how to run programs on iOS simulators
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-06-09 16:22:49 +02:00