Thanks Fred, at lease someone replied
Just thought I'd release some of the helpper functions that I'm building to test the verious features of the editor.
have noted one bug so far, if the EditorID in ScintillaSendMessage() doesn't exist it will core dump.
Code: Select all
Declare Set_SciCaret(editorid.l,color.l,width.l,blinkrate.l)
Declare Set_SciCaretLine(editorid.l,color.l,visable.l)
Declare Set_SciDefaultBGrdFGrd(editorid,stylecolorbg,stylecolorfg)
Declare Set_SciFont(editorid.l,fontname.s,fontsize.l,fontantialias.l)
Procedure Set_SciCaret(editorid.l,color.l,width.l,blinkrate.l)
ScintillaSendMessage(editorid,#SCI_SETCARETFORE,color,0)
ScintillaSendMessage(editorid,#SCI_SETCARETWIDTH,width,0)
ScintillaSendMessage(editorid,#SCI_SETCARETPERIOD,blinkrate,0)
EndProcedure
Procedure Set_SciCaretLine(editorid.l,color.l,visable.l)
ScintillaSendMessage(editorid,#SCI_SETCARETLINEBACK,color,0)
ScintillaSendMessage(editorid,#SCI_SETCARETLINEVISIBLE,visable,0)
EndProcedure
Procedure Set_SciDefaultBGrdFGrd(editorid,stylecolorbg,stylecolorfg)
ScintillaSendMessage(editorid,#SCI_STYLESETBACK,#STYLE_DEFAULT,stylecolorbg)
ScintillaSendMessage(editorid,#SCI_STYLESETFORE,#STYLE_DEFAULT,stylecolorfg)
ScintillaSendMessage(editorid,#SCI_STYLECLEARALL,0,0)
EndProcedure
Procedure Set_SciFont(editorid.l,fontname.s,fontsize.l,fontantialias.l)
antialias.s=""
If(fontantialias=1) : antialias="!" : EndIf
ScintillaSendMessage(editorid,#SCI_STYLESETFONT,0,fontname+antialias)
ScintillaSendMessage(editorid,#SCI_STYLESETSIZE,0,fontsize)
EndProcedure
Procedure Set_SciZoom(editorid,zoominout.l)
If zoominout=#True
ScintillaSendMessage(editorid,#SCI_ZOOMIN,0,0)
Else
ScintillaSendMessage(editorid,#SCI_ZOOMOUT,0,0)
EndIf
EndProcedure