****************************************************************
*
*   Data Module
*
*          Copyright 1989, 1990
*          Simple Software Systems International, Inc.
*
*          ALL RIGHTS RESERVED
*
* Marc Wolfgram, 2 Feb 1989
*
*****************************************************************
           case     on

           copy     2/ainclude/e16.types
           copy     2/ainclude/e16.dialog
           copy     2/ainclude/e16.control
           copy     2/ainclude/e16.event
           copy     2/ainclude/e16.memory
           copy     2/ainclude/e16.intmath
           copy     2/ainclude/e16.window

           copy     e16.genesys

           mcopy    data.mac

Shell      DATA
*****************************************************************
*
*   Globals data structure...
*
*          a shadow of it's former self...
*
*****************************************************************
*

SESIdx     ds       2
SEStack    ds       16                  allow 8 levels of SE nesting

MItemTbl   ds       64

FileNameStr ds      1
FileNameTxt ds      17

RootNameStr ds      2
RootNameTxt ds      17

HideNameStr str     'Hide "'
HideNameTxt ds      17

ShowNameStr str     'Show "'
ShowNameTxt ds      17

SrcFName    ds      32

EquFName    ds      32

FileName    ds       32
FilePath    ds       256

NewReply   ds       2
           ds       2
           ds       4
           dc       i2'0'               IsPointer
           dc       i4'O1UName'
           dc       i2'0'               IsPointer
           dc       i4'O1PName'

O1UName    dc       i2'32'
I1UName    ds       32
O1PName    dc       i2'256'
I1PName    ds       256

*****************************************************************

EditMenuList ENTRY
             dc     i2'UndoID,CutID,CopyID,PasteID,ClearID,0'
IdleMenuList dc     i2'FileNewID,FileOpenID,FileNew2ID,0'
LiveMenuList dc     i2'FileSaveID,FileSaveAsID,FileCreateID,PrintID'
             dc     i2'HRootID,SRootID,NextWID,ImportID'  ; ,GlobalAttrID'
             dc     i2'PackResID,CheckMapID,ResToolsID,0'
RealMenuList dc     i2'CloseID,SHCoordinatesID,ResetOriginID,SetOriginID,0'
NoSEMenuList dc     i2'AboutID,HelpID,ChooseLangID,QuitID,TextEditID'
             dc     i2'ShowClipboardID,0'

*****************************************************************

AddPopUp   dc       i2'10'
           dc       i4'1'
           dc       i2'2,5,0,0'
           dc       i4'$87000000'
           dc       i2'$0040'
           dc       i2'$1000'
           dc       i4'0'
           dc       i2'0'
           dc       i4'EMEN'
           dc       i2'$1000'
           dc       i4'0'               ColorTable

EditPopUp  dc       i2'10'
           dc       i4'2'
           dc       i2'2,240,0,0'
           dc       i4'$87000000'
           dc       i2'$0040'
           dc       i2'$1002'
           dc       i4'0'
           dc       i2'0'
           dc       i4'400'               Resource menu ID = 6
           dc       i2'PopItemID'
           dc       i4'0'               Colortable

Action     dc       i2'PopItemID'

*****************************************************************

rootWind   dc       i2'$50'
           dc       i2'fTitle+fVis+fMove+fClose'
           dc       i4'0'
           dc       i4'refConHndl'
           dc       4i2'0'
           dc       i4'stripes'         Color table
           dc       10i2'0',i4'0',i2'0',3i4'0'
           dc       i2'40,80,123,560'   Rect
           dc       i4'-1'              Plane
           dc       i4'0',i2'0'         zip controls

stripes    dc       i2'$0000,$0F00,$020F,$0000,$00F0'

refConHndl dc       i4'refConData'
refConData dc       i2'0',i4'0',c'RW',i4'0'

rootCtrl   dc       i4'TypeList,ItemList,AddPopUp,EditPopUp,0'

NewPrompt  str      'New file name:'
OpenPrompt str      'Select file to edit...'
SrcPrompt  str      'Source file name:'
EquPrompt  str      'Equate file name:'
ImpPrompt  str      'Select file to import...'
ExpPrompt  str      'Export file name:'
QuitPrompt str      'Select next application...'

DlogPtr    ds       4

SavingTemp dc       i'30,180,60,460,1',i4'0,SavingTPtr,0'
SavingTPtr dc       i'3,10,10,20,270,$800F',i4'SavingTTxt',i'0,0',i4'0'
SavingTTxt STR      'Saving ^3...'

RevertTemp dc       i'30,180,60,460,1',i4'0,RevertTPtr,0'
RevertTPtr dc       i'3,10,10,20,270,$800F',i4'RevertTTxt',i'0,0',i4'0'
RevertTTxt STR      'Restoring ^3...'

