NAME:

Widget: TagDoc


SYNOPSIS:

use class::TagDoc;


DIRECTORY/FILE:

The file TagDoc.pm is located in the subdirectory './class'


DESCRIPTION:

This is a widget derived from Tk::Label that gets embeded into the documents text widget in the DocForm object (=document window).

This widget is thought to be used for the TagDoctor-Feature, that displays the start and the end of all tags in the document.

This object is coded as an Perl/Tk widget, so it has no Constructor new, it has the standard Tk functions to initialise itself (Populate,ClassInit,...) The function Populate() is used like an constructor here.


STATUS:

Coding: 99% done

Documentation: up-to-date


ATTRIBUTES:

Do not set/read them directly, use the Get/Set methods instead.

$self->{'text_widget'} #Reference to the textwidget where the TagDoc object is embeded

$self->{'associated_tag'} ##Name of the tag the TagDoc object belongs to

$self->{'type'} #The type of the Dagdoc-object could be 'start' or 'end'

$self->{'tagman'} #A reference to the associated TagMan object


METHODS:


Class Methods:


ClassInit($class, $parentwindow)

! Not called directly !

This ``constructor'' initialises a new object of the class TagDoc and calls ClassInit() of the Superclass.


Constructors:


Populate

$object = TagDoc(%options);

This ``constructor'' sets the options of the new object of the class TagDoc.

The binding of events and the creation of the associated Baloonhelp is done here too.

The keys/values in %options:

(+) '-text_widget' => Reference to the textwidget where the NumLabel is embeded

(+) '-associated_tag' => The name of the the NumLabel is associated with (PAR_STYLES or EMBOBJ or ENV_STYLES)

(+) '-type' => The type of the Dagdoc-object could be 'start' or 'end'

(+) '-tagman' => A reference to the associated TagMan object


Destructors:


DESTROY;

The standard automatically called PERL destructor for objects.


do_detstroy

$object->do_detsroy();

This ``destructor'' method is binded to the ``<DESTROY>'' event and should be performed whenever the element is destroyed. It should not be called directly.


Public data methods (=Get/Set methods):


type

$type = $object->type(); #gets the value of the 'type' attribute

$object->type($type); #sets the value of the 'type' attribute


text_widget

$ref_text_widget = $object->text_widget(); #gets a referenece to the Text widget the NumLabel is embeded in

$object->text_widget($ref_text_widget); #sets a referenece to the Text widget the NumLabel is embeded in


associated_tag

$tag_name = $object->associated_tag(); #gets the name of the tag the NumLabel is associated with

$object->associated_tag($tag_name); #sets the name of the tag the NumLabel is associated with


tagman

$tagman = $object->tagman(); #gets a reference to the associated TagMan object

$object->tagman($tagman); #sets a reference to the associated TagMan object


Other public methods:


Private methods:


_popup

$object->_popup();

Create the popupmenu and display it on the screen


_select_tag

$object->_select_tag();

Selecting the associated tag in the text widget


_remove_tag

$object->_remove_tag();

Removing the associated tag in the text widget


_raise_tag

$object->_raise_tag();

Raise the associated tag in the text widget


_lower_tag

$object->_lower_tag();

Lower the associated tag in the text widget


_delete_content_of_tag

$object->_delete_content_of_tag();

Delete the text content of the associated tag in the text widget


_empty_content_of_tag

$object->_empty_content_of_tag();

Empty the text content of the associated tag in the text widget


KNOWN BUGS:


STILL MISSING: