Return the content of the text widget, including the text and optionally information about tags, embedded windows, and embedded images. The information is returned in the following format (notated in EBNF; BEG denotes the start of a list, end END denotes the end of the list; white spaces will not be taken into consideration):
Inspect = BEG , ( Setup )? , ( Configure )? , ( Segment )+ , END ; Setup = BEG , "setup" , PathName , TextOptions , END ; Configure = BEG , "configure" , TagName , ( BEG , TagOptions, END )? , END ; Bindings = BEG , "bind", TagName , ( BEG , Script , END ) , END ; Segment = BEG , ( ( Content , TagInfo ) | Mark | Elide | Binding ) , END ; Content = Text | Hyphen | Break | EmbImage | EmbWindow ; Text = "text" , BEG , ( Character )+ , END ; Hyphen = "hyphen" ; EmbImage = "image" , ImageOptions ; EmbWindow = "window" , WindowOptions ; Mark = Gravity , MarkName ; Gravity = "left" | "right" ; Elide = "elide" , ( "on" | "off" ) ; TagInfo = Tags , ( Tags )? ; Tags = BEG , ( TagName )* , END ; Character = ? Any character (UTF-8), but no newline ? ; Newline = ? The newline character ? ; TextOptions = ? See STANDARD OPTIONS and WIDGET-SPECIFIC OPTIONS ? TagOptions = ? See TAGS ? ; ImageOptions = ? See EMBEDDED IMAGES ? ; WindowOptions = ? See EMBEDDED WINDOWS ? ; PathName = ? Any valid widget pathname ? ; TagName = ? Any tag name ? ; MarkName = ? Any mark name ? ;
We will also provide an informal description of the items; note that the optional tagList will be provided only if option -nested is specified:
{"setup" pathName configurationList} {"configure" tagName ?configurationList?} {"bind" tagName event script} {"text" content tagList ?tagList?} {"break" tagList ?tagList?} {"hyphen" tagList ?tagList?} {"image" imageOptions tagList ?tagList?} {"window" windowOptions tagList ?tagList?} {"left" markName} {"right" markName} {"elide" "on"|"off"}
One or more of the following switches (or abbreviations thereof) may be specified to control the extraction:
The result of this command can be used for loading a widget with a snapshot (see command load).
Contrary to the dump command a quite simple, flat format will be returned. This is the appropriate format for doing changes on the result, and then load back with the changes (see command load). It is also the appropriate format for transferring, and analyzing the widget content. Moreover it allows to save and restore snap-shots.