The initial appearance of a Fragaria view is determined by the framework preferences controller. The MGSFragaria framework supplies two preference view controllers whose views can be embedded in your preference panel.

The implementation of this feature is at an early stage. Feel free to improve it.

Custom colouring

The SMLSyntaxColouringDelegate protocol allows a delegate to influence the syntax colouring for each of a number of syntactical groups such as numbers, attributes, comments or keywords.

Pseudo code for the protocol method flow looks something like:

// query delegate if should colour this document
doColouring = fragariaDocument:shouldColourWithBlock:string:range:info
if !doColouring quit colouring
// send *ColourGroupWithBlock methods for each group defined by SMLSyntaxGroupInteger
foreach group
// query delegate if should colour this group
doColouring = fragariaDocument:shouldColourGroupWithBlock:string:range:info
if doColouring
colour the group
// inform delegate group was coloured
fragariaDocument:didColourGroupWithBlock:string:range:info
end if
end
// inform delegate document was coloured
fragariaDocument:willDidWithBlock:string:range:info

The delegate can completely override the colouring for a given group or provide additional colouring support (you will have to provide you own scanning logic). Document level delegate messages provide an opportunity to provide colouring for custom group configurations.

L

M

N

O

P

R

r,
rhtml,
ruby

S

scala,
sgml,
shell,
sml,
sql,
stata,
supercollider

T

tcltk,
torquescript

U

udo

V

vb,
verilog,
vhdl

X

xml

Defining a new language syntax

To define a new syntax definition:

Generate a plist that defines the language syntax. The plist structure is simple and browsing the existing definitions should provide some enlightenment. The plist keys are defined in SMLSyntaxDefinition.h. For much deeper insight see SMLSyntaxColouring - recolourRange:.

How can I contribute

Where did it come from?

Fragaria started out as the vital pulp of Smultron, now called Fraise. If you want to add additional features to Fragaria then looking at the Fraise and other forked sources is a good place to start. Fraise is a GC only app so you will need to consider memory management issues when importing code into Fragaria.