interact.GestureDetector{OnTap:func(){/* select */},OnDoubleTap:func(){/* open */},OnSecondaryTapAt:func(layout.Tap){/* a menu where the press was */},OnLongPress:func(_geom.Offset,_input.PointerDevice){/* more choices */},OnDragUpdate:func(_,_geom.Offset){/* move by the delta */},Child:tile("Tap me",120,40),}
interact.Listener{OnPointer:func(e*core.PointerEvent){switche.Kind{casecore.PointerDown:// start a stroke at e.Pos, as wide as e.Pressure for a pencasecore.PointerMove:// add e.Pos to the stroke while one is going}},Child:basic.SizedBox{Width:300,Height:200},}
interact.Focus{Enabled:true,OnKey:func(e*core.KeyEvent)bool{returne.Key==input.KeySpace// handled; false passes it on},OnShowFocus:func(_bool){/* show a FocusRing while true */},Child:tile("Focusable",120,40),}
interact.Draggable{Data:input.DragData{Text:"notes.txt"},Allowed:input.DropCopy|input.DropMove,OnDragEnd:func(_input.DropEffect){/* remove the row on DropMove */},Child:tile("notes.txt",120,32),}
interact.DragTarget{Kinds:input.DataFiles,OnHover:func(_bool){/* light up while true */},OnDrop:func(_input.DragData,_geom.Offset){/* open the files */},Child:tile("Drop files here",240,120),}
interact.Semantics{Role:semantics.RoleButton,Label:"Play",Hint:"Plays the album from the start",OnTap:func(){/* play */},Child:basic.Icon{Path:triangleIcon()},}
basic.Row{Size:layout.MainMin,Spacing:theme.Space8,Children:[]core.Widget{// The initial only decorates; the name beside it is read.interact.ExcludeSemantics{Child:basic.Text{Content:"S"}},basic.Text{Content:"Sato Hana"},}}
basic.Column{Children:[]core.Widget{field.Input{Label:"Details",OnChange:func(string){}},// Tab reaches the search field first, wherever it is painted.interact.FocusTraversalOrder{Order:1,Child:field.Search{OnChange:func(string){}}},}}