!XTREE.SDF [143] - Structure definitions for XTREE
!-------------------.-------------------.-------------------.-------------------.
!EDIT HISTORY
! VEDIT=143
! Note: history reformatted 9-Feb-17
! [143] 17-Feb-23 / jdm / Add XDSPROW, FILTERED
! [142] 20-Apr-22 / jdm / Add XDIRTY
! [141] 10-Apr-22 / jdm / Add COLTYPEID
! [140] 06-Sep-20 / jdm / Add COLID
! [139] 26-Dec-17 / jdm / Add ST_XTRCTL, ST_MMOCLR (aliases to XTRCTL, MMOCLR)
! [138] 18-Nov-16 / jdm / Add the SHOWFOOTER, FOOTERSTYLE (6.3.1537.0+)
! [137] 25-Mar-15 / jdm / Add the LEFTINDEX
! [136] 26-Jun-12 / jdm / Add the ST_XTRARYDESC structure
! [135] 04-Jun-12 / jdm / Add ++ifdef to allow multiple ++include
! [134] 01-Dec-10 / jdm / No real change, just update notes on SHOWBUTTON, 
!       SHOWBUTTON0
! [133] 29-Jul-09 / jdm / Add CTLID, increase overall size from 124 to 128
! [132] 05-Jun-09 / jdm / Move MISCFLAGS to overlay TRUNCATED
! [131] 03-Jun-09 / jdm / Add XTR'SHOWROWHDR,XTR'ROWHDRSTYLE,XTR'MISCFLAGS
! [130] 19-Apr-09 / jdm / Add ST_XFLAGS
! [129] 15-Mar-09 / jdm / Add XTR'HEADERSTYLE
! [128] 03-Oct-08 / jdm / Add USRCFG
! [127] 16-Sep-08 / jdm / Reinstate the overlay and initial values (now 
!       supported in 1124.7)
! [126] 07-Sep-08 / jdm / Add VERSYS
! [125] 10-Jul-08 / jdm / Add XTR'SEARCHMODE
! [124] 15-Aug-07 / jdm / Add XTREE'MMOCLR
! [123] 06-Jun-07 / jdm / Add XTR'NFSELSTYLE
! [122] 01-Jun-07 / jdm / Overlay XTR'NEXTROW (which was no longer used) with 
!       XTR'TOPINDEX
! [121] 05-Apr-07 / jdm / Remove XTREEO.DEF (easier to include it separately 
!       if needed); correct comment on XTR'SORTORDER()
! [120] 02-Dec-06 / jdm / Rename CLICKROW/CLICKCOL to TARGETROW/TARGETCOL
! [119] 21-Nov-06 / jdm / Add XTR'XVALIDATE
! [118] 18-Nov-06 / jdm / Add XTR'CLICKROW, XTR'CLICKCOL
! [117] 21-Sep-06 / jdm / Add XTR'CLOSEDENDED
! [116] 29-Aug-06 / jdm / Add XTR'LEFTPANECOLS, XTR'LEFTPANEWIDTH
! [115] 24-Jul-06 / jdm / Add XTR'TIMEOUT
! [114] 08-Mar-06 / jdm / Add XTR'COLREORDER, XTR'COLORDER()
! [113] 08-Dec-05 / jdm / Add XTR'DELCTLID
! [112] 05-Jun-05 / jdm / Add XTR'SKEY
! [111] 11-May-05 / jdm / Chg XTR'EXPANDALL to XTR'EXPANDLEVEL
! [110] 22-Apr-05 / jdm / Add XTR'EXPANDALL
! [109] 14-Mar-05 / jdm / Add XTR'XNAVCOD,XTR'NAVMASK,XTR'COL
! [108] 08-Mar-05 / jdm / Split out constants (symbols) into XTREEO.DEF 
!       (requires 923+) and put new versions of the constants (XTF_xxx) in 
!       ASHELL.DEF. Add XTR'XROW
! [107] 26-Feb-05 / jdm / Change XTF'CHKBOX to XTF'EDITABLE
! [106] 25-Feb-05 / jdm / Add XTR'HIDEHEADER
! [105] 23-Feb-05 / jdm / Add XTF'CTRLC, XTF'CHKBOX, XTR'SHOW3D
! [104] 23-Sep-04 / jdm / Add XTR'PARENTID
! [103] 22-Sep-04 / jdm / Add XTF'FILANS
! [102] 12-Sep-04 / jdm / Add XTF'DEL
! [101] 20-Jul-04
!-------------------.-------------------.-------------------.-------------------.

