This commit is contained in:
Andrew Williams 2018-08-23 10:38:06 +00:00 committed by GitHub
commit cf85f60da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

Binary file not shown.

View File

@ -16,7 +16,7 @@ type Separator struct {
s *C.uiSeparator
}
// NewSeparator creates a new horizontal Separator.
// NewHorizontalSeparator creates a new horizontal Separator.
func NewHorizontalSeparator() *Separator {
s := new(Separator)
@ -26,6 +26,16 @@ func NewHorizontalSeparator() *Separator {
return s
}
// NewVerticalSeparator creates a new vertical Separator.
func NewVerticalSeparator() *Separator {
s := new(Separator)
s.s = C.uiNewVerticalSeparator()
s.c = (*C.uiControl)(unsafe.Pointer(s.s))
return s
}
// Destroy destroys the Separator.
func (s *Separator) Destroy() {
C.uiControlDestroy(s.c)

1
ui.h
View File

@ -190,6 +190,7 @@ _UI_EXTERN uiProgressBar *uiNewProgressBar(void);
typedef struct uiSeparator uiSeparator;
#define uiSeparator(this) ((uiSeparator *) (this))
_UI_EXTERN uiSeparator *uiNewHorizontalSeparator(void);
_UI_EXTERN uiSeparator *uiNewVerticalSeparator(void);
typedef struct uiCombobox uiCombobox;
#define uiCombobox(this) ((uiCombobox *) (this))