summaryrefslogtreecommitdiff
path: root/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'doc.go')
-rw-r--r--doc.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc.go b/doc.go
index 80146e9..3422f48 100644
--- a/doc.go
+++ b/doc.go
@@ -41,5 +41,30 @@ Here is a simple, complete program that asks the user for their name and greets
panic(err)
}
}
+
+On Dialogs
+
+The following functions provide dialogs. They exist both in package scope and as methods on Window.
+
+ MsgBox()
+ MsgBoxError()
+
+Dialogs opened by using the package-scope functions are modal to the entire application: the user cannot interact with any other window until they are dismissed.
+Whether or not resizing Windows will still be allowed is implementation-defined; if the implementation does allow it, resizes will still work properly.
+Whether or not the dialog box stays above all other Windows in the program is also implementation-defined.
+
+Dialogs opened by using the Window methods are modal to the receiver Window only.
+Attempts to interact with the receiver Window will be blocked, but all other Windows in the application can still be used properly.
+The dialog box will also stay above the receiver Window.
+Whether the receiver Window can be resized while the dialog box is displayed is implementation-defined, but will work properly if allowed.
+If the receiver Window has not yet been created, the methods panic.
+If the receiver Window has not been shown yet or is currently hidden, what the methods do is implementation-defined.
+
+The return type also differs between the two types of functions.
+Both ultimately either yield a signal that the dialog has been dismissed or a code specifying what the user decided to do with the dialog (if it has multiple choices).
+The package-scope functions wait for the dialog box to be dismissed and merely return the code (or nothing if no code is needed).
+The Window methods return immediately with a channel that will eventually receive either the signal or the return code.
+Package ui does not close these channels, nor does it send multiple values on the same channel.
+
*/
package ui