mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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
|
lineHeightScale float32
|
||||||
}
|
}
|
||||||
|
|
||||||
type pathKey struct {
|
|
||||||
gidHash uint64
|
|
||||||
}
|
|
||||||
|
|
||||||
const maxSize = 1000
|
const maxSize = 1000
|
||||||
|
|
||||||
func gidsEqual(a []glyphInfo, glyphs []Glyph) bool {
|
func gidsEqual(a []glyphInfo, glyphs []Glyph) bool {
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ import (
|
|||||||
|
|
||||||
// editBuffer implements a gap buffer for text editing.
|
// editBuffer implements a gap buffer for text editing.
|
||||||
type editBuffer struct {
|
type editBuffer struct {
|
||||||
// pos is the byte position for Read and ReadRune.
|
|
||||||
pos int
|
|
||||||
|
|
||||||
// The gap start and end in bytes.
|
// The gap start and end in bytes.
|
||||||
gapstart, gapend int
|
gapstart, gapend int
|
||||||
text []byte
|
text []byte
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math/bits"
|
"math/bits"
|
||||||
|
|
||||||
"gioui.org/gesture"
|
|
||||||
"gioui.org/io/system"
|
"gioui.org/io/system"
|
||||||
"gioui.org/layout"
|
"gioui.org/layout"
|
||||||
"gioui.org/op/clip"
|
"gioui.org/op/clip"
|
||||||
@@ -12,11 +11,7 @@ import (
|
|||||||
|
|
||||||
// Decorations handles the states of window decorations.
|
// Decorations handles the states of window decorations.
|
||||||
type Decorations struct {
|
type Decorations struct {
|
||||||
clicks map[int]*Clickable
|
clicks map[int]*Clickable
|
||||||
resize [8]struct {
|
|
||||||
gesture.Hover
|
|
||||||
gesture.Drag
|
|
||||||
}
|
|
||||||
maximized bool
|
maximized bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -347,10 +347,6 @@ type Region struct {
|
|||||||
Baseline int
|
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
|
// 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
|
// [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.
|
// 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}
|
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.
|
// textIterator computes the bounding box of and paints text.
|
||||||
type textIterator struct {
|
type textIterator struct {
|
||||||
// viewport is the rectangle of document coordinates that the iterator is
|
// viewport is the rectangle of document coordinates that the iterator is
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ type Selectable struct {
|
|||||||
focused bool
|
focused bool
|
||||||
dragging bool
|
dragging bool
|
||||||
dragger gesture.Drag
|
dragger gesture.Drag
|
||||||
scroller gesture.Scroll
|
|
||||||
scrollOff image.Point
|
|
||||||
|
|
||||||
clicker gesture.Click
|
clicker gesture.Click
|
||||||
// events is the list of events not yet processed.
|
// events is the list of events not yet processed.
|
||||||
|
|||||||
Reference in New Issue
Block a user