ORIGIN 'guienv'; LIB_DEF 'guienvstddialogs' '../lib'; BODY 'private/stddialogsbody' (* * COPYRIGHT * Copyright (C) Mjolner Informatics, 1991-96 * All rights reserved. * * The intent of this fragment is that is should contain verious * standard dialogs, such as noteUser, alertUser, fileSelectionDialog, * etc. *) -- guienvLib: attributes -- dialog: (* Dialog is an abstract superpattern for activating * modal dialogs. In the INNER of this(dialog) you * can assign values to owner and dialogTitle to control * these features of the dialog. * * If the dialogwindow has a titlebar the title is used. * If the owner is specified, the dialog is centered * inside that window. If owner is NONE, the dialog is centered * on the screen. *) (# owner: ^window; title: ^text; private: @...; enter owner[] ... #); messageDialog: dialog (* MessageDialog is an abstract superpattern for dialogs with * a simple message. * * The message can be specified by evaluating the enter part, eg. * (NONE, 'You have new mail', 'Mail Dialog')-> noteUser; * * and in the INNER: * newMailDialog: noteUser * (# do 'You have new mail' -> message[] #); *) (# message: ^text; messageDialogPrivate: @...; onClose:< object; enter (message[], title[]) ... #); noteUser: messageDialog (* A note user dialog are used for neutral messages. * No additional features are defined here. *) (# ... #); alertUser: messageDialog (* AlertUsers brings up a simple messagedialog * with a warning icon. Use it to warn to user of * som dangerous condition. *) (# ... #); fileDialog: dialog (* FileDialog is an abstract superpattern for * file selection and file creation (On some platforms * these two dialogs are actually the same). * * The filter is an wildcard like: '*.c'. If filter is none, '*' * is used. * The path is the a path to the default directory in the dialog. * If path is none, the working directory is used. * Label is the label for the textfield displaying the current * selection. * filter, path, label, filename, title may be set in the do-part. *) (# filter, path, label, fileName, defaultExt: ^text; fileDialogPrivate: @...; ... exit fileName[] #); fileSelectionDialog: fileDialog (* brings up a standard file selection dialog *) (# ... #); fileCreationDialog: fileDialog (* brings up a standard file creation dialog *) (# ... #)
20.13 Stddialogs Interface | © 1994-2004 Mjølner Informatics |
[Modified: Tuesday March 20th 2001 at 10:43]
|