-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtreeviewitem.go
More file actions
41 lines (30 loc) · 781 Bytes
/
Copy pathtreeviewitem.go
File metadata and controls
41 lines (30 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2010 The Walk Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package walk
import . "github.com/lxn/go-winapi"
type TreeViewItem struct {
handle HTREEITEM
children *TreeViewItemList
parent *TreeViewItem
text string
}
func NewTreeViewItem() *TreeViewItem {
tvi := &TreeViewItem{}
tvi.children = newTreeViewItemList(nil)
tvi.children.parent = tvi
return tvi
}
func (tvi *TreeViewItem) Children() *TreeViewItemList {
return tvi.children
}
func (tvi *TreeViewItem) Parent() *TreeViewItem {
return tvi.parent
}
func (tvi *TreeViewItem) Text() string {
return tvi.text
}
func (tvi *TreeViewItem) SetText(value string) error {
tvi.text = value
return nil
}