summaryrefslogtreecommitdiff
path: root/separator.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2018-08-11 21:29:20 -0400
committerPietro Gagliardi <[email protected]>2018-08-11 21:29:20 -0400
commit68ffb808678159b8810c8ed093c0458316d3f8f2 (patch)
tree5bda3855b4b6cafc1f39bdbc66204a44493896e3 /separator.go
parent5ab5777d4cbfe6490760ef4e618bd5fe80a20bea (diff)
More control migration.
Diffstat (limited to 'separator.go')
-rw-r--r--separator.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/separator.go b/separator.go
new file mode 100644
index 0000000..67dea4f
--- /dev/null
+++ b/separator.go
@@ -0,0 +1,37 @@
+// 12 december 2015
+
+package ui
+
+import (
+ "unsafe"
+)
+
+// #include "ui.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
+}