
HelpPath	SWI, C-Toolbox, C,

#-------------------------------------------

Search
	includeC	< {White} "#include" {White} "<" ["C:"] @0 {'a-zA-Z'}+ (@9 ".H" {White} ">" >)
	includeC2	< {White} "#include" {White} '"' ["C:"] @0 {'a-zA-Z'}+ (@9 ".H" {White} '"' >)
	includeTCPIP	< {White} "#include" {White} '"' ["TCPIPLibs:"] @0 {'a-zA-Z'}+ (@9 ".H" {White} '"' >)
	includeUnix	< {White} "#include" {White} "<" {White} ("Unix:" | "unix:")  @0 * (@9 ".H" {White} ">" >)
	includeDeskLib	< {White} "#include" {White} "<" {White} ("DeskLib:" | "desklib") @0 * (@9 ".H" {White} ">" >)
	includeToolbox	< {White} "#include" {White} '"' {White} ("ToolBox:" | "toolbox:") @0 * (@9 ".H" {White} '"' >)
#	startfold	("/*************************************************/" NL NL)
#	endfold		("}" NL NL "/*************************************************/")
	startfold	NL @0 {' '} "/****"
	endfold		NL "}" NL
#	c_in		"{" NL
#	c_out		"}" NL
#	c_anything	. | NL
End

#Foldparm1 ("/*{{{","/*}}}",startspace,case)
#Foldparm1 (startfold,endfold,startspace,case)
Foldparm1 (startfold,endfold)

ClickList
	includeC	LoadOne ("<tmp$path>.^.H.<tmp$word>","C:H.<tmp$word>")
	includeC2	LoadOne ("<tmp$path>.^.H.<tmp$word>","C:H.<tmp$word>")
	includeTCPIP	LoadOne ("TCPIPLibs:H.<tmp$word>")
	includeUnix	LoadOne ("Unix:H.<tmp$word>")
	includeDeskLib	LoadOne ("DeskLib:H.<tmp$word>")
	includeToolbox	LoadOne ("ToolBox:H.<tmp$word>")
End

#ClickList indent
#	c_in		NewLine "  "
#	c_out		CaretLeft DeleteLeft DeleteLeft CaretRight NewLine
#	c_anything	NewLine
#End

#-------------------------------------------

ID_FirstChar	A-Za-z_
ID_Middle	A-Za-z_0-9

SyntaxOptions
	SingleQuote	Yes
	DoubleQuote	Yes
	QuoteChar	\
	QuoteQuote	No
	SplitString	Yes
	HexPrefix	0x
End

SyntaxComment 1
	Type		Multiline
	StartWith	/*
	EndWith		*/
End

SyntaxComment 2
	Type		OneLine
	StartWith	//
End

SyntaxWords Group1 case
	do case default
	continue
	for while break do return goto
	if else switch default
End

SyntaxWords Group2 case
	auto register static extern typedef
	void char short int long float double signed unsigned
	const volatile
	struct union enum
	_kernel_oserror size_t flex_ptr FILE
	_kernel_ExtendProc
	ObjectId ComponentId IdBlock ToolboxEvent MessagesFD ToolboxEventHandler
	SaveAsFillBufferEvent
	BBox
	wimp_icondata wimp_menuhdr wimp_menustr wimp_menuitem wimp_menuflags wimp_menuptr wimp_iconflags wimp_ibtype
	WimpEventHandler WimpPollBlock WimpMessage WimpSysInfo
	WimpGetPointerInfoBlock WimpGetWindowStateBlock WimpGetCaretPositionBlock
	WimpGetWindowOutlineBlock WimpOpenWindowBlock WindowShowObjectBlock WimpPlotIconBlock
	WimpRedrawWindowBlock WimpKeyPressedEvent WimpMouseClickEvent WimpGetIconStateBlock WimpSetIconStateBlock

End

SyntaxWords Group3 nocase
	#include #ifdef #ifndef #endif #pragma #line #error #define #undef #else #if
End

# Program specific definitions

SyntaxWords Group4 case
	NULL
	ChkError ChkTrace RetError Beep StrNCpy0 MallocGranularity FlexGranularityShift WordAlign
	DISPLAY_NAMED ISBODY ISHEAD ISBULLET ISLINK
	LINEBREAK LINEBREAKSW LINEBREAKON LINEBREAKOFF CENTRED VISUALDATA
	LEADING SWAP
	FileType_HTML FileType_TEXT FileType_POUT FileType_URI
	MaxLstLen MaxMsgLen MaxPrgLen
	MaxUrlLen MaxStaLen MaxBytLen MaxDiaLen
	UrlLabLen DiaLabLen StaLabLen BytLabLen
	MaxTiBLen MaxHstLen MaxHotLen MaxPoILen MaxPoOLen
	MaxHelpLen
	FontNameLen TypeNameLen
End

# Program specific data types

SyntaxWords Group5 case
	browser_data browser_token global_choices fixed_choices
	HStream bs_fetch urlstat tristate_type bistate_type
	reformat_line reformat_line_chunk reformat_width_data
	fm_typeface fm_facelist fm_face
	token_path
	status_content status_type
	image_info print_info menu_source bitfield_mask bitfield_set display_type
	form_header form_fieldtype form_field form_field_value form_field_header
	table_stream table_row table_headdata reformat_cell
End

# Program specific debug keywords

SyntaxWords Group6 case
	Printf
End

#----------------------------------------------------------

KeyList
	^[		InsertStr("/*")
	^]		InsertStr("*/")
#	Return		Clicklist("indent")
End

#----------------------------------------------------------

Functions

	Key	F2
	Menu	List of functions F2
	Icon	LoF
	Select	ListOfC (All,Sort)
	Help	HCM_lof

	Key 	PgUp
	Icon	up
	Select	GotoPrevC (Text)
	Help	HCM_up

	Key 	PgDown
	Icon	down
	Select	GotoNextC (Text)
	Help	HCM_dn

	Key	^H
	Menu	Load H.*
	Icon	save
	Help	HCM_ld
	Select	SetTmp() LoadOne ("<tmp$path>.^.H.<tmp$word>","C:H.<tmp$word>")

	Key	^F10
	Menu	Save & Compile      F10
	Icon	Run
	Select	SaveDrag ("cc")
	Help	HCM_run

	Key	F10
	Menu	Save & Make      ^F10
	Icon	brick
	Select	SetTmp() SaveDClick ("<tmp$path>.^.Makefile")
	Help	HCM_mak

	Key	^G 1
	Menu	Goto function definition
	Icon	goto
	Select	Push GotoFoundC (all)
	Help	HCM_go

	Key	^G 2
	Select	Pop

End

Shortcuts
	w(	while (\@) {\n\i  \@\n\i}
	f(	for (\@;\@;\@) {\n\i  \@\n\i}
	s(	switch (\@) {\n\i  case\n\i}
	p(	printf("\@");
	#<	#include <\@.h>\n\@
	#"	#include "\@.h"\n\@
	``-     /*----------------------------------------------------------------------------*/
End
