MorphOS Developer
Posts: 162 from 2003/3/17
Hi,
I guess that someone is me since I came up with Scintilla.mcc + Scribble in the first place...
Unfortunately I have never written any developer documentation for the Scintilla.mcc. I agree that ideally this should be included in the SDK together with example code (one day hopefully). However, this should not really be a problem as Scintilla.mcc intentionally keeps the full interface available on other platforms.
This means that the documentation you can find on
Scintilla Documentation is all valid also in the case of the MorphOS implementation. This makes it really easy to just create a Scintilla MUI object and then pass commands to it (there are many very powerful ones as you will notice). You can also easily translate code available for Linux, Windows or so on...
What you additonally need to know is the following:
To call a scintilla command you use
SCI_Command like this:
DoMethod(obj, SCI_Command, m, w, l)
where m is the scintilla command (i.e. SCI_INSERTTEXT)
w and l are the two parameters of that command. In case the command takes only 0 or 1 parameters then pass 0s.
Scintilla notifications are implemented using
SCI_Notify and standard MUI notifications. An example from Scribble might make this clearer:
DoMethod(data->Scintilla_MUI, MUIM_Notify, SCI_Notify, MUIV_EveryTime,
obj, 3, MM_PlayWin_HandleSciMsg, (LONG) MUIV_TriggerValue, FALSE);
Additonally, there are a few custom additions to the MorphOS port. You might particularly find
the MA_ActiveEditor attribute useful. Here's an example:
setmui(data->Scintilla_MUI, MA_ActiveEditor, TRUE);
I hope this helps but please don't hesitate if you have questions.
Best,
Nicholai
ps.
By the way, there is no command to load file into Scintilla, you have to load the file from disk yourself and then pass the contents to the Scintilla document buffer with i.e SCI_ADDTEXT or SCI_INSERTTEXT.