++ifndef INC_XTREE_SDF
define INC_XTREE_SDF = 1

map1 VERSYS_XTREE_SDF,s,40,">>@VERSYS(1)->>xtree.sdf[142]"  


DEFSTRUCT XTRCTL         ! extended XTREE parameters
        map2 OPCODE,B,1             ! 0=normal (create), 1=replace data,
                                        ! 2=append, 3=delete, 4=select,
                                        ! 5=delete one row
        map2 CTLNO,B,1              ! 0=1st pcklst ctl, 1=2nd, 2=3rd
        map2 ITEMLINES,B,1          ! max # dsp lines of text per item
        map2 TREELINESTYLE,B,1      ! 0=none,1=solid,2=dotted
        map2 SHOWBUTTONS0,B,1       ! [134] Not used
        map2 SHOWBUTTONS,B,1        ! [134] Show +/- btns (0,1=yes, 2=no top lvl, 4=no lower lvl, see XTSBF_xxx)
        map2 SHOWGRID,B,1           ! Show grid lines (0=no,1=yes)
        map2 GRIDSTYLE,B,1          ! 0=vert, 1=horz, 2=both
                                        ! (0-2 = solid, 3-5 = dotted)
        map2 TRUNCATED,B,1          ! Show truncation indicator
        map2 MISCFLAGS,B,1,@TRUNCATED ! [132] see XTMF_xxx
        map2 SELECTAREA,B,1         ! Set to 1
        map2 FLYBY,B,1              ! Fly by highlighting (0=no, 1=yes)
        map2 SCROLLTIPS,B,1         ! Show scroll tips (0=no, 1=yes)
        map2 COLUMNACTIVE,B,1       ! Active column (on entrance & exit)
        map2 COLUMNSORT(3),B,1      ! Columns sorted by (1=1st col)
        map2 SORTORDER(3),B,1       ! Sort order (0=ascending, 1=descending)
        map2 KBDSTR,S,10            ! kbd click string
        map2 USETHEMES,B,1          ! 1=use XP themes (if available)
        map2 PARENTID,B,2           ! ID of parent control (e.g. TAB)
        map2 SHOW3D,B,1             ! 1=use 3D style [105]
        map2 HIDEHEADER,B,1         ! 1=hide header [106]
        map2 XNAVCOD,B,1            ! [109] cell editing navigation code
        map2 XNAVMASK,B,1           ! [109] internal use
        map2 XROW,B,4               ! [108] current row
        map2 XCOL,B,1               ! [108] current col
        map2 EXPANDLEVEL,B,1        ! [111] 0=none, N=thru level N
        map2 SKEY,S,10              ! [112] single-sel srch key (overrides answer)
        map2 NEXTROW,B,4            ! [113] used internally
        map2 TOPINDEX,B,4,@NEXTROW ![122] force vertical scroll position
        map2 DELCTLID,B,4           ! [113] ID of ctl to delete (progress)
        map2 USECOLORDER,B,1        ! [114] use COLORDER() to reorder?
        map2 COLORDER(31),B,1       ! [114] a(x) = real col # for disp col x
        map2 TIMEOUT,B,4            ! [115] timeout (ms) (exitcode=11)
        map2 LEFTPANECOLS,B,1       ! [116] (XTF_SPLIT) # cols in left pane
        map2 LEFTPANEWIDTH,B,1      ! [116] (XTF_SPLIT) width of left pane
                                        !   0=optimize, -1=50/50, else col units
        map2 CLOSEDENDED,B,1        ! [117] 1=last col not open ended
        map2 XVALIDATE,B,1          ! [119] 1=must validate xrow,xrol
        map2 TARGETROW,B,4          ! [118][120] row clicked or navigated to
        map2 TARGETCOL,B,1          ! [118][120] col clicked or navigated to
        map2 NFSELSTYLE,B,1         ! [123] no-focus sel style
                                        ! [123] 0=dflt, 1=keep (bar), 2=frame, 3=nothing
        map2 SEARCHMODE,B,1         ! [125] 0=alltop, 1=allnext, 2,3 (skip collapsed)
        map2 USRCFG,B,1             ! [128] user cfg save/res; see XTUCFG_xxx
        map2 HEADERSTYLE,B,1        ! [129] see XTHSF_xxx
        map2 ROWHDRSTYLE,B,1        ! [131] see XTHSF_xxx
        map2 SHOWROWHDR,B,1         ! [131] see XTRHF_xxx
        map2 CTLID,B,2              ! [133] A-Shell ctl #
        map2 LEFTINDEX,B,1          ! [137] Left-most visible column
        map2 SHOWFOOTER,B,1         ! [138] Show footer
        map2 FOOTERSTYLE,B,1        ! [138] same XTHSF_xxx flags as HEADERSTYLE (6.3.1537+)
        map2 COLID,B,1              ! [140] column ID 
        map2 COLTYPEID,B,1          ! [141] column Type ID
        map2 XDIRTY,B,1             ! [142] exit cell (XROW,XCOL) was changed (i.e. dirty)
        map2 XDSPROW,B,4            ! [143] display row corresponding to physical XROW
        map2 FILTERED,B,1           ! [143] =1 if rows have been filtered by user
        map2 UNUSED2,X,4            ! [142] was 10 [141] was 11 [140] was 12
                                    ! (total size = 128)
