#include "FiveWin.ch"
#include "Scintilla.ch"
function Main()
LOCAL cIni, oWnd, nBits
DEFINE WINDOW oWnd TITLE "TLPosWin - EtiE"
//cIni := MemoRead("C:\TL\Utility\TLEtiW\test\Pos\Mag1\Eti\0_pelllicano_scaffale_pdf.ini")
cIni := MemoRead("C:\pos\config\tlposwin.ini")
//cIni := MemoRead("C:\fwh32\samples\scintilla\src\SciTE.properties")
nBits := SCLEX_PROPERTIES
oWnd:oClient := MyScintilla():New( 0, 0, 10,10,oWnd,RGB(0,0,0), RGB(255,255,255),SCLEX_PROPERTIES)
oWnd:oClient:SetText(cIni)
oWnd:oClient:Refresh()
ACTIVATE WINDOW oWnd
return 0
class MyScintilla FROM TScintilla
METHOD Setup
endclass
METHOD Setup( nMark, lInit ) CLASS MyScintilla
::SendMsg( SCI_SETLEXER, SCLEX_PROPERTIES, 0 )
::SendMsg( SCI_SETSTYLEBITS, 5 )
::SendMsg(SCI_STYLECLEARALL)
::SendMsg(SCI_STYLESETFORE, SCE_PROPS_DEFAULT , CLR_BLACK)
::SendMsg(SCI_STYLESETFORE, SCE_PROPS_COMMENT , CLR_GRAY)
::SendMsg(SCI_STYLESETFORE, SCE_PROPS_SECTION , CLR_BLUE)
::SendMsg(SCI_STYLESETFORE, SCE_PROPS_ASSIGNMENT, RGB(255, 128, 0))
::SendMsg(SCI_STYLESETFORE, SCE_PROPS_DEFVAL , RGB(0, 0, 128))
::SendMsg(SCI_STYLESETFORE, SCE_PROPS_KEY , CLR_RED)
::SendMsg(SCI_STYLESETBOLD, SCE_PROPS_KEY, 1)
::SendMsg(SCI_STYLESETEOLFILLED, SCE_PROPS_SECTION, 1)
PonFold( ::hWnd , "lexer.props.allow.initial.spaces" , "1" )
PonFold( ::hWnd , "fold" , "1" )
PonFold( ::hWnd , "fold.compact" , "0" )
::SendMsg( SCI_STYLESETFONT,STYLE_DEFAULT, "Lucida Console" )
::SendMsg( SCI_SETMARGINTYPEN, 1, SC_MARGIN_NUMBER )
::SendMsg( SCI_SETMARGINWIDTHN, 1, 40 )
::SendMsg( SCI_SETMARGINSENSITIVEN, 1, 1)
//::Send( SCI_STYLESETBACK , STYLE_LINENUMBER , RGB(0,255,255) ) //CLR_VSBAR )
//::Send( SCI_STYLESETFORE , STYLE_LINENUMBER , RGB(0,255,255)) //CLR_BLUE )
::SendMsg(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_CLICK,0)
::SendMsg( SCI_SETMARGINTYPEN, 2, SC_MARGIN_SYMBOL )
::SendMsg( SCI_SETMARGINWIDTHN, 2, 15 )
::SendMsg( SCI_SETMARGINMASKN , 2, SC_MASK_FOLDERS )
::SendMsg( SCI_SETMARGINSENSITIVEN, 2, 1 )
::SendMsg( SCI_SETFOLDMARGINCOLOUR, 2, RGB(0,255,255) ) //CLR_VSBAR )
::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDEROPEN,SC_MARK_BOXMINUS)
::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDER,SC_MARK_BOXPLUS)
::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDERSUB,SC_MARK_VLINE)
::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDERTAIL,SC_MARK_LCORNERCURVE)
::SendMsg( SCI_MARKERSETFORE,SC_MARKNUM_FOLDER, CLR_WHITE)
::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDER, CLR_BLACK)
::SendMsg( SCI_MARKERSETFORE,SC_MARKNUM_FOLDEROPEN,CLR_WHITE)
::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDEROPEN,CLR_BLACK)
::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDERSUB,CLR_BLACK)
::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDERTAIL,CLR_BLACK)
::SetSavePoint()
return nil