forked from joejulian/gio
text,widget: remove dead code and fields
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -163,10 +163,6 @@ type layoutKey struct {
|
||||
lineHeightScale float32
|
||||
}
|
||||
|
||||
type pathKey struct {
|
||||
gidHash uint64
|
||||
}
|
||||
|
||||
const maxSize = 1000
|
||||
|
||||
func gidsEqual(a []glyphInfo, glyphs []Glyph) bool {
|
||||
|
||||
@@ -11,9 +11,6 @@ import (
|
||||
|
||||
// editBuffer implements a gap buffer for text editing.
|
||||
type editBuffer struct {
|
||||
// pos is the byte position for Read and ReadRune.
|
||||
pos int
|
||||
|
||||
// The gap start and end in bytes.
|
||||
gapstart, gapend int
|
||||
text []byte
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"math/bits"
|
||||
|
||||
"gioui.org/gesture"
|
||||
"gioui.org/io/system"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op/clip"
|
||||
@@ -13,10 +12,6 @@ import (
|
||||
// Decorations handles the states of window decorations.
|
||||
type Decorations struct {
|
||||
clicks map[int]*Clickable
|
||||
resize [8]struct {
|
||||
gesture.Hover
|
||||
gesture.Drag
|
||||
}
|
||||
maximized bool
|
||||
}
|
||||
|
||||
|
||||
@@ -347,10 +347,6 @@ type Region struct {
|
||||
Baseline int
|
||||
}
|
||||
|
||||
// region is identical to Region except that its coordinates are in document
|
||||
// space instead of a widget coordinate space.
|
||||
type region = Region
|
||||
|
||||
// locate returns highlight regions covering the glyphs that represent the runes in
|
||||
// [startRune,endRune). If the rects parameter is non-nil, locate will use it to
|
||||
// return results instead of allocating, provided that there is enough capacity.
|
||||
|
||||
@@ -97,10 +97,6 @@ func (l Label) LayoutDetailed(gtx layout.Context, lt *text.Shaper, font font.Fon
|
||||
return dims, TextInfo{Truncated: it.truncated}
|
||||
}
|
||||
|
||||
func r2p(r clip.Rect) clip.Op {
|
||||
return clip.Stroke{Path: r.Path(), Width: 1}.Op()
|
||||
}
|
||||
|
||||
// textIterator computes the bounding box of and paints text.
|
||||
type textIterator struct {
|
||||
// viewport is the rectangle of document coordinates that the iterator is
|
||||
|
||||
@@ -77,8 +77,6 @@ type Selectable struct {
|
||||
focused bool
|
||||
dragging bool
|
||||
dragger gesture.Drag
|
||||
scroller gesture.Scroll
|
||||
scrollOff image.Point
|
||||
|
||||
clicker gesture.Click
|
||||
// events is the list of events not yet processed.
|
||||
|
||||
Reference in New Issue
Block a user