PCE version 4C man_modulenamespaceid_tablemodified current_idOIxNclass/graphicalN referenceC hash_tablerefersizeOIxNbothI“sNM.graphical.S.do_setCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.graphical.S.do_setRICdateOIx,ƵNdo_setnCstringOIxSet X, Y, W and H for graphical. Unlike the other geometry management methods, this method calls ->geometry rather then ->request_geometry.nnnnnsNV.graphical.colourCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOIxNV.graphical.colourRIOIx0µîNcolournOIxËThe <->colour attribute of a graphical describes the colour used to draw the affected pixels. It is either a colour object or @default. The latter implies the <->colour attribute of the device is used.CchainsizeOI xIEN$class/colour$C.colourXnOI xF@default. For windows, the default colour is `@display <-foreground'.sNV.graphical.displayedOI xNV.graphical.displayedRIOI x2ÛkžN displayednOI xIf @off, the graphical will not be displayed even if it is member of a device. The initial value is @off. It is set to @on by `device ->display' an @off by `device ->erase'. `Graphical ->displayed' is used to remove a graphical temporary from the display. See also `figure ->status'.OIxIeNM.graphical.G.is_displayedeN $class/device$M.device.S.displayeN'$class/dialog_item$M.dialog_item.S.showENV.graphical.deviceXnOIx2Initially @off. Set to @on by `Device ->display'.sNM.graphical.G.heightOIxNM.graphical.G.heightRIOIx*¸Ž7NheightnOIxHeight in pixels. Note that for some graphicals this value may be negative, indication the top-side is above rather than below the y-position.nnnnnsNM.graphical.G.distance_xOIxNM.graphical.G.distance_xRIOIx*¸ùN distance_xnOIx‚Yields an integer representing the distance between the graphicals in X-direction. Yields 0 if both areas overlap in X-direction.OIxIeN$class/area$M.area.G.distance_xeNM.graphical.G.distance_yENM.graphical.G.distanceXnnnnsNM.graphical.S.focus_cursorOIxNM.graphical.S.focus_cursorRIOIx0µ¹iN focus_cursornOIx¬Invokes `window ->focus_cursor' it the graphical is displayed in a window. Always succeeds. This will modify the cursor of the window until the window's focus is changed.OIxIeN$class/cursor$C.cursoreNM.graphical.S.focuseN%$class/window$M.window.S.focus_cursorEN$class/gesture$V.gesture.cursorXnnnnsNM.graphical.S.deviceOIxNM.graphical.S.deviceRIOIx,Æ£NdevicennnnnnnsNM.graphical.G.monitorOIxNM.graphical.G.monitorRIOIxD2C[NmonitornOIxŸFind the monitor object that has the largest overlap with the graphical. Fails if graphical does not overlap with any monitor. See also `display<-monitor'.nnnnnsNM.graphical.S.synchroniseOI xNM.graphical.S.synchroniseRIOI!x0µ°wN synchronisenOI"x„Invokes `display ->synchronise' on the result of `graphical <-display'. Always succeeds, also if graphical has no display attached.OI#xIeN $class/display$M.display.S.flushEN&$class/display$M.display.S.synchroniseXnnnnsN C.graphicalCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOI$xN C.graphicalRIOI%x2 =XN graphicalnOI&x ÄPCE contains a large number of classes related to creating and manipulating graphical objects. The graphics facilities were designed for interactively manipulating diagrams and graphical representations of information and knowledge. The graphics facilities are not suitable for 2-D or 3-D modeling of real-life objects (such as cars and planes). The most commonly used subclasses of class graphical are: class box Rectangle (filled, rounded) class ellipse class line class path Multiple segment line (curved) class bitmap Image class text Short text objects class device Compound graphical objects class dialog_item Specialised items for dialogue Example types of diagrams for which PCE has been used are the representation of graphs (hierarchies, lattices, flow-charts), tabular information, iconic representations of computer networks, knowledge bases and various graphical editors. A graphical describes an image, all of whose affected pixels are within a rectangular area, represented by <-area. The main role of class graphical to facilitate the communication to its <-device. A device object is a collection of graphical objects. Class device is a subclass of class graphical. This allows us to display devices on devices, leading to nested graphicals with local coordinate systems. Graphics in PCE is more complicated than most of the other facilities, although the maxim ``if your needs are simple, it will be simple in PCE as well'' still applies. Advanced use of graphics, however, requires a good understanding of the basic concepts and how they are applied. Mouse and keyboard events are made available to a graphical using the method ->event. By default the primitive graphical classes do not respond to this message. There are two ways to make a graphical sensitive to the mouse and/or keyboard. The first is to associate a recogniser object using `object ->recogniser'. The second is to redefine the ->event method. REFINING GRAPHICALS A couple of methods are commonly redefined on class graphical for creating customised graphical objects: # ->event: event May be redefined to modify event processing. This is a class-level alternative for `graphical ->recogniser'. # ->device: device Called if the device of the graphical object is changed. May be redefined to take care of side-effects, but the user *must* call the super-behaviour. # ->displayed: bool Called if the <-displayed attribute is changed. Like ->device, this method may be redefined, but the user *must* call the super-behaviour. # ->reparent: int Indicates that the consists-of tree of graphicals has changed between this graphical and the window. May be redefined, but the user *must* call the super-behaviour.OI'xIeN$class/gesture$C.gestureeN$class/handle$C.handleeN $class/dialog_item$C.dialog_itemeN$class/window$C.windoweN$class/device$C.deviceeN#$class/object$M.object.S.recogniserEN$class/area$C.areaXnnnsNM.graphical.S.layoutOI(xNM.graphical.S.layoutRIOI)xFÄ¡"NlayoutnOI*xÑWhen graphical is member of a `network' (see `graphical <-network') of connected graphicals (see `graphical ->connect'), this method tries to give the entire graph of connected graphicals a sensible layout. Don't expect too much: this algorithm does not know anything about what your graph is representing. The algorithm is based on [Eades:84]. It defines a number of springs between connected and non-connected nodes. The algorithm does a Monte-Carlo simulation using these springs. The parameters are: # attract: real, default is 2 `Strength' of the springs # nominal: real, default is 30 `Natural Length' of the springs. Individual connection objects may have their specific `connection <-ideal_length' # repel: real, default is 2.0 Force (outwards) between any pair of non-connected graphicals # adapt: int, default is 15 Determines how much the network is changed each iteration # iterations: int, default is 100 Determines the number of iterations. # area: area Area in which to constrain the graph. By default the graph extends unconstrained. `Window <-visible' is often used to confine the graph to the visible part of a window object. # network: chain Network to layout. By default these are the graphicals that can be reached using <-network. If provided explicitely only the provided graphicals are affected. Notably providing all nodes in a window and using `window<-visible' for the area argument will layout each network and spread the separated networks over the window. # move_only: chain If present, only the given nodes are moved. This is useful for adding nodes to a given graph without changing the layout of the already displayed nodes. Connections between objects are found using <-connected, which may be refined to deal with application specific situations. Visible annimation can be achieved calling this predicate in a loop using a low number of iterations each time and force a display update using ->flush between each iteration.OI+xIeNM.graphical.S.connecteN$class/tree$C.treeeNM.graphical.G.networkEN $topics$138XnnOI,xSee descriptionOI-xl# Gets slow if there are many nodes (> 50). # Produces bad results on large networks with many connections.sNM.graphical.G.convertOI.xNM.graphical.G.convertRIOI/x*¸\ÈNconvertnOI0xºGeneral object are converted into graphicals by invoking <-image on the object. This simplifies manipulation of non-graphical objects that manipulate a graphical (such as class `node').OI1xIEN$class/node$V.node.imageXnnnnsNR.graphical.event_toleranceCman_resource_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsO I2xNR.graphical.event_toleranceRIOI3x5}V†Nevent_tolerancenOI4xsMinimum size of event-area. This class-variable is used by `graphical ->in_event_area' and `line ->in_event_area'.nnnsNM.graphical.G.top_sideOI5xNM.graphical.G.top_sideRIOI6x*¸XeNtop_sidennOI7xIENM.graphical.G.bottom_sideXnnnnsNM.graphical.G.common_deviceOI8xNM.graphical.G.common_deviceRIOI9x0µ¥]N common_devicenOI:x‡Graphical devices may be used to create complex diagrams by combining simple and other complex diagrams (see class device). This method locates the most `local' device that displays both the receiver and the argument graphical. `Graphical <-common_device' is used internally to determine the device on which to draw connections between graphicals that are not displayed on the same device.OI;xIeN$class/connection$C.connectionEN$class/device$C.deviceXnOIx*¸~óNdistancenOI?xCInvokes `area <-distance: area' using the areas of both graphicals.OI@xIeNM.graphical.G.distance_yeNM.graphical.G.distance_xEN$class/area$M.area.G.distanceXnnnOIAxGSilently assumes that both graphicals are displayed on the same device.sNM.graphical.S.cursorOIBxNM.graphical.S.cursorRIOICx(SÕeNcursornnOIDxIeNM.graphical.S.focuseN'$class/window$V.window.displayed_cursorXnnnnsNM.graphical.S.bellOIExNM.graphical.S.bellRIOIFx(ûwNbellnOIGxFRings the bell on the associated display. The argument is the volume.OIHxIeN$class/window$M.window.S.flasheN$class/display$M.display.S.bellENM.graphical.S.alertXnnnnsNR.graphical.selection_handlesO IIxNR.graphical.selection_handlesRIOIJx5kÓONselection_handlesnOIKx)Determines how ->paint_selected draws the selection indication, provided <-selected is @on and the <-window's `window <-selection_feedback' equals `handles'. Values: # sides Paint inverted blobs at the middle of all 4 sides of the bounding box. # corners Paint inverted blobs at the 4 corners of the bounding box. # corners_and_sides Combines the above possibilities # line Specific for class line. # @nil Don't draw any inverted blobs. Used with classes that define a private version of these functions (`path ->paint_selected').nnnsNM.graphical.S.draw_lineOILxNM.graphical.S.draw_lineRIOIMx0®@ôN draw_linenOINxDraw line segment from (X1,Y1) to (X2,Y2) using the current settings of the graphics state (see ->graphics_state). This method is part of the user-defined graphics infra-structure described with ->_redraw_area and should not be called outside this context.nnnnnsNM.graphical.S.rightOIOxNM.graphical.S.rightRIOIPx,ì£ NrightnnnOIQxIENM.graphical.S.aboveXnnnsNM.graphical.S.widthOIRxNM.graphical.S.widthRIOISx*¹¥hNwidthnOITxSInvokes `graphical ->set' with specified X-value to set the width of the graphical.OIUxIENM.graphical.S.setXnnnnsNM.graphical.S.exposeOIVxNM.graphical.S.exposeRIOIWx9åÐNexposenOIXxÜMoves graphical in the stacking order of its device such that it is displayed just on top of the argument graphical. If no argument is given, the grapical becomes the topmost one. See also ->hide, ->swap and ->overlap.OIYxIeNM.graphical.S.swapENM.graphical.S.hideXnOIZx`Always succeeds but has no effect if the argument graphical is not displayed on the same device.OI[xlIf the argument graphical is omited, the graphical will be moved to the top of the device's graphical stack.nsNM.graphical.S.initialiseOI\xNM.graphical.S.initialiseRIOI]x0±¯ÖN initialisenOI^xInitialise a graphical using the area components <-x, <-y, <-width and <-height. It sets the following defaults: <-displayed @off (will be set by ->display) <-device @nil <-area new area from the arguments <-pen 1 1 <-texture none <-colour @default <-selected @off <-name Classname (box, ellipse, ...) <-handles @nil <-inverted @off <-cursor @nil <-request_compute @nil Class graphical is a super-class of all graphical classes. Instances of this class can be created, but are probably of little use.nnnnnsNM.graphical.S._postscriptOI_xNM.graphical.S._postscriptRIOI`x(ûFN _postscriptnOIax4Internal method supporting `Graphical <-postscript'.nnnnnsNM.graphical.S.request_computeOIbxNM.graphical.S.request_computeRIOIcx*¸CªNrequest_computennOIdxIENV.graphical.request_computeXnnnnsNM.graphical.S.normaliseOIexNM.graphical.S.normaliseRIOIfx*¹†ÛN normalisenOIgx˜Equivalent to `graphical ->orientation: north_west': Ensures <-width and <-height are positive, making the origin the top-left corner of the graphical.OIhxIENM.graphical.S.orientationXnnnnsNV.graphical.activeOIixNV.graphical.activeRIOIjx5}QNactivenOIkx˜If @off, the colour of the drawing pen will be set to <-class_variable_value: inactive_colour. The method ->event will simply fail if <-active is @off.nnnsNM.graphical.S.computeOIlxNM.graphical.S.computeRIOImx,CÌ NcomputenOInx­This method is invoked by PCE's graphical kernel when: * One of the area attributes is needed (X, Y, size, ...). * The graphical needs to be repainted. The ->request_compute ->compute mechanism is used by graphical objects that need complex computations to determine their area and appearance from some internal state. For example, a menu is determined by its member menu_items and several flags manipulating its visual appearance. It would be a waste to recompute the entire layout of the menu on each change of its state as there will often be multiple changes before it actually needs to be repainted on the screen. A menu will therefore just issue `graphical ->request_compute' on itself if recomputation is needed. PCE graphics kernel will cause a message ->compute to be send to the graphical just before the ->_redraw_area. The definition of this method at the level of class graphical just assigns <-request_compute to @nil.OIoxIeN $class/device$V.device.recomputeENV.graphical.request_computeXnnnnsNV.graphical.areaOIpxNV.graphical.areaRIOIqx,C@ùNareanOIrxiThe area object associated with each graphical describes a bounding-box inside which all pixels affected by the graphical are. The area is used for: * Representing the position and size of the graphical. * Planning redraw of the window. * Dispatching events to graphicals `below' the mouse. The get method first invokes ->compute to update the graphical.nnOIsx5The default area of most graphicals is area(0,0,0,0).sNM.graphical.S.disconnectOItxNM.graphical.S.disconnectRIOIux,C7¤N disconnectnOIvx£->free all connections to- and from this graphical that match the arguments. @default is taken to match anything. The arguments are described with <-connections.OIwxIeN $topics$138eNM.graphical.S.connectXnnnnsNM.graphical.S.resizeOIxxNM.graphical.S.resizeRIOIyx*¹ž“NresizenOIzx4Realises together with `device ->resize' resizing of collections of objects. This method resizes the graphical with specified factor relative to the given origin. The X- and Y-distance of each of the corners to this reference point is multiplies by resp. the X- and Y-resize factor (1st and 2nd argument).OI{xIeN$class/area$M.area.S.decreaseeN$class/text$M.text.S.resizeeNM.graphical.S.setEN$class/device$M.device.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 <-x and <-y of the graphical.nsNM.graphical.S.popupOI}xNM.graphical.S.popupRIOI~x0µÂXNpopupnOIx€Utility method to associate a popup with an object. It performs the following steps. 1) If the object has a `popup' instance variable, it will fill this variable with the popup object and assume the class knows how to display it. 2) Otherwise it will attach an attribute `popup' to the object and append the recogniser @_popup_gesture, which is a default popup_gesture objectOI€xIeN$class/popup$C.popupeN"$class/object$M.object.S.attributeEN$$class/popup_gesture$C.popup_gestureXnnnOIx#Notably 1) is a dubious assumption.sNM.graphical.G.display_colourOI‚xNM.graphical.G.display_colourRIOIƒx,C:`Ndisplay_colournOI„x~Return the colour in which the graphical is actually displayed. If the variable `graphical <-colour' equals @default, this is the <-display_colour of the graphical's device. Otherwise it is the value of the <-colour variable. If the graphical is displayed, this will always return a colour. Otherwise this method fails if neither the graphical, nor its device specify the colour.OI…xIeN$class/window$M.window.S.colourENM.graphical.S.colourXnnnnsNM.graphical.S.keyboard_focusOI†xNM.graphical.S.keyboard_focusRIOI‡x<Í.¤Nkeyboard_focusnOIˆxÂIf @off, release the `window->keyboard_focus'. If @on or @default and the receiver passes the test ->_wants_keyboard_focus send `window->keyboard_focus: Graphical'. See also `device ->advance'nnnnnsNM.graphical.G.auto_alignOI‰xNM.graphical.G.auto_alignRIOIŠx,ì§fN auto_alignnOI‹x->auto_align is for the integration with class dialog_item. It associates an ->attribute auto_align with the specified value. <-auto_align returns the value of this attribute if present. Otherwise @on if one of the attributes <-above, <-below, <-left, <-right exists and @off otherwise.nnnnnsNM.graphical.S.moveOIŒxNM.graphical.S.moveRIOIx*¸›úNmovenOIŽxSynonym for `graphical ->position': moves the origin of the graphical to the indicated position. Normally the origin is the top-left corner. Note however that this depends on the `graphical <-orientation'. The origin of devices is the origin of the device's coordinate system.OIxIENM.graphical.S.positionXnnnnsN!M.graphical.S.save_graphics_stateOIxN!M.graphical.S.save_graphics_stateRIOI‘x0§$ÑNsave_graphics_statenOI’xSave the current setting for the device's pen, texture and fore- and background. The old values are restored using ->restore_graphics_state. Each ->save_graphics_state must be closed with a ->restore_graphics_state before ->_redraw_area returns. See also ->graphics_state.nnnnnsNM.graphical.S.toggle_selectedOI“xNM.graphical.S.toggle_selectedRIOI”x*¹¡¸Ntoggle_selectednOI•xmIf <-selected equals @on, invoke ->selected: @off and visa-versa. Useful for implementing selection handling.OI–xIeN $examples$17eNM.graphical.S.selectedENV.graphical.selectedXnnnnsNM.graphical.S.hideOI—xNM.graphical.S.hideRIOI˜x9åÐRNhidenOI™xàPlace in background or below argument. If the argument is @default, the receiver becomes the deepest nested graphical or, in other words, the head of the `device<-graphicals' chain. See also ->expose, ->swap and ->overlap.OIšxIeNM.graphical.S.swapENM.graphical.S.exposeXnnnnsNV.graphical.deviceOI›xNV.graphical.deviceRIOIœx(¯­$NdevicenOIxóThe device (normally picture, dialog or figure) on which the graphical is displayed. A graphical can only be displayed on one device. The <->device slot is used by graphicals to inform their device of changes, so the device can perform the appropriate redraw operations. The following is always true: If the device of a graphical is not @nil, the graphical is member of `Device <-graphicals' of this device and visa-versa. Normally, a graphical is assigned a device using `Device ->display'.OIžxIeNV.graphical.displayedeN $class/device$M.device.S.displayeN!$class/device$V.device.graphicalsEN$class/device$C.deviceXnnsNM.graphical.G.center_yOIŸxNM.graphical.G.center_yRIOI x*¤ëûNcenter_ynnOI¡xIENM.graphical.G.centerXnnnnsNM.graphical.S.setOI¢xNM.graphical.S.setRIOI£x,}E¸NsetnOI¤x3Set the X-, Y-, W- and H- parameter of the graphical. This method is invoked by all the other geometry managing methods (->size, ->position, ->x, ...). Note that this method is faster than ->size, ->position, etc. when the geometry has to be changed from a set of integer values as no intermediate object has to be created. It first determines whether any action is necessary (i.e. there is a non-default value that is not equal to the current value). If so, it invoked `graphical ->geometry' which takes care of the class-dependent geometry-changing action.OI¥xI eNM.graphical.S.heighteNM.graphical.S.widtheNM.graphical.S.resizeeNM.graphical.S.sizeeNM.graphical.S.cornereNM.graphical.S.positioneNM.graphical.S.yeNM.graphical.S.xeNM.graphical.S.geometryeNM.graphical.S.centerENM.graphical.S.areaXnnnOI¦x¼`graphical ->geometry' is invoked using the internal function `simpleSend()', which bypasses possible object-level methods. Geometry management can only be programmed at thee class level.sNM.graphical.S.reparentOI§xNM.graphical.S.reparentRIOI¨x*¹šjNreparentnOI©xWUpdates the <-device of possible associated connections. This method. It is invoked from class device when the position of the graphical in the consists-of tree relative to its window has changed: # When the graphical is first connected to a device. # When the graphical is erased from its device. # When the device received a ->reparent.OIªxIeN$class/device$M.device.S.eraseeN $class/device$M.device.S.displayEN!$class/device$M.device.S.reparentXnnnnsNM.graphical.S.rotateOI«xNM.graphical.S.rotateRIOI¬x0´Ipost'. If the graphical has recogniser objects associated (see `object <-all_recognisers') and <-active equals @on, the recognisers are activated in the order they appear in this chain until one succeeds, after which this method returns successfully. This method is redefined by many subclasses of class graphical to achieve predefined response to user-events. When programming user-defined (graphical) classes, this method is commonly used to attach predefined user-interface behaviour to the new class. The following creates a box that may be moved using the middle button: ?- new(B, box(100,100)), send(B, recogniser, new(move_gesture)). And the following example defines a class movable_box from which all instances can be moved: :- pce_begin_class(movable_box, box). :- pce_global(@movable_box_gesture, new(move_gesture)). event(B, Ev:event) :-> ( send(B, send_super, event, Ev) -> true ; send(@movable_box_gesture, event, Ev) ). :- pce_end_class.OI²xIeN$class/recogniser$C.recognisereN#$class/object$M.object.S.recognisereN($class/object$M.object.G.all_recognisersEN$class/device$M.device.S.eventXnOI³xYFails silently if there are no recognisers or none of the recognisers accepted the event.nnsNV.graphical.selectedOI´xNV.graphical.selectedRIOIµx5}P¦NselectednOI¶xxIndicates whether or not the graphical is selected. The visual feedback is determined by the graphical.selection_style.OI·xIeNR.graphical.selection_styleeNM.graphical.S.selectedeNM.graphical.S.toggle_selectedeN"$class/device$M.device.G.selectioneN"$class/device$M.device.S.selectionENV.graphical.invertedXnnsNM.graphical.G.corner_yOI¸xNM.graphical.G.corner_yRIOI¹x*¸pHNcorner_ynOIºx7Y-coordinate of the corner, defined as <-y + <-heightOI»xIeNM.graphical.G.cornerENM.graphical.G.corner_xXnnnnsNM.graphical.S.request_geometryOI¼xNM.graphical.S.request_geometryRIOI½x,Æ«4Nrequest_geometrynOI¾xInvoked internally from `graphical ->set', which in turn is invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default. Invokes ->geometry to change the <-area. The indirection ->request_geometry ==> ->geometry may be redefined when a graphical is constrained by some other object. For example, class window exploits this mechanism to let windows communicate with their tile object.nnnnnsNM.graphical.G.positionOI¿xNM.graphical.G.positionRIOIÀx*¸WNpositionnnOIÁxIENM.graphical.G.absolute_positionXnnnnsNM.graphical.S.sizeOIÂxNM.graphical.S.sizeRIOIÃx*¹ŸÙNsizenOIÄxset' with specified W- and H-parameter.OIÅxIENM.graphical.S.setXnnnnsNM.graphical.G.auto_label_alignOIÆxNM.graphical.G.auto_label_alignRIOIÇx,C>´Nauto_label_alignnnnOIÈxIENM.graphical.G.auto_alignXnnnsNM.graphical.S.yOIÉxNM.graphical.S.yRIOIÊx*¹¦VNynOIËx3Invokes `graphical ->set' width specified Y- value.OIÌxIENM.graphical.S.setXnnnnsNM.graphical.G.cornerOIÍxNM.graphical.G.cornerRIOIÎx*¸p”NcornernOIÏxflash', `device->flash' and `tab->flash'. Normally one should invoke `graphical ->alert', which depending on `graphical.visual_bell' will either ring the bell or flash the graphical.OI×xIeNM.graphical.S.alerteN R.graphical.visual_bell_durationENR.graphical.visual_bellXnnnnsNM.graphical.S.graphics_stateOIØxNM.graphical.S.graphics_stateRIOIÙx<ü‹[Ngraphics_statenOIÚx”Modify the graphics state. Only the specified values will be modified. This method will normally be called using the named-argument conventions of XPCE: ..., send(Gr, graphics_state, pen := 2, colour := red), ... It is not allowed to return from ->_redraw_area with a modified state. Therefore redraw-methods that modify the state should normally use ->save_graphics_state and ->restore_graphics_state. Here is a typical example, drawing a thicker line. '_redraw_area'(MyGr, Area:area) :-> send(MyGr, save_graphics_state), send(MyGr, graphics_state, pen := 2), send(MyGr, draw_line, 0,0,100,100), send(MyGr, restore_graphics_state). NOTE: It is generally advised to paint graphical objects that require the same graphics state together. So, if you need to paint alternating thick and thin lines, first draw all thick lines and then all thin lines instead of switching the state between each line.nnnnnsNV.graphical.cursorOIÛxNV.graphical.cursorRIOIÜx(¯«©NcursornOIÝx|Cursor displayed in this window when the graphical is in focus of events. When @nil, the cursor of the device is displayed.OIÞxIEN$class/cursor$C.cursorXnOIßx@nil.sNM.graphical.S.pointerOIàxNM.graphical.S.pointerRIOIáx,@ fNpointernOIâx Move the pointer relative to the coordinate system of the graphical: computes offset relative to window's coordinate system and then invokes `window ->pointer'.OIãxIEN $class/window$M.window.S.pointerXnOIäx@Succeeds without side-effects if the graphical is not displayed.nnsNM.graphical.G.auto_value_alignOIåxNM.graphical.G.auto_value_alignRIOIæx,C>·Nauto_value_alignnnnOIçxIENM.graphical.G.auto_alignXnnnsNM.graphical.G.networkOIèxNM.graphical.G.networkRIOIéx,CËmNnetworknOIêxiComputes a new chain, holding the receiving graphical and all graphicals that can be reached from it by following the specified types of connections: # link When specified, follow only connections of this link # from, to When specified, follow only links that are connected to the named handles This method is save on cyclic graphs. See also ->layout.OIëxIeNM.graphical.S.layoutENM.graphical.G.connectionsXnnnnsNV.graphical.request_computeOIìxNV.graphical.request_computeRIOIíx,CÌÍNrequest_computenOIîxWhen not @nil, indicates that the graphical is in inconsistent state. Used for graphical objects that require significant computation to determine their area and visual representation. When no argument is specified with ->request_compute the variable will be filled with @on. If a ->request_compute is invoked on a graphical, PCE's graphical kernel will invoke a ->compute on it if the graphical needs to be repainted or one of the dimensions of the graphical is requested. See <-area, `display ->dispatch' and `->compute'.OIïxIeNM.graphical.S.computeENM.graphical.S.request_computeXnnsNM.graphical.S.unlinkOIðxNM.graphical.S.unlinkRIOIñx,C3CNunlinknOIòx\Delete possible connections using ->disconnect and remove the graphical from it's <-device.nnnnnsNM.graphical.S.xOIóxNM.graphical.S.xRIOIôx*¹¦MNxnOIõx3Invokes `graphical ->set' width specified X- value.OIöxIENM.graphical.S.setXnnnnsNM.graphical.G.contained_inOI÷xNM.graphical.G.contained_inRIOIøx?ÂeN contained_innOIùx’Device this graphical is displayed on when not @nil. If the device is a tree object, it will return the associated node using `graphical <-node'.OIúxIeN$class/tree$M.tree.G.containsENM.graphical.G.nodeXnOIûxFails if <-device equals @nil.nnsNM.graphical.G.display_positionOIüxNM.graphical.G.display_positionRIOIýx9¼®:Ndisplay_positionnOIþxrDetermines the position of the top-left corner of the graphical relative to the display. Sometimes use to determine the position of a new (prompter) window. Note that the position of the current event, relative to the display may be found using get(@event, position, @display, Point) See `event <-position' and @event. See also <-position and <-absolute_position.OIÿxIENM.graphical.G.absolute_positionXnOIx-Fails if graphical is not related to a windownOIxOYields incorrect results if the window is not actually displayed on the screen.sNM.graphical.G.handleOIxNM.graphical.G.handleRIOIx*¸ŠâNhandlenOIx¤Returns handle object with specified name. First scans `graphical -handles' followed by <-handles of the graphical's class. The first matching handle is returned.OIxIeNM.graphical.G.handle_positioneNM.graphical.G.handlesENM.graphical.S.handleXnOIx0Fails silently when there is no matching handle.nnsNM.graphical.S.corner_yOIxNM.graphical.S.corner_yRIOIx*¸oåNcorner_ynnOI xIENM.graphical.S.cornerXnnnnsNM.graphical.S.draw_arcOI xNM.graphical.S.draw_arcRIOI x0®=uNdraw_arcnOI xŽDraw an ellipse-part. X,Y,W,H define the bounding box if the entire ellipse. Angle1 and Angle2 the start and end angles (in degrees). When omitted, an entire ellipse will be drawn. Fill defines the fill-pattern used. If @nil, the shape is not filled. This method is part of the user-defined graphics infra-structure described with ->_redraw_area and should not be called outside this context.nnnnnsNM.graphical.G.orientationOI xNM.graphical.G.orientationRIOIx*¹‰uN orientationnnOIxIENM.graphical.S.orientationXOIxIENM.graphical.S.orientationXnnnsN$M.graphical.S.container_size_changedOIxN$M.graphical.S.container_size_changedRIOIx8ƒ$Ncontainer_size_changednOIxn<-width or <-height of <-contained_in changed. Currently used only by class parbox. See `parbox->line_width'nnnnnsNM.graphical.S.focusOIxNM.graphical.S.focusRIOIx0µ ÛNfocusnOIx§When the graphical is related to a window, invoke send(Window, focus, Graphical, Recogniser, Cursor, Button). Focusing further user-events to this graphical object.OIxIeN$class/window$M.window.S.focuseNM.graphical.S.focus_cursorENM.graphical.S.cursorXnnnnsNV.graphical.penOIxNV.graphical.penRIOIx0µªüNpennOIxðThe pen attribute denotes the thickness in pixels of the drawing pen for drawing lines. It is defined at class graphical, but only applicable to classes whose images actually contain lines. If the pen is 0 (zero), lines are not displayed.OIxIENV.graphical.textureXnOIx1sNM.graphical.S.applyOIxNM.graphical.S.applyRIOIx0¾øUNapplynOIxàVirtual method, defined by most subclasses of class dialog_item. This method should forward the <-message of the dialog_item if the dialog_item has been modified by the user or the argument is @on. See also `dialog ->apply'nnnnnsNM.graphical.S.connectedOI xNM.graphical.S.connectedRIOI!x?›´N connectednOI"xTest if graphical has a connection that matches the specification. Any of the values may be @default, which refers to `anything'. See <-connections for a description of the arguments. The method <-connected performs the same test, returning the connection object found.OI#xIeNM.graphical.G.connectionseN $topics$138ENM.graphical.S.connectXnnnnsNM.graphical.S.draw_polyOI$xNM.graphical.S.draw_polyRIOI%x0µ«[N draw_polynOI&x’Draw/fill a polygon. Points is a chain object or vector object containing the points though which the polyline is drawn. If closed is @on, a line is drawn from the last to the first point. If fill is specified, the interior is filled with the given pattern. This method is part of the user-defined graphics infra-structure described with ->_redraw_area and should not be called outside this context.nnnnnsNM.graphical.S.geometryOI'xNM.graphical.S.geometryRIOI(x@ãé]NgeometrynOI)xBInvoked from `graphical ->request_geometry', which is, through `graphical ->set', invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default. Sets the area and informs the graphical's device on the changed geometry. The device will answer with a ->_redraw_area when this is necessary. This method is commonly refined, dealing with all possible resize and move requests. If this method is refined if should *always* call the ->geometry method of the super-class. It is allowed to change the parameters though The example below defines a box fits on a 10x10 pixel grid. :- pce_begin_class(grid_box, box). geometry(B, X:[int], Y:[int], W:[int], H:[int]) :-> align_to_grid(X, NX), align_to_grid(Y, NY), align_to_grid(W, NW), align_to_grid(H, NH), send(B, send_super, geometry, NX, NY, NW, NH). align_to_grid(@default, @default). align_to_grid(Value, Aligned) :- Aligned is ((Value + 4) // 10) * 10. :- pce_end_class.OI*xIeNM.graphical.S.seteN!$class/device$M.device.S.geometryXnnnnsNV.graphical.connectionsOI+xNV.graphical.connectionsRIOI,x(¯«8N connectionsnOI-x­Chain of connection objects. Connections are lines relating two graphical objects. Connection are automatically updated when either of the connected graphicals is updated.OI.xIEN $topics$138XnnsNM.graphical.S.drawOI/xNM.graphical.S.drawRIOI0x0®8”NdrawnOI1x@Draw the graphical on the current device. If `offset' is given, the coordinate system of the device is moved by the given offset prior to painting the graphical. The optional argument is the changed area of the device. This method may be used to redefine ->_redraw_area. It should not be called outside this context.nnnnnsNM.graphical.G.postscriptOI2xNM.graphical.G.postscriptRIOI3x5lzN postscriptnOI4x¢Create postscript description of graphical. This method creates `real' PostScript. XPCE lines area mapped on PostScript lines, XPCE text is printed using PostScript fonts, etc. When the first argument is @on, the drawing is rotated 90 degrees (landscape). When @off or @default, the drawing is generated in PostScripts normal portray mode. `Area' describes an area in PostScript's coordinate system into which the object is to be scaled. XPCE does not define conversion functions for all graphical objects. Notably for dialog_items, list_browsers and editors there are no provisions to generate PostScript. Such objects are painted on an image object, after which a PostScript description of the resulting image is included in the output. <-postscript makes two passes through the objects. In the first pass, all required definitions are collected, while in the second pass the actual PostScript is generated. If a PostScript macro is required, this is fetched from the global sheet object @postscript_defs, which maps PostScript macro names onto a string containing the PostScript code for the definition. This object may be modified to alter (or delete) macro definitions.OI5xIeN$$class/pce$M.pce.G.postscript_headerEN!$class/frame$M.frame.G.postscriptXnnOI6x½The default orientation is @off (portray mode) The default area is area(70, 70, 500, 700), which is suitable for an a4 slide in PostScript's native coordinate system (1 point is 1/72 inch).nsNM.graphical.G.absolute_yOI7xNM.graphical.G.absolute_yRIOI8x*¸WåN absolute_ynOI9x^Y coordinate of graphical in coordinate system of device. See `graphical<-absolute_position'.OI:xIENM.graphical.G.absolute_positionXnnnnsNM.graphical.G.left_sideOI;xNM.graphical.G.left_sideRIOIxNM.graphical.S.corner_xRIOI?x*¸oãNcorner_xnnOI@xIENM.graphical.S.cornerXnnnnsNM.graphical.S.draw_textOIAxNM.graphical.S.draw_textRIOIBx0®C«N draw_textnOICxœDraw a string in the given font object. If only X and Y are given, they describe the left-side of the baseline. If W and H are given, the text is positioned in a box according the the alignment-specifiers hadjust an vadjust. The box described by X,Y,W,H does not need to be large enough to contain the text. For example, a box of size 0.0 and hadjust/vadjust center/center may be used to center text around a point. Multiple lines are aligned according to hadjust (default: left). The redraw-method below draws a text-box: '_redraw_area'(TB, _Area:area) :-> "Redraw text-box":: get_object(TB, area, area(X,Y,W,H)), send(TB, draw_box, X, Y, W, H), get(TB, font, Font), get(TB, string, String), send(TB, draw_text, String, Font, X, Y, W, H, center, center). This method is part of the user-defined graphics infra-structure described with ->_redraw_area and should not be called outside this context.nnnnnsNM.graphical.S.cornerOIDxNM.graphical.S.cornerRIOIEx*¸oéNcornernOIFx\Sets the corner opposite the origin of the graphical (see `graphical ->orientation') to the indicated position in the coordinate system of the graphical's device. This method used to support resizing graphicals: sending ->corner messages to with the location of the device resizes the graphical. Resizing is now dealt with by class resize_gesture.OIGxIeN$class/area$M.area.G.cornereNM.graphical.S.seteNM.graphical.G.cornereNM.graphical.S.corner_yeNM.graphical.S.corner_xENM.graphical.S.orientationXnnnnsNM.graphical.G.right_sideOIHxNM.graphical.G.right_sideRIOIIx*¸XbN right_sidennOIJxIENM.graphical.G.bottom_sideXnnnnsNM.graphical.S.centerOIKxNM.graphical.S.centerRIOILx(ûáNcenternOIMxoMoves the graphical such that the center of its area becomes point. Moving is realised using `Graphical ->set'.OINxIENM.graphical.S.setXnnnnsNM.graphical.S.clipOIOxNM.graphical.S.clipRIOIPx0§#ôNclipnOIQx“Clip subsequent drawing actions to the indicated rectangle. If the rectangle is @default, all operations are clipped to the <-area of the graphical. Note that on entry of ->_redraw_area clipping is set to the argument area, which will normally be larger than <-area. Each ->clip must be undone by an ->unclip before ->_redraw_area returns. See also ->_redraw_area, ->graphics_state ->draw_line, etc.nnnnnsNM.graphical.G.displayOIRxNM.graphical.G.displayRIOISx*¸}NdisplaynOITxfDisplay on which the graphical is displayed. Useful when using multiple displays (see class display).OIUxIENM.graphical.G.windowXnOIVxLFails (silently) if the graphical is not displayed (indirectly) on a window.nnsNM.graphical.S.connectOIWxNM.graphical.S.connectRIOIXx/Á·NconnectnOIYxŸCreate a connection (line) to another graphical, which must be displayed on the same window, but not necessarily on the same device object. `graphical ->connect' simply invokes `link<-connection' passing the receiver as `from', as well as `to', `from_kind' and `to_kind'. The normal way to redefine the type of connection established is using either `link->connection_class' or by redefining `link <-connection'.OIZxIeNM.graphical.S.layouteN+$class/connection$M.connection.S.initialiseeN $topics$138eNM.graphical.S.handleeNM.graphical.S.disconnecteNM.graphical.S.connectedEN$class/connection$C.connectionXnnnnsNM.graphical.G.alignmentOI[xNM.graphical.G.alignmentRIOI\x7”FÛN alignmentnOI]xTDialog_item integration. See ->alignment and `dialog_item ->alignment' for details.nnnnnsNM.graphical.G.centerOI^xNM.graphical.G.centerRIOI_x*¸XÈNcenternnOI`xIeNM.graphical.G.center_yENM.graphical.G.center_xXnnnnsNM.graphical.S.orientationOIaxNM.graphical.S.orientationRIOIbx,D|¿N orientationnOIcx¹Some graphical objects may have negative <-width and <-height. The origin is the (X,Y) point of the graphical. (X+W, Y+H) refers to the opposite corner (see <->corner). This method places the origin at one of the indicated corner. The graphicals location and size on the screen is not affected by this method. The values are: north_west W>=0, H>=0 (->normalise) north_east W < 0, H>=0 south_west W>=0, H < 0 south_east W < 0, H < 0OIdxIeNM.graphical.G.sizeENM.graphical.G.orientationeNM.graphical.S.normaliseeNM.graphical.S.cornerXnnnnsNM.graphical.S.relative_moveOIexNM.graphical.S.relative_moveRIOIfx(N‘WN relative_movenOIgxYMove the graphical relative to its current position using the X- and Y-values of ^point^.nnnnnsNM.graphical.G.absolute_xOIhxNM.graphical.G.absolute_xRIOIix*¸WÙN absolute_xnOIjx^X coordinate of graphical in coordinate system of device. See `graphical<-absolute_position'.OIkxIENM.graphical.G.absolute_positionXnnnnsNM.graphical.S.heightOIlxNM.graphical.S.heightRIOImx*¹¥‘NheightnOInx2Invokes `graphical ->set' width specified H-value.OIoxIENM.graphical.S.setXnnnnsNM.graphical.G.frameOIpxNM.graphical.G.frameRIOIqx*¸†êNframenOIrxéFrame on which the graphical is displayed. Frames are commonly used to represent a tool of an application (or an entire application). This method provides an easy way to find the application object from some `deep-down' part of it.OIsxIeNM.graphical.G.windowEN$class/frame$M.frame.G.frameXnOItx1Fails silently if the graphical is not displayed.nnsNM.graphical.S.referenceOIuxNM.graphical.S.referenceRIOIvx,짣N referencennnOIwxIENM.graphical.S.alignmentXnnnsNM.graphical.S.handleOIxxNM.graphical.S.handleRIOIyx5~^2NhandlenOIzx²Associates a handle with the graphical. A handle is a named connection-point, which position is determined by two expression objects in terms of the <-width and <-height of the graphical. Connections between graphicals can only be made if both graphicals have suitable handles defined. Note that handles may also be attached at the class of the graphical. Such handles are used by all instances of the class. See `class ->handle'.OI{xIeN$class/handle$C.handleeNM.graphical.G.handleeN $topics$138eNM.graphical.S.connecteN$class/connection$C.connectioneNV.graphical.handlesEN$class/class$M.class.S.handleXnnnnsNM.graphical.S.in_event_areaOI|xNM.graphical.S.in_event_areaRIOI}x5}UdN in_event_areanOI~xÕUsed by class `device' to determine `device <-pointed_objects'. Performs the following steps: 1) if the width or height is very small (< 5 pixels), it is enlarged to make it at least 5 pixels. Fails if (X,Y) is outside this (enlarged) area. The tolerance is read from the graphical.event_tolerance. 2) if the class has the C-function `class -in_event_area_function' defined, this function is called and its value is returned. Otherwise success is returned.OIxIeN$class/event$M.event.S.insideeN($class/device$M.device.G.pointed_objectsEN"$class/class$V.class.in_event_areaXnnnOI€xâ # The 5 pixels should be a resource # The test should be a normal method, making it accesible to the user. # Currently the C-function is only implmented for lines. Must be implemented for ellipses, circles, paths, etc.sNM.graphical.S.areaOIxNM.graphical.S.areaRIOI‚x(ûîNareanOIƒx@Changes position and size. Implemented using `Graphical ->set'.OI„xIeNM.graphical.S.setXnnnnsNM.graphical.S.textureOI…xNM.graphical.S.textureRIOI†x(zäŒNtexturennnnnnnsNM.graphical.S.leftOI‡xNM.graphical.S.leftRIOIˆx,ì£ NleftnnnOI‰xIENM.graphical.S.aboveXnnnsNM.graphical.S._draw_post_scriptOIŠxNM.graphical.S._draw_post_scriptRIOI‹xC=5N_draw_post_scriptnOIŒx9Default (catch all) PostScript generation method for graphical objects that do not redefine the ->_draw_post_script to generate proper PostScript. The method `graphical ->_draw_post_script' creates an image object from the graphical using `image <-convert', subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes `bitmap ->_draw_post_script'. The resulting quality of the PostScript is a similar to a screendump. As of XPCE 6.5.21, PostScript generation may be (re-)defined by the user by refining this method. PostScript output is written to a Prolog stream which can be retrieved using the predicate pce_principal:pce_postscript_stream(-Stream). The infrastructure ensures the PostScript coordinate system is consistent with the normal XPCE device coordinate system. PostScript is generated in two passes. During the first pass the argument is `head' and the routine may emit PostScript macro definitions. During the second pass the argument is `body' and the actual PostScript code must be written.nnnnnsNM.graphical.S.display_onOIxNM.graphical.S.display_onRIOIŽx0µ¬8N display_onnOIx…Display graphical on device. Equivalent to `device ->display: graphical', which is the recommended way to display graphical objects.OIxIEN $class/device$M.device.S.displayXnnnnsNM.graphical.G.windowOI‘xNM.graphical.G.windowRIOI’x*¹¥éNwindownOI“xTWindow on which the graphical is displayed. Yields itself if graphical is a window.OI”xIeNM.graphical.G.displayENM.graphical.G.frameXnOI•x;Fails silently when graphical is not displayed on a window.nnsNM.graphical.G.corner_xOI–xNM.graphical.G.corner_xRIOI—x*¸p.Ncorner_xnOI˜x7X-coordinate of the corner, defined as <-x + <-width.OI™xIENM.graphical.G.corner_yXnnnnsNM.graphical.S.swapOIšxNM.graphical.S.swapRIOI›x*¹ ´NswapnOIœx·Swap the positions of both graphicals in the device's <-graphicals chain. The `background' graphicals are at the head of this chain, wile the `foreground' graphicals are at the tail.OIxIeNM.graphical.S.exposeENM.graphical.S.hideXnnnnsNM.graphical.G.all_recognisersOIžxNM.graphical.G.all_recognisersRIOIŸx,1·Nall_recognisersnnnOI xIeN'$class/object$M.object.G.all_attributesXnnnsNM.graphical.S.paint_selectedOI¡xNM.graphical.S.paint_selectedRIOI¢x5}VÂNpaint_selectednOI£x¬Paint the selection attributes if the graphical is <-selected and the <-window defines one of the following `window <-selection_feedback' values: # invert Invert the bounding box. # handles Request the graphical.selection_handles and paint the handles accordingly. # an elevation object Elevate the bounding box. This method should not be called by the application programmer directly. It is called by ->_redraw_area.nnnnnsNM.graphical.S.redrawOI¤xNM.graphical.S.redrawRIOI¥x,C×NredrawnOI¦xçRequest the graphical to repaint the specified area. When @default, the entire graphical is repainted. Should not be necessary for the application programmer as PCE takes care of redraw automatically. See also ->request_compute.nnnnnsNM.graphical.S._redraw_areaOI§xNM.graphical.S._redraw_areaRIOI¨x0®<žN _redraw_areanOI©x­Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with <-area, the bounding box of the pixels affected by this graphical. This method is called by the graphical infra-structure of XPCE and should never be called directly. See also ->draw and ->compute. This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the <-area of the graphical. If there is no simple way to avoid this, use ->clip and ->unclip to ensure this. The definition can use ->draw to paint other graphical objects or one or more of the primitive drawing operations listed below: ->draw_arc Draw ellipse-part or pie-part ->draw_box Draw rectangle ->draw_fill Fill/clear a rectangle ->draw_image Draw an image object ->draw_line Draw a line segment ->draw_poly Draw a polygon ->draw_text Draw a string The pen, colours, etc. may be manipulated using the following methods: ->save_graphics_state Save current settings ->restore_graphics_state Restore old values ->graphics_state Modify graphics state The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals. Another common approach to create custom graphics is by subclassing class device to define compound graphicals.nnnnnsNM.graphical.S.generate_eventOIªxNM.graphical.S.generate_eventRIOI«x*¸‡µNgenerate_eventnOI¬x:Generate a new event-object and post it to this graphical. The new event has the given id. Its window is the window in which the graphical is displayed. All other values default (to the values of the latest event). Used internally to generate area_enter and area_exit events from other pointer-oriented events.OI­xIeN!$class/event$M.event.S.initialiseEN$class/event$M.event.S.postXnOI®x.Returns the value of `event ->post: graphical'nnsNM.graphical.S.draw_fillOI¯xNM.graphical.S.draw_fillRIOI°x0®?ÕN draw_fillnOI±xŽFill rectangle with specified pattern. If the pattern is @nil, the area is cleared to the current background. If the pattern is @default, the area is filled with the current foreground. To fill a rounded rectangle, use ->draw_box with the pen set to 0. This method is part of the user-defined graphics infra-structure described with ->_redraw_area and should not be called outside this context.nnnnnsNM.graphical.G.referenceOI²xNM.graphical.G.referenceRIOI³x,C>ºN referencennnOI´xIENM.graphical.G.auto_alignXnnnsNM.graphical.G.is_displayedOIµxNM.graphical.G.is_displayedRIOI¶x*¸™N is_displayednOI·xNTests whether graphical is actually displayed, assuming `device' is displayed.OI¸xIENV.graphical.displayedXnnOI¹x^When device is @default, succeeds if graphical and all deviced above it have <-displayed: @on.nsNM.graphical.S.draw_imageOIºxNM.graphical.S.draw_imageRIOI»x0®@ÊN draw_imagenOI¼xüDraw a bitmap or pixmap image. The image is drawn from X,Y. SX,SY,SW,SH define the source-area on the image. The default area is the entire image object. If the image is monochrome, (`image <-kind: bitmap'), the `on' pixels are painted in the current foreground and the off pixels in the current background. If transparent is @on, the off pixels are not painted. This method is part of the user-defined graphics infra-structure described with ->_redraw_area and should not be called outside this context.nnnnnsNM.graphical.S.alertOI½xNM.graphical.S.alertRIOI¾x5}V NalertnOI¿xkAlert the user of an error. Depending on the graphical.visual_bell, either ->flash or ->bell are invoked.OIÀxIeN$class/visual$M.visual.S.reporteNM.graphical.S.flasheN$class/window$M.window.S.flasheNM.graphical.S.belleNR.graphical.visual_belleN!$class/display$M.display.S.informEN$$class/editor$V.editor.error_messageXnnOIÁx.Depends on the resource Graphical.visual_bell.nsNM.graphical.G.distance_yOIÂxNM.graphical.G.distance_yRIOIÃx*¸þN distance_ynnOIÄxIeNM.graphical.G.distance_xENM.graphical.G.distanceXnnnnsNV.graphical.handlesOIÅxNV.graphical.handlesRIOIÆx(¯¯ÅNhandlesnOIÇxÑChain of handles. Each handle defines a position to which a connection can attach. See `T Connections'. Handles can be attached at the instance level and at the class level (see `Class ->handles') or both.OIÈxIeN $topics$138eNM.graphical.S.handleeN$class/class$V.class.handlesEN$class/handle$C.handleXnOIÉx'@nil (no handles at the instance level)sNM.graphical.S.draw_boxOIÊxNM.graphical.S.draw_boxRIOIËx0®>ÙNdraw_boxnOIÌxàDraw rectangular (rounded) box with the given X, Y, W, H. Radius defines the rounding radius for the corners. If the last argument is an image or colour object, the interior will be filled with this. If it is an elevation object, a 3D effect will be simulated. In this case `up' defines whether the box is painted elevated or lowered. This method is part of the user-defined graphics infra-structure described with ->_redraw_area and should not be called outside this context.nnnnnsNV.graphical.invertedOIÍxNV.graphical.invertedRIOIÎx(¯°¿NinvertednOIÏxdIf @on, `Graphical <->area' is inverted after the graphical is painted, inverting all pixels in the bounding-box of the graphical. Note that this implies at inverted circle appears as a white circle in a black square (using white background and black foreground colours). Also note that graphicals below (i.e. hidden by this graphical) are inverted too.OIÐxIENV.graphical.selectedXnOIÑx@offsNR.graphical.visual_bellO IÒxNR.graphical.visual_bellRIOIÓx(û}N visual_bellnnOIÔxIeNM.graphical.S.flasheN$class/window$M.window.S.flashENM.graphical.S.alertXnnsNM.graphical.G.absolute_positionOIÕxNM.graphical.G.absolute_positionRIOIÖx9¼®Nabsolute_positionnOI×xÿReturns a point object indicating the position of the top-left corner of the graphical in the coordinate system of the argument device (or window). The position relative to the screen may be found using <-display_position. See also <-position and <-area.OIØxIeNM.graphical.G.positioneNM.graphical.G.display_positioneNM.graphical.G.absolute_yENM.graphical.G.absolute_xXnOIÙxTFails silently if device is specified and graphical is not displayed on this device.OIÚx¯When device is omited, returns the absolute position relative to the `top-most' device. If the graphical is displayed, this is the window in which the graphical is displayed.nsNM.graphical.S.positionOIÛxNM.graphical.S.positionRIOIÜx*¹™’NpositionnOIÝx—Move graphical such that <-x and <-y match the x- and y-coordinates of the argument point. Invokes `graphical ->set'. Synonym for `graphical ->move'.OIÞxIeNM.graphical.S.setENM.graphical.S.moveXnnnnsNM.graphical.G.bottom_sideOIßxNM.graphical.G.bottom_sideRIOIàx*¸XiN bottom_sidenOIáxªY-coordinate of the bottom-side of the graphical in the coordinate system of its device. With positive height, this is <-y + <-height. With negative height, this is <-y.OIâxIeNM.graphical.G.top_sideeNM.graphical.G.right_sideENM.graphical.G.left_sideXnnnnsNM.graphical.G.connectedOIãxNM.graphical.G.connectedRIOIäx?›´›N connectednOIåxêFind specified connection object. See ->connected for details. If there are multiple connections matching the search the first one is returned. See also <-connections. This method may be redefined to hook the behaviour of ->layout.nnnnnsNM.graphical.S.displayedOIæxNM.graphical.S.displayedRIOIçx,Æ£4N displayednnnnnnnsNV.graphical.nameOIèxNV.graphical.nameRIOIéx,˼NnamenOIêxäThe name of a graphical can be used to locate it on its device. Finding graphicals by name is a simple but very effective way. Graphicals generally do not visualise their <-name. See `device<-member' and `device <-catch_all'.OIëxIeN$$class/frame$M.frame.G.get_catch_alleN $examples$12eN&$class/device$M.device.G.get_catch_allEN$class/device$M.device.G.memberXnnsNM.graphical.G.connectionsOIìxNM.graphical.G.connectionsRIOIíx,C6óN connectionsnOIîxCompute a new chain with all connections of graphical. The arguments are: to: Graphical at other side link: Link that must be in the connection from_kind: Name of the handle at the from-side to_kind: Name of the handle at the to-side. Fails if there are no connections.OIïxIeNM.graphical.G.networkENM.graphical.S.connectedXnnOIðx6Omitted or default arguments imply any value is legal.nsNM.graphical.G.handlesOIñxNM.graphical.G.handlesRIOIòx0µÀattribute. See `dialog_item ->alignment' and `dialog_item ->reference' for details.nnnnnsNM.graphical.S.aboveOIøxNM.graphical.S.aboveRIOIùx3Éç­NabovenOIúx5Integrates plain graphical objects in the layout system defined for class dialog. The ->above relation is stored using ->attribute. This method handles combinations of plain graphical objects and dialog_item objects correctly. See also `dialog_item ->above', `dialog ->layout' and `device ->layout_dialog'.OIûxIXnnnnsN R.graphical.visual_bell_durationO IüxN R.graphical.visual_bell_durationRIOIýx0µ¦ŠNvisual_bell_durationnOIþxLength of flash in millisecondsOIÿxIeNM.graphical.S.flashEN$class/window$M.window.S.flashXnnsNM.graphical.S.colourOIxNM.graphical.S.colourRIOIx,C9÷NcolournnOIxIeNM.graphical.G.display_coloureN#$class/device$M.device.S.foregroundEN$class/colour$C.colourXnnnnsNM.graphical.S.flushOIxNM.graphical.S.flushRIOIx,C9—NflushnOIxvInvokes `window ->flush' when the graphical is related to a window, immediately updating the display. Always succeeds.OIxIEN$class/window$M.window.S.flushXnnnnsNM.graphical.G.center_xOIxNM.graphical.G.center_xRIOIx*¤ëöNcenter_xnnOI xIENM.graphical.G.centerXnnnnsNM.graphical.G.sizeOI xNM.graphical.G.sizeRIOI x*¹ (NsizenOI x˜New size object created from <-height and <-width of the graphical's area. Either or both of <-width and <-height may be negative. See <->orientation.OI xIENM.graphical.S.orientationXnnnnsNM.graphical.S.unclipOIxNM.graphical.S.unclipRIOIx0§#&NunclipnnnOIxIENM.graphical.S.clipXnnnsNM.graphical.S.selectedOIxNM.graphical.S.selectedRIOIx(¯·“NselectednnOIxIeNM.graphical.S.toggle_selectedENV.graphical.selectedXnnnnsNM.graphical.S.auto_alignOIxNM.graphical.S.auto_alignRIOIx,C>¬N auto_alignnnnOIxIENM.graphical.G.auto_alignXnnnsNM.graphical.G.nodeOIxNM.graphical.G.nodeRIOIx?ÂUNnodenOIx›Return the node object that has `node <-image' equal to this graphical if the graphical is controlled by a node of a tree object. See also <-contained_in.OIxIeNM.graphical.G.contained_ineN$class/node$M.node.G.find_nodeeN$class/tree$M.tree.S.eventeN$class/node$V.node.imageEN$class/node$C.nodeXnOIx-Fails silently when the node cannot be found.nOIxÍOnly works if the node is attached to a tree and actually displayed. It checks whether the graphical's device is a tree and then uses `node <-find_node' to find the node object belonging to this graphical.sNV.graphical.textureOIxNV.graphical.textureRIOIx:à°NtexturenOIx6Stipple pattern used for drawing lines. Applicable to all graphicals that have line elements in them. Values: none Straight line dotted Pattern: 1 on 2 off ... dashed Pattern: 7 on 7 off ... dashdot Pattern: 7 on 3 off 1 on 7 off ... dashdotted Pattern: 11 on 3 off 1 on 3 off 1 on 3 off 1 on 3 off longdash Pattern: 15 on 7 off ... PLATFORM NOTES: The DOS-based Windows platforms (Windows 95,98,ME) are severely limited in their pen-handling. Patterns only work for one-pixel lines at the device-level. Instead of the above patterns, these platforms resembling windows-based patterns. In addition, it is *not* possible to print pattern-lines using class win_printer as accessing a printer generally uses a mapping between logical and physical coordinated. Translation to PostScript is supported though.OI xIENV.graphical.penXnnsN#M.graphical.S._wants_keyboard_focusOI!xN#M.graphical.S._wants_keyboard_focusRIOI"x.’¼N_wants_keyboard_focusnOI#xrTest if graphicals wants keyboard events (fail). Used by `device ->advance' and redefined by various sub-classes.nnnnnsNM.graphical.S.recogniserOI$xNM.graphical.S.recogniserRIOI%x/Îù“N recognisernOI&xýAdd recogniser for user events (last). This is the normal way of associating event recogniser objects with graphical objects. Recognisers associated this way are store very similar to attributes associated with `object ->attribute'. If the graphical is saved to a file using ->save_in_file, the recognisers will be saved with the graphical object. Using class-level programming, recognisers mat be associated with graphical objects in two ways: by redefining the ->initialise method, calling ->recogniser to associate event handling or by redefining the class `graphical ->event' method. The following example defines movable_box as a class: :- pce_begin_class(movable_box, box). :- pce_global(@movable_box_recogniser, new(move_gesture)). event(MB, Ev:event) :-> "Associate @movable_box_recogniser":: ( send(MB, send_super, event, Ev) ; send(@movable_box_recogniser, event, Ev) ). :- pce_end_class. See also: class gesture, class event, ->prepend_recongiser, `event ->post', pce_global/2.nnnnnsNM.graphical.G.handle_positionOI'xNM.graphical.G.handle_positionRIOI(x.¨)òNhandle_positionnOI)x„Determine position of the named handle in the coordinate system of the given device. The default device is the graphicals <-device.OI*xIeN$class/handle$M.handle.G.yeN$class/handle$M.handle.G.xENM.graphical.G.handleXnOI+xWFails if there is no such handle or the graphical is not displayed on the given device.OI,xUWhen no device is specified, the coordinate system of the graphical's device is used.nsN$M.graphical.S.restore_graphics_stateOI-xN$M.graphical.S.restore_graphics_stateRIOI.x0§$MNrestore_graphics_statennnOI/xIEN!M.graphical.S.save_graphics_stateXnnnXaCnumber O I0xx