CSyntax10.Scn.Fnt Z ParcElemsAlloc Syntax20.Scn.FntSyntax14.Scn.Fnt%Syntax12.Scn.Fnt# Z  Syntax14b.Scn.Fnt Z   Z  % 9B)DialogElemsAllocDialogStaticTextsItemDescP a5 @ Syntax10.Scn.FntComboBox /E` @ Syntax10.Scn.FntText DialogComboBoxesmhk28 p P4d@.pr5 @ Syntax10.Scn.FntAnalogClock DialogAnalogClocksP$  >5 @ Syntax10.Scn.FntClock DialogClocks11' @  e5 @ Syntax10.Scn.FntDate DialogDatesp 1' @ Z2ЯP @ Syntax10.Scn.FntColorPicker DialogColorPickers`M/@ @ 20@P @ Syntax10.Scn.FntIntegerSlider 0`` @ Syntax10.Scn.FntLine DialogLines0@P N#@` @ Syntax10.Scn.FntCircle DialogCircles$a>P`r5 @ Syntax10.Scn.FntRectangle DialogRectangles0WCu Syntax10.Scn.FntSliders DialogSlidersp 0@$staticTextRadio`T|@B@ Syntax10.Scn.FntRadio ButtonsDialogTextstextp1 P4DialogRadioButtons`'@ @  radio2t@ @  n4@ @ DialogGroupBoxesradio3@$@5 Syntax10.Scn.FntGroupBoxstaticTextCheck5 @ Syntax10.Scn.FntCheckBox DialogCheckBoxescheckbox @ @ DialogButtonsButtonp@0P4Syntax10.Scn.FntDialogIntSlidersDialogIntSliderE32` @  Z  Syntax12i.Scn.FntY # Syntax12b.Scn.Fnt$ >B  >S ! Z  NL>_^nTS36 &9,oh   Z  E6DialogButtonsItemDescSetDialogInsert.DofileName P&/@`@ Syntax10.Scn.FntDialogLinesP43`1'DialogStaticTextsI%@ Syntax10.Scn.FntParDialogTextspar  %\@ cmd  C\@ "@ Syntax10.Scn.FntCmdOpenDialog.OpenfileName P'@`@ Syntax10.Scn.FntEditDialog.EditfileName ` @ 0@ Syntax10.Scn.Fnt l @ Syntax10.Scn.FntDialogfileName  0\@ DialogListBoxesl! PPn4q@ Syntax10.Scn.FntNametemp43920 Syntax10.Scn.FntWtemp269`b0 Syntax10.Scn.FntHn2n2`[`b@ Syntax10.Scn.FntYn1`[2@ Syntax10.Scn.FntXname  \@ h G`b' @ w G' @ y  `b' @ x  ' @ DialogInsert.OpenH Z  D)OJ|?1 ,1>\ c Z   PDialogButtonsItemDescTimeSystem.TimeP43PpSyntax10.Scn.Fnt Z  ' m  d @  ,~5#k . F H {C"/8 :N5r%<=  Z  =$\ DialogButtonsItemDescOpenMyEdit.Printfile @ Syntax10.Scn.FntDialogStaticTextsFile^@ Syntax10.Scn.FntfileDialogTextsfile 7` `[ Z  # k)89   Z   "1 DialogTextsItemDescfile@` `[DialogStaticTextsFile@ Syntax10.Scn.FntfileDialogCheckBoxesdraft @ @ Draft0@ Syntax10.Scn.FntdraftDialogButtonsPrintMyEdit.Print)^@ Syntax10.Scn.Fnt Z Syntax10b.Scn.Fnt Syntax10i.Scn.FntD 1  Z  >  ZP  Z  P,  DialogStaticTextsItemDescs10u@5 Syntax10.Scn.FntSearch for:DialogTextssearchMyUI.SearchResetm p/@$@ replMyUI.SearchResetm 7@$@ s20u5 Syntax10.Scn.FntReplace with:DialogCheckBoxesallpPIIs3 @ Syntax10.Scn.FntallDialogButtonsSearchMyUI.Search`#p/' @ Syntax10.Scn.FntReplaceMyUI.Replace`#7' @ Syntax10.Scn.Fntfoldsm PIIs4, O@ Syntax10.Scn.Fntsearch FoldElems Z   Z  a@8<DialogRadioButtonsItemDescblockMyUI.AdjustIIDialogGroupBoxes0u@ Syntax10.Scn.FntAdjustmentDialogStaticTextstblockl  Syntax10.Scn.FntblockcenterMyUI.Adjust^IIleftMyUI.AdjustIIrightMyUI.AdjustIItcenterl7  Syntax10.Scn.Fntcentertleftlx  Syntax10.Scn.Fntlefttrightl  Syntax10.Scn.FntrightbeforeMyUI.Break`IIAdjust~pM pdSyntax10.Scn.FntPage BreaktbeforeO  Syntax10.Scn.FntbeforenormalMyUI.Break`^IItnormalO7  Syntax10.Scn.FntnormalColumnsMyUI.Columns~@ @~Syntax10.Scn.FntColumnsoneMyUI.Columns`IItoneO Syntax10.Scn.Fnt1twoMyUI.Columns5IIttwo Syntax10.Scn.Fnt2First`@~Syntax10.Scn.FntFirst Line IndentationfirstdefaultMyUI.FirstLpIItfirstdefault`b  Syntax10.Scn.FntdefaultDialogTextstfirstnumberMyUI.FirstReset@,@q 0firstnumberMyUI.Firsttfirstnumber 2)pIIDialogCheckBoxesgridMyUI.GridIItgrid 0p' Syntax10.Scn.FntLine gridleftmpM pdSyntax10.Scn.FntLeft MarginleftmargindefMyUI.LeftLIItleftmargindef  Syntax10.Scn.FntdefaultleftmarginMyUI.Lefttleftmargin L^IItleftmarginMyUI.LeftReset@Y ' 0rightmp*pM pdSyntax10.Scn.FntRight MarginrightmargindefMyUI.Right|+IItrightmargindefc.  Syntax10.Scn.FntdefaultrightmarginMyUI.Righttrightmargin|+^IItrightmarginMyUI.RightReset .' 0Width@`@~Syntax10.Scn.FntMaximal Line WidthwidthdefMyUI.WidthLIItwidthdef  Syntax10.Scn.FntdefaultwidthMyUI.Widthtwidth 2)IItwidthMyUI.WidthReset0g,pkq 0TabsG`@~Syntax10.Scn.FntTab SpacingeveryMyUI.Tabstevery L@2IIt1every0 0W Syntax10.Scn.FnteveryteveryMyUI.TabsReset10%0W0enumMyUI.Tabstenum +0 IItenumMyUI.TabsReset2;. 0Lead0u`@~Syntax10.Scn.FntLeading Paragraph SpaceleaddefMyUI.LeadpIItleaddefl`b  Syntax10.Scn.FntdefaultleadnumberMyUI.Lead` pIItleadnumberMyUI.LeadResetS@q 0Line0uG`@~Syntax10.Scn.FntMinimal Line HeightlinedefMyUI.Line@2IItlinedefl0  Syntax10.Scn.FntdefaultlinenumberMyUI.Linetlinenumber ` @2IItlinenumberMyUI.LineResetSq 0DialogButtonsGetAllMyUI.GetAll0p@ Syntax10.Scn.FntDialogComboBoxesstylesMyUI.StyleO@ dtstylesp  Syntax10.Scn.FntStyle:E      Y:DialogRadioButtonsItemDescmrspVIImarkedp`IIlistp@IIDialogStaticTextssmsr`` Syntax10.Scn.Fntmost recent selectionsmarked@I` Syntax10.Scn.Fntmarked viewersfiles  Syntax10.Scn.Fntlist of filesDialogTextsfiles0c|+0DialogGroupBoxessource0u909 Syntax10.Scn.FntSourceDialogCheckBoxesidxp@IIoptions0uC9Syntax10.Scn.FntOptionssidx %& Syntax10.Scn.Fntdisable index checkstypep 7IInilpxIIinitpIIassertpIIsymbolp:IIpcp{IIstype%& Syntax10.Scn.Fntdisable type guardssnil)%& Syntax10.Scn.Fntdisable NIL checkssinitj2) Syntax10.Scn.Fntsuppress initialization of local pointers to NILsassert2) Syntax10.Scn.Fntsuppress code generation for ASSERT functionssymbol2) Syntax10.Scn.Fntallow generation of new symbol filespc`-! Syntax10.Scn.Fntfind text position corresponding to pctpc%P@B0DialogButtonsCompileMyUI.CompileU+@ Syntax10.Scn.FntFoldsCompileMyUI.FoldsCompileU+ Syntax10.Scn.Fnt/       *-DialogStaticTextsItemDesct10uV@ Syntax10.Scn.FntType:type}L0Syntax10.Scn.FntPopupElems.ElemDescDialogButtonsGetTypeMyUI.GetTypep%}@ Syntax10.Scn.FntDialogRectanglesV`[  g    08U+:DialogCheckBoxesItemDescalternate``IIDialogStaticTextst1@gO Syntax10.Scn.Fntalternating pagesDialogTextscopies2 0W@ t22)' Syntax10.Scn.FntCopies:t3@!@ Syntax10.Scn.FntFont for headers and page numbersfontU"\@ DialogRadioButtonsnohdr`@IIDialogGroupBoxesHeader N@27u Syntax10.Scn.FntHeadert4x`[ Syntax10.Scn.Fntnodefhdr  IIt5P x Syntax10.Scn.Fntdefaultheaderv IIthdrЃx."0poshdrleft@;%X0W@ t71  Syntax10.Scn.FntFrom the left:t8@0 Syntax10.Scn.FntFrom the bottom:poshdrbottom@;%P$0W@ t90 Syntax10.Scn.FntWidth:hdrwidth@;%0W@ HdrPosS\Syntax10.Scn.FntHeader Positioningt6)$  Syntax10.Scn.Fntcustomt10W @ Syntax10.Scn.Fntcustomt11 N10 Syntax10.Scn.FntFrom the left:t12 N@0 Syntax10.Scn.FntFrom the bottom:t13 N0 Syntax10.Scn.FntWidth:postxtleftpX0W postxtbottompP$0W@ txtwidthp0W@ t14 N0 Syntax10.Scn.FntHeight:txtheightp0W@ TextBody Np\9Syntax10.Scn.FntText Body Positioningt15Vj Syntax10.Scn.FntPage number of first page:tfirstpage2}0W@ nopagenr1`tIIt16`&@w Syntax10.Scn.Fntno page number on first pagenopagenr`3IIt17 Syntax10.Scn.Fntno page numbersRomannum`@IIt18 @w Syntax10.Scn.FntRoman numerals (up to 30)t19+1 Syntax10.Scn.FntFrom:t20+@ Syntax10.Scn.FntTo:from 2X0W@ to 2P$0W@ t22 . @ Syntax10.Scn.FntAllPagesU+SP Syntax10.Scn.FntPagesDialogButtonsSaveOptionsMyUI.SaveOptionspP @ Syntax10.Scn.FntPrintMyUI.Print 2p@ Syntax10.Scn.Fntdraft`IIt21 Syntax10.Scn.Fntdraft modefromto @,0)IIall @,0eIIDefaultOptionsMyUI.SetDefaultOptions#p @ Syntax10.Scn.Fntcustom1п 0)IIdefault1`0)IIt23@ Syntax10.Scn.Fntdefaultcustom2!0)IIdefault2@0)IIt24P- Syntax10.Scn.FntdefaultMyUI.InitPrintDlg Z   Z    Z  @Y (DialogStaticTextsItemDesct1@}0n@ Syntax10.Scn.Fnt 0DialogButtons1MyUI.Num"1"z@ @ Syntax10.Scn.Fnt2MyUI.Num"2" @ @ Syntax10.Scn.Fnt3MyUI.Num"3"~@ @ Syntax10.Scn.Fnt4MyUI.Num"4"z`D@ @ Syntax10.Scn.Fnt5MyUI.Num"5" `D@ @ Syntax10.Scn.Fnt6MyUI.Num"6"~`D@ @ Syntax10.Scn.Fnt7MyUI.Num"7"z@ @ Syntax10.Scn.Fnt8MyUI.Num"8" @ @ Syntax10.Scn.Fnt9MyUI.Num"9"~@ @ Syntax10.Scn.Fnt*MyUI.Op"mult"v @ @ Syntax10.Scn.Fnt-MyUI.Op"sub"v`D@ @ Syntax10.Scn.Fnt+MyUI.Op"add"v@ @ Syntax10.Scn.Fnt=MyUI.Op"res"v@ @ Syntax10.Scn.FntDialogTextssetv0 ' @ SetMyUI.SetVar`0 @ Syntax10.Scn.FntDialogComboBoxesgsetMyUI.Variable0 pF @ dCRMyUI.Reset @ @ Syntax10.Scn.Fnt0MyUI.Num"0"z@ @ Syntax10.Scn.Fnt.MyUI.Comma @ @ Syntax10.Scn.Fnt/MyUI.Op"div"v@ @ Syntax10.Scn.FntClrMyUI.Clear0u @ @ Syntax10.Scn.FntSqrMyUI.Op"sqr"E@ Syntax10.Scn.FntSinMyUI.Op"sin"E@ Syntax10.Scn.FntCosMyUI.Op"cos"`DE@ Syntax10.Scn.FntTanMyUI.Op"tan"E@ Syntax10.Scn.FntExpMyUI.Op"exp"E@ Syntax10.Scn.FntDialogCheckBoxesinv  qqinvers@ Syntax10.Scn.FntinversmodeMyUI.ShowNumber}`=@ Z+/-MyUI.Op"sign"~p@ Syntax10.Scn.FntAMyUI.Num"10"0u@ @ Syntax10.Scn.FntBMyUI.Num"11"@ @ Syntax10.Scn.FntCMyUI.Num"12"0u`D@ @ Syntax10.Scn.FntDMyUI.Num"13"`D@ @ Syntax10.Scn.FntEMyUI.Num"14"0u@ @ Syntax10.Scn.FntFMyUI.Num"15"@ @ Syntax10.Scn.Fntt20uE@ Syntax10.Scn.FntVars: DialogRectanglesr10uVP`[1/xMyUI.Op"oneDivX"`DE@ Syntax10.Scn.FntMyUI.InitCalc_  &   g< A Guide to Dialogs A Graphical User Interface for Oberon M. Knasmller, 12.8.94 / 16.2.95  1. Introduction  Graphical user interfaces of modern workstations are usually composed of a number of items such as buttons, check boxes, text fields, and scroll bars which allow a user to interactively communicate with the computer. We call a panel of such items a dialog. This guide describes the use of dialogs in the Oberon System. Dialogs extend the original user interface of Oberon and give the user a choice between a compact textual interface (for professional programmers) and a more intuitive graphical interface (for end users). A similar package for graphical user interfaces is the Gadgets system implemented for Oberon System 3. While the Gadgets system is more powerful (e.g. nested objects) it is also more complicated and incompatible with the standard Oberon system. The virtue of the Dialogs package is that it is extremly light-weight and smoothly fits into the existing Oberon system. Figure 1 shows a sample dialog. Dialogs can be edited interactively and stored on a file. Applications can use dialogs by loading them from a file and retrieving their items by name or by a number. Dialog items can also be connected to commands that are called automatically when the item is clicked. Thus it is very simple to add a graphical user interface to any Oberon program.   Figure 1. A sample dialog  Module Dialog offers commands to use, edit and print a dialog. Dialogs can be displayed in two modes: Dialog.Open opens a dialog for using it while Dialog.Edit opens it for editing. 2. Using Dialogs Opening a Dialog for Using its Items Dialog.Open (name | ^) opens a dialog viewer and displays the dialog from file name. The menu text of the opened viewer is taken from the file Dialog.Menu.Text if such a file exists.The user can now work with the dialog by clicking at buttons or check boxes or by typing text into a text field. He cannot modify the dialog, i. e., he cannot add or move dialog items. To do that he has to use the command Dialog.Edit. Opening a Dialog for Editing Dialog.Edit (name | ^) opens a dialog viewer and displays the dialog from file name for editing. If such a file does not exist, a new dialog is created. The following sections describe how to build dialogs by inserting items, moving and resizing them, and inspecting and modifying their attributes. Most editing operations can be done by moving and clicking the mouse. Thus clicking the left button while editing a dialog, causes a cross to appear. This is called the caret. Inserting New Dialog Items Dialog items (buttons, check boxes, etc.) can be inserted in viewers opened with Dialog.Edit. Every dialog item is defined in a separate module that exports also a command Insert, to insert an item of this class in the panel containing the caret position. The syntax of the Insert command is .Insert ([name] [x y w h] | ^) where name is a panel-wide unique name, x and y are the lower left coordinates, w is the width and h is the heigth of the object. if these parameters are not set, standard values will be taken. Usually no item can overlap others. The following items are currently implemented: DialogButtons. A button is a small named rectangle that can be pushed with an mouse click. DialogCheckBoxes. A check box is a rectangular button that can be in two states, on and off, toggled with a mouse click. Usally there is a static text displayed to its right. DialogStaticTexts. A static text item is a text that is shown in a panel but cannot be edited. DialogTexts. A text item is a rectangle in which the user can enter text. DialogGroupBoxes. A group box groups together several objects. Of course a group box may overlap other elements. DialogRadioButtons. A radio button is a diamond object with a state that can be on or off. All radio buttons within a group box are related and represent mutually exclusive choices (i.e., only one button of this set is on at any time). DialogListBoxes. A list box displays a text of lines, that can be selected by moving the mouse up and down. DialogComboBoxes. A combo box is an item containing an entry field and a push button. It responds to a mouse click on the push button by showing a text of lines that can be selected by moving the mouse up and down. DialogSliders. A slider item consists of a rectangular area with a small bar inside. It is used to enter integer numbers. DialogIntegerSliders. An integer slider item consists of a rectangular area with an integer number inside. DialogLines. A line item is a graphical object, which can be used to draw a line in the panel. DialogCircles. A circular item which may overlap other elements. DialogRectangles. A rectangular item which may overlap other elements. DialogDates. A date item displays the current date. DialogClocks. A (digital) clock is an item displaying the current time. DialogAnalogClock. An analog clock displaying the current time. DialogColorPicker. A color picker item is a rectangular item, which allows the user to select one of the sixteen Oberon colors. DialogGraphics. Graphic items support incorporation of graphs compatible with the standard Draw package into dialogs. DialogKeplers. Kepler items support incorporation of ports compatible with the Kepler package into dialogs. Items can also be created using the dialog "Insert.Dlg", which can be opened with Dialog.Open Insert.Dlg (see Figure 2).   Figure 2. Insert.Dlg Selecting an item of the list box and clicking the "Set" Button inserts a new item in the panel containing the caret. There are also several text items which allow the user to specify parameters for the new items. If these parameters are not set, default values will be taken. The meaning of the text items are as follow: Name the panel-wide unique name of the item. X, Y the lower left corner coordinates of the item in panel-relative coordinates. W the width of the item. H the height of the item. Cmd a command which is called whenever a property of the object is changed. Par a string containing the names of the text items or combo boxes and Oberon stings that should be concatenated to form Oberon.Par.Text. Cmd and Par are associated by following rule: The command cmd can assume that Oberon.Par.text contains the texts defined through the property par (e.g. if par = "t1 t2 "t3"" and if there is a text item t1 containing the text "name" and also a text item t2 containing the text "text", then the command can assume that Oberon.Par.text contains the text "name text t3")). Example: To create a dialog that allows you to invoke System.Time via a button you have to do the following: - type "MyDialog" in the Dialog field and click the "Edit" Button. - set the caret in the new viewer with a left mouse click. - type "Time" in the Name field and "System.Time" in the Cmd field. - select "Button" from the list box and click the "Set" Button. This will make the following dialog (see Figure 3).   Figure 3. MyDialog  - store it on a file with the command Dialog.Store. - open it again clicking the "Open" button. - every click at the "Time" button will now invoke the command System.Time. Mouse Clicks ML sets the caret to the position of the mouse pointer. MR selects all dialog items in the rectangle described with the pressed mouse button. MM moves the selected elements (or the element under the mouse pointer if no element is selected) while the mouse is moved. MR + ML deletes the selected items. MR + MM copies the selected object to the position of the mouse pointer. MM + ML changes the size of the element under the mouse pointer, while the mouse is moved. MM + MR opens a dialog to edit the properties of the object under the mouse pointer. ML + MM copies the selected objects to the mouse pointer. Storing a Dialog on a File Dialog.Store stores the dialog under the name appearing in its menu frame. Printing a Dialog Dialog.Print server (* | ^ | {name} ~) prints dialogs to a print server named server. If "*" is specified, the dialog in the marked viewer is printed. Otherwise the dialogs specified by the names are printed. 3. Inspecting and Modifying the Attributes of an Item The attributes of an item can be conveniently inspected and modified by doing an MM+MR click on the item. A new dialog will appear that allows changing the attributes of the inspected item. Alternatively the user may also inspect and modify these attributes using the following commands. Retrieving Attributes Dialog.GetInitCmd writes the command of the marked dialog to the log viewer. This cmd will be called by open the dialog with Dialog.Open. It can be used to initaly different items. Dialog.GetCmd writes the command of the object under the caret to the log viewer. Dialog.GetPar writes the parameter of the object under the caret to the log viewer. Dialog.GetDim writes the coordinates of the lower left corner, the width and the height of the object under the caret to the log viewer Dialog.GetName writes the name of the object under the caret to the log viewer. Changing the Attributes of an Item Dialog.SetInitCmd (cmd | ^) sets the command of the marked dialog to cmd. Dialog.SetCmd (cmd | ^) sets the command of the object under the caret to cmd. DialogSetPar (par | ^) sets the parameter of the object under the caret to par. Dialog.SetDim (x y w h | ^) sets the lower left corner coordinates of the object under the caret to x and y, the width to w, and the height to h. Dialog.SetName (name | ^) sets the name of the object under the caret to name. Dialog.AlignSelected (dir | ^) aligns the selected objects so that they have the same left, right, top or bottom coordinates (specified by dir = R(ight), L(eft), U(p) or D(own)). Dialog.RegulateDistance (dir | ^) regulates the distance between the selected objects. Dialog.SetGrid (int| ^) sets the grid to which mouse movements are restricted. 4. A very simple Dialog Dialogs can be used as a graphical user interface for existing Oberon applications. This is shown in Fig. 4. Lets assume a dialog "Open.Dlg" that contains a text named "file" and a button named "Open". The button is associated with the command Edit.Open. The button property par (see above) is set to "file".   Figure 4. Open.Dlg.  The user can open the dialog with Dialog.Open Open.Dlg and can write a file-name in the text item. Pressing the "Open"-button opens the specified file. 5. Retrieving Dialog Items from a Program Dialog items can be retrieved by name. A dialog panel p can be opened by DialogFrames.OpenPanel(..., p). The item with the name "n" can then be retrieved with item : = p.NamedObject ("n"). The following example shows how to use dialogs from a program. Lets assume a dialog "Test.Dlg" (see Fig. 5) that contains a text named "file", a check box named "draft", and a button named "Do". The button is associated with a command MyEdit.Print. Thus clicking the button calls this command which prints the file specified by the "file" in the mode specified by the check box "draft" (draft mode or normal mode).   Figure 5. Test.Dlg The source code of MyEdit could be as follows: MODULE MyEdit; IMPORT DialogCheckBoxes, DialogFrames, Dialogs, DialogTexts, Oberon, TextFrames, Texts; VAR w: Texts.Writer; PROCEDURE Open*; (** you can also use Dialog.Open Test.Dlg instead of this command *) VAR x, y: INTEGER; p: Dialogs.Panel; BEGIN Oberon.AllocateUserViewer (Oberon.Mouse.X, x, y); DialogFrames.OpenPanel ("Test.Dlg", x, y, p); END Open; PROCEDURE Print*; (** prints the text in draft or not draft mode *) VAR t, draft: Dialogs.Object; par: Oberon.ParList; res: INTEGER; t1: Texts.Text; p: Dialogs.Panel; BEGIN NEW (par); par.text := TextFrames.Text (""); par.vwr := Oberon.FocusViewer; par.frame := Oberon.Par.frame; p := Dialogs.cmdPanel; (*the panel from where the command was called*) t := p.NamedObject ("file"); draft := p.NamedObject ("draft"); WITH t: DialogTexts.Item DO WITH draft: DialogCheckBoxes.Item DO IF draft.on THEN Texts.WriteString (w, "QuickDraw % "); ELSE Texts.WriteString (w, "QuickDraw "); END; t1 := t.GetText (); Texts.Save (t1, 0, t1.len, w.buf); Texts.Append (par.text, w.buf); Oberon.Call ("Edit.Print", par, FALSE, res); ELSE END ELSE END END Print; BEGIN Texts.OpenWriter (w); END MyEdit. 6. Dialog Elements Dialogs can also be used as elements in a text (subclass of Texts.Element). The command DialogElems.Insert inserts a new dialog element into a text at the text caret position. Using the middle mouse button, a dialog element can be "opened" for editing in a dialog viewer. The command DialogElems.Update in the viewers menu can be used to make the modifications in the dialog permanent. Dialog elements can be used like ordinary dialogs: focus the element using the left mouse key and do everything what you would do with an ordinary dialog. command explicit parameters implicit parameters DialogElems.Insert ("^" | "*" | name) caret (plus marked viewer, if "*" is used) Inserts a dialog element sized to show the dialog stored in file "name". If a dialog viewer is marked, the command inserts the dialog of this viewer. 7 Sample Dialogs In the following, some dialogs which manages a simplified working with the Oberon system, are presented. The sample dialogs are contained in the Oberon Dialogs distribution. Search and Replace   Figure 6. Search.Dlg Parcs and Style Elements   Figure 7. GetSet.Dlg Select a parc and click the GetAll button. Now you can change the settings of the parc with the help of the GetSet.Dlg. In the Style combo box all style elements contained in the text with the selection and in Styles.Text are displayed. You can insert style elements from the combo box by setting the caret at the right position and selecting the style from the combo box. You can define your standard styles in Styles.Text and use them in all your documents. Compile  Figure 8. Compile.Dlg Specify the source to compile and the options. These options are used additionally to those defined in Folds.Profile or to those that are listed in the specification of the source file. Inspector  Figure 9. Inspector.Dlg Select a text element and click the GetType button. Now you see the type of the text element selected. Print  Figure 10. Print.Dlg Specify the options and click the Print button to print the text in the marked viewer. You can save the options (in the file "PrintOptions") and revert to the default options. Calculator  Figure 11. Calc.Dlg Do simple calculations by clicking on the buttons. You can associate the displayed value with a variable by typing the name into the text field and clicking the Set button. "Clr" clears the value displayed. "CR" also clears the list of variables in the combo box. The combo box in the upper right corner controls the display. You can select any of the following types: dec, bin, oct, hex, real and char. If you selected "invers", then the inverse functions of Sin (= ArcSin), Cos (= ArcCos), Tan (= ArcTan), Exp (= Ln) and Sqr (= Sqrt) are executed.  Acknowledgments I wish to thank Prof. Hanspeter Mssenbck, for the support of this project. Further thank goes to my colleagues Markus Hof, Christian Mayrhofer, Christoph Steindl and Josef Templ for their valueable input. Christoph Steindl is also the creator of the sample dialogs. Comments Error reports and comments may be sent to knasmueller@ssw.uni-linz.ac.at or oberon@ssw.uni-linz.ac.at