Elias Naur
65c783179d
clip: change Rect argument to f32.Rectangle
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-11-09 19:42:19 +01:00
Elias Naur
e864ac3fc3
op/clip: split clip operations into its own package
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-11-09 19:07:00 +01:00
Elias Naur
c4ac40e609
layout: remove Format
...
Move Format to eliasnaur.com/giox/layout because it's not clear it
belongs in the Gio standard library.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-23 10:53:59 +02:00
Elias Naur
afcff9c8b5
layout: fix comment
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-21 10:38:58 +02:00
Elias Naur
dafb180176
layout: fix ambiguous parsing of stack and flex arguments
...
Fixed gio#44
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-21 01:04:31 +02:00
Elias Naur
79d505623a
layout: parse empty names and let higher levels generate errors
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-21 01:04:31 +02:00
Elias Naur
c07b520157
layout: rename formatState to formatter
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-21 01:04:31 +02:00
Elias Naur
32d51dd9e6
layout: fix spelling of "northeast"
...
Fixes gio#45
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-21 01:04:19 +02:00
Elias Naur
5c0f1ed954
layout: update tests
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-17 14:22:24 +02:00
Elias Naur
862061b363
layout: rename "exp" layout variants to "max"; add "min" variants
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-17 13:55:30 +02:00
Elias Naur
d7694ae95f
layout: add "exp" format layout for expanding both constraints
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 20:51:20 +02:00
Elias Naur
759900902a
layout: fix Flex baseline
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 20:35:24 +02:00
Elias Naur
b1643e5e2a
layout: skip Flex and Stack Layout when scanning format string
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 20:29:17 +02:00
Elias Naur
f442512888
layout: more doc fixes for layout.Format
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 18:00:57 +02:00
Elias Naur
80b1af3024
layout: fix godoc.org rendering of layout.Format docs
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 17:59:04 +02:00
Elias Naur
c76490956d
layout: add support for layout format strings
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 17:44:13 +02:00
Elias Naur
7f07933eb3
layout: unexport Context.Layout and make it a function
...
Layout wasn't used outside package layout, so let's not export it.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 11:08:52 +02:00
Elias Naur
e2d0b3cfca
layout: invert baseline to measure positive distance from bottom
...
With an inverted baseline, the zero value results in the widget
baseline aligned to its bottom.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 00:49:52 +02:00
Elias Naur
8e3d03f2c4
layout: correct Align baseline
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 00:49:52 +02:00
Elias Naur
4bbad66947
layout: adjust only max constraints on Inset
...
Only adjust minimums, and insets, if necessary.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-16 00:49:52 +02:00
Elias Naur
45ccbbe571
layout: expand Flex children
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-15 23:33:31 +02:00
Elias Naur
fd1fa85998
layout: allow Expand children to fill the available area
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-15 23:33:31 +02:00
Elias Naur
2990ceda69
layout: relax constraints in Stack.Rigid
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-15 17:59:23 +02:00
Elias Naur
6e44d355cc
layout: enforce constraints in Context.Layout
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-15 17:59:23 +02:00
Elias Naur
0783d1939e
stack: fix comment
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-15 15:53:43 +02:00
Elias Naur
36d1cd90f2
app,io/system: extract system events to separate package
...
Package app is the only package that depends on native libraries and
Cgo. Minimize its API, thereby minimizing Gio clients' dependency on
it. In the future, a headless, testing or remote "Window" should be
very easy to replace app.Window.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-14 16:20:20 +02:00
Elias Naur
529fd4d307
layout: rename Flex.Flexible to just Flex
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-06 09:20:04 +02:00
Elias Naur
8d82a3eaa6
layout: delete Init methods from Flex and Stack
...
With Context containing all the necessary information, separate
Init methods no longer makes much sense. Delete them and thereby
remove a source of runtime panics.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-06 09:17:41 +02:00
Elias Naur
e031308172
layout: take a size, not constraints in Context.Reset
...
Taking a constraint in Reset smells too much of a layout operation,
whereas a size is simpler and only serves to set the context constraints
to something sensible.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-10-02 15:35:05 +02:00
Elias Naur
3784ece6dd
all: rename package ui to unit
...
Package ui is now only about units except for the Config.Now method.
Remove Now and rename Config to Converter. Add layout.Config to
replace the old ui.Config.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-30 16:55:47 +02:00
Elias Naur
beaec661d2
op/paint: move paint package below the op package
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-30 16:55:47 +02:00
Elias Naur
8cf35a1f97
op: add package op for operations
...
Extract operation types from package ui into package op.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-30 16:55:47 +02:00
Elias Naur
e7a97bf176
io/event: move event types from package ui to its own package
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-30 15:18:08 +02:00
Elias Naur
7a259e68f7
io: give event packages a common prefix
...
Packages that provide support for external events such as pointer, key and
system are only the beginning. Future packages are expected for clipboard
access, drag and drop, gps positions and so on.
To keep the number of top-level packages under control, move such I/O packages
to the new `io` directory.
The `system` package name was the previous solution to keeping the number of
top-level packages under control: I named it `system` instead of the narrower
`profile` because I expected to put all the less common events into it, turning
`system` into a "package util" smell.
With `io`, package system can be renamed to `profile`.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-30 14:50:55 +02:00
Elias Naur
22cd88df9f
all: rename the gioui.org/ui module to gioui.org
...
The "ui" is redundant and stutters.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-09-30 12:37:06 +02:00