This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
/
toolbar_item_group.go
118 lines (94 loc) · 4.07 KB
/
toolbar_item_group.go
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// auto-generated code, do not modify
package appkit
import (
"unsafe"
"github.com/hsiafan/cocoa/objc"
)
var ToolbarItemGroupClass = _ToolbarItemGroupClass{objc.GetClass("NSToolbarItemGroup")}
type _ToolbarItemGroupClass struct {
objc.Class
}
type IToolbarItemGroup interface {
IToolbarItem
IsSelectedAtIndex(index int) bool
SetSelected_AtIndex(selected bool, index int)
Subitems() []ToolbarItem
SetSubitems(value []IToolbarItem)
SelectedIndex() int
SetSelectedIndex(value int)
ControlRepresentation() ToolbarItemGroupControlRepresentation
SetControlRepresentation(value ToolbarItemGroupControlRepresentation)
SelectionMode() ToolbarItemGroupSelectionMode
SetSelectionMode(value ToolbarItemGroupSelectionMode)
}
type ToolbarItemGroup struct {
ToolbarItem
}
func MakeToolbarItemGroup(ptr unsafe.Pointer) ToolbarItemGroup {
return ToolbarItemGroup{
ToolbarItem: MakeToolbarItem(ptr),
}
}
func (tc _ToolbarItemGroupClass) GroupWithItemIdentifier_Images_SelectionMode_Labels_Target_Action(itemIdentifier ToolbarItemIdentifier, images []IImage, selectionMode ToolbarItemGroupSelectionMode, labels []string, target objc.IObject, action objc.Selector) ToolbarItemGroup {
rv := objc.CallMethod[ToolbarItemGroup](tc, objc.SEL("groupWithItemIdentifier:images:selectionMode:labels:target:action:"), itemIdentifier, images, selectionMode, labels, objc.ExtractPtr(target), action)
return rv
}
func (tc _ToolbarItemGroupClass) GroupWithItemIdentifier_Titles_SelectionMode_Labels_Target_Action(itemIdentifier ToolbarItemIdentifier, titles []string, selectionMode ToolbarItemGroupSelectionMode, labels []string, target objc.IObject, action objc.Selector) ToolbarItemGroup {
rv := objc.CallMethod[ToolbarItemGroup](tc, objc.SEL("groupWithItemIdentifier:titles:selectionMode:labels:target:action:"), itemIdentifier, titles, selectionMode, labels, objc.ExtractPtr(target), action)
return rv
}
func (t_ ToolbarItemGroup) InitWithItemIdentifier(itemIdentifier ToolbarItemIdentifier) ToolbarItemGroup {
rv := objc.CallMethod[ToolbarItemGroup](t_, objc.SEL("initWithItemIdentifier:"), itemIdentifier)
return rv
}
func (tc _ToolbarItemGroupClass) Alloc() ToolbarItemGroup {
rv := objc.CallMethod[ToolbarItemGroup](tc, objc.SEL("alloc"))
return rv
}
func (tc _ToolbarItemGroupClass) New() ToolbarItemGroup {
rv := objc.CallMethod[ToolbarItemGroup](tc, objc.SEL("new"))
rv.Autorelease()
return rv
}
func NewToolbarItemGroup() ToolbarItemGroup {
return ToolbarItemGroupClass.New()
}
func (t_ ToolbarItemGroup) Init() ToolbarItemGroup {
rv := objc.CallMethod[ToolbarItemGroup](t_, objc.SEL("init"))
return rv
}
func (t_ ToolbarItemGroup) IsSelectedAtIndex(index int) bool {
rv := objc.CallMethod[bool](t_, objc.SEL("isSelectedAtIndex:"), index)
return rv
}
func (t_ ToolbarItemGroup) SetSelected_AtIndex(selected bool, index int) {
objc.CallMethod[objc.Void](t_, objc.SEL("setSelected:atIndex:"), selected, index)
}
func (t_ ToolbarItemGroup) Subitems() []ToolbarItem {
rv := objc.CallMethod[[]ToolbarItem](t_, objc.SEL("subitems"))
return rv
}
func (t_ ToolbarItemGroup) SetSubitems(value []IToolbarItem) {
objc.CallMethod[objc.Void](t_, objc.SEL("setSubitems:"), value)
}
func (t_ ToolbarItemGroup) SelectedIndex() int {
rv := objc.CallMethod[int](t_, objc.SEL("selectedIndex"))
return rv
}
func (t_ ToolbarItemGroup) SetSelectedIndex(value int) {
objc.CallMethod[objc.Void](t_, objc.SEL("setSelectedIndex:"), value)
}
func (t_ ToolbarItemGroup) ControlRepresentation() ToolbarItemGroupControlRepresentation {
rv := objc.CallMethod[ToolbarItemGroupControlRepresentation](t_, objc.SEL("controlRepresentation"))
return rv
}
func (t_ ToolbarItemGroup) SetControlRepresentation(value ToolbarItemGroupControlRepresentation) {
objc.CallMethod[objc.Void](t_, objc.SEL("setControlRepresentation:"), value)
}
func (t_ ToolbarItemGroup) SelectionMode() ToolbarItemGroupSelectionMode {
rv := objc.CallMethod[ToolbarItemGroupSelectionMode](t_, objc.SEL("selectionMode"))
return rv
}
func (t_ ToolbarItemGroup) SetSelectionMode(value ToolbarItemGroupSelectionMode) {
objc.CallMethod[objc.Void](t_, objc.SEL("setSelectionMode:"), value)
}