###########
comment="#7F7F7F"    			#colore per i commenti multilinea [PHP]
comment_line="#7F7F7F"  	#colore per i commenti in linea [PHP]
default="#000000" 					#colore per le funzioni [PHP]
string="#7F0000"  					#colore stringhe [PHP]
string_h="#7F0000" 	 			#colore stinghe 2 [PHP]
number="#FF0000"					#colore per i numeri [PHP]
operator="#7F7F7F"					#colore per gli operatori [PHP]
string_s="#7F0000"					#colore stringhe 3 [PHP]
variable="#007F7F"					#colore variabili [PHP]
key="#00007F"							#colore costrutti [PHP]
attribute="#3939F1"					#colore attibuti  [HTML]
attribute_unk="#3939F1"		#colore attributi sconosciuti  [HTML]
cdata="000000"							#colore cdata  [HTML]
h_comment="#ADADAD"	   #colore commenti   [HTML]
h_default="000000"					#colore default  [HTML]
double_s="#35AE35"				#colore stringa  [HTML]
entity="#3C84C8"						#colore entity  [HTML]
h_number="#4F1CA8"				#colore numeri  [HTML]
other="000000"							#altro  [HTML]
question="#EAB2FF"				#colre question  [HTML]
h_script="#378516"					#colore script  [HTML]
tag="#12127A"							#colore tag  [HTML]
tagend="#1E00FF"					#colore tag di fine  [HTML]
h_value="#FF00E9"					#colore valori		[HTML]
h_asp="#7F7F7F"    					#colore per i commenti multilinea [ASP]
h_aspat="#FF0000"  				#colore per i commenti in linea [ASP]
a_default="#000000"				#Colore Default [ASP]
a_start="#7F7F7F"						#Colore start [ASP]
a_a_default="#8800B3"			#Colore Default [ASP]
a_comment="C0C0C0"			#Colori commenti [ASP]
a_number="#FF0000"				#Colore numeri [ASP]
a_variable="#005A02"			#Colore variabili [ASP]
a_key="#000000"						#colori parola chiave [ASP]
a_string="#7F0000"					#colore stringhe [ASP]
a_symbol="#007F7F"				#colore simboli	[ASP]
###########
self.SetLexer(wxSTC_LEX_HTML)
#self.SetKeyWords(0," "+"")
self.SetKeyWords(4," "+"for if else function echo while class switch break continue exit do die GLOBAL global isset Isset ind double or and case array Attay <? ?> <?PHP foreach while return ")
self.SetKeyWords(1," "+"if If For Do Set End Not Then Loop Else Nothing Close  Or And for do set end then not or and loop else while While nothing close open Randomize randomize Rnd Server rnd server Int Float Max createobject int float max")
self.SetStyleBits(7)
self.StyleClearAll()
self.StyleSetSpec(wxSTC_STYLE_DEFAULT,     "face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_STYLE_LINENUMBER,  "back:#A5A5A5,face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_STYLE_CONTROLCHAR, "face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_STYLE_BRACELIGHT,  "fore:#FFFFFF,back:#0000FF,face:%(font)s,size:%(size)d,bold")
self.StyleSetSpec(wxSTC_STYLE_BRACEBAD,    "fore:#000000,back:#FF0000,face:%(font)s,size:%(size)d,bold")

# Html styles
self.StyleSetSpec(wxSTC_H_ATTRIBUTE, "fore:"+attribute+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_ATTRIBUTEUNKNOWN, "fore:"+attribute_unk+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_CDATA, "fore:"+cdata+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_COMMENT, "fore:"+h_comment+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_DEFAULT, "fore:"+h_default+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_DOUBLESTRING, "fore:"+double_s+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_ENTITY, "fore:"+entity+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_NUMBER, "fore:"+h_number+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_OTHER, "fore:"+other+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_QUESTION, "fore:"+question+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_SCRIPT, "fore:"+h_script+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_SINGLESTRING, "fore:"+double_s+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_TAG, "fore:"+tag+",face:%(font)s,bold,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_TAGEND, "fore:"+tagend+",face:%(font)s,bold,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_TAGUNKNOWN, "fore:"+tag+",face:%(font)s,bold,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_VALUE, "fore:"+h_value+",face:%(font)s,size:%(size)d" % faces)
self.SetCaretForeground("BLUE")
#PHP styles
self.StyleSetSpec(wxSTC_HPHP_COMMENT, "fore:"+comment+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_COMMENTLINE, "fore:"+comment_line+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_DEFAULT, "fore:"+default+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_HSTRING, "fore:"+string+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_HSTRING_VARIABLE, "fore:"+string_h+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_NUMBER, "fore:"+number+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_OPERATOR, "fore:"+operator+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_SIMPLESTRING, "fore:"+string_s+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_VARIABLE, "fore:"+variable+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HPHP_WORD, "fore:"+key+",face:%(font)s,bold,size:%(size)d" % faces)

# Asp styles
#self.StyleSetSpec(wxSTC_H_DEFAULT, "fore:"+a_default+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_ASP, "fore:"+h_asp+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_H_ASPAT, "fore:"+h_aspat+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_START, "fore:"+a_start+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_DEFAULT, "fore:"+a_a_default+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_COMMENT, "fore:"+a_comment+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_COMMENTLINE, "fore:"+a_comment+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_COMMENTDOC, "fore:"+a_comment+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_NUMBER, "fore:"+a_number+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_WORD, "fore:"+a_variable+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_KEYWORD, "fore:"+a_key+",bold,face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_DOUBLESTRING, "fore:"+a_string+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_SINGLESTRING, "fore:"+a_string+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_SYMBOLS, "fore:"+a_symbol+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_STRINGEOL, "fore:"+a_key+",face:%(font)s,size:%(size)d" % faces)
self.StyleSetSpec(wxSTC_HJA_REGEX, "fore:"+a_symbol+",face:%(font)s,size:%(size)d" % faces)

self.colori={}
self.colori[wxSTC_H_ATTRIBUTE]=attribute
self.colori[wxSTC_H_ATTRIBUTEUNKNOWN]=attribute_unk
self.colori[wxSTC_H_CDATA]=cdata
self.colori[wxSTC_H_COMMENT]=h_comment
self.colori[wxSTC_H_DEFAULT]=h_default
self.colori[wxSTC_H_DOUBLESTRING]=double_s
self.colori[wxSTC_H_ENTITY]=entity
self.colori[wxSTC_H_NUMBER]=h_number
self.colori[wxSTC_H_OTHER]=other
self.colori[wxSTC_H_QUESTION]=question
self.colori[wxSTC_H_SCRIPT]=h_script
self.colori[wxSTC_H_SINGLESTRING]=double_s
self.colori[wxSTC_H_TAG]=tag+" bold"
self.colori[wxSTC_H_TAGEND]=tagend+" bold"
self.colori[wxSTC_H_TAGUNKNOWN]=tag+" bold"
self.colori[wxSTC_H_VALUE]=h_value
self.colori[wxSTC_HPHP_COMMENT]=comment
self.colori[wxSTC_HPHP_COMMENTLINE]=comment_line
self.colori[wxSTC_HPHP_DEFAULT]=default
self.colori[wxSTC_HPHP_HSTRING]=string
self.colori[wxSTC_HPHP_HSTRING_VARIABLE]=string_h
self.colori[wxSTC_HPHP_NUMBER]=number
self.colori[wxSTC_HPHP_OPERATOR]=operator
self.colori[wxSTC_HPHP_SIMPLESTRING]=string_s
self.colori[wxSTC_HPHP_VARIABLE]=variable
self.colori[wxSTC_HPHP_WORD]=key+" bold"
self.colori[wxSTC_H_ASP]=h_asp
self.colori[wxSTC_H_ASPAT]=h_aspat
self.colori[wxSTC_HJA_START]=a_start
self.colori[wxSTC_HJA_DEFAULT]=a_a_default
self.colori[wxSTC_HJA_COMMENT]=a_comment
self.colori[wxSTC_HJA_COMMENTLINE]=a_comment
self.colori[wxSTC_HJA_COMMENTDOC]=a_comment
self.colori[wxSTC_HJA_NUMBER]=a_number
self.colori[wxSTC_HJA_WORD]=a_variable
self.colori[wxSTC_HJA_KEYWORD]=a_key+" bold"
self.colori[wxSTC_HJA_DOUBLESTRING]=a_string
self.colori[wxSTC_HJA_SINGLESTRING]=a_string
self.colori[wxSTC_HJA_SYMBOLS]=a_symbol
self.colori[wxSTC_HJA_STRINGEOL]=a_key
self.colori[wxSTC_HJA_REGEX]=a_symbol
