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

YadaDocument Class Reference
[YadaDocuments - embedded objects]

Inheritance diagram for YadaDocument:

Inheritance graph
[legend]
Collaboration diagram for YadaDocument:

Collaboration graph
[legend]
List of all members.

Detailed Description

YadaDocument - embeddeable document. This class extends the YadaPlainDocument and offers all functionality to embed a document into the YadaMain widget. In parallel to this inheritance the YadaConfigDocument is not embeddeable into YadaMain but into YadaConfig, i.e. YadaGammars, YadaExperiments etc.

Author:
Michael Daum
Id
YadaDocument.tcl,v 1.11 2004/05/11 14:30:47 ddreyer Exp

Definition at line 23 of file YadaDocument.tcl.

Public Member Functions

virtual activationHandle ()
 backward ()
virtual deActivationHandle ()
 displayTitle ()
 forward ()
 fromDOM (domNode node)
 getPersistanceFileName ()
 hasSavedState ()
virtual init ()
 isModified ()
 lastChanged ()
 load ()
 loadUpdatedWordgraphs (TclList args)
 resetModified ()
 save ()
 setModified ()
 setToggle (TclString name, TclRef value="")
 toDOM ()
 YadaDocument ()
 ~YadaDocument ()

Static Public Member Functions

 newDocument (TclString className, TclString name)

Public Attributes

TclString hasView = "true"
TclString name = ""
YadaDocument nextDocument
YadaDocument prevDocument

Protected Member Functions

 askNewLoad ()
 updateModificationTime ()

Protected Attributes

TclNumber _isInitialized = 0
TclNumber _lastModificationTime = 0
TclNumber _modified = 0

Private Attributes

TclNumber _statusFlag = 1
TclNumber _toolbarFlag = 1


Constructor & Destructor Documentation

YadaDocument::YadaDocument  ) 
 

constructor

Definition at line 66 of file YadaDocument.tcl.

YadaDocument::~YadaDocument  ) 
 

destructor

unregister only, if document has been registered before Definition at line 226 of file YadaDocument.tcl.


Member Function Documentation

YadaDocument::activationHandle  )  [virtual]
 

activationHandle

Reimplemented from YadaPlainDocument.

Reimplemented in YadaOneOnOne, YadaConfig, YadaDifference, YadaGlsStats, YadaRanking, and YadaRunner.

Definition at line 280 of file YadaDocument.tcl.

YadaDocument::askNewLoad  )  [protected]
 

Pops up a yes/no message dialog and returns the result (i.e. which button has been pressed) Definition at line 330 of file YadaDocument.tcl.

YadaDocument::backward  ) 
 

backward

Definition at line 236 of file YadaDocument.tcl.

References forward().

YadaPlainDocument::deActivationHandle  )  [virtual, inherited]
 

deActivationHandle

Reimplemented in YadaConfig.

Definition at line 91 of file YadaPlainDocument.tcl.

References YadaPlainDocument::init().

Referenced by YadaPlainDocument::activationHandle().

YadaPlainDocument::displayTitle  )  [inherited]
 

Displays title in main window (reflecting modification state of document).

Reimplemented in YadaConfigDocument, YadaGenerals, YadaRanking, and YadaRunner.

Definition at line 207 of file YadaPlainDocument.tcl.

YadaDocument::forward  ) 
 

forward

Definition at line 243 of file YadaDocument.tcl.

References prevDocument.

Referenced by backward().

YadaPlainDocument::hasSavedState  )  [inherited]
 

Predicate returning 1, if file containing persistant state of YadaGrammar exists, otherwise 0 Definition at line 192 of file YadaPlainDocument.tcl.

Referenced by YadaPlainDocument::resetModified().

YadaPlainDocument::init  )  [virtual, inherited]
 

init

Reimplemented in YadaMethods, YadaConfig, YadaConfigDocument, YadaExperiments, YadaGenerals, YadaGrammars, YadaMachines, YadaRanking, and YadaRunnableDocument.

Definition at line 97 of file YadaPlainDocument.tcl.

Referenced by YadaPlainDocument::deActivationHandle().

YadaPlainDocument::isModified  )  [inherited]
 

Predicate returning 1, if configuration data has changed, 0 otherwise.

Definition at line 168 of file YadaPlainDocument.tcl.

