PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/dialogN referenceC hash_tablerefersizeOIxNbothIsNM.dialog.S.appendCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.dialog.S.appendRICdateOIx0µÃðNappendnCstringOIxËAppend an instance of class dialog_item or a plain graphical object to the dialog object. The appended item is placed according to `relative_to_last': below below the last one right right of the last one next_row below the left-most item of previous row If relative_to_last is omitted, the following defaults apply: if the last item *and* this item are instances of class button, the item is placed `right'. Otherwise the item is placed `next_row'.CchainsizeOIxIeNM.dialog.S.layoutENM.dialog.S.displayXnnnnsNM.dialog.S.heightOIxNM.dialog.S.heightRIOIx4ö–hNheightnOI x See ->width.nOI xIeNM.dialog.S.widthXnnnsNC.dialogCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOI xNC.dialogRIOI x.ì-çNdialognOI xºA dialog is a window that is designed to be used for creating dialog boxes. A dialog performs automatic layout over its contents, thus largely simplifying the definition of simple dialog windows and the automatic generation of dialog windows. Dialog windows normally only display instances of subclasses of class dialog_item. These are added to the dialog using the `dialog ->append' method rather than `window ->display'. `dialog ->append' places the item relative to the other items in the dialog. When the frame in which the dialog resides is created, the final positions are automatically calculated by `dialog ->layout'. Dialog windows may be operated in two modes: each change to an item in the dialog immediately sends a message or pressing an `apply' button will apply all modifications made to the dialog. The example below illustrates a dialog of the latter type for editing some window attributes: dialog(W) :- new(D, dialog('Edit Window Attributes')), send(D, append, label(reporter)), send(D, append, text_item(frame_label, W?frame?label, message(W?frame, label, @arg1))), send(D, append, slider(width, 50, 500, W?visible?width, message(W, width, @arg1))), send(D, append, slider(height, 50, 500, W?visible?height, message(W, height, @arg1))), send(D, append, button(apply)), send(D, append, button(restore)), send(D, append, button(quit, message(D, destroy))), send(D, default_button, apply), send(D, open). ?- new(@w, window), send(@w, open), dialog(@w). This dialog may be converted into an `immediate' changing dialog by deleting the apply button. See ->apply, ->modified_item and ->restore for details.OIxIeN $class/dialog_item$C.dialog_itemEN $examples$5XnnnsNM.dialog.S.initialiseOIxNM.dialog.S.initialiseRIOIx,AcŒN initialisenOIxƒCreate an empty dialog window. After creation it is normal to display instances of class dialog_item in the dialog using ->append.nnnnnsNM.dialog.S.activeOIxNM.dialog.S.activeRIOIx,AbäNactivennnOIxIENM.dialog.G.activeXnnnsNM.dialog.S.modified_itemOIxNM.dialog.S.modified_itemRIOIx0½Ý'N modified_itemnOIxªThis message is normally invoked by one of the member dialog_item objects. If the dialog has a <-default_button, this button will be activated using `button ->active: @on'. Otherwise, this method fails. Dialog-items will send their `dialog_item <-message' immediately if this message fails. Otherwise they assume the default button will activate `dialog ->apply'. See also `dialog_item ->modified', ->apply and ->restore.nnnnnsNM.dialog.S.layoutOIxNM.dialog.S.layoutRIOIx3\Ë™NlayoutnOIxvAlign the dialog_item objects in the dialog. This method is normally called from `dialog ->_compute_desired_size' when then dialog's frame is created. See also `frame ->fit'. The layout process consists of the following stages: 1) Place all items for which `dialog_item <-auto_align: @on' in a two-dimensional grid. 2) Automatically align labels and values of items placed above each other depending on * `dialog_item <-auto_label_align' * `dialog_item <-label_width' * `dialog_item <-auto_value_align' * `dialog_item <-value_width' 3) Items that have `dialog_item <-alignment' *not* `column', but one of `left', `center' or `right' are not horizontally with items above or below them, but combined with items to their left and right into sequences of items with the same alignment. At the end of the layout process aligned such sequences are aligned in the available space. Notably button objects have `button <-alignment: center', so a row of buttons is normally centered in the dialog window. 4) Compute the cell-size of the matrix and align the * `dialog_item <-reference' in the two-dimensional grid.OIxI eN'$class/dialog_item$V.dialog_item.placedeN%$class/dialog_item$V.dialog_item.lefteN,$class/dialog_item$V.dialog_item.label_widtheN&$class/dialog_item$V.dialog_item.beloweN1$class/dialog_item$V.dialog_item.auto_value_aligneN1$class/dialog_item$V.dialog_item.auto_label_aligneN0$class/dialog_item$V.dialog_item.align_in_columneN&$class/dialog_item$V.dialog_item.aboveeN M.dialog.S._compute_desired_sizeeNM.dialog.S.appendeN V.dialog.gapEN $class/dialog_item$C.dialog_itemXnnnnsNM.dialog.G.default_buttonOIxNM.dialog.G.default_buttonRIOIx,Ai´Ndefault_buttonnOIx›The default window of a dialog window is the button that has accelerator `RET'. There is no default default_button. See also ->modified_item and ->apply.nnnnnsNM.dialog.S.assign_acceleratorsOIxNM.dialog.S.assign_acceleratorsRIOI x6°[Nassign_acceleratorsnOI!x!Assign accelerators for the dialog_item objects. This method collects the labels of all member <-graphicals, computes a set of accelerators to use for them and finally uses `dialog_item->accelerator' to assign them. See also `menu->assign_accelerators' and `dialog->assign_accelerators'.nnnnnsNM.dialog.S.default_buttonOI"xNM.dialog.S.default_buttonRIOI#x,Ai)Ndefault_buttonnnnOI$xIENM.dialog.G.default_buttonXnnnsNM.dialog.S.applyOI%xNM.dialog.S.applyRIOI&x0¾øwNapplynOI'x‰Invoke the `dialog_item <-message' for each of the dialog_item's in <-graphicals. If `always' equals @on the message will be invoked regardless whether the user has modified the item or not. If `always' equals @off or @default the message will only be invoked if `dialog_item <-modified' yields @on. If the dialog has a <-default_button, execute `button->active: @off'. See also ->restore.nnnnnsNM.dialog.S.displayOI(xNM.dialog.S.displayRIOI)x,Ak]NdisplaynOI*xÝDisplay a graphical or dialog_item on a fixes position rather than exploiting automatic layout. Equivalent to `device->display', but invokes `dialog_item ->auto_align: @off' To inform ->layout not to move this object.OI+xIENM.dialog.S.appendXnnnnsNM.dialog.S.caretOI,xNM.dialog.S.caretRIOI-x,AjNNcaretnOI.x_Assign the caret to the named text_item object. See also ->advance and `text_item <-advance'.nnnnnsNV.dialog.size_givenCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOI/xNV.dialog.size_givenRIOI0x4ö–þN size_givennOI1xnSet by ->size, ->width and ->height. Used by ->_compute_desired_size to determine the dimensions that should not be altered. Values: # none ->_compute_desired_size sets <-width and <-height. # width ->_compute_desired_size only sets <-width # height ->_compute_desired_size only sets <-height # both ->_compute_desired_size does not modify dimensions.nnnsNM.dialog.S.sizeOI2xNM.dialog.S.sizeRIOI3x4ö•¥NsizenOI4xÑSet the size of the window as `window->size' and sets -size_given to both to avoid overruling of the given size by the automatic layout system invoked by ->_compute_desired_size. See also ->width and ->heightnnnnnsNM.dialog.G.activeOI5xNM.dialog.G.activeRIOI6x,}E NactivenOI7xqEquivalent to `window <->sensitive'. Both for consistency with class dialog_item and for backward compatibility.nnnnnsN M.dialog.S._compute_desired_sizeOI8xN M.dialog.S._compute_desired_sizeRIOI9x4ö—>N_compute_desired_sizenOI:xÕThis method is normally called from `frame->fit'. It invokes the automatic ->layout, assigns the ->caret to the first text_item and (depending on -size_given) computes the desired dimensions of the dialog window.OI;xIeN$class/frame$M.frame.S.fitENM.dialog.S.layoutXnnnnsNM.dialog.S.typedOIxòHandle keyboard accelerators registered with buttons and menu_items part of the dialog. See `button <-accelerator' and `menu_item<-accelerator'. This method is normally invoked from `window ->event'. It performs the following steps: 1) Convert the event_id into a key-name (see also class key_binding). 2) invoke `dialog_item ->key' on each member of the dialog window until one succeeds. 3) If no member accepts the key it will invoke `frame ->typed: event_id' on the associated frame.nnnnnsNM.dialog.S.restoreOI?xNM.dialog.S.restoreRIOI@x0¾÷¶NrestorenOIAx8Restores all items in the dialog to their default state by invoking `dialog_item ->restore' to all <-graphicals. If the dialog has a <-default_button, this is send `button->active: @off'. See also `dialog_item ->restore', `dialog_item <-default' and `dialog_item ->modified', `dialog_item ->apply' and ->apply.nnnnnsNM.dialog.G.report_toOIBxNM.dialog.G.report_toRIOICx,AlxN report_tonOIDxwIf there is a <-member dialog_item called `reporter', this item is returned. Otherwise `visual <-report_to' is invoked. This method is normally exploited by displaying a label object with name `reporter' on the dialog object. This label will then display all error messages raised from operating the dialog item. See `visual ->report', `object ->report' and class error.OIExIeN"$class/visual$M.visual.G.report_toEN$class/label$M.label.S.reportXnnnnsNM.dialog.S.widthOIFxNM.dialog.S.widthRIOIGx4ö– NwidthnOIHx÷Defines the width of the dialog window. If ->_compute_desired_size computes the size on the basis of the dialog's contents, the <-width will not be changed after this message. Sets -size_given to `width' or `both'. See also ->height and ->size.nnnnnsNM.dialog.G.borderOIIxNM.dialog.G.borderRIOIJx<ã°NbordernOIKxCIf the <-slot -border is not @default return it, else return <-gap.nnnnnsN V.dialog.gapOILxN V.dialog.gapRIOIMx(zó€NgapnnOINxIENM.dialog.S.layoutXnnsNV.dialog.borderOIOxNV.dialog.borderRIOIPx<ã°,NbordernOIQxcFree area around contents. If not specified this is the same as <-gap, the distance between items.nnnXaCnumber O IRxx