#ifndef __DEFMASK_H
#define __DEFMASK_H

/* @M 
   Identificativi predefiniti dei controlli di XVT
   */
#define DLG_NULL     -1
#define DLG_OK        1 /* TAG del bottone <Conferma> */
#define DLG_CANCEL    2 /* TAG del bottone <Annulla> */
#define DLG_PGDN      5 /* TAG del bottone <PgDn> */
#define DLG_PGUP      6 /* TAG del bottone <PgUp> */
#define DLG_PAGE      7 /* TAG del bottone <PgUp/PgDn> */
#define DLG_CONFIG    8 /* TAG del bottone <Configura> */
#define DLG_QUIT      9 /* TAG del bottone <Uscita> */
#define DLG_F9       10 /* TAG del bottone <Ricerca> */
#define DLG_FIRSTREC 11 /* TAG del bottone <Primo> */
#define DLG_PREVREC  12 /* TAG del bottone <Precedente> */
#define DLG_STOPREC  13 /* TAG del bottone <Stop> */
#define DLG_NEXTREC  14 /* TAG del bottone <Successivo> */
#define DLG_LASTREC  15 /* TAG del bottone <Ultimo> */
#define DLG_NEWREC   16 /* TAG del bottone <Nuovo> */
#define DLG_DELREC   17 /* TAG del bottone <Cancella> */
#define DLG_SAVEREC  18 /* TAG del bottone <Registra> */
#define DLG_FINDREC  19 /* TAG del bottone <Ricerca> */
#define DLG_BAR      20 /* TAG del bottone <Barra> == <Annulla> */
#define DLG_SELECT   21 /* TAG del bottone <Selezione> */
#define DLG_EDIT     22 /* TAG del bottone Edit */
#define DLG_LINK     23 /* TAG del bottone Collega (applicazione) */
#define DLG_PRINT    24 /* TAG del bottone Stampa */
#define DLG_SETPRINT 25 /* TAG del bottone Imposta Stampa */
#define DLG_RECALC   26 /* TAG del bottone Ricalcola */
#define DLG_ELABORA  27 /* TAG del bottone <Elabora> */
#define DLG_EMAIL    29 /* TAG del bottone <Posta> */
#define DLG_PROFILE  30 /* TAG del campo <Profilo> */
#define DLG_PDF      31 /* TAG del bottone Stampa PDF */
#define DLG_ARCHIVE  32 /* TAG del bottone Archiviazione */
#define DLG_INFO     33 /* TAG del bottone Informazioni */
#define DLG_HELP     34 /* TAG del bottone Help */
#define DLG_EXPORT   35 /* TAG del bottone Esporta*/
#define DLG_IMPORT   36 /* TAG del bottone Importa*/
#define DLG_PREVIEW  37 /* TAG del bottone Anteprima*/
#define DLG_SIGNMAIL 38 /* TAG del bottone Posta firmata */
#define DLG_SIGNPDF  39 /* TAG del bottone PDF firmato */
#define DLG_SIGNARC  40 /* TAG del bottone Archivia firmato */
#define DLG_PACKTCLI 41 /* TAG del bottone Pacco a cliente */
#define DLG_PACKTMAG 42 /* TAG del bottone Pacco a magazzino */

#define DLG_USER    100 /* TAG del primo controllo definito dall'utente */
          
/* @M 
   Funzioni di libreria  per i validate delle maschere
   Nome            descrizione             Parametri
   NUM_EXPR        espressione numerica    espressione
   STR_EXPR        espressione stringa     espressione
   NOT_EMPTY_FUNC  campo non vuoto
   FIXLEN_FUNC     lunghezza fissa         lunghezza
   EMPTYCOPY_FUNC  data                    id del campo da cui copiarsi se vuoto
   DATE_CMP_FUNC   compara due date        operatore,id.campo con l'altra data
   PI_FUNC         controllo part.IVA      ????
   XTPI_FUNC       controllo esteso
   part.IVA                ????
   XTZPI_FUNC      controllo esteso
   part.IVA anche vuota    ????
   CF_FUNC         controllo cod.fisc.     ????
   XTCF_FUNC       controllo esteso
   cod.fisc.                                                       ????
   XTZCF_FUNC      controllo esteso
   cod.fisc.anche vuoto    ????
   MTCHECK_FUNC    mese corretto per
   ditta mensile o
   trimestrale
   REQIF_FUNC      richiesto se immesso un campo della lista    
   n.ro di campi lista di campi...
   ONEREQ_FUNC     almeno uno non vuoto
   n.ro campi lista di campi
   CHECK_FIELD     esegue il check su di un altro campo
   campo
   FILENAME_FUNC   controlla se la stringa e' un nome di file
   ZEROFILL_FUNC   riempie di zeri i numeri fino a n caratteri 
   n.ro di caratteri
   ALPHA_FUNC      accetta solo caratteri alfabetici
   */

#define EXPR_FUNC 0 2
#define EMPTYCOPY_FUNC 1 1
#define PI_FUNC 2 1
#define CF_FUNC 3 1
#define NOT_EMPTY_FUNC 4 0
#define DATE_CMP_FUNC 5 2
#define XTPI_FUNC 6 3
#define XTCF_FUNC 7 4
#define XTZPI_FUNC 8 3
#define XTZCF_FUNC 9 4
#define FIXLEN_FUNC 10 1
#define MTCHECK_FUNC 11 0
#define REQIF_FUNC 12
#define AUTOEXIT_FUNC 13
#define NUMCALC_FUNC 14
#define STRCALC_FUNC 15
#define ONEREQ_FUNC 16
#define CHECK_FIELD 17 1
#define FILENAME_FUNC 18 0
#define ZEROFILL_FUNC 19 1
#define ALPHA_FUNC 20 0
#define NOT_EMPTY_CHECK_FIELD 21 0
#define ORA_FUNC 22 0
#define SCONTO_FUNC 23 0
#define CHECK_IBAN_FUNC 24 8
#define CHECK_BBAN_FUNC 25 5

#define VALEXPR VALIDATE EXPR_FUNC 
#define NUM_EXPR VALEXPR 0
#define STR_EXPR VALEXPR 1
#define NUM_CALC VALIDATE NUMCALC_FUNC 1
#define STR_CALC VALIDATE STRCALC_FUNC 1
#define THIS_FIELD 0
#define THIS 0
/* @END */
#endif // __DEFMASK_H