Merge c090c8d194
into 70a69d6ae3
This commit is contained in:
commit
d56d7a9a74
|
@ -5,7 +5,8 @@ package ui
|
||||||
// #include "pkgui.h"
|
// #include "pkgui.h"
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
// TODO
|
// MsgBoxError opens a modal dialog box with graphical error hinting and returns when the
|
||||||
|
// user acknowledges the message.
|
||||||
func MsgBoxError(w *Window, title string, description string) {
|
func MsgBoxError(w *Window, title string, description string) {
|
||||||
ctitle := C.CString(title)
|
ctitle := C.CString(title)
|
||||||
defer freestr(ctitle)
|
defer freestr(ctitle)
|
||||||
|
@ -14,6 +15,7 @@ func MsgBoxError(w *Window, title string, description string) {
|
||||||
C.uiMsgBoxError(w.w, ctitle, cdescription)
|
C.uiMsgBoxError(w.w, ctitle, cdescription)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenFile opens a modal allowing the user to select a path to an existing file.
|
||||||
func OpenFile(w *Window) string {
|
func OpenFile(w *Window) string {
|
||||||
cname := C.uiOpenFile(w.w)
|
cname := C.uiOpenFile(w.w)
|
||||||
if cname == nil {
|
if cname == nil {
|
||||||
|
@ -23,6 +25,8 @@ func OpenFile(w *Window) string {
|
||||||
return C.GoString(cname)
|
return C.GoString(cname)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// SaveFile opens a modal allowing the user to select a path to a new or existing file.
|
||||||
func SaveFile(w *Window) string {
|
func SaveFile(w *Window) string {
|
||||||
cname := C.uiSaveFile(w.w)
|
cname := C.uiSaveFile(w.w)
|
||||||
if cname == nil {
|
if cname == nil {
|
||||||
|
@ -31,7 +35,8 @@ func SaveFile(w *Window) string {
|
||||||
defer C.uiFreeText(cname)
|
defer C.uiFreeText(cname)
|
||||||
return C.GoString(cname)
|
return C.GoString(cname)
|
||||||
}
|
}
|
||||||
|
// MsgBox opens a generic modal dialog box and returns when the user acknowledges the
|
||||||
|
// message.
|
||||||
func MsgBox(w *Window, title string, description string) {
|
func MsgBox(w *Window, title string, description string) {
|
||||||
ctitle := C.CString(title)
|
ctitle := C.CString(title)
|
||||||
defer freestr(ctitle)
|
defer freestr(ctitle)
|
||||||
|
|
Loading…
Reference in New Issue