Widget: TagDoc
use class::TagDoc;
The file TagDoc.pm is located in the subdirectory './class'
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.
Coding: 99% done
Documentation: up-to-date
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
! Not called directly !
This ``constructor'' initialises a new object of the class TagDoc and calls
ClassInit()
of the Superclass.
$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
The standard automatically called PERL destructor for objects.
$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.
$type
= $object->type(); #gets the value of the 'type'
attribute
$object->type($type); #sets the value of the 'type' attribute
$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
$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
= $object->tagman(); #gets a reference to the
associated TagMan object
$object->tagman($tagman); #sets a reference to the associated TagMan object
$object->_popup();
Create the popupmenu and display it on the screen
$object->_select_tag();
Selecting the associated tag in the text widget
$object->_remove_tag();
Removing the associated tag in the text widget
$object->_raise_tag();
Raise the associated tag in the text widget
$object->_lower_tag();
Lower the associated tag in the text widget
$object->_delete_content_of_tag();
Delete the text content of the associated tag in the text widget
$object->_empty_content_of_tag();
Empty the text content of the associated tag in the text widget