A2osX/LIB/LIBTUI.S.LBOX.txt
burniouf 05ee4ce936 LIBTCPIP:shutdown() fix
LIBTUI:bugfix & improvments (hyperlinks....)
KERNEL:bugfix in fwrite() to socket
CIFSD:NT_CREATE now set proper rights, better ERR codes
GOPHER:Hyperlinks (wip)
2023-03-26 19:42:38 +02:00

159 lines
2.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
* LBOX.New hParent,X1,Y1,W,H,F,pList,pVar 10
*--------------------------------------
LBOX.New lda #S.OBJ.T.LBOX
jsr OBJ.Create
bcs .9
ldy #S.OBJ.pVar
jsr OBJ.PullWordY
ldy #S.OBJ.pBuf
jsr OBJ.PullWordY
>PULLA
ldy #S.OBJ.F
sta (ZPObjPtr),y
jsr OBJ.PullHW
jsr OBJ.PullY1X1hParent
jsr CONT.Insert
bcs .99
lda hObj
* clc
rts
.9 >POP 10
.99 rts
*--------------------------------------
LBOX.Run ldy #S.OBJ.S
lda (ZPObjPtr),y
bpl .9
lda (pStack) Event
cmp #C.LF
bne .2
ldy #S.LBOX.Idx
lda (ZPObjPtr),y
inc
tax
ldy #S.OBJ.pBuf
jsr OBJ.GetLineXAtY
bcs .8
ldy #S.LBOX.Idx
lda (ZPObjPtr),y
inc
sta (ZPObjPtr),y
clc
ldy #S.LBOX.VScroll
adc (ZPObjPtr),y
ldy #S.OBJ.InnerH
cmp (ZPObjPtr),y
bcc .7
ldy #S.LBOX.VScroll
lda (ZPObjPtr),y
inc
sta (ZPObjPtr),y
bra .7
.2 cmp #C.VT
bne .9
ldy #S.LBOX.Idx
lda (ZPObjPtr),y
beq .8
dec
sta (ZPObjPtr),y
ldy #S.LBOX.VScroll
cmp (ZPObjPtr),y
bcs .7
ldy #S.LBOX.VScroll
lda (ZPObjPtr),y
dec
sta (ZPObjPtr),y
.7 ldy #1 hObj
lda (pStack),y
>PUSHA
jsr OBJ.Draw.Body
inc pStack
rts
.8 clc
rts
.9 lda #0
sec
rts
*--------------------------------------
LBOX.Draw ldy #S.LBOX.VScroll
lda (ZPObjPtr),y
clc
adc (pStack) Relative Y
tax
ldy #S.OBJ.pBuf
jsr OBJ.GetLineXAtY
bcs .5
txa
ldy #S.LBOX.Idx
cmp (ZPObjPtr),y
bne .1
ldy #S.OBJ.S
lda (ZPObjPtr),y S.OBJ.S.bActive
bpl .1
ldx #SEQ.INVERSE-SEQS
jsr LB.SeqOut
.1 ldy #S.OBJ.InnerW
lda (ZPObjPtr),y
tax
jsr LB.Ptr1OutEscMaxX
txa
beq .8
bne .6
.5 ldy #S.OBJ.InnerW
lda (ZPObjPtr),y
tax
.6 lda #C.SPACE
.7 jsr LB.COut
dex
bne .7
.8 clc
rts
*--------------------------------------
LBOX.Activate
LBOX.Deactivate
jmp OBJ.Draw.Body
*--------------------------------------
MAN
SAVE usr/src/lib/libtui.s.lbox
LOAD usr/src/lib/libtui.s
ASM