Files correlati : Ricompilazione Demo : [ ] Commento : Spostato tutto in libreria git-svn-id: svn://10.65.10.50/trunk@12063 c028cbd2-c16b-5b4b-a496-9718f37d4682
106 lines
2.6 KiB
Plaintext
Executable File
106 lines
2.6 KiB
Plaintext
Executable File
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
|
\ Funzioni di aiuto per implementazione messaggi
|
|
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
|
|
|
: GET_POS.X ( f1 -- n1 ) GET_POS DROP ;
|
|
|
|
: GET_POS.Y ( f1 -- n1 ) GET_POS NIP ;
|
|
|
|
: GET_SIZE.X ( f1 -- n1 ) GET_POS DROP ;
|
|
|
|
: GET_SIZE.Y ( f1 -- n1 ) GET_SIZE NIP ;
|
|
|
|
: GET_BOTTOM ( f1 -- n1 )
|
|
DUP
|
|
GET_POS.Y
|
|
SWAP
|
|
GET_SIZE.Y
|
|
+
|
|
;
|
|
|
|
: OFFSET_FIELD_POS.X ( n1 -- )
|
|
#THIS GET_POS.X \ Legge posizione x
|
|
+ \ La incrementa di n1
|
|
#THIS GET_POS.Y \ Legge posizione y
|
|
#THIS SET_POS \ Aggiorna posizione
|
|
;
|
|
|
|
: OFFSET_FIELD_POS.Y ( n1 -- )
|
|
#THIS GET_POS.Y \ Legge posizione y
|
|
+ \ La incrementa di n1
|
|
#THIS GET_POS.X \ Legge posizione x
|
|
SWAP \ Scambia le coordinate
|
|
#THIS SET_POS \ Aggiorna posizione
|
|
;
|
|
|
|
: MESSAGE_ALIGN_BOTTOM ( f1 -- )
|
|
GET_BOTTOM \ Calcola fondo di f1
|
|
#THIS GET_BOTTOM \ Calcola fondo del campo corrente
|
|
- \ Calcola offset come differenza dei due
|
|
OFFSET_FIELD_POS.Y \ Incrementa posizione y del campo corrente
|
|
;
|
|
|
|
: MESSAGE_ALIGN_TOP ( f1 -- )
|
|
GET_POS.Y \ Legge posizione y del capo f1
|
|
#THIS GET_POS.X \ Legge posizione x del campo corrente
|
|
SWAP \ Scambia le coordinate
|
|
#THIS SET_POS \ Aggiorna posizione del campo corrente
|
|
;
|
|
|
|
: MESSAGE_ALIGN_CENTER ( f1 -- )
|
|
GET_BOTTOM \ Calcola fondo del campo f1
|
|
#THIS GET_BOTTOM \ Calcola fondo del campo corrente
|
|
- 2 / \ Calcola offset verticale
|
|
OFFSET_FIELD_POS.Y \ Aggiorna posizione del campo corrente
|
|
;
|
|
|
|
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
|
\ Implementazione dei vari messaggi standard
|
|
\ f1 campo o sezione del report
|
|
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
|
|
|
: MESSAGE_ADD ( f1 -- )
|
|
#THIS @ SWAP +! \ Incrementa f1 col contenuto del campo corrente
|
|
;
|
|
|
|
: MESSAGE_ALIGN ( s1 -- )
|
|
"MESSAGE_ALIGN_" SWAP + \ Si crea il nome della funzione da chiamare
|
|
PERFORM \ Chiama MESSAGE_ALIGN_BOTTOM, ecc...
|
|
;
|
|
|
|
: MESSAGE_COPY ( f1 -- )
|
|
#THIS @ SWAP !
|
|
;
|
|
|
|
: MESSAGE_DEBUG
|
|
MON \ Attiva il fantastico debugger
|
|
;
|
|
|
|
: MESSAGE_DISABLE ( f1 -- )
|
|
DISABLE \ User defined word
|
|
;
|
|
|
|
: MESSAGE_ENABLE ( f1 -- )
|
|
ENABLE \ User defined word
|
|
;
|
|
|
|
: MESSAGE_HIDE ( f1 -- )
|
|
HIDE \ User defined word
|
|
;
|
|
|
|
: MESSAGE_INCR ( f1 -- )
|
|
INCR
|
|
;
|
|
|
|
: MESSAGE_PAGENO ( -- ) \ Numero di pagina corrente
|
|
#REPORT.PAGE @ #THIS !
|
|
;
|
|
|
|
: MESSAGE_RESET ( f1 -- )
|
|
NULL SWAP !
|
|
;
|
|
|
|
: MESSAGE_SHOW ( f1 -- )
|
|
SHOW \ User defined word
|
|
;
|