References YadaPlainDocument::setModified().

YadaPlainDocument::lastChanged  )  [inherited]
 

Returns time of last update to document XML file or an empty string, if there is no such file Definition at line 219 of file YadaPlainDocument.tcl.

YadaPlainDocument::load  )  [inherited]
 

Loads current document from file (file name depends on document name).

reset in case there is some value left from last load operation;

Modified state may be changed by overridden fromDOM methods

Reimplemented in YadaConfig, YadaExperiments, YadaGrammars, YadaMachines, and YadaRunner.

Definition at line 113 of file YadaPlainDocument.tcl.

Referenced by YadaPlainDocument::setToggle().

YadaDocument::newDocument TclString  className,
TclString  name
[static]
 

newDocument

Definition at line 319 of file YadaDocument.tcl.

YadaPlainDocument::resetModified  )  [inherited]
 

Removes modification mark.

Definition at line 183 of file YadaPlainDocument.tcl.

References YadaPlainDocument::hasSavedState().

Referenced by YadaPlainDocument::setModified().

YadaPlainDocument::save  )  [inherited]
 

Saves current document to file (file name depends on document name).

Reimplemented in YadaConfig, YadaExperiments, YadaGrammars, YadaMachines, and YadaRunnableDocument.

Definition at line 140 of file YadaPlainDocument.tcl.

YadaPlainDocument::setModified  )  [inherited]
 

Marks item as modified.

Definition at line 175 of file YadaPlainDocument.tcl.

References YadaPlainDocument::resetModified().

Referenced by YadaPlainDocument::isModified().

YadaDocument::setToggle TclString  name,
TclRef  value = ""
 

toggle toolbar or status. This method switches the toolbar or the status bar on or off depending on its arguments.

Parameters:
name the element to be toggled: toolbar or status
value the value to which to switch to: 1 or 0

Reimplemented from YadaPlainDocument.

Reimplemented in YadaRunnableDocument.

Definition at line 300 of file YadaDocument.tcl.

YadaPlainDocument::updateModificationTime  )  [protected, inherited]
 

Synchronizes internal modification attribute with modification time of document's XML file Definition at line 234 of file YadaPlainDocument.tcl.


Member Data Documentation

TclNumber YadaPlainDocument::_isInitialized = 0 [protected, inherited]
 

flag indicating initialization. Possible falues are 0 and 1. init() sets this to 1 when it is called in the init chain calls of inheriting classes, i.e. YadaConfigDocument::init() or YadaRunnableDocument::init(). Definition at line 36 of file YadaPlainDocument.tcl.

TclNumber YadaPlainDocument::_lastModificationTime = 0 [protected, inherited]
 

Denotes time of most recent modification of document's XML file CAUSED by this object. This allows recognizing cases where a second object modifies the same file concurrently, in which case the need may arise to synchronize the object with the new file contents. Definition at line 44 of file YadaPlainDocument.tcl.

TclNumber YadaDocument::_statusFlag = 1 [private]
 

flag indicating whether the status message of this document is shown. This information is kept in sync with YadaMain::_statusFlag whenever the document is activated.

See also:
setToggle(), activationHandle().
Definition at line 43 of file YadaDocument.tcl.

TclNumber YadaDocument::_toolbarFlag = 1 [private]
 

flag indicating whether the toolbar of this document is shown. This information is kept in sync with YadaMain::_toolbarFlag whenever the document is activated.

See also:
setToggle(), activationHandle().
Definition at line 38 of file YadaDocument.tcl.

TclString YadaPlainDocument::hasView = "true" [inherited]
 

flag indicating whether this object functions as combined model-view object (value "true"), or as a pure model object (value "false": has to be set explicitly when instantiating object) Definition at line 29 of file YadaPlainDocument.tcl.

TclString YadaPlainDocument::name = "" [inherited]
 

name of the document

Definition at line 25 of file YadaPlainDocument.tcl.

YadaDocument::nextDocument
 

link to the next YadaDocument registered to YadaMain

Definition at line 265 of file YadaDocument.tcl.

YadaDocument::prevDocument
 

link to the previous YadaDocument registered to YadaMain

Definition at line 250 of file YadaDocument.tcl.

Referenced by forward().


The documentation for this class was generated from the following file:
YADA 2.0-alpha (20 Oct 2004)