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

AllFiles Class Reference

Inheritance diagram for AllFiles:

Inheritance graph
[legend]
Collaboration diagram for AllFiles:

Collaboration graph
[legend]
List of all members.

Detailed Description

AllFiles - CDG grammar file manager. This class is responsible for all issues regarding grammar files in the xcdg application, that is loading, reloading grammar files and xml annotaion files.

Author:
Michael Daum (see also AUTHORS and THANKS for more)
Id
allfiles.tcl,v 1.65 2004/10/11 13:50:05 micha Exp

Definition at line 20 of file allfiles.tcl.

Public Member Functions

 AllFiles (TclList args)
 getCData (TclString id)
 getSelection ()
 init_data ()
 load (TclList args)
 load_dir (TclList args)
 loadXml (TclString filename)
 refreshid (TclString id)
 reload ()
 selectIdsOfFile (TclString filename)
 setIndexedSelection (TclList args)
 setSelection (TclList args)

Protected Member Functions

 _browse_action (TclWidget w)
 _keypress_action (TclWidget w, TclKeyBinding k)
 _motion_action (TclWidget w, TclNumber x, TclNumber y)
 _return_action ()
 _rowtag (TclNumber row)
 _setCount (TclNumber n)
 refreshrow (TclNumber row, TclString item)

Protected Attributes

TclString _idColumnIndex = ""
TclString _selection = ""

Private Member Functions

 _dom2anno (DomNode document)
 _edit_action ()
 _load (TclList args)
 _load_action ()
 _reload_action ()
 _reset_action ()
 _run_action ()

Private Attributes

TclArray _filenames
TclString _lastLoaded = ""


Constructor & Destructor Documentation

AllFiles::AllFiles TclList  args  ) 
 

An AllFiles constructor.

Parameters:
args arguments passed to itk_initialize
Definition at line 62 of file allfiles.tcl.


Member Function Documentation

DataBrowser::_browse_action TclWidget  w  )  [protected, inherited]
 

browse slot. This method adjusts the selected file in AllFiles::_selection.

Parameters:
w the widget bound to this slot.
Definition at line 189 of file databrowser.tcl.

AllFiles::_dom2anno DomNode  document  )  [private]
 

analyse a dom document and convert it to an annotation.

Parameters:
document the dom document
Returns:
a string buffer containing the annotation in the cdg annotation format
This method mainly is called by loadXml . Definition at line 418 of file allfiles.tcl.

AllFiles::_edit_action  )  [private]
 

edit slot. This method is called on and edit button press and starts an editor on the selected filenames. Definition at line 329 of file allfiles.tcl.

DataBrowser::_keypress_action TclWidget  a,
TclKeyBinding  k
[protected, inherited]
 

React to a keypress into the table.

Keys typed by the user are collected into a string, and the row whose id matches that string is selected. Definition at line 421 of file databrowser.tcl.

AllFiles::_load TclList  args  )  [private]
 

internal load method. This method is called while the CdgBusy box is shown.

Parameters:
args list of filenames to be loaded
Returns:
the list of the filenames basenames
Definition at line 207 of file allfiles.tcl.

AllFiles::_load_action  )  [private]
 

load slot. This command is executed whenever the load button is pressed. It loads the selected files in AllFiles::_selection and sets the selection accordingly. Definition at line 287 of file allfiles.tcl.

AllFiles::_motion_action TclWidget  w,
TclNumber  x,
TclNumber  y
[protected]
 

motion slot. Moving the mouse over the table extracts displays a help string in the status line of the main window.

Parameters:
w the widget where the motion was detected
x the x coords of the mouse
y the y coords of the mouse

Reimplemented from DataBrowser.

Definition at line 360 of file allfiles.tcl.

AllFiles::_reload_action  )  [private]
 

reload slot. This command is executed whenever the load button is pressed. It resets the cdg system before loading the files in AllFiles::_lastLoaded. Definition at line 298 of file allfiles.tcl.

AllFiles::_reset_action  )  [private]
 

reset slot. This method simply calls ::cmd::Reset. Definition at line 347 of file allfiles.tcl.

DataBrowser::_return_action  )  [protected, inherited]
 

actions to take place on pressing return in the entryfield.

Definition at line 244 of file databrowser.tcl.

DataBrowser::_rowtag TclNumber  row  )  [protected, inherited]
 

colorize the table rows This method is a callback configured to the table in order to colorize the rows. Definition at line 361 of file databrowser.tcl.

AllFiles::_run_action  )  [private]
 

select a file and run it as a tcl-cdg-script

Definition at line 307 of file allfiles.tcl.

DataBrowser::_setCount TclNumber  n  )  [protected, inherited]
 

display the count-label. This number should reflect the number of items selected

Parameters:
n the number to be set
Definition at line 375 of file databrowser.tcl.

DataBrowser::getCData TclString  id  )  [inherited]
 

abstract methods for retrieving the relevant C or Tcl data values for a given ID

Reimplemented in AllConstraints, AllLexemes, AllNetworks, AllParses, and AllWordgraphs.

DataBrowser::getSelection  )  [inherited]
 

return a list of selected ids

Definition at line 292 of file databrowser.tcl.

References DataBrowser::setSelection().

AllFiles::init_data  ) 
 

initialization of the data managed by this class. This method refreshes the data which could have been changed elsewhere, that is consult the C layer and squeeze out the relevant information.

Reimplemented from DataBrowser.

Definition at line 242 of file allfiles.tcl.

AllFiles::load TclList  args  ) 
 

load files and store additional information which could be acquired

Definition at line 146 of file allfiles.tcl.

AllFiles::load_dir TclList  args  ) 
 

load all files in a directory.

Todo:
this method does not use the busy dialog.
Definition at line 188 of file allfiles.tcl.

AllFiles::loadXml TclString  filename  ) 
 

read in an xml annotation.

Parameters:
filename the xml file containing the xml annotation
The provided file is read, and the xml document is searched for an <annotation> .... </annotation>. This was hopefully generated with writeXmlAnnoEntry() . Definition at line 384 of file allfiles.tcl.

DataBrowser::refreshid TclString  id  )  [inherited]
 

refresh the displayed data for a specific ID

Definition at line 398 of file databrowser.tcl.

Referenced by DataBrowser::_motion_action().

DataBrowser::refreshrow TclNumber  row,
TclString  item
[protected, inherited]
 

abstract method called in refreshid

Reimplemented in AllWordgraphs.

AllFiles::reload  ) 
 

load the last loaded file again

Definition at line 232 of file allfiles.tcl.

AllFiles::selectIdsOfFile TclString  filename  ) 
 

select row of a file. previous selections are cleared Definition at line 124 of file allfiles.tcl.

DataBrowser::setIndexedSelection TclList  args  )  [inherited]
 

Select one or more rows. A previous selection is cleared; without arguemnts, removes all selections.

ARGS is a list of row indices. Definition at line 332 of file databrowser.tcl.

DataBrowser::setSelection TclList  args  )  [inherited]
 

Select one or more rows. A previous selection is cleared; without arguemnts, removes all selections.

ARGS must be a list of strings without spaces in them. Definition at line 304 of file databrowser.tcl.

Referenced by DataBrowser::getSelection().


Member Data Documentation

TclArray AllFiles::_filenames [private]
 

array holding all loaded files.

Definition at line 51 of file allfiles.tcl.

TclString DataBrowser::_idColumnIndex = "" [protected, inherited]
 

column index of table that contains selectable ids (used in _browse_action)

Definition at line 87 of file databrowser.tcl.

TclString AllFiles::_lastLoaded = "" [private]
 

list if recently loaded files

Definition at line 54 of file allfiles.tcl.

TclString DataBrowser::_selection = "" [protected, inherited]
 

string of current selected row ids

Definition at line 84 of file databrowser.tcl.


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