ParseTree objects are the central means to give you a nice dependency tree drawing. They are only thought to be used as components of a VisParses object being the GUI surrounding a set of visualized ParseTree objects. Taking the embedded Parse object into account, these tree classes implement the tree editor in XCDG.
Definition at line 26 of file parsetree.tcl.
Public Member Functions | |
addUndoListener (TclString listener) | |
backwardLevel () | |
breakcycles () | |
canRedo () | |
canUndo () | |
drawAll () | |
edgecolor (TclString value="black") | |
errorcolor (TclString value="red") | |
forwardLevel () | |
getOrientation () | |
highlight (TclString which) | |
highlightcolor (TclString value="red") | |
labelcolor (TclString value="black") | |
labelfont (TclString value="") | |
levelborderwidth (TclNumber value=1) | |
levelrelief (TclString value="flat") | |
mainlevelname () | |
mirror () | |
nodecolor (TclString value="black") | |
parse (TclList args) | |
ParseTree (Parse p, VisParses vp, TclList args) | |
redo () | |
setOrientation (TclString orient) | |
showcycles () | |
undo () | |
verify () | |
vlinecolor (TclString value="gray") | |
wordcolor (TclString value="black") | |
wordfont (TclString value="") | |
writeToFile (TclString fileName) | |
zoom (TclNumber direction) | |
~ParseTree () | |
Private Member Functions | |
_zoom (TclNumber step) | |
allEnter (Canvas w) | |
allLeave (Canvas w) | |
allSybillings (TclNumber id1, TclNumber id2, TclString level) | |
arcRightClick (Canvas w) | |
canvasClick (Canvas w, TclNumber x, TclNumber y) | |
canvasToScreen (Canvas canvas, TclNumber x, TclNumber y) | |
centerOnItem (Canvas w, TclNumber i) | |
closestNode (Canvas w, TclNumber x, TclNumber y) | |
compareLexeme (LexiconItem a, LexiconItem b) | |
createArc (Canvas canvas, TclNumber x1, TclNumber y1, TclNumber x2, TclNumber y2, TclNumber text, TclNumber bindNo) | |
drawArcs () | |
drawLevel (TclString level) | |
drawText (Widget canvas, TclNumber x, TclNumber y) | |
drawViolas () | |
edgeClick (Canvas w, TclNumber x, TclNumber y) | |
edgeDrag (Canvas w, TclNumber x, TclNumber y) | |
edgeDragPan (Canvas w, TclNumber x, TclNumber y) | |
edgeDrop (Canvas w, TclNumber x, TclNumber y) | |
edgeEnter (Canvas w) | |
edgeLeave (Canvas w) | |
edgeMoveCancel (Canvas w) | |
edgeOfTimepoint (Canvas w, TclNumber t) | |
edgeRightClick (Canvas w) | |
fixCoords (Canvas w, TclNumber x, TclNumber y) | |
getAlternativeLexemes (Canvas w, TclNumber i) | |
itemVisible (Canvas w, TclNumber i) | |
kb_change_edge (Canvas w, TclWidget k, TclKeyBinding a) | |
kb_change_label (Canvas w, TclWidget k, TclKeyBinding a) | |
kb_change_lexeme (Canvas w, TclWidget k, TclKeyBinding a) | |
kb_select_edge (Canvas w, TclWidget k, TclKeyBinding a) | |
kb_select_label (Canvas w, TclWidget k, TclKeyBinding a) | |
kb_select_lexeme (Canvas w, TclWidget k, TclKeyBinding a) | |
kb_select_word (Canvas w, TclWidget k, TclKeyBinding a) | |
labelClick (Canvas w) | |
labelOfEdge (Canvas w, TclString edge) | |
labelRightClick (Canvas w) | |
labelSelect (TclString l, TclNumber i, TclString label) | |
makeUserInterface (Canvas w) | |
mouseScrollDown (Canvas w) | |
mouseScrollUp (Canvas w) | |
moveEdge (Canvas canvas, TclNumber x1, TclNumber y1, TclNumber x2, TclNumber y2) | |
moveLabel (Canvas canvas, TclString label_id, TclNumber x1, TclNumber y1, TclNumber x2, TclNumber y2) | |
multiCanvas (TclList args) | |
multiDragto (TclNumber x, TclNumber y) | |
multiMark (TclNumber x, TclNumber y) | |
noCrossing (TclString id, TclList bindings) | |
nodeOfTimepoint (Canvas w, TclNumber e, TclNumber t) | |
optimizeWord (TclNumber t) | |
paintTabs () | |
pop_constraint (TclNumber x, TclNumber y, TclNumber X, TclNumber Y) | |
reDrawLevel (TclString level) | |
registerItems (TclString level) | |
rgValue (TclNumber score) | |
showPopMenu (Canvas w, TclNumber x, TclNumber y, TclList items) | |
undoEdge (TclNumber modifier, TclNumber modifiee, TclString level) | |
undoLabel (TclNumber modifier, TclString label, TclString level) | |
undoLexeme (TclNumber from, TclString description) | |
violaBrowse (TclString mode, TclNumber xcoord, TclNumber ycoord) | |
wordClick (Canvas w) | |
wordEnter (Canvas w) | |
wordLeave (Canvas w) | |
wordMiddleClick (Canvas w) | |
wordOfTimepoint (Canvas w, TclNumber t) | |
wordRightClick (Canvas w) | |
wordSelect (Canvas w, TclNumber from, LexemNode lexeme) | |
Private Attributes | |
TclArray | _arcOfTimepoint |
TclString | _commandHistory = "" |
TclNumber | _computing = 0 |
TclString | _dragItem = "" |
TclNumber | _dragStartX = 0 |
TclNumber | _dragStartY = 0 |
TclArray | _isDrawn |
TclArray | _itemsOfTimepoint |
TclArray | _itemsOfViolation |
TclNumber | _kb_label = -1 |
TclRef | _kb_labels |
TclRef | _kb_lexeme |
TclRef | _kb_lexemes |
TclNumber | _kb_regent = -2 |
TclNumber | _kb_word = 0 |
TclNumber | _lastxmark = 0 |
TclNumber | _lastymark = 0 |
TclArray | _levelOfCanvas |
TclArray | _levelOfItem |
TclString | _mouseBinding = "" |
TclString | _mouseItem = "" |
TclString | _oldColor = "" |
TclString | _parse = "" |
TclNumber | _released = 0 |
TclArray | _textMidPos |
TclArray | _timepointOfId |
TclString | _visparses = "" |
TclNumber | _zoomstep = 0 |
|
constructor instantiating command-history-object Definition at line 232 of file parsetree.tcl. |
|
destructor Definition at line 362 of file parsetree.tcl. References makeUserInterface(). |
|
set zoom level for one canvas. Definition at line 2532 of file parsetree.tcl. |
|
Add a listener to be informed of changes to the command-history
|
|
command bound to Enter-event Definition at line 538 of file parsetree.tcl. |
|
command bound to Leave-event Definition at line 552 of file parsetree.tcl. |
|
checks if all nodes between id1 and id2 are modifier of id2. Definition at line 1521 of file parsetree.tcl. |
|
Auto-correct a non-mainlevel subordination. Definition at line 996 of file parsetree.tcl. |
|
Switch to the previous level of description. Definition at line 3220 of file parsetree.tcl. |
|
Break cycles in the tree on the current level. This may be necessary because a cycle can't be broken by drag & drop if there isn't already a root binding. Definition at line 2459 of file parsetree.tcl. |
|
Predicate-method rooted to command history
References itemVisible(). Referenced by canUndo(). |
|
Predicate-method rooted to command history
References canRedo(). |
|
command bound to B1-event on the canvas background. Definition at line 1051 of file parsetree.tcl. |
|
compute the screen x and y coords of canvas-coords x and y. Definition at line 2027 of file parsetree.tcl. |
|
Scroll $w horizontally so that $i is visible. Definition at line 2766 of file parsetree.tcl. |
|
Find closest circle on the canvas. One should think that this should be possible with a normal `canvas find' command, but it isn't; you can only search for the closest item, OR for all circles. Definition at line 1106 of file parsetree.tcl. |
|
compare two pointers to LexemeNode by their description. Definition at line 773 of file parsetree.tcl. |
|
creates a new arc with the specified parameters. Definition at line 2244 of file parsetree.tcl. |
|
draw everything into the levels. Definition at line 1880 of file parsetree.tcl. |
|
draws all bindings not on the main level as arcs under the main tree. Definition at line 2128 of file parsetree.tcl. |
|
draw a specified level on its page. Definition at line 1567 of file parsetree.tcl. |
|
draw the sentence to the canvas. Definition at line 1333 of file parsetree.tcl. |
|
draw violations in the list. Definition at line 1254 of file parsetree.tcl. |
|
command bound to B1-event on an edge. Definition at line 1083 of file parsetree.tcl. |
|
itk_option: color of edges up to the parents
|
|
Command bound to B1-Motion-event on a edge. Moving edges around on the canvas is implemented by setting the private variable _dragItem to the edge that is clicked on, moving this edge when the mouse is dragged, and resetting the variable when the mouse is released. Ordinarily one would use Tcl's automatically managed canvas tag `current' for this; but an edge may be selected not by clicking on it, but by clicking on the canvas background in its vicinity, and Tcl is not smart enough to assign the `current' tag to an item that was moved under the mouse pointer after the click occurred. It also doesn't allow setting the `current' tag manually, so we have to duplicate its functionality. Definition at line 1147 of file parsetree.tcl. |
|
Handler for the unusual event that the user wants to pan while holding an edge; this is actually useful if an edge must be moved between two attachment points that do not fit on the canvas simultaneously. Definition at line 1180 of file parsetree.tcl. |
|
command bound to B1-Release-event on a edge. if bindings changed, save commands to history Definition at line 1206 of file parsetree.tcl. |
|
Executed when an edge is touched. This is different from allEnter because touching an edge should also highlight its label. Definition at line 645 of file parsetree.tcl. |
|
Executed when an edge is left by the mouse pointer. Definition at line 660 of file parsetree.tcl. |
|
Cancel an ongoing move operation, i.e. return the edge to where it was before it was picked up. Completed moves are not undone, for that you need undo/redo. Definition at line 1191 of file parsetree.tcl. |
|
Return the edge widget at timepoint $t on canvas $w. Definition at line 591 of file parsetree.tcl. |
|
Auto-correct the current subordination. Definition at line 912 of file parsetree.tcl. |
|
itk_option: color of erroneous structures
|
|
Translate window-based into canvas-based co-ordinates. If a scrolledcanvas is scrolled to the right, away from the home position, and a mouse click occurs in its upper left corner, then the bind event will still receive the coordinates (1,1) through its x and y parameters, even though the canvas pixel the the mouse is touching is something like (320,1). (Actually, because of the way the scrolledcanvas widget is written, an offset occurs even in the home position.) This routine accounts for that offset. Therefore it must be called whenever coordinates received through `bind' are to be applied to things on the canvas. Definition at line 2053 of file parsetree.tcl. |
|
Switch to the next level of description. Definition at line 3228 of file parsetree.tcl. |
|
Find lexemes that can be exchanged for $item. The return value is a list of lists that each contain a descriptive string and the fitting wordSelect callback. Definition at line 786 of file parsetree.tcl. |
|
get the orientation of the panedwindow. Definition at line 2586 of file parsetree.tcl. |
|
Highlight specified edges in color. Definition at line 2609 of file parsetree.tcl. |
|
itk_option: color of highlighted structures
|
|
Check if $i is actually visible on $w. Returns 0 only if $i is actually scrolled offscreen. $i might also be invisible because the entire X window is partially obscured, but Tcl cannot detect this. Definition at line 2747 of file parsetree.tcl. Referenced by canRedo(). |
|
Handle Shift-ed keyboard editing events: actually change the subordination Definition at line 2962 of file parsetree.tcl. |
|
Handle Control-ed keyboard editing events: actually change the label Definition at line 3076 of file parsetree.tcl. |
|
Handle Alt keyboard editing events: actually change the lexeme Definition at line 3198 of file parsetree.tcl. |
|
Handle Shift-ed keyboard editing events. Definition at line 2833 of file parsetree.tcl. |
|
Handle Control-ed keyboard events: select the hypothetical new label Definition at line 3003 of file parsetree.tcl. |
|
Handle Alt keyboard events: select the hypothetical new lexeme Definition at line 3110 of file parsetree.tcl. |
|
Handle keyboard editing events: select the word that the next change will apply to. Definition at line 2788 of file parsetree.tcl. |
|
show menu of available level-labels when clicking on a label. Definition at line 865 of file parsetree.tcl. |
|
itk_option: color of the dependency labels
|
|
itk_option: font-property of the dependency labels Definition at line 1998 of file parsetree.tcl. |
|
Return the label that goes with $edge. Definition at line 563 of file parsetree.tcl. |
|
Auto-correct the current label. Definition at line 895 of file parsetree.tcl. |
|
Set the label of the edge at $timepoint on $level. Definition at line 1022 of file parsetree.tcl. |
|
itk_option: decoration of a level component
|
|
itk_option: decoration of a level component
|
|
Return he name of the main level. The main level is the one that gets all other edges drawn under it as little arcs. If the grammar does not define one, return the name of the first level in the parse. Definition at line 2597 of file parsetree.tcl. |
|
part of the initialization process. Definition at line 371 of file parsetree.tcl. Referenced by ~ParseTree(). |
|
apply parseMirror. Definition at line 2333 of file parsetree.tcl. |
|
Scroll canvas down a step. Definition at line 3243 of file parsetree.tcl. Referenced by mouseScrollUp(). |
|
Scroll canvas up a step. Definition at line 3236 of file parsetree.tcl. References mouseScrollDown(). |
|
move an existing edge and its label to a new position. Definition at line 1511 of file parsetree.tcl. |
|
move an existing edge and its label to a new position. Definition at line 1363 of file parsetree.tcl. |
|
call all level canvases of the tree. Definition at line 2320 of file parsetree.tcl. |
|
scan all levels of the tree horizontally.
|
|
scan all levels of the tree horizontally.
|
|
seeks an edge crossing with this id. Definition at line 1542 of file parsetree.tcl. |
|
itk_option: color of a node of the dependency tree
|
|
Return the node widget at timepoint $t on canvas $w. Note that for t == -1, there can be several candidates on the canvas, and we select the one that is closest to the end of edge $e to avoid hectic scrolling. Definition at line 609 of file parsetree.tcl. |
|
Wrapper for Parse::optimizeWord. Definition at line 967 of file parsetree.tcl. |
|
colorize the tabs in the tabnotebook. This is done according to the worst violation on that tab. Definition at line 1895 of file parsetree.tcl. |
|
delegate to the _parse. Definition at line 2570 of file parsetree.tcl. References setOrientation(). |
|
Command bound to conflict middle click. Definition at line 678 of file parsetree.tcl. |
|
Calls redo on command history. Definition at line 2713 of file parsetree.tcl. |
|
force draw a specified level on its page. Definition at line 1559 of file parsetree.tcl. |
|
Compute the array _itemsOfViolation for this level. Definition at line 1791 of file parsetree.tcl. |
|
take a score and return an appropriate red/green color for it. Definition at line 1950 of file parsetree.tcl. |
|
set the orientation of the panedwindow and reset to default fraction. Definition at line 2577 of file parsetree.tcl. Referenced by parse(). |
|
highlight all edges participating in cycles on the current level. Definition at line 2401 of file parsetree.tcl. |
|
build a popup menu and show the provided items. Items is a list of pairs consisting of a label and the associated command. Definition at line 2068 of file parsetree.tcl. |
|
Methods used to implement undo-functionality (called from VisParses). Definition at line 2689 of file parsetree.tcl. |
|
Methods used to implement undo-functionality (Internal methods). Shift edge (modifier) to modifiee on given level Used to undo edge-moving actions Definition at line 2667 of file parsetree.tcl. |
|
Change modifier's label at given level. Definition at line 2655 of file parsetree.tcl. |
|
Change reading for given vertice to description
|
|
highlight differences to annotation Definition at line 2348 of file parsetree.tcl. |
|
command bound to violation browsing. Definition at line 699 of file parsetree.tcl. |
|
itk_option: color of vertical lines
|
|
show menu of available lexicon-entries when clicking on a word. Definition at line 819 of file parsetree.tcl. |
|
itk_option: color of the words in the sentence
|
|
command bound to Enter-event. Definition at line 509 of file parsetree.tcl. |
|
itk_option: font-property for the words in the sentence Definition at line 2012 of file parsetree.tcl. |
|
command bound to Leave-event. Definition at line 530 of file parsetree.tcl. |
|
command bound to word middle click. Definition at line 463 of file parsetree.tcl. |
|
Return the word widget at timepoint $t on canvas $w. Definition at line 578 of file parsetree.tcl. |
|
Auto-correct the current word. Definition at line 940 of file parsetree.tcl. |
|
action taking place when a lexeme is chosen from a wordlist. Saving action to history Definition at line 836 of file parsetree.tcl. |
|
saves the Parse to file as an annotation in cdgp input format Definition at line 1989 of file parsetree.tcl. |
|
increase or decrease zoom level of all canvases. Definition at line 2513 of file parsetree.tcl. |
|
array storing arcs by level and timepoint. Example: _arcOfTimepoint(3,OBL1) = 47 48 Definition at line 85 of file parsetree.tcl. |
|
Command-History-Object for undo-implementation. Definition at line 113 of file parsetree.tcl. |
|
Flags for inter-handler communication. Definition at line 124 of file parsetree.tcl. |
|
array indicating whether a level is already drawn. Definition at line 99 of file parsetree.tcl. |
|
holds all items on a canvas belonging to one timepoint. Example: _itemsOfTimepoint(SYN,3) == 4 27 26 24 25 Definition at line 77 of file parsetree.tcl. |
|
holds ids of canvas items to be highlighted when touching a violation. Example: _itemsOfViolation(1) == 23 SYN 22 SYN Definition at line 93 of file parsetree.tcl. |
|
Variables holding state of the keyboard highlighting. Definition at line 116 of file parsetree.tcl. |
|
array storing the canvas of a level. Definition at line 96 of file parsetree.tcl. |
|
array holding the level that an arc belongs to. Example: _levelOfItem(89) = DOM Definition at line 89 of file parsetree.tcl. |
|
the embedded Parse object Definition at line 66 of file parsetree.tcl. |
|
array holding the middle points of the words. initialized by drawText; indexed by timepoints, e.g. 0 Definition at line 73 of file parsetree.tcl. |
|
array holding the timepoint which a specified id belongs to. Example: _timepointOfId(SYN,3) = 0 Definition at line 81 of file parsetree.tcl. |
|
who is my daddy Definition at line 69 of file parsetree.tcl. |