• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fyne-io / fyne / 13156141055

05 Feb 2025 11:14AM UTC coverage: 62.563% (-0.06%) from 62.619%
13156141055

Pull #5496

github

dweymouth
address code style comments
Pull Request #5496: Make table scrolling and resizing more efficient

38 of 38 new or added lines in 1 file covered. (100.0%)

266 existing lines in 11 files now uncovered.

24755 of 39568 relevant lines covered (62.56%)

841.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.79
/data/binding/items.go
1
package binding
2

3
import (
4
        "bytes"
5

6
        "fyne.io/fyne/v2"
7
)
8

9
// Bool supports binding a bool value.
10
//
11
// Since: 2.0
12
type Bool interface {
13
        DataItem
14
        Get() (bool, error)
15
        Set(bool) error
16
}
17

18
// ExternalBool supports binding a bool value to an external value.
19
//
20
// Since: 2.0
21
type ExternalBool interface {
22
        Bool
23
        Reload() error
24
}
25

26
// NewBool returns a bindable bool value that is managed internally.
27
//
28
// Since: 2.0
29
func NewBool() Bool {
30
        return newBaseItemComparable[bool]()
31
}
2✔
32

2✔
33
// BindBool returns a new bindable value that controls the contents of the provided bool variable.
2✔
34
// If your code changes the content of the variable this refers to you should call Reload() to inform the bindings.
35
//
36
// Since: 2.0
37
func BindBool(v *bool) ExternalBool {
38
        return baseBindExternalComparable(v)
39
}
13✔
40

13✔
41
// Bytes supports binding a []byte value.
13✔
42
//
43
// Since: 2.2
44
type Bytes interface {
45
        DataItem
46
        Get() ([]byte, error)
47
        Set([]byte) error
48
}
49

50
// ExternalBytes supports binding a []byte value to an external value.
51
//
52
// Since: 2.2
53
type ExternalBytes interface {
54
        Bytes
55
        Reload() error
56
}
57

58
// NewBytes returns a bindable []byte value that is managed internally.
59
//
60
// Since: 2.2
61
func NewBytes() Bytes {
62
        return newBaseItem(bytes.Equal)
63
}
×
UNCOV
64

×
UNCOV
65
// BindBytes returns a new bindable value that controls the contents of the provided []byte variable.
×
66
// If your code changes the content of the variable this refers to you should call Reload() to inform the bindings.
67
//
68
// Since: 2.2
69
func BindBytes(v *[]byte) ExternalBytes {
70
        return baseBindExternal(v, bytes.Equal)
71
}
×
UNCOV
72

×
UNCOV
73
// Float supports binding a float64 value.
×
74
//
75
// Since: 2.0
76
type Float interface {
77
        DataItem
78
        Get() (float64, error)
79
        Set(float64) error
80
}
81

82
// ExternalFloat supports binding a float64 value to an external value.
83
//
84
// Since: 2.0
85
type ExternalFloat interface {
86
        Float
87
        Reload() error
88
}
89

90
// NewFloat returns a bindable float64 value that is managed internally.
91
//
92
// Since: 2.0
93
func NewFloat() Float {
94
        return newBaseItemComparable[float64]()
95
}
7✔
96

7✔
97
// BindFloat returns a new bindable value that controls the contents of the provided float64 variable.
7✔
98
// If your code changes the content of the variable this refers to you should call Reload() to inform the bindings.
99
//
100
// Since: 2.0
101
func BindFloat(v *float64) ExternalFloat {
102
        return baseBindExternalComparable(v)
103
}
6✔
104

6✔
105
// Int supports binding a int value.
6✔
106
//
107
// Since: 2.0
108
type Int interface {
109
        DataItem
110
        Get() (int, error)
111
        Set(int) error
112
}
113

114
// ExternalInt supports binding a int value to an external value.
115
//
116
// Since: 2.0
117
type ExternalInt interface {
118
        Int
119
        Reload() error
120
}
121

122
// NewInt returns a bindable int value that is managed internally.
123
//
124
// Since: 2.0
125
func NewInt() Int {
126
        return newBaseItemComparable[int]()
127
}
5✔
128

5✔
129
// BindInt returns a new bindable value that controls the contents of the provided int variable.
5✔
130
// If your code changes the content of the variable this refers to you should call Reload() to inform the bindings.
131
//
132
// Since: 2.0
133
func BindInt(v *int) ExternalInt {
134
        return baseBindExternalComparable(v)
135
}
2✔
136

2✔
137
// Rune supports binding a rune value.
2✔
138
//
139
// Since: 2.0
140
type Rune interface {
141
        DataItem
142
        Get() (rune, error)
143
        Set(rune) error
144
}
145

146
// ExternalRune supports binding a rune value to an external value.
147
//
148
// Since: 2.0
149
type ExternalRune interface {
150
        Rune
151
        Reload() error
152
}
153

154
// NewRune returns a bindable rune value that is managed internally.
155
//
156
// Since: 2.0
157
func NewRune() Rune {
158
        return newBaseItemComparable[rune]()
159
}
×
UNCOV
160

×
UNCOV
161
// BindRune returns a new bindable value that controls the contents of the provided rune variable.
×
162
// If your code changes the content of the variable this refers to you should call Reload() to inform the bindings.
163
//
164
// Since: 2.0
165
func BindRune(v *rune) ExternalRune {
166
        return baseBindExternalComparable(v)
167
}
2✔
168

2✔
169
// String supports binding a string value.
2✔
170
//
171
// Since: 2.0
172
type String interface {
173
        DataItem
174
        Get() (string, error)
175
        Set(string) error
176
}
177

178
// ExternalString supports binding a string value to an external value.
179
//
180
// Since: 2.0
181
type ExternalString interface {
182
        String
183
        Reload() error
184
}
185

186
// NewString returns a bindable string value that is managed internally.
187
//
188
// Since: 2.0
189
func NewString() String {
190
        return newBaseItemComparable[string]()
191
}
7✔
192

7✔
193
// BindString returns a new bindable value that controls the contents of the provided string variable.
7✔
194
// If your code changes the content of the variable this refers to you should call Reload() to inform the bindings.
195
//
196
// Since: 2.0
197
func BindString(v *string) ExternalString {
198
        return baseBindExternalComparable(v)
199
}
6✔
200

6✔
201
// URI supports binding a fyne.URI value.
6✔
202
//
203
// Since: 2.1
204
type URI interface {
205
        DataItem
206
        Get() (fyne.URI, error)
207
        Set(fyne.URI) error
208
}
209

210
// ExternalURI supports binding a fyne.URI value to an external value.
211
//
212
// Since: 2.1
213
type ExternalURI interface {
214
        URI
215
        Reload() error
216
}
217

218
// NewURI returns a bindable fyne.URI value that is managed internally.
219
//
220
// Since: 2.1
221
func NewURI() URI {
222
        return newBaseItem(compareURI)
223
}
3✔
224

3✔
225
// BindURI returns a new bindable value that controls the contents of the provided fyne.URI variable.
3✔
226
// If your code changes the content of the variable this refers to you should call Reload() to inform the bindings.
227
//
228
// Since: 2.1
229
func BindURI(v *fyne.URI) ExternalURI {
230
        return baseBindExternal(v, compareURI)
231
}
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc