-
Notifications
You must be signed in to change notification settings - Fork 2
/
separator.go
37 lines (27 loc) · 719 Bytes
/
separator.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
// 12 december 2015
package ui
import (
"unsafe"
)
// #include "pkgui.h"
import "C"
// Separator is a Control that represents a horizontal line that
// visually separates controls.
type Separator struct {
ControlBase
s *C.uiSeparator
}
// NewHorizontalSeparator creates a new horizontal Separator.
func NewHorizontalSeparator() *Separator {
s := new(Separator)
s.s = C.uiNewHorizontalSeparator()
s.ControlBase = NewControlBase(s, uintptr(unsafe.Pointer(s.s)))
return s
}
// NewVerticalSeparator creates a new vertical Separator.
func NewVerticalSeparator() *Separator {
s := new(Separator)
s.s = C.uiNewVerticalSeparator()
s.ControlBase = NewControlBase(s, uintptr(unsafe.Pointer(s.s)))
return s
}