Embedded Images |
||||
|
The final form of annotation in text widgets is an embedded image. Each embedded image annotation causes an image to be displayed at a particular point in the text. There may be any number of embedded images in a text widget, and a particular image may be embedded in multiple places in the same text widget. The embedded image's position on the screen will be updated as the text is modified or scrolled. Each embedded image occupies one character's worth of index space in the text widget, and it may be referred to either by its position in the widget's index space, or the name it is assigned when the image is inserted into the text widget widh image create. If the range of text containing the embedded image is deleted then that copy of the image is removed from the screen. When an embedded image is added to a text widget with the image create widget command, a name unique to this instance of the image is returned. This name may then be used to refer to this image instance. The name is taken to be the value of the #:name option (described below). If the #:name option is not provided, the #:image name is used instead. If the imageName is already in use in the text widget, then #nn is added to the end of the imageName, where nn is an arbitrary integer. This insures the imageName is unique. Once this name is assigned to this instance of the image, it does not change, even though the #:image or #:name values can be changed with image configure. When an embedded image is added to a text widget with the image create widget command, several configuration options may be associated with it. These options may be modified later with the image configure widget command. The following options are currently supported:
|