UnloadTemp dc       i'30,180,60,460,1',i4'0,UnloadTPtr,0'
UnloadTPtr dc       i'3,10,10,20,270,$800F',i4'UnloadTTxt',i'0,0',i4'0'
UnloadTTxt STR      'Saving the clipboard...'

ADialogP   ENTRY
           ds       4
SavedPort  ds       4

CurWTitle  ds       256

HelpWinPtr ds       4                   ptr to Help Window

OkStr      str      'Ok'

*****************************************************************

ChooserWin DC I2'$50'                   template size
           DC I2'$2000'                 frame bits
           DC I4'0,0',I2'0,0,0,0',I4'0'
           DC I2'0,0,0,0,0,0,0,0,0,0'
           DC I4'0',I2'0',I4'0,0'
           DC I4'DrawProc'
           DC I2'54,210,160,430'        position
           DC I4'-1'
           DC I4'ChooserCtrl',I2'3'     pointer to pointer list

ChooserCtrl ANOP
           DC I4'ChooserOK,ChooserList,ChooserText,0'

ChooserOK ANOP
           DC I2'9'                     pCount
           DC I4'1'                     ID
           DC I2'87,65,100,155'         rect
           DC I4'$80000000'             simple button
           DC I2'$0001'                 flag
           DC I2'$3000'                 moreFlags
           DC I4'0'                     refCon
           DC I4'OkStr'                 title
           DC I4'0'                     no color table
           DC I1'13,13',I2'0,0'         key equivalents

ChooserList ANOP
           DC I2'14'                    pCount
           DC I4'2'                     ID
           DC I2'18,10,80,186'          rect
           DC I4'$89000000'             list control
           DC I2'$0000'                 flag
           DC I2'$1400'                 moreFlags
           DC I4'0'                     refCon
           DC I2'14'                    list size (item count)
           DC I2'6'                     list view
           DC I2'2'                     list type (single/pascal)
           DC I2'1'                     list start
           DC I4'0'                     list draw
           DC I2'10'                    list mem height
           DC I2'7'                     list mem size: pstr,f,id
           DC I4'LangData'              list ref

ChooserText ANOP
           DC I2'9'                     pCount
           DC I4'3'                     ID
           DC I2'4,10,14,193'           rect
           DC I4'$81000000'             static text
           DC I2'$0000'                 flag
           DC I2'$1000'                 moreFlags
           DC I4'0'                     refCon
           DC I4'SelLangFmt'            text reference
           DC I2'25'                    text size
           DC I2'0'                     justification

SelLangFmt DC C'Select language format...'

LangData   dc i4'LangText01',i1'0',i2'$00fe'
           dc i4'LangText02',i1'0',i2'$0003'
           dc i4'LangText03',i1'0',i2'$000a'
           dc i4'LangText04',i1'0',i2'$0015'
           dc i4'LangText13',i1'0',i2'$0083'
           dc i4'LangText05',i1'0',i2'$00ff'
           dc i4'LangText06',i1'$20',i2'$0090'
           dc i4'LangText14',i1'$20',i2'$0091'
           dc i4'LangText07',i1'$20',i2'$0080'
           dc i4'LangText08',i1'$20',i2'$0081'
           dc i4'LangText09',i1'$20',i2'$0082'
           dc i4'LangText10',i1'0',i2'$0008'
           dc i4'LangText11',i1'0',i2'$0005'
           dc i4'LangText12',i1'0',i2'$009e'

LangText01 str      'Resource info report'
LangText02 str      'APW/ORCA ASM65816'
LangText03 str      'APW C'
LangText04 str      'APW Rez'
LangText13 str      'Lisa 816'
LangText05 str      'Merlin 16'
LangText06 str      'Micol BASIC'
LangText14 str      'Micol MACRO'
LangText07 str      'MPW IIgs Assembler'
LangText08 str      'MPW IIgs C'
LangText09 str      'MPW IIgs Pascal'
LangText10 str      'ORCA C'
LangText11 str      'ORCA Pascal'
LangText12 str      'TML Pascal II'

monoFormat ENTRY
           dc       i2'0'               version
           dc       i4'20'              bytes in rulers (not quite none!)
           dc       i2'1,0,608,0,0,0'     ruler justification, etc.
           dc       i4'0',i2'1,32'        ruler user/tabs
           dc       i4'12'              bytes in styles
           dc       i4'$08007530'         fontid 8pt Genesys
           dc       i2'$0000,$FFFF'       foreground/background color
           dc       i4'0'                 userdata
           dc       i4'0'               number of styles (none!)

           END
