;==================================================== ; ; Api92/Api89 Example Source Code ; ; (c) NeXO Software, Ibrahim - Benoit SCHERRER ; e-mail : p.c.scherrer@wanadoo.fr ; web : http://perso.wanadoo.fr/scherrer/ben/ ; ; File> slctfil2.asm ; > This is a more advanced example of the ; SelectFile Component : here it shows only ; text variables. ;==================================================== ;--------------------- Includes --------------------- include "tios.h" include "api92.h" include "api92cst.h" xdef _ti92plus OX equ 0 OY equ 0 ;------------ Start of assembly program ------------- xdef _main xdef _comment _main lea ieInterface(PC),a0 jsr api92::InterfaceEngine lea SelectFileHeader(PC),a0 jsr api92::SelectFileComponent rts api92CB_Filter: moveq.w #1,d0 ;d0=1 : Add btst.b #7,VAT_ENTRYFLAG(a0) ;if a folder bne.s \exit ;add it move.w VAT_ENTRYHDL(a0),d0 jsr api92::DEREFd0a0 jsr api92::vat_GetFileExt cmp.w #EXT_TEXT,d2 beq.s \exit clr.w d0 ;d0=0 : Don't Add \exit rts ;------------------- Program Data ------------------- SelectFileHeader: dc.w 70+OX,50+OY ;X,Y dc.w 4 ;Nb Item per page dc.w 100 ;Width of the component dc.w 0 ;Current Folder dc.b %00011000,0 ;Flags dc.l api92CB_Filter ;api92CB_Filter dc.l 0 ;api92CB_lvKeyDown dc.l 0 ;api92CB_lvKey dc.l 0 ;api92CB_lvOnSelect dc.l 0 ;api92CB_lvDrawItem ieInterface: dc.b IE_WIN2,40+OX,30+OY,199+OX,95+OY,"Open Dialog",0 dc.b IE_SETFONT,0 dc.b IE_STRING,50+OX,43+OY,"Select a text file :",0 dc.b IE_SETFONT,1 dc.b IE_END _comment dc.b "Select File - Ex2",0 ;-------------------- End of program ------------------ end