Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

VisParses Class Reference

Inheritance diagram for VisParses:

Inheritance graph
[legend]
Collaboration diagram for VisParses:

Collaboration graph
[legend]
List of all members.

Detailed Description

VisParses - the grafical tree editor.

A VisParses object instanciate one toplevel window that embedds a set of ParseTree objects to be displayed. There are two common situations that determine the set of parses: (1) displaying annotations, (2) displaying parser solutions. In the first case one VisParses object can fetch all annotations loaded into the system. In the second case one VisParses object displays all solutions a specific parsing flavour has found for one wordgraph. So in the latter case another parser cannot reuse the same VisParses object to visualize its solution record also, but needs a new VisParses object of its own, giving you two separate toplevel windows. I think this is the best compromise here between lots of toplevel windows and embedded objects in separate tabs of one window.

As you see below we don't provide a separate destructor to destruct embedded ParseTree objects but add ParseTree objects directly as itk-components to the VisParses widget. So they get destructed automatically.

Author:
Michael Daum, Kilian A. Foth, Dietmar Fünning (see also AUTHORS and THANKS for more)
$Id visparses.tcl $

Definition at line 35 of file visparses.tcl.

Public Member Functions

 addParse (ParseTree parse)
 center ()
 geometry ()
 getBadness ()
 highlight (ParseTree parse, TclString which)
 iconname (TclString value="xcdg")
 interactive (TclNumber value=0)
 readWord ()
 removeParse (ParseTree parse)
 update ()
 view (TclNumber no)
 VisParses (TclList args)

Private Member Functions

 _BackspaceHandler ()
 _breakcycleAction ()
 _computeViolas ()
 _deleteParseAction ()
 _getOrientation ()
 _labelOfIndex (TclNumber index)
 _loadAction ()
 _mirrorAction ()
 _nextAction ()
 _previousAction ()
 _print ()
 _redo ()
 _refresh ()
 _saveAction ()
 _saveAsAction ()
 _setOrientation ()
 _showcycleAction ()
 _spaceHandler ()
 _switchLevel (TclNumber x)
 _undo ()
 _updateVisual ()
 _verifyAction ()
 _zoomIn ()
 _zoomOut ()

Private Attributes

TclString _currentOrient = "vertical"
TclNumber _noPages = 0
TclArray _pageOfParse
TclString _userInput = ""


Constructor & Destructor Documentation

VisParses::VisParses TclList  args  ) 
 

constructor

Configure Edit-Menu with Undo-/Redo-Entries Definition at line 91 of file visparses.tcl.


Member Function Documentation

VisParses::_BackspaceHandler  )  [private]
 

invoked by Backspace in the textbox.

Definition at line 858 of file visparses.tcl.

VisParses::_breakcycleAction  )  [private]
 

Break cycles in a parse.

Definition at line 664 of file visparses.tcl.

VisParses::_computeViolas  )  [private]
 

compute the violations of the selected ParseTree.

Definition at line 713 of file visparses.tcl.

VisParses::_deleteParseAction  )  [private]
 

undisplay the selected ParseTree.

Definition at line 792 of file visparses.tcl.

VisParses::_getOrientation  )  [private]
 

get the orientation of the split of the current parsetree.

Definition at line 941 of file visparses.tcl.

VisParses::_labelOfIndex TclNumber  index  )  [private]
 

returns the label of a page.

Definition at line 816 of file visparses.tcl.

VisParses::_loadAction  )  [private]
 

load a parse directly into the editor.

Todo:
this is not implelented yet here, but in AllParses
Definition at line 560 of file visparses.tcl.

VisParses::_mirrorAction  )  [private]
 

call parseMirror() eventually.

Definition at line 611 of file visparses.tcl.

VisParses::_nextAction  )  [private]
 

switch to the next tab in the tree editor. Switching to a next tab means that we select the next tree in a set of trees loaded into the editor. In case of solution parses we simply switch to the next parse in the editor. In case of annotation parses we switch to the next annotation or generate new annotation parses for the next lattice in the set of annotated lattices. Definition at line 681 of file visparses.tcl.

