diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-02 17:13:40 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-02 17:13:40 -0400 |
| commit | 5d339e656b66d00356960ae057969532d34245b4 (patch) | |
| tree | 01f00932aba2a4b996603beeda788995e0f0a382 /dialog.go | |
| parent | 2d7e168e6a350a0cfb52970fbf74c9e37834eaec (diff) | |
Moved everything out of the way pending rewrite.
Diffstat (limited to 'dialog.go')
| -rw-r--r-- | dialog.go | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/dialog.go b/dialog.go deleted file mode 100644 index 6c62bfd..0000000 --- a/dialog.go +++ /dev/null @@ -1,52 +0,0 @@ -// 7 february 2014 - -package ui - -// Response denotes a response from the user to a Dialog. -type Response uint -const ( - NotDone Response = iota - OK -) - -// sentinel (not nil so programmer errors don't go undetected) -// this window is invalid and cannot be used directly -// notice the support it uses -var dialogWindow = new(Window) - -// MsgBox displays an informational message box to the user with just an OK button. -// primaryText should be a short string describing the message, and will be displayed with additional emphasis on platforms that support it. -// Optionally, secondaryText can be used to show additional information. -// If you pass an empty string for secondaryText, neither additional information nor space for additional information will be shown. -// On platforms that allow for the message box window to have a title, os.Args[0] is used. -// -// See "On Dialogs" in the package overview for behavioral information. -func MsgBox(primaryText string, secondaryText string) { - dialogWindow.msgBox(primaryText, secondaryText) -} - -// MsgBox is the Window method version of the package-scope function MsgBox. -// See that function's documentation and "On Dialogs" in the package overview for more information. -func (w *Window) MsgBox(primaryText string, secondaryText string) { - if !w.created { - panic("parent window passed to Window.MsgBox() before it was created") - } - w.msgBox(primaryText, secondaryText) -} - -// MsgBoxError displays a message box to the user with just an OK button and an icon indicating an error. -// Otherwise, it behaves like MsgBox. -// -// See "On Dialogs" in the package overview for more information. -func MsgBoxError(primaryText string, secondaryText string) { - dialogWindow.msgBoxError(primaryText, secondaryText) -} - -// MsgBoxError is the Window method version of the package-scope function MsgBoxError. -// See that function's documentation and "On Dialogs" in the package overview for more information. -func (w *Window) MsgBoxError(primaryText string, secondaryText string) { - if !w.created { - panic("parent window passed to Window.MsgBox() before it was created") - } - w.msgBoxError(primaryText, secondaryText) -} |
