PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/deviceN referenceC hash_tablerefersizeOIxNbothI1sN M.device.S.yCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxN M.device.S.yRICdateOIx(úóöNynCstringOIx7Set the Y-coordinate of the origin. See `Device ->move'CchainsizeOIxIENM.device.S.moveXnnnnsNM.device.S.geometryOIxNM.device.S.geometryRIOIx(úî´NgeometrynOI xx`Device ->geometry' updates `Device <-offset' (the offset of the device's coordinate system relative to its super-device) such that the top-left corner is at (X, Y). The <-width and <-height of a device is defined to be the union of the area of the member graphicals (intersected with `Device <-clip_area') and the W and H parameters of the geometry request are thus ignored.OI xIEN'$class/graphical$M.graphical.S.geometryXnnnnsNM.device.G.containsOI xNM.device.G.containsRIOI x(úõ8NcontainsnOI xUImplementation of the visual part-of hierarchy. Equivalent to `Device <-graphicals'.OIxIeNV.device.graphicalsEN!$class/visual$M.visual.G.containsXnnnnsNV.device.levelCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOIxNV.device.levelRIOIx?iÁ³NlevelnOIxNesting depth from the window. The window itself has <-level equals 0. Used for quick detection of a common device for two graphicals. See also ->reparent.nnnsNV.device.pointedOIxNV.device.pointedRIOIx(zóNpointednOIx…Chain of (graphical) members whose bounding-box overlap the position of the mouse. Internally used to generate area_enter and area_exit events and perform event-dispatching. May be used from code that handles an event to detect which graphicals overlap the mouse-position. The first element of this chain is the top-most graphical. The others are further and further in the background.OIxIeNM.device.S.update_pointedENM.device.G.pointed_objectsXnnsNM.device.S.layoutOIxNM.device.S.layoutRIOIx,죾NlayoutnnOIxIXnnnnsNM.device.G.insideOIxNM.device.G.insideRIOIx,CÞRNinsidenOIx'Returns a new chain object with all graphicals that are entirely inside the argument area. If no graphicals can be found, an empty chain is returned. Described with `selection' because it is commonly used to implement selecting multiple graphicals by dragging a box around them. See PceDraw.OIxIeNM.device.S.roomEN$class/area$M.area.S.insideXnnnnsN M.device.S.xOIxN M.device.S.xRIOIx(úóëNxnOIx7Set the X-coordinate of the origin. See `Device ->move'OI xIENM.device.S.moveXnnnnsNM.device.S.resizeOI!xNM.device.S.resizeRIOI"x,}EŸNresizenOI#xyResize the member graphicals of the device in X and Y direction. See `Graphical ->resize' for details on the parameters.OI$xIEN%$class/graphical$M.graphical.S.resizeXnnOI%x» The following defaults apply: # Y-resize factor (2nd argument) defaults to the X-resize-factor (1st argument). # The resize origin defaults to <-position (origin) of the deviceOI&x– The contents are resize by sending `graphical ->resize' to each graphical. If graphicals are related using constraints the result may be incorrect.sNM.device.S.initialiseOI'xNM.device.S.initialiseRIOI(x(úîÛN initialisennnnnnnsNM.device.S.reparentOI)xNM.device.S.reparentRIOI*x,CîöNreparentnOI+xƒCalled from PCE graphics kernel if something has changed to the <-device organisation up in the <-device hierarchy. This general method performs the following: * Updates `device <-level' to reflect the distance to the `top-most' graphical device. * Sends ->reparent to all its member graphicals * Invoked `graphical ->reparent' on itself See `graphical ->reparent' for details.OI,xIEN'$class/graphical$M.graphical.S.reparentXnnnnsNM.device.S.referenceOI-xNM.device.S.referenceRIOI.x,CéÌN referencenOI/x"Move the reference-point (offset) of the device to be at point, but move the member graphicals the same amount in the other direction, such that they remain displayed at the same position. The default reference point is the top-left corner of the bounding box of all the member graphicals.nnnnnsNM.device.S.changed_unionOI0xNM.device.S.changed_unionRIOI1x2±þN changed_unionnOI2xîIf the union of the displayed graphicals (see `area->union') has changed, this method is called. The arguments indicate the old union of the graphicals. This method may be used to implement custom scroll_bar objects with figure objects.nnnnnsNV.device.bad_bounding_boxOI3xNV.device.bad_bounding_boxRIOI4x(zí@Nbad_bounding_boxnOI5xfIndicates that the contents has been changed such that the bounding-box (area) needs to be recomputed.nnnsNM.device.S.positionOI6xNM.device.S.positionRIOI7x,Cé­NpositionnnOI8xIENV.device.offseteNM.device.S.moveXOI9xIENV.device.offsetXnnnsNV.device.clip_areaOI:xNV.device.clip_areaRIOI;x,CàþN clip_areanOIxNM.device.G.catch_allRIOI?x,1¥ÅN catch_allnOI@x¬Find a displayed graphical by it's name. To find a graphical named `hello', type ?- get(Device, hello_member, Hello). NOTE: Graphicals may also be found using <-member.OIAxIENM.device.G.memberXnOIBxLAsking for a graphical that does not exist will trap the no_behaviour error.nnsNM.device.S.layout_dialogOICxNM.device.S.layout_dialogRIOIDx3.[´N layout_dialognOIExÜThis method implements the layout of dialog objects (see `dialog ->layout'). It may be used to define compound dialog windows or to exploit the layout mechanism for dialog windows in a normal window or graphical device.nnnnnsNM.device.S.roomOIFxNM.device.S.roomRIOIGx,CàyNroomnOIHx€Test if there are no graphicals that have `Graphical <->displayed: @on' and overlap with area on the device. See also <-inside.OIIxIENM.device.G.insideXnnnnsN M.device.G.yOIJxN M.device.G.yRIOIKx(ûDNynOILx.Returns the Y-coordinate of `Device <-offset'.OIMxIENM.device.G.offsetXnnnnsNM.device.S.eraseOINxNM.device.S.eraseRIOIOx>‰VØNerasenOIPxƒErase a graphical from the device. The graphical is removed from the <-graphicals chain of the device, the graphical's <-device is set to @nil and the display is updated. Note that the graphical is only destroyed if it had no other references. To make sure the graphical is destroyed, use `Graphical ->free'. To be sure all sub-graphicals are removed as well, use `Graphical->destroy'.OIQxIeN'$class/graphical$M.graphical.S.reparentENM.device.S.clearXnnnnsNM.device.G.memberOIRxNM.device.G.memberRIOISx(û ÓNmembernOITxˆReturn the first graphical of `Device <-graphicals' that has name `name'. This mechanism is commonly used to address parts of a device.OIUxIeNM.device.G.catch_allENM.device.G.get_catch_alleN $examples$12eN!$class/graphical$V.graphical.nameeNV.device.graphicalseN $examples$3XnOIVx5Fails if no graphical with the requested name exists.nnsNM.device.S.eventOIWxNM.device.S.eventRIOIXx)á¦NeventnOIYx×Process an event. It performs the following operations: * Update `Device <-pointed' and generate `area_enter' and `area_exit' events to graphicals that were added/removed from this chain. Implemented by `Device ->update_pointed' * Post the event to the elements on `Device <-pointed' using `Event ->post'. If `Event ->post' succeeds on some graphical, stop with success. * Activate `Graphical ->event' to process recognisers defined on the device.OIZxIeNM.device.S.update_pointedeN$$class/graphical$M.graphical.S.eventEN$class/event$M.event.S.postXnnnnsNM.device.S.for_someOI[xNM.device.S.for_someRIOI\x.Ö5,Nfor_somenOI]xËRun code on all member graphicals that have <-name equal to name. The exit status is ignored and ->for_some always succeeds. If `name' is @default, code is run on all <-graphicals in the device object.OI^xIeNM.device.S.for_allENV.device.graphicalsXnnOI_x?If name is @default, code is executed on all member graphicals.nsNM.device.G.findOI`xNM.device.G.findRIOIax, KNfindnOIbxŽFind the most `local' graphical overlapping with `at' for which `condition' succeeds. This methods uses a similar search technique as used by ->event and is first of all intended to help writing gestures that have to relate two graphical objects, possibly not placed on the same device object. Examples are class connect_gesture or a `drag-and-drop' gesture. <-find performs the following steps: * Traverse the list <-graphicals from tail to head (i.e. starting at the topmost graphical). For each graphical: # if `at' is given and `graphical ->in_event_area' fails Continue with the next graphical # if the graphical is a device object Recursively call <-find on the device. Return with the result if any. # if the graphical is not a device Evaluate the condition and return the graphical if the condition succeeds. * Finally, evaluate the condition on the device itself and return the device if the condition succeeds. The following example finds a graphical that defines the send-method `drop' in the same window as where the event occurred: ... get(@event?window, find, @event, message(@arg1, has_send_method, drop), Gr), ...nnnnnsNM.device.S.unlinkOIcxNM.device.S.unlinkRIOIdx>ñÓNunlinknOIexÑ->erases all <-graphicals from the device and then calls `graphical ->unlink'. Note that erased graphicals are only garbage-collected if they have no references from other objects. See also `visual ->destroy.nnnnnsNM.device.S.computeOIfxNM.device.S.computeRIOIgx,Cñ8NcomputenOIhx¶Send ->compute to all members of -recompute, next recomputes the <-format if requested by -bad_format and finally recomputes the <-area (bounding box) requested by -bad_bounding_box.nnnnnsNM.device.S.for_allOIixNM.device.S.for_allRIOIjx,CÞ¨Nfor_allnOIkx÷Run code on all graphicals with given <->name. Stops with failure executing code fails for some graphical. If name is @default, code is executed on all member graphicals, which makes the method equivalent to send(Dev?graphicals, for_all, Code)OIlxIeNM.device.S.for_someeN$class/chain$M.chain.S.for_allENV.device.graphicalsXnnnnsNM.device.S.modified_itemOImxNM.device.S.modified_itemRIOInx0½ÜƒN modified_itemnOIox5Virtual method, fails. Dialog item's send this message to their device after they have been modified. If this message succeeds, they assume the dialog is an `attribute editor' and will not forward their <-message. Otherwise they will immediately forward their <-message. See also `dialog ->modified_item'.nnnnnsNM.device.S.advanceOIpxNM.device.S.advanceRIOIqx3\ÔÔNadvancenOIrxÒAdvance the keyboard-focus to the next graphical object of this device for which the test `Graphical ->_wants_keyboard_focus' succeeds. Used by text_item to implement `text_item ->advance'. This method cycles through the <-graphicals chain. If the argument is a graphical and there is no graphical that requests the keyboard focus further down the <-graphicals chain and the device is not the window itself, and `propagate' not is @off, it will invoke ->advance on its <-device, passing itself as argument. This behaviour allows for handling the keyboard focus in dialog-windows built from nested devices. Otherwise, If no graphical wants to have the keyboard focus, the keyboard focus of the <-window is set to @nil.OIsxIeN4$class/text_item$M.text_item.S._wants_keyboard_focuseN$$class/text_item$V.text_item.advanceEN'$class/window$M.window.S.keyboard_focusXnnOItxeIf graphical is @default, the first graphical accepting `->_wants_keyboard_focus' is given the focus.nsNM.device.S.selectionOIuxNM.device.S.selectionRIOIvx*ÙØØN selectionnOIwxeSet the member graphicals that have `graphical <->selected: @on'. If the argument is a graphical, this graphical will be selected. If it is a chain of graphicals, each member of this chain will be selected. If the argument is @nil, no graphical will be selected. All graphicals displayed on this device, except for the indicated one's will be deselected.OIxxIeNM.device.G.selectionEN%$class/graphical$V.graphical.selectedXnnnnsNM.device.S.formatOIyxNM.device.S.formatRIOIzx(úêvNformatnOI{x|This method has two modes of operation: # Device ->format: format* Attaches a format object to a device. This implies the graphicals are placed in a two-dimensional grid. # Device ->format: name, value Change an attribute of the associated format object and recompute the layout of the graphicals in the device according to the new format. See class format for details.OI|xIEN$class/format$C.formatXnnnnsNM.device.S.clearOI}xNM.device.S.clearRIOI~x?‚ËNclearnOIx™Remove all graphicals from the device. The argument controls what happens to the removed graphicals. By default it uses `device->erase', leaving destruction to the reference-count garbage collector. Using free the graphicals will be send a ->free, ensuring destruction of the graphicals, but not their parts and using destroy ensures deep destruction of the displayed graphicals based on `visual->destroy'.OI€xIENM.device.S.eraseXnnnnsNV.device.graphicalsOIxNV.device.graphicalsRIOI‚x.Ö4ÞN graphicalsnOIƒx™Chain of graphicals displayed on the device. The first graphical is the one that is entirely in the background; the last is entirely in the foreground. See `graphical ->expose' and friends to change the stacking order of overlapping graphicals. The contents of this chain may be queried but not changed. Use the manipulation behaviour defined on devices and graphicals to change the contents of the device. Note that the `collection enumeration' methods ->for_all and `->for_some' are also available for devices. The following example changes the pen thickness of all graphicals of a device to 2: send(Device, for_some, @default, message(@arg1, pen, 2)),OI„xIeNM.device.G.containseN#$class/graphical$V.graphical.deviceeNM.device.G.membereNM.device.S.for_someENM.device.S.for_allXnnsNM.device.G.selectionOI…xNM.device.G.selectionRIOI†x(ûN selectionnOI‡xŒReturns a new chain with all graphicals that have `Graphical <-selected: @on'. If there are no such graphicals, an empty chain is returned.OIˆxIeNM.device.S.selectionEN%$class/graphical$V.graphical.selectedXnnnnsNV.device.formatOI‰xNV.device.formatRIOIŠx,CàQNformatnOI‹xìWhen not @nil, the positions of the graphicals displayed on the device is computed using the attached format. If a device has a <-format, graphicals cannot be moved any more. Also, the position argument of ->display is simply ignored.OIŒxIEN$class/format$C.formatXnnsNV.device.recomputeOIxNV.device.recomputeRIOIŽx*¸ZÄN recomputennOIxIEN&$class/graphical$M.graphical.S.computeXnnsNM.device.S.foregroundOIxNM.device.S.foregroundRIOI‘x(úé¿N foregroundnOI’x¾The foreground colour of a device determines the colour used to draw member graphicals that have <-colour not equal to @default. `Device ->foreground' is equivalent to `Graphical ->colour'.OI“xIeN%$class/graphical$M.graphical.S.colourEN$class/colour$C.colourXnnnnsNM.device.S.update_pointedOI”xNM.device.S.update_pointedRIOI•x)áuNupdate_pointednOI–xrUpdate the `Device <-pointed' chain to represent all graphicals displayed on the device for which `event' is in the event_area. Graphicals that are deleted from the chain are send an `area_exit' event. Graphicals that are added to the chain are send an `area_enter' event. If on or more of the mouse-buttons are down, these events are `area_cancel' and `area_resume'.OI—xIeNM.device.S.eventeNV.device.pointedEN $topics$130XnnnnsN M.device.G.xOI˜xN M.device.G.xRIOI™x(û;NxnOIšx.Returns the X-coordinate of `Device <-offset'.OI›xIENM.device.G.offsetXnnnnsNV.device.offsetOIœxNV.device.offsetRIOIx,}EŸNoffsetnOIžx“Offset of the coordinate-system to the coordinate-system of it's device. Managed via the geometry-changing behaviour of devices (->position, etc.).OIŸxIENM.device.S.positionXnnsNM.device.S.moveOI xNM.device.S.moveRIOI¡x(úï=NmovenOI¢x•Move the origin of the device to be at point. Note that this need not be the top-left corner. To set the top-left corner, use `Device ->set: X, Y'.OI£xIeN M.device.S.yeN M.device.S.xENM.device.S.positionXnnnnsNM.device.S.append_dialog_itemOI¤xNM.device.S.append_dialog_itemRIOI¥x,좣Nappend_dialog_itemnOI¦xAppend a graphical object using the dialog-layout mechanism. This method may be used to define sub-dialogs. See `dialog ->append' for details.nnnnnsNM.device.G.positionOI§xNM.device.G.positionRIOI¨x,Cé“NpositionnnOI©xIENM.device.G.offsetXOIªxIENV.device.offsetXnnnsNC.deviceCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOI«xNC.deviceRIOI¬x,CñtNdevicenOI­xA (graphical) device is a collection of graphical objects. As device itself is a graphical objects; devices may be nested. Class device describes the management of such a collection: adding (displaying) graphical objects; erasing graphical objects; changing them; dispatching events over their displayed graphical objects; etc. Devices communicate changed area's to their super-device and eventually to the window, which takes care of planning and executing the actual redisplay of the X-window. The PCE-user normally uses the behaviour of devices via the classes figure or one of the sub-classes of window. Class device itself may be used for the definition of compound graphical objects. The <-area of a device is by definition the bounding box of all <-displayed graphical objects.OI®xIeN,$class/graphical$M.graphical.G.common_deviceeN#$class/graphical$V.graphical.deviceeN $topics$137eN$class/graphical$C.graphicaleN$class/event$C.eventeN#$class/object$M.object.S.recogniserXnnnsNM.device.G.pointed_objectsOI¯xNM.device.G.pointed_objectsRIOI°x-@KNpointed_objectsnOI±x›Determines all objects that overlap with some position. This method is used internally to determine the objects to which an event should be send. The first argument describes the position. It is either a point or an event. In the latter case the position of the event is taken. If chain is supplied, this chain is filled with the matching graphicals. This chain is `chain->clear'ed first. If it is @default, a new chain object with the matching graphicals it returned. The matching graphicals are the graphicals for which `Graphical ->in_event_area' succeeds. The graphicals are stored in the chain, such that the top-most graphical is the head of the chain.OI²xIeNV.device.pointedEN,$class/graphical$M.graphical.S.in_event_areaXnnnnsNM.device.G.offsetOI³xNM.device.G.offsetRIOI´x,CéZNoffsetnnOIµxIeN M.device.G.yeN M.device.G.xENM.device.G.positionXOI¶xIENV.device.offsetXnnnsNM.device.S.displayOI·xNM.device.S.displayRIOI¸x0´HÅNdisplaynOI¹xìDisplay a graphical object on the device. This is the principal way of drawing on a device. It performs the following operations: * if `point' is not @default, invoke `graphical ->set' with the X and Y values of the point. * invoke `graphical ->device: device' * invoke `graphical ->displayed: @on' Note that the geometry management may be redefined for each graphical using `graphical ->geometry'. Also `graphical ->device' and `graphical ->displayed' may have been redefined.OIºxIeN'$class/graphical$M.graphical.S.reparenteN)$class/graphical$M.graphical.S.display_oneN&$class/graphical$V.graphical.displayedEN#$class/graphical$V.graphical.deviceXnnOI»x„If point is omitted, the current position of the graphical is used. For graphicals that were never displayed, this is usually (0,0)nsNV.device.bad_formatOI¼xNV.device.bad_formatRIOI½x(zíjN bad_formatnOI¾xdIndicates the contents has been changed such that the attached format object needs to be recomputed.OI¿xIEN$class/format$C.formatXnnXaCnumber O IÀxx