ui/pointer: split AreaOp into RectAreaOp and EllipseAreaOp

Now that the pass through mode is moved into its own PassOp op,
it doesn't make sense to collect all area types into one exported
type.

Add RectAreaOp and EllipseAreaOp for clients; the internal
representation is still a single op. It can be changed later without
breaking clients.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-10 22:55:16 +02:00
parent f44ccec043
commit 4fadf71992
4 changed files with 80 additions and 55 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
ui.PopOp{}.Add(ops)
baseline := e.padTop + e.dims.Baseline
pointer.AreaRect(e.viewSize).Add(ops)
pointer.RectAreaOp{Size: e.viewSize}.Add(ops)
e.scroller.Add(ops)
e.clicker.Add(ops)
return layout.Dimens{Size: e.viewSize, Baseline: baseline}