-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtabs.go
38 lines (30 loc) · 849 Bytes
/
tabs.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
package fltk_go
/*
#include "tabs.h"
*/
import "C"
import "unsafe"
type Tabs struct {
Group
}
func NewTabs(x, y, w, h int, text ...string) *Tabs {
t := &Tabs{}
initWidget(t, unsafe.Pointer(C.go_fltk_new_Tabs(C.int(x), C.int(y), C.int(w), C.int(h), cStringOpt(text))))
return t
}
func (t *Tabs) Value() int {
return int(C.go_fltk_Tabs_value((*C.Fl_Tabs)(t.ptr())))
}
func (t *Tabs) SetValue(value int) {
C.go_fltk_Tabs_set_value((*C.Fl_Tabs)(t.ptr()), (C.int)(value))
}
type Overflow int
var (
OverflowCompress = Overflow(C.go_FL_OVERFLOW_COMPRESS)
OverflowClip = Overflow(C.go_FL_OVERFLOW_CLIP)
OverflowPulldown = Overflow(C.go_FL_OVERFLOW_PULLDOWN)
OverflowDrag = Overflow(C.go_FL_OVERFLOW_DRAG)
)
func (t *Tabs) SetOverflow(overflow Overflow) {
C.go_fltk_Tabs_handle_overflow((*C.Fl_Tabs)(t.ptr()), (C.int)(overflow))
}