VisParses::_previousAction  )  [private]
 

display the previous annotation.

Definition at line 706 of file visparses.tcl.

VisParses::_print  )  [private]
 

_print the visible level.

Definition at line 530 of file visparses.tcl.

VisParses::_redo  )  [private]
 

undo the last action of the selected page.

Definition at line 735 of file visparses.tcl.

VisParses::_refresh  )  [private]
 

_refresh the display of the selected VisParses.

Definition at line 746 of file visparses.tcl.

VisParses::_saveAction  )  [private]
 

writes the tree to file as an annotation.

Todo:
The name of the file to write to is determined by parsing the -title property. Actually this should be done better by paying a round of new properties.
Definition at line 570 of file visparses.tcl.

VisParses::_saveAsAction  )  [private]
 

writes the tree to file under a new name.

Definition at line 587 of file visparses.tcl.

VisParses::_setOrientation  )  [private]
 

set the orientation of the split of the current parsetree.

Definition at line 929 of file visparses.tcl.

VisParses::_showcycleAction  )  [private]
 

Display cycles on a level in red ink.

Definition at line 652 of file visparses.tcl.

VisParses::_spaceHandler  )  [private]
 

invoked by space in the textbox.

Definition at line 828 of file visparses.tcl.

VisParses::_switchLevel TclNumber  x  )  [private]
 

Switch to next or previous level in the parsetree.

Definition at line 635 of file visparses.tcl.

VisParses::_undo  )  [private]
 

undo the last action of the selected page.

Definition at line 724 of file visparses.tcl.

VisParses::_updateVisual  )  [private]
 

update the visual parts which depends on the selected parsetree

Definition at line 973 of file visparses.tcl.

VisParses::_verifyAction  )  [private]
 

visual version of the `verify' command

Definition at line 623 of file visparses.tcl.

VisParses::_zoomIn  )  [private]
 

Display all canvases of the selected parse smaller.

Definition at line 905 of file visparses.tcl.

VisParses::_zoomOut  )  [private]
 

display all canvases of the selected parse bigger.

Definition at line 917 of file visparses.tcl.

VisParses::addParse ParseTree  parse  ) 
 

add a parse on a separate page.

Definition at line 470 of file visparses.tcl.

VisParses::center  ) 
 

center on the middle of the application.

Definition at line 762 of file visparses.tcl.

VisParses::geometry  ) 
 

Confess to my geometry.

Definition at line 463 of file visparses.tcl.

VisParses::getBadness  ) 
 

get the score of current parsetree

Definition at line 954 of file visparses.tcl.

VisParses::highlight ParseTree  parse,
TclString  which
 

Delegate a highlight action to the parsetree.

Definition at line 989 of file visparses.tcl.

VisParses::iconname TclString  value = "xcdg"  ) 
 

option -iconname.

Definition at line 755 of file visparses.tcl.

VisParses::readWord  ) 
 

gets another word of typed input. Hangs until the word is supplied. Definition at line 775 of file visparses.tcl.

VisParses::removeParse ParseTree  parse  ) 
 

make a ParseTree invisible. This does not destroy the underlying Parse. Definition at line 503 of file visparses.tcl.

VisParses::update  ) 
 

updates the editmenu. This method is registered to the CommandHistory to be called whenever the undo history changes. Depending on the current position in the undo history, things are redoable or undoable.

Todo:
get a better name for this method: "update" is most generic and might be confusing as we have a VisParsees::_updateVisual() aswell.
Definition at line 1001 of file visparses.tcl.

VisParses::view TclNumber  no  ) 
 

delegate the view command to the tbn component

Definition at line 523 of file visparses.tcl.


Member Data Documentation

TclArray VisParses::_pageOfParse [private]
 

array mapping Parses to page-numbers

Definition at line 85 of file visparses.tcl.


The documentation for this class was generated from the following file:
XCDG 0.95 (20 Oct 2004)