Package: Config
use lib::Config;
The file Config.pm is located in the subdirectory './lib'
This package contains all functions that transfer the information from the configuration files into the anonymous hashes that keep this information in memory during runtime ($main::internal, $main::config, $main::obj ...).
The actual reading is done by a simple loop that puts all of the files content into an array. It uses the functions from the package lib::Filesys to get some blocks out of the filearray. This data is then transferred into the right positions in the configuration hashes.
Coding: 90%
Documentation: up-do-date
Config::load_internal();
Read the content of the file '\config\edoc.int' into an array and call the functions that read the content of that array into the right branches of the anonymous $main::internal-hash.
Config::load_internal_global($ref_file_array)
Loads all global definitions form the file '\config\edoc.int'.
It gets the information from the previously created file_array that holds the content of the file 'edoc.int' and to read the desired GLOBAL block correctly into the anonymous hash referenced by $ref_internal.
Parameters:
(+) $ref_file_array: A reference to the array that holds the content of '\config\edoc.int'
Config::load_internal_numlists($ref_file_array)
Read all information about the numbering engines from the DOC_NUMLISTS block
Parameters:
(+) $ref_file_array: A reference to the array that holds the content of '\config\edoc.int'
Config::load_project()
Read the content of the file '\config\edoc.prj' into an array and call the functions that read the content of that array into the right branches of the anonymous $main::project-hash.
Config::load_config()
Read the content of the file '\config\edoc.cfg' into an array and call the functions that read the content of that array into the right branches of the anonymous $main::config-hash.
Config::load_config_inline_macros($ref_file_array)
Gets the inline_macros first from the 'INLINE_MACROS' block of the file '\config\edoc.cfg'.
Parameters:
(+) $ref_file_array: A reference to the array that holds the content of '\config\edoc.cfg'
Config::load_config_ui($ref_file_array)
Gets the user interface definition from the 'UI' block of the file '\config\edoc.cfg'.
Parameters:
(+) $ref_file_array: A reference to the array that holds the content of '\config\edoc.cfg'
Config::load_config_general($ref_file_array)
Gets the general configurations from the 'GENERAL' block of the file '\config\edoc.cfg'.
Parameters:
(+) $ref_file_array: A reference to the array that holds the content of '\config\edoc.cfg'
Config::load_project_args($ref_prj_array)
Get the definitions of the project arguments from the configuration file
Parameters:
(+) $ref_prj_array: A reference to the array that holds the content.
Config::load_project_filetypes($ref_prj_array)
Gets the filetapes definition from the file '\config\edoc.prj'.
This is where the user can define several filetypes and associated actions (MACROS) for doubleclicking on them.
Parameters:
(+) $ref_prj_array: A reference to the array that holds the content of '\config\edoc.prj'
Config::load_config_speedbar($ref_form_array, $form_name);
Gets the speedbar definitions from the 'SPEEDBAR' block of the file '\config\edoc.cfg'.
Parameters:
(+) $ref_form_array: A reference to the array that holds the content of the forms block in '\config\edoc.cfg'
(+) $form_name: The form name to which the speedbar belongs
Config::load_config_menu($ref_form_array, $form_name);
Gets the 'MENU' entries definition from the file '\config\edoc.cfg'.
Parameters:
(+) $ref_form_array: A reference to the array that holds the content of the forms block in '\config\edoc.cfg'
(+) $form_name: The form name to which the menu belongs
Config::load_macros()
Read the content of the file '\config\edoc.mac' into an array and call the functions that read the content of that array into the right branches of the anonymous $main::config-hash.
NOTE: The macros are stored in a subbranch of the $main::config-hash, because they do not belong to the internal documents definition and do not belong to a backend. They are only kept in a seperate file, because '\config\edoc.cfg' will get rather long when everything is in it.
Config::load_config_macro_header($ref_file_array)
Gets the macro header definitions from the 'MACRO_HEADER' block of the file '\config\edoc.cfg'.
The macro header is a macrocode that is inserted automatically at the beginning of each defined macro in the block 'MACROS' and automatically executed before the macro code. This is used to set definitions you can use inside of all macros.
The macros execution and parsing functionality will later move into a seperate package called 'Macros', its now kept in several parts of PrjForm.pm, uiPrjForm.pm, DocForm.pm and uiDocForm.pm .
Parameters:
(+) $ref_file_array: A reference to the array that holds the content of '\config\edoc.cfg'
Config::load_config_macros($ref_file_array)
Gets the macros code from the 'MACROS' block of the file '\config\edoc.cfg'.
This is the macros names and code you can assign to menu entries and speedbuttons and for actions in the project form.
The macros execution and parsing functionality will later move into a seperate package called 'Macros', its now kept in several parts of PrjForm.pm, uiPrjForm.pm, DocForm.pm and uiDocForm.pm .
Parameters:
(+) $ref_file_array: A reference to the array that holds the content of '\config\edoc.cfg'
Config::load_backend($ref_docform, $backend_name)
Read the content of the file '{backend_name}.out' into an array and call the functions that read the content of that array into the right branches of the anonymous $backend-hash.
Parameters:
(+) $ref_docform: A reference to the docform object, that has changed its current_backend_name
(+) $backend_name: The name of the backend to load
Config::load_backend_global($ref_backend, $ref_file_array)
Loads all global definitions form the '\config\*.out' file.
It gets the information from the previously created file_array that holds the content of the file '*.out' and to read the desired GLOBAL block correctly into the anonymous hash referenced by $ref_backend.
Parameters:
(+) $ref_backend: A reference to the anonymous $backend
hash
(+) $ref_file_array: A reference to the array that holds the content of '\config\*.out'
Config::load_backend_mask($ref_backend, $ref_file_array)
Loads all information for backends character-masking (=escaping) form the '\config\*.out' file.
It gets the information from the previously created file_array that holds the content of the file '*.out' and to read the desired MASK block correctly into the anonymous hash referenced by $ref_backend.
Parameters:
(+) $ref_backend: A reference to the anonymous $backend
hash
(+) $ref_file_array: A reference to the array that holds the content of '\config\*.out'
Config::build_style_list_from_docstyle($doc_style,$style_group, $none)
Parses the information of the stylegroups for the 'in_document_style'property, builds and returns a new stylelist for the given stylegroup.
This is neccesary because some styles are only valid in special document styles and should not appear in the Optionmenu widgets if another document style is set for the document.
Parameters:
(+) $doc_style: the new actual document style name
(+) $style_group: The name of the stylegroup for which the new style list should be created
(+) $none: The text for the none-entry (what should be shown in the Optionmenu if no style is set at the cursor position.
This package should also read information from the now missing configuration files into the now missing hashes:
(+) $obj
: holds the content of the configuration file
'edoc.obj'