Widget: ImgObj
use class::ImgObj;
The file ImgObj.pm is located in the subdirectory './class'
This is a widget derived from class::EmbObj that gets embeded into the documents text widget in the DocForm object (=document window).
This class is for embeding images into the document.
This class is in a very basic stage, it's just for demonstarting that it's quiet easy to add new embeded objects to e:doc.
Coding: 10% done
Documentation: up-to-date
Do not set/read them directly, use the Get/Set methods instead.
All properties derived from the class EmbObj.
$self->{'_data'}->{'img_name'} #The filepath/name of the image
$self->{'_data'}->{'img_type'} #The type of the image (GIF,JPG....)
NOTE: The following attributes are used for the Tk widgets building the GUI and are accessed directly (no get/set methods):
All GUI attributes derived from the class EmbObj.
Here your widget could build up all its own widgets and gets initialised
$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.
$filename
= $object->img_name(); #gets the filename of the
image to be displayed
$object->img_name($filename); #sets the filename of the image to be displayed
$filetype
= $object->img_type(); #gets the filetype of the
image to be displayed
$object->img_type($filetype); #sets the filetype of the image to be displayed
my @export_text
= $object->export_to_backend();
This function exports the content of the object to the current backend.
The function is called in the document-exporting process, whenever an embeded object is found.
It returns the text for exporting the object.
$object->_before_save();
This function is called before the $self->{'_data'}-subbranch gets saved.
Processing absolute filenames into relative ones if possible