Computes a checksum over the whole widget content. The result is platform independent.
One or more of the following switches (or abbreviations thereof) may be specified to control the extraction:
Computes the checksum over all these elements: chars (characters and soft hyphens), tags, images, and windows. This is the default, and includes the following switches: -chars, -image, -tag, -window.
The computation considers all characters and soft hyphens.
If this option is given, then only those characters and soft hyphens which are not elided will be considered in the computation of the checksum.
If this option is given, then only those characters which are not elided will be considered in the computation of the checksum. Note that soft hyphens (Unicode point U+00AD) do not belong to this result.
The computation considers all embedded images. In case of an image the name of the image will be used for the checksum computation.
The computation considers all marks. In case of a mark the name of the mark and his gravity will be used for the checksum computation. Note that the computation discards generated marks, and it discards the special marks current, insert, and sel.
Consider tag information in the checksum computation. The name of the tags associated to this data (characters, soft hyphen, image, or window) will be used for the checksum computation. But this computation also considers the priority of the tags.
The computation considers all characters. Note that soft hyphens (Unicode point U+00AD) do not belong to this result.
The computation considers all embedded windows. In case of a window the pathname of the window will be used for the checksum computation.
Sometimes a quick checksum computation is quite useful. One example: we do not use an undo stack, but we want to check at a certain point whether the content has been changed. Note that querying edit modfied or edit altered is not sufficient for such a check, because it's likely that these commands will return 'true' even if the content is finally unchanged. So this new command is also completing the new command edit irreversible, because it's possible that an irreversible text content is equal to the original text content.