NAME:

Object: BaseForm


SYNOPSIS:

use class::BaseForm;


DIRECTORY/FILE:

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


DESCRIPTION:

The object BaseForm is the base class for all major forms in e:doc. These are the DocForm and the PrjForm classes until now.

Al methods that have to be available in all major forms like building up a speedbars and menus, displaying several kinds of dialogs or message boxes or executing macros are done here.


STATUS:

Coding: 99% done

Documentation: up-do-date


ATTRIBUTES:

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

$self->{'ui'} #The barnch that hold ALL GUI elements

$self->{'ui'}->{'top'} #Reference to the Toplevel or Mainwindow that is displayed

$self->{'dialogs'}; #A reference to an array of references to dialog windows that have been cretaed by the Docform object (TagForm, TblForm, etc.)

$self->{'content_changed'} #Flag if the content is changed ``*'' means changed `` '' means unchanged

$self->{'filename'} #Current filename

$self->{'filename_short'} #Current filename without path

$self->{'path'} #Current path (without filename)


METHODS:


Class Methods:


Constructors:


new

$object = BaseForm->new($config_name);

This constructor creates a new object.

This method is never called directly (BaseForm is a base class) , it is only called from within the constructors of the derived classes.

Parameters:

(+) $config_name: The name of the Section in edoc.cfg that describes the GUI of the derived from


Destructors:


DESTROY;

The standard automatically called PERL destructor for objects.


do_destroy

$object ->do_destroy();

This destructor is binded to the protocol-message WM_DELETE_WINDOW


Public data methods (=Get/Set methods):


top

$ref_toplevel = $object->top(); #gets a reference to the toplevel

$object ->top($ref_toplevel); #sets a reference to the toplevel


filename

$filename = $object->filename(); #gets the current filename

$object->filename($filename); #sets the current filename


filename_short

$filename_short = $object->filename_short(); #gets the current filename without path

$object->filename_short($filename_short); #sets the current filename without path


path

$path = $object->path(); #gets the current path

$object->path($path); #sets the current path


ref_filename

$ref_filenamename = $object->ref_filename(); #returns a reference to the current filename (for use with Tk widgets that need a reference, READONLY)


content_changed

$status = $object->contentt_changed(); #gets the current changing status

$object->content_changed($status); #sets the current changing status

($status is an empty string (='') if the content is unchanged and '*' if the content is changed.)


ref_content_changed

$ref_status = $object->ref_content_changed(); #gets a reference to the current changing status

($status is an empty string (='') if the content is unchanged and '*' if the content is changed.)


status_bar

$status_bar = $object->status_bar(); #gets a reference to the status_bar

$object->status_bar($status_bar); #sets a reference to the status_bar


file_label

$file_label = $object->file_label(); #gets a reference to the file_label in the statusbar

$object->file_label($file_label); #sets a reference to the file_label in the statusbar


progress_bar

$progress_bar = $object->progress_bar(); #gets a reference to the progress_bar

$object->progress_bar($progress_bar); #sets a reference to the progress_bar


menu

$menu = $object->menu(); #gets a reference to the menu

$object->menu($menu); #sets a reference to the menu


speedbar

$speedbar = $object->speedbar(); #gets a reference to the speedbar

$object->speedbar($speedbar); #sets a reference to the speedbar


dialogs

$ref_dialogs = $object->dialogs(); #gets an reference to the list (array) of all opened dialog forms that must be destroyed manually

$object->dialogs($ref_dialogs); #sets an reference to the list (array) of all opened dialog forms that must be destroyed manually


Other public methods:


is_content_changed

$flag = $object->is_content_changed();

returns 0 if the content is unchanged else returns 1


set_content_changed

$object->set_content_changed();

sets the content-changed-flag to 'changed' (='*')


set_content_unchanged

$object->set_content_unchanged();

sets the content-changed-flag to 'unchanged' (='')


show_aboutbox

$object->show_aboutbox();

Shows the aboutbox of e:doc.


execute_macro

$return_value = $object->execute_macro($macro_name [, %args]);

This method executes a macro in the actual Form object and returns the SCALAR return value.

Parameters:

(+) $macro_name: The name of the macro to execute

(+) %args: a hash holding the arguments that are passed to the macro (OPTIONAL)


message

$object->message($message_text, $message_title);

Shows a dialogbox with a message.

Parameters:

(+) $message_text: The text of the message to show

(+) $message_title: The title of the message to show


dialog

my $new_value = $object->dialog($message_text, $message_title, $default_value );

Shows a dialogbox and queries an input from the user.

The function returns the value entered by the user

Parameters:

(+) $message_text: The text of the message to show

(+) $message_title: The title of the message to show

(+) $default_value: The value that should be entered by default


Private methods:


_progress_init

$object->_progress_init();

Initialises the progress bar in the right corner of the bottom status bar.


_progress_update

$object->_progress_update($msg, $percent);

Redraws the progress bar with the given message and percent status.

Parameters:

(+) $msg: The message that should be displayed in the progress bar

(+) $percent: How many percent of the full width should be drawn as a colored bar.


_progress_finish

$object->_progress_finish();

Terminates the progress bar and remove the whole progress bar.


KNOWN BUGS:


STILL MISSING: