Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Nov 15, 2023
1 parent c8e06cd commit f28c6cf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
24 changes: 24 additions & 0 deletions data/binding/bindlists.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (l *boundBoolList) Reload() error {
return l.doReload()
}

// Remove takes the specified bool out of the list.
//
// Since: 2.5
func (l *boundBoolList) Remove(val bool) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -358,6 +361,9 @@ func (l *boundBytesList) Reload() error {
return l.doReload()
}

// Remove takes the specified []byte out of the list.
//
// Since: 2.5
func (l *boundBytesList) Remove(val []byte) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -609,6 +615,9 @@ func (l *boundFloatList) Reload() error {
return l.doReload()
}

// Remove takes the specified float64 out of the list.
//
// Since: 2.5
func (l *boundFloatList) Remove(val float64) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -860,6 +869,9 @@ func (l *boundIntList) Reload() error {
return l.doReload()
}

// Remove takes the specified int out of the list.
//
// Since: 2.5
func (l *boundIntList) Remove(val int) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -1111,6 +1123,9 @@ func (l *boundRuneList) Reload() error {
return l.doReload()
}

// Remove takes the specified rune out of the list.
//
// Since: 2.5
func (l *boundRuneList) Remove(val rune) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -1362,6 +1377,9 @@ func (l *boundStringList) Reload() error {
return l.doReload()
}

// Remove takes the specified string out of the list.
//
// Since: 2.5
func (l *boundStringList) Remove(val string) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -1613,6 +1631,9 @@ func (l *boundUntypedList) Reload() error {
return l.doReload()
}

// Remove takes the specified interface{} out of the list.
//
// Since: 2.5
func (l *boundUntypedList) Remove(val interface{}) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -1864,6 +1885,9 @@ func (l *boundURIList) Reload() error {
return l.doReload()
}

// Remove takes the specified fyne.URI out of the list.
//
// Since: 2.5
func (l *boundURIList) Remove(val fyne.URI) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down
32 changes: 32 additions & 0 deletions data/binding/bindtrees.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ func (t *boundBoolTree) Prepend(parent, id string, val bool) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundBoolTree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down Expand Up @@ -402,6 +406,10 @@ func (t *boundBytesTree) Prepend(parent, id string, val []byte) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundBytesTree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down Expand Up @@ -683,6 +691,10 @@ func (t *boundFloatTree) Prepend(parent, id string, val float64) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundFloatTree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down Expand Up @@ -964,6 +976,10 @@ func (t *boundIntTree) Prepend(parent, id string, val int) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundIntTree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down Expand Up @@ -1245,6 +1261,10 @@ func (t *boundRuneTree) Prepend(parent, id string, val rune) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundRuneTree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down Expand Up @@ -1526,6 +1546,10 @@ func (t *boundStringTree) Prepend(parent, id string, val string) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundStringTree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down Expand Up @@ -1807,6 +1831,10 @@ func (t *boundUntypedTree) Prepend(parent, id string, val interface{}) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundUntypedTree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down Expand Up @@ -2088,6 +2116,10 @@ func (t *boundURITree) Prepend(parent, id string, val fyne.URI) error {
return t.doReload()
}

// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *boundURITree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down
7 changes: 7 additions & 0 deletions data/binding/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ func (l *bound{{ .Name }}List) Reload() error {
return l.doReload()
}
// Remove takes the specified {{ .Type }} out of the list.
//
// Since: 2.5
func (l *bound{{ .Name }}List) Remove(val {{ .Type }}) error {
l.lock.Lock()
defer l.lock.Unlock()
Expand Down Expand Up @@ -761,6 +764,10 @@ func (t *bound{{ .Name }}Tree) Prepend(parent, id string, val {{ .Type }}) error
return t.doReload()
}
// Remove takes the specified id out of the tree.
// It will also remove any child items from the data structure.
//
// Since: 2.5
func (t *bound{{ .Name }}Tree) Remove(id string) error {
t.lock.Lock()
defer t.lock.Unlock()
Expand Down

0 comments on commit f28c6cf

Please sign in to comment.