# Define SciTE settings for Harbour and FlagShip files.
# (Syntactically compatible to other XBase dialects, like dBase, Clipper, Fox etc.)
# Based on Version .02 by Randy Butler.

# FlagShip Source code file
file.patterns.flagship=*.prg

lexer.$(file.patterns.flagship)=flagship

*language.flagship=FlagShip|prg||

# FlagShip 6 Commands
keywordclass.fs6commands=\
? @ accept access all alternate announce ansi any append as assign autolock average \
begin bell bitmap blank box \
call cancel case century charset checkbox clear close cls color combobox commit \
confirm console constant continue copy count create cursor \
date dbread dbwrite decimals declare default delete deleted delimiters device dir \
directory display do draw \
edit else elseif eject end endcase enddo endif endtext epoch erase error escape eval eventmask \
exact exclusive extended external extra \
field file filter find fixed font for form format from \
get gets global global_extern go goto gotop guialign guicolor guicursor guitransl \
html htmltext \
if image index input intensity \
join \
key keyboard keytransl \
label lines list listbox local locate \
margin memory memvar menu message method multibyte multilocks \
next nfs nfslock nfs_force note \
on openerror order outmode \
pack parameters path pixel pop printer private prompt public push pushbutton \
quit \
radiobutton radiogroup read recall refresh reindex relation release rename replace report request restore \
richtext rowadapt rowalign run \
save say scoreboard scrcompress screen seek select sequence set setenhanced setstandard setunselected \
skip softseek sort source static store struct structure sum \
tag tbrowse text to total type typeahead \
unique unlock update use \
wait while with wrap \
xml zap zerobyteout

# FlagShip 6 Std Library Functions
keywordclass.fs6libfunc=\
_displarr _displarrerr _displarrstd _displobj _displobjerr _displobjstd \
aadd abs achoice aclone acopy adel adir aelemtype aeval afields afill ains alert alias alltrim altd ansi2oem \
appiomode appmdimode appobject array asc ascan asize asort at atail atanychar autoxlock \
between bin2i bin2l bin2w binand binlshift binor binrshift binxor bof break browse \
cdow chr chr2screen cmonth col col2pixel color2rgb colorselect colvisible consoleopen consolesize crc32 ctod curdir \
date datevalid day dbappend dbclearfilter dbclearindex dbclearrelation dbcloseall dbclosearea dbcommit dbcommitall \
dbcreate dbcreateindex dbdelete dbedit dbeval dbf dbfilter dbfinfo dbflock dbfused dbgetlocate dbgobottom dbgoto \
dbgotop dbobject dbrecall dbreindex dbrelation dbrlock dbrlocklist dbrselect dbrunlock dbseek dbselectarea \
dbsetdriver dbsetfilter dbsetindex dbsetlocate dbsetorder dbsetrelation dbskip dbstruct dbunlock dbunlockall \
dbusearea default deleted descend devout devoutpict devpos directory diskspace dispbegin dispbox dispcount \
dispend dispout doserror doserror2str dow drawline dtoc dtos \
empty eof errorblock errorlevel eval execname execpidnum exp \
fattrib fclose fcount fcreate ferase ferror ferror2str fieldblock fielddeci fieldget fieldgetarr fieldlen fieldname \
fieldpos fieldput fieldputarr fieldtype fieldwblock file findexefile fklabel fkmax flagship_dir flock flockf fopen \
found fread freadstdin freadstr freadtxt frename fs_set fseek fwrite \
getactive getalign getapplykey getdosetkey getenv getenvarr getfunction getpostvalid getprevalid getreader guidrawline \
hardcr header hex2num \
i2bin iif indexcheck indexcount indexdbf indexext indexkey indexnames indexord infobox inkey inkey2read inkey2str inkeytrap \
instdchar instdstring int int2num isalpha isbegseq iscolor isdbexcl isdbflock isdbmultip isdbmultiple isdbmultipleopen \
isdbrlock isdigit isfunction isguimode islower isobjclass isobjequiv isobjproperty isprinter isupper \
l2bin lastkey lastrec left len listbox lock log lower ltrim lupdate \
macroeval macrosubst max max_col max_row maxcol maxrow mcol mdblck mdiclose mdiopen mdiselect memocode memodecode \
memoedit memoencode memoline memoread memory memotran memowrit memvarblock mhide min minmax mlcount mlctopos mleftdown \
mlpos mod month mpostolc mpresent mreststate mrightdown mrow msavestate msetcursor msetpos mshow mstate \
neterr netname nextkey num2hex num2int \
objclone oem2ansi onkey ordbagext ordbagname ordcond ordcondset ordcreate orddescend orddestroy ordfor ordisinique \
ordkey ordkeyadd ordkeycount ordkeydel ordkeygoto ordkeyno ordkeyval ordlistadd ordlistclear ordlistrebui ordname \
ordnumber ordscope ordsetfocu ordsetrelat ordskipunique os outerr outstd \
padc padl padr param parameters pcalls pcol pcount pixel2col pixel2row printstatus procfile procline procname procstack proper prow \
qout qout2 qqout qqout2 \
rat rddlist rddname rddsetdefault readexit readinsert readkey readkill readmodal readsave readupdated readvar reccount recno recsize \
replicate restscreen right rlock rlockverify round row row2pixel rowadapt rowvisible rtrim \
savescreen scrdos2unix screen2chr scroll scrunix2dos seconds secondscpu select serial set setansi setblink setcancel setcol2get \
setcolor setcolorba setcursor setevent setguicursor setkey setmode setpos setprc setvarempty sleep sleepms soundex space \
sqrt statbarmsg statusmessage stod str strlen strlen2col strlen2pix strlen2space strpeek strpoke strtran strzero stuff substr \
tbcolumnnew tbmouse tbrowsearr tbrowsedb tbrowsenew tempfilename time tone transform trim truepath type \
updated upper used usersactive usersdbf usersmax \
val valtype version \
webdate weberrorhandler webgetenvir webgetformdata webhtmlbegin webhtmlend weblogerr webmaildomain weboutdata websendmail word \
year

