#-------------------------------------------------------------------------------
#
#	Name    : StrongHlp
#	Purpose : StrongED mode file for StrongHelp files
#	Author  :  Fred Graute
#	Licence : Freeware
#	Version : 1.00, 23-01-02
#
#-------------------------------------------------------------------------------

HelpPath	StrongHelp,SH-RefMan,SH-Style

##ID_FirstChar
ID_Middle	A-Za-z_0-9" "
##ID_LastChar	

Search
	Link		"<" @0 {'a-zA-Z_0-9'} @9 ">"
	Link2		"<" {~"=>" ~">" .} "=>" @0 {'a-zA-Z_0-9'} @9 ">"
	LinkText	{~(">" | "=>" | NL) . }+
	LinkCmd		{~(">" | NL) . }+
	bold		(" " | "\t" | (<)) ("*") {(A" "A) | A} ("*") (Punct | White)
	italic		(" " | "\t" | (<)) ("/") {(A" "A) | A} ("/") (Punct | White)
	underline	(" " | "\t" | (<)) ("_") {(A" "A) | A} ("_") (Punct | White)
	selected_line	{any}+
	command_group	{'~}'}"}"
End

SyntaxComment 1
	Type		OneLine
	StartWith	"# "
End

SyntaxWords Group1 nocase StartOfLine EndOfLine
	#Align
	#Background
	#Below
	#Bottom
	#Draw
	#Endtable
	#F
	#Include
	#Indent
	#Line
	#Linkattributes
	#Manuals
	#Parent
	#Prefix
	#Postfix
	#RGB
	#Sprite
	#Spritefile
	#Subpage
	#Tab
	#Table
	#Tag
	#Wrap
End


SyntaxWords Group2 nocase EndOfExpr LinkText
	<
End

SyntaxWords Group3 nocase EndAlways
	>
End

SyntaxWords Group4 nocase EndOfExpr LinkCmd
	=>
End

#SyntaxWords Group5 nocase StartSpace EndOfID
#	"*"
#	"/"
#	"_"
#End

#SyntaxWords Group6 nocase EndAlways
#	"* "
#	"/ "
#	"_ "
#End

SyntaxWords Group6 nocase EndOfExpr command_group
	"{"
End

#SyntaxWords Group7 nocase EndOfID
#	" *"
#	" /"
#	" _"
#End

SyntaxWords Group8 nocase EndAlways
	\{
	\}
	\*
	\\
	\<
	\>
	\_
	\/
	\#
End

Replace
	Make_bold	"*" @@ "*"
	Make_italic	"/" @@ "/"
	Make_underline	"_" @@ "_"
End

Functions
	Menu	Add bold
	Icon	fg_bold
	Help	Hshlp_bld
	Select	Replace(selected_line,Make_bold,block,noline,nocase)

	Adjust	ListOfFound(bold,All,Whole,noline,nocase)

	Menu	Add italic
	Icon	fg_italic
	Select	Replace(selected_line,Make_italic,block,noline,nocase)

	Adjust	ListOfFound(italic,All,Whole,noline,nocase)

	Menu	Add underline
	Icon	fg_underline
	Select	Replace(selected_line,Make_underline,block,noline,nocase)

	Adjust	ListOfFound(underline,All,Whole,noline,nocase)

	Icon	lof
	Select	dbox_ListOfFound
End

Shortcuts
	``ac	#Align centre
	``al	#Align left
	``ar	#Align right
End

ClickList Select2
	Link	SetTmp LoadOne("<TMP$Path>.<TMP$Word>")
	Link2	SetTmp LoadOne("<TMP$Path>.<TMP$Word>")
End
