# Define SciTE settings for C++, C, Java, IDL, JavaScript files.

# sma files are Small script (C-like)
file.patterns.cpp=*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma
# pln, inc and t are SilkTest (4Test) files.
file.patterns.test=*.pln;*.inc;*.t
file.patterns.cs=*.cs
file.patterns.rc=*.rc;*.rc2;*.dlg
file.patterns.idl=*.idl;*.odl
file.patterns.c.like=$(file.patterns.cpp);$(file.patterns.cs);$(file.patterns.idl);*.java

filter.cpp=C/C++ (c cc cpp cxx cs h hh hxx hpp dlg rc rc2 mak)|\
$(file.patterns.cpp);$(file.patterns.rc);*.mak;make*|
filter.java=Java (java)|*.java|
filter.js=JavaScript (js)|*.js|
filter.idl=IDL (idl odl)|$(file.patterns.idl)|
filter.test=SilkTest (pln inc t)|$(file.patterns.test)|

file.patterns.braces=$(file.patterns.cpp);$(file.patterns.idl);*.java;$(file.patterns.cs);$(file.patterns.test)

lexer.*.java=cpp
lexer.$(file.patterns.cpp)=cpp
lexer.$(file.patterns.rc)=cpp
lexer.$(file.patterns.idl)=cpp
lexer.$(file.patterns.cs)=cpp
lexer.*.js=cpp
lexer.$(file.patterns.test)=cpp

keywordclass.cpp=asm auto bool break case catch char class const const_cast continue \
default delete do double dynamic_cast else enum explicit export extern false float for \
friend goto if inline int long mutable namespace new operator private protected public \
register reinterpret_cast return short signed sizeof static static_cast struct switch \
template this throw true try typedef typeid typename union unsigned using \
virtual void volatile wchar_t while
keywords.$(file.patterns.cpp)=$(keywordclass.cpp)
# keywords2 is for highlighting user defined keywords or function calls or similar
#keywords2.$(file.patterns.cpp)=file
# keywords3 is for doc comment keywords, highlighted in style 17
#CPP doxygen
keywords3.$(file.patterns.cpp)=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 post pre ref relates remarks return retval \
sa section see showinitializer since skip skipline struct subsection \
test throw todo typedef union until \
var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }

word.chars.cxx=$(chars.alpha)$(chars.numeric)_#
word.characters.$(file.patterns.cpp)=$(word.chars.cxx)
comment.block.cpp=//~
#comment.block.at.line.start.cpp=1
comment.stream.start.cpp=/*
comment.stream.end.cpp=*/
comment.box.start.cpp=/*
comment.box.middle.cpp= *
comment.box.end.cpp= */
fold.comment=1

statement.indent.$(file.patterns.c.like)=5 case catch class default do else for if \
private protected public struct try union while
statement.end.$(file.patterns.c.like)=10 ;
statement.lookback.$(file.patterns.c.like)=20
block.start.$(file.patterns.c.like)=10 {
block.end.$(file.patterns.c.like)=10 }

#styling.within.preprocessor=1
preprocessor.symbol.$(file.patterns.cpp)=#
preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef
preprocessor.middle.$(file.patterns.cpp)=else elif
preprocessor.end.$(file.patterns.cpp)=endif

keywordclass.cs=abstract as base bool break byte case catch char checked class \
const continue decimal default delegate do double else enum \
event explicit extern false finally fixed float for foreach goto if \
implicit in int interface internal is lock long namespace new null \
object operator out override params private protected public \
readonly ref return sbyte sealed short sizeof stackalloc static \
string struct switch this throw true try typeof uint ulong \
unchecked unsafe ushort using virtual void while
keywords.$(file.patterns.cs)=$(keywordclass.cs)
word.characters.$(file.patterns.cs)=$(word.chars.cxx)

keywordclass.rc=\
ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON \
BEGIN BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS \
COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX DISCARDABLE \
EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE LISTBOX LTEXT \
MENU MENUEX MENUITEM MESSAGETABLE POPUP \
PUSHBUTTON RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 \
STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY
keywords.$(file.patterns.rc)=$(keywordclass.rc)

keywordclass.idl=\
aggregatable allocate appobject arrays async async_uuid \
auto_handle \
bindable boolean broadcast byte byte_count \
call_as callback char coclass code comm_status \
const context_handle context_handle_noserialize \
context_handle_serialize control cpp_quote custom \
decode default defaultbind defaultcollelem \
defaultvalue defaultvtable dispinterface displaybind dllname \
double dual \
enable_allocate encode endpoint entry enum error_status_t \
explicit_handle \
fault_status first_is float \
handle_t heap helpcontext helpfile helpstring \
helpstringcontext helpstringdll hidden hyper \
id idempotent ignore iid_as iid_is immediatebind implicit_handle \
import importlib in include in_line int __int64 __int3264 interface \
last_is lcid length_is library licensed local long \
max_is maybe message methods midl_pragma \
midl_user_allocate midl_user_free min_is module ms_union \
ncacn_at_dsp ncacn_dnet_nsp ncacn_http ncacn_ip_tcp \
ncacn_nb_ipx ncacn_nb_nb ncacn_nb_tcp ncacn_np \
ncacn_spx ncacn_vns_spp ncadg_ip_udp ncadg_ipx ncadg_mq \
ncalrpc nocode nonbrowsable noncreatable nonextensible notify \
object odl oleautomation optimize optional out out_of_line \
pipe pointer_default pragma properties propget propput propputref \
ptr public \
range readonly ref represent_as requestedit restricted retval \
shape short signed size_is small source strict_context_handle \
string struct switch switch_is switch_type \
transmit_as typedef \
uidefault union unique unsigned user_marshal usesgetlasterror uuid \
v1_enum vararg version void wchar_t wire_marshal