# FlagShip 6 function and procedure
keywordclass.fs6funcproc=\
function procedure return exit

# FlagShip 6 Class (OOP)
keywordclass.fs6class=\
class instance export hidden protect prototype

# Doxygen keywords
keywordclass.fs6doxygen=a addindex addtogroup anchor arg attention \
author b brief bug c class code date def defgroup deprecated dontinclude \
e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception \
f$ f[ f] file fn hideinitializer htmlinclude htmlonly \
if image include ingroup internal invariant interface latexonly li line link \
mainpage name namespace nosubgrouping note overload \
p page par param param[in] param[out] \
post pre ref relates remarks return retval \
sa section see showinitializer since skip skipline struct subsection \
test throw throws todo typedef union until \
var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }

keywords.$(file.patterns.flagship)=$(keywordclass.fs6commands)
keywords2.$(file.patterns.flagship)=$(keywordclass.fs6libfunc)
keywords3.$(file.patterns.flagship)=$(keywordclass.fs6funcproc)
keywords4.$(file.patterns.flagship)=$(keywordclass.fs6class)
keywords5.$(file.patterns.flagship)=$(keywordclass.fs6doxygen)

#FlagShip Comments
#comment.block.flagship='/
comment.block.flagship=//~
comment.stream.start.flagship=/*
comment.stream.end.flagship=*/
comment.box.start.flagship=/*
comment.box.middle.flagship= *
comment.box.end.flagship= */

#lexer.flagship.styling.within.preprocessor=0

# FlagShip styles

# Default
style.flagship.32=$(font.base)
# White space
style.flagship.0=
# Comment * ...
style.flagship.1=$(colour.code.comment.line),$(font.code.comment.line)
# Comment Line && ...
style.flagship.2=$(colour.code.comment.line),$(font.code.comment.line)
# Comment Doc /* ... */
style.flagship.3=$(colour.code.comment.doc),$(font.code.comment.doc)
# Comment Line Doc // ...
style.flagship.4=$(colour.code.comment.line),$(font.code.comment.line)
# Comment keyword
style.flagship.5=fore:#3060A0,$(font.code.comment.doc)
# Comment keyword error
style.flagship.6=fore:#804020,$(font.code.comment.doc)

# Keyword - Commands
style.flagship.7=$(colour.keyword)
# keywords 2 - Std Library Functions
style.flagship.8=$(colour.keyword)
# keywords 3 - function, procedure, return, exit
style.flagship.9=$(colour.keyword),bold
# keywords 4 - Class (oop)
style.flagship.10=$(colour.keyword),bold
#style.flagship.10=$(colour.keyword),$(font.monospace),bold

# Number
style.flagship.11=$(colour.number)
# String
style.flagship.12=$(colour.string)
# Preprocessor (directives)
style.flagship.13=$(colour.preproc)
# Operator
style.flagship.14=$(colour.operator)
# Identifier
style.flagship.15=
# Date
style.flagship.16=$(colour.number)
# STRINGEOL - End of line where string is not closed
style.flagship.17=$(style.stringeol)
# Constant nil .t. .f.
style.flagship.18=$(colour.number)
# Word operator .and. .or. .not.
style.flagship.19=$(colour.operator)
# Diasabled code
style.flagship.20=
# Default C
style.flagship.21=
# Comment Doc C
style.flagship.22=$(colour.code.comment.doc),$(font.code.comment.doc)
# Comment Line Doc C
style.flagship.23=$(colour.code.comment.line),$(font.code.comment.line)
# Keyword C
style.flagship.24=$(colour.keyword)
# Std Library Functions C
style.flagship.25=$(colour.keyword)
# Number C
style.flagship.26=$(colour.number)
# String C
style.flagship.27=$(colour.string)
# Preprocessor C
style.flagship.28=$(colour.preproc)
# Operator C
style.flagship.29=$(colour.operator)
# Identifier C
style.flagship.30=
# STRINGEOL C
style.flagship.31=$(style.stringeol)

#FlagShip Compiler Option
fsOptObj=-c -q -w1 -w2 -w3
fsOptExe=-q -w1 -w2 -w3

#Command for obj file
fsObj=FlagShip $(fsOptObj) $(FileNameExt) -o $(FileName).o

#Command for exe file
fsExe=FlagShip $(fsOptExe) $(FileNameExt) -o $(FileName)

# Use flagship without make file
command.compile.*.prg=$(fsObj)
command.build.*.prg=$(fsExe)
command.go.*.prg=$(FileName)

# Use flagship with a make file
#make.command=make
#command.compile.*.prg=$(make.command)
#command.build.*.prg=$(make.command)
#command.go.*.prg=$(FileName)
#command.build.*.ch=$(make.command)
#command.build.*.fh=$(make.command)

# help from fsman
command.help.$(file.patterns.flagship)=fsman