ENDSTRUCT

DEFTYPE ST_XTRCTL = XTRCTL          ! [139] (normalized alias name)

![124] Technically, XTREE supports the following INMEMO MMOCLR settings:
![124]       TFCLR/TBCLR (text), PFCLR/PBCLR (prompt/titles)
![124] But as a practical matter, these are deprecated and should be left
![124] at the default (-1) values.  If colors desired, use XTREE coldef
![124] features for color definitions.
![124] Colors: 0=blk,1=wht,2=blu,3=mag,4=red,5=yel,6=grn,7=cyan

DEFSTRUCT MMOCLR                   ! INMEMO style color definitions
    map2 BFCLR,B,1,-1           ! border fg
    map2 BBCLR,B,1,-1           ! border bg
    map2 TFCLR,B,1,-1           ! text fg (black text)
    map2 TBCLR,B,1,-1           ! text bg (white bg)
    map2 AFCLR,B,1,-1           ! arrows fg
    map2 ABCLR,B,1,-1           ! arrows bg
    map2 PFCLR,B,1,-1           ! prompt fg (column titles) (dfltclrs)
    map2 PBCLR,B,1,-1           ! prompt bg
    map2 WFCLR,B,1,-1           ! warnings & messages fg
    map2 WBCLR,B,1,-1           ! "    "    "     bg
    map2 SFCLR,B,1,-1           ! orig. status line fg
    map2 SBCLR,B,1,-1           ! orig. status line bg
    map2 RFCLR,B,1,-1           ! ruler/reserved fg
    map2 RBCLR,B,1,-1           ! ruler/reserved bg
ENDSTRUCT

DEFTYPE ST_MMOCLR = MMOCLR      ! [139] normalized alias 

DEFSTRUCT ST_XFLAGS             ! [130] expanded form of XFLAGS param
    map2 FLAGS,B,4              ! [130] equivalent to original FLAGS,B,4
    map2 FLAGS2,B,4             ! [130] new flags (XTF2_xxx)
ENDSTRUCT                       ! [130]

DEFSTRUCT ST_XTRARYDESC         ! [136] array descriptor
    map2 BASEADDR64             ! [136] address of base of array
        map3 BASEADDR'LO,B,4    ! [136] low 32 bits
        map3 BASEADDR'HI,B,4    ! [136] hi 32 bits (for 64 bit mode future)
    map2 LOADFROM,B,4           ! [136] element # to start loading from (base 1)
    map2 FLAGS,B,4              ! [136] misc flags
    map2 WIDTH,B,4              ! [136] array width
    map2 TOTROWS,B,4            ! [136] total rows in ENTIRE array
ENDSTRUCT

++else
++message Skipping XTREE.SDF - already included
++endif
