/*! \page pag_Messages Messages
../../doc/gcad_doxygen/Messages.dox


<pre>
\ref Direct-Messages             display text
\ref Standard-Messages           messages, identified by a keyword
\ref Constant-Messages           messages; identified by integers (../xa/xa_msg.h)
\ref System-Messages             messages; keyword, languages
\ref Application-Messages

\ref Logfile                     write log-messages into file, display file
\ref Dump-object-functions
\ref ErrorHandling

See also \ref Debugging


<hr>
Files:
\ref xa_msg.c            Application-Messages, Standard-Messages, Constant-Messages
\ref xa_msg.h            integer-constants for Constant-Messages
../../doc/msg/msg_*.txt  message-files




Tools for manipulating the language-files:

save the lang.files: ./lang_save.csh
edit files:          ./lang_ed.csh
find a keyword:      ./lang_find.csh keyWd 
modify keyword       /mnt/serv1/Linux/bin/changeall old new files
modify line          ./lang_line keyWd "line words .."
delete Line          ./lang_del.csh keyWd
insert Line          ./lang_ins.csh keyWd_before new line words ..


</pre>





<hr>
\section Direct-Messages

- display text in text-window (under grafic-window)
- no translation


<pre>
\ref ut_ui_TX.c         TX_* messages
</pre>

\code
TX_Error            display message and raise error    ../xa/ut_ui_TX.c
TX_Print            display message
GUI_Tx_rmLast       remove last messageline

\endcode






<hr>
\section Dump-object-functions
\code

UT3D_stru_dump      dump struct -> debug-window
DBO_dump__          dump DB-object -> debug-window
UTO_dump__          dump ObjGX + Inhalt
UTO_dump_s_         dump ObjGX - structured display
tess_dump_f_        dump tesselated (sizeRec, Typ_GL_Sur-Recs ..)
UI_dump_obj         dump DB-object  into file & display with browser
UTO_dump_obj        dump struct -> UT3D_stru_dump
AP_obj_analyze      replace by UT3D_stru_dump (see IE_analyz__)
UME_dump            disp. fre space of Memspc
GR_Disp_pTab        disp. temp. obj

UTF_dump__          disp. memory (sourcetext Alt shift s)
DB_dump_stat        disp DB-statistics (Alt shift o)
APT_dump_itab       dump EditorLine->DL-Hilfsliste

AP_dump_statPg      dump active subModel, active lineNr
DB_dump_ModBas      dump Basemodels (Alt shift m)
DB_dump_ModRef      dump Submodels (Alt shift r)
DB_dump__           dump DB
DL_DumpObjTab       Dump DL (Alt D (shift d!))
GA_dump__           Dump permanentAttributeList (Alt shift g)
WC_actPos_dump      dump NC-Records (Alt shift n)

UTX_dump_cnl        disp. textStrings (UTX_dump_c__ UTX_dump__)


\endcode





<hr>
\section ErrorHandling

<pre>
see also Messages / \ref Direct-Messages
</pre>

\code


Global Vars:
AP_STAT   AP_stat;
AP_stat.errStat       0=OK, else nr of errors
AP_stat.errLn


Functions:
TX_Error   (../ut/ut_ui_TX.c)
AP_errStat_get
AP_errStat_set           // raise / reset error
AP_errStat_reset
AP_errText_set


AP_test__           Testfunction in core; activate by Ctl shift T
                    exit durch Ctl shift X

\endcode



<hr>
\section Logfile
Sourcefile: ../ut/ \ref ut_log.c

\code
LOG_A_init      set logfilename
LOG_A__         write
LOG_A_disp      display logfile
\endcode


<hr>
\section System-Messages
<pre>

- Messagefiles, different languages (../../doc/msg/msg_en.txt - language is _en)
  (Languages: _en _de _es _fr _it)
- find key in message-file
- can have dynamic parameters ({0})
- Functions: MSG_pri_0 MSG_pri_1 MSG_get_0 MSG_err_0 MSG_Tip ..

\code
Example:
  MSG_pri_0 ("CAD_On");
  MSG_get_1 (buf, 256, "NOEX_fil", "%s", filnam);  // with dynam. parameter
  p1 = MSG_get_str ("CADSUR");
\endcode


How to add new System-Message:
- add line with {keyCode}={message} into all messagefiles

Fileformat of the messagefile:
{keyCode}={message}
  Messagelinelength may not exceed 255 chars
  commentlines: first char #
  dynamic parameters: " {0} " will be replaced with the parameter.
  continuation-lines:  last char \, first char of next line \




</pre>
<hr>
\section Standard-Messages
Sourcefile: ../xa/ \ref xa_msg.c

- display message from keyword
- and display name of calling function with additional parameters

How to add new standard-message:
  - add key in enum ERR_* in ../xa/xa_msg.h
  - add text for key MSG_STD_tab in ../xa/xa_msg.c


\code
See MSG_STD_ERR
Example:
  #include "../xa/xa_msg.h"                 // MSG_*
  return MSG_STD_ERR (func_not_impl, "/ cvTyp %d", cvTyp);
\endcode



<hr>
\section Constant-Messages
Sourcefile: ../xa/ \ref xa_msg.c

- get text from keyword
- all constant-Messages are in memory

How to add new constant-message:
  - add key into enum in ../xa/xa_msg.h
  - add text into files ../../doc/msg/msg_const_{language}.txt


\code
Example:
  strcpy(s1,  MSG_const__(MSG_cancel));  // "Cancel");
\endcode

\section Application-Messages
Sourcefile: ../xa/ \ref xa_msg.c


*/