keywordclass.msidl=handle
keywordclass.xpidl=attribute native noscript scriptable shared wstring inout
keywords.$(file.patterns.idl)=$(keywordclass.idl) $(keywordclass.xpidl)

keywordclass.java=abstract boolean break byte case catch char class const \
continue default do double else extends final finally float for future \
generic goto if implements import inner instanceof int interface long \
native new null operator outer package private protected public rest \
return short static super switch synchronized this throw throws \
transient try var void volatile while
keywords.*.java=$(keywordclass.java)

keywordclass.javascript=abstract boolean break byte case catch char class \
const continue debugger default delete do double else enum export extends \
final finally float for function goto if implements import in instanceof \
int interface long native new package private protected public \
return short static super switch synchronized this throw throws \
transient try typeof var void volatile while with
keywords.*.js=$(keywordclass.javascript)

# C++ styles

# Default
style.cpp.32=$(font.base)
# White space
style.cpp.0=fore:#808080
# Comment
style.cpp.1=$(colour.code.comment.box),$(font.code.comment.box)
# Line Comment
style.cpp.2=$(colour.code.comment.line),$(font.code.comment.line)
# Doc comment
style.cpp.3=$(colour.code.comment.doc),$(font.code.comment.doc)
# Number
style.cpp.4=$(colour.number)
# Keyword
style.cpp.5=$(colour.keyword),bold
# Double quoted string
style.cpp.6=$(colour.string)
# Single quoted string
style.cpp.7=$(colour.char)
# UUIDs (only in IDL)
style.cpp.8=fore:#804080
# Preprocessor
style.cpp.9=$(colour.preproc)
# Operators
style.cpp.10=$(colour.operator),bold
# Identifiers
style.cpp.11=
# End of line where string is not closed
style.cpp.12=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Verbatim strings for C#
style.cpp.13=fore:#007F00,$(font.monospace),back:#E0FFE0,eolfilled
# Regular expressions for JavaScript
style.cpp.14=fore:#3F7F3F,$(font.monospace),back:#E0F0FF,eolfilled
# Doc Comment Line
style.cpp.15=$(colour.code.comment.doc),$(font.code.comment.doc)
# Keywords2
style.cpp.16=fore:#B00040
# Comment keyword
style.cpp.17=fore:#3060A0,$(font.code.comment.doc)
# Comment keyword error
style.cpp.18=fore:#804020,$(font.code.comment.doc)
# Braces are only matched in operator style
braces.cpp.style=10

cc=g++ -pedantic -Os -fno-exceptions -fvtable-thunks -c $(FileNameExt) -o $(FileName).o

command.compile.*.c=$(cc)
command.build.*.c=make
command.go.*.c=$(FileName)
# To make the Go command both compile (if needed) and execute, use this setting:
#command.go.needs.*.c=g++ $(FileNameExt) -o $(FileName)

command.compile.*.cc=$(cc)
command.build.*.cc=make
command.go.*.cc=$(FileName)

command.compile.*.cpp=$(cc)
command.build.*.cpp=make
command.go.*.cpp=$(FileName)

command.compile.*.cxx=$(cc)
command.build.*.cxx=make
command.go.*.cxx=$(FileName)

command.build.*.h=make

command.name.0.*.cxx=Indent
command.0.*.cxx=astyle -tapO $(FileNameExt)
command.is.filter.0.*.cxx=1

command.name.1.*.cxx=Lint
command.1.*.cxx=g++ -W -Wall -Wshadow -Wwrite-strings -Wold-style-cast \
	-Woverloaded-virtual  -pedantic -Os -fno-exceptions -fvtable-thunks -c $(FileNameExt)

command.name.2.*.cxx=Execute Selection
command.2.*.cxx=$(CurrentSelection)

if PLAT_WIN
	command.compile.*.rc=windres $(FileNameExt) $(FileName).o
	command.build.*.rc=make
	command.build.*.h=make
	command.help.$(file.patterns.cpp)=$(CurrentWord)!G:\Program Files\Microsoft Visual Studio\MSDN98\98VSa\1033\MSDNVS6A.COL
	command.help.subsystem.$(file.patterns.cpp)=4
# When maintaining old Win16 programs...
#	command.help.$(file.patterns.cpp)=$(CurrentWord)!I:\msvc\help\win31wh.hlp
#	command.help.subsystem.$(file.patterns.cpp)=5

if PLAT_GTK
	command.help.$(file.patterns.cpp)=man $(CurrentWord) | col -b
	
# C# is only available on Windows
if PLAT_WIN
	command.build.*.cs=csc /t:winexe $(FileNameExt) /r:system.winforms.dll,system.dll,microsoft.win32.interop.dll,system.drawing.dll
	command.go.*.cs=$(FileName)
	command.go.subsystem.*.cs=1

command.compile.*.java=javac $(FileNameExt)
command.build.*.java=javac *.java
command.go.*.java=java $(FileName)

