XProfEd - Opensource IDE | | | | - Page 1 - |
| GDL | @ Hello Roland,
I have me with Help your class a Einfachsteditor for my Atmelprogramm gezimmert. it works too everything wonderful, except for one:i want always whom actually Zeileninhalt in row$ having.
I take at times, that with the the part To do has. CompileMarkSeparation
Proc XSciProf.GetLine
Return Int(.SciMessage(~SCI_LINEFROMPOSITION, .SciMessage(~SCI_GETCURRENTPOS, 0, 0), 0) + 1)
EndProc
Proc XSciProf.GetLine$
Parameters Nr%, Z$
Declare Len%, Zeile#
Dim Zeile#,32767
Len% = .SciMessage(~SCI_GETLINE, Nr%, Zeile#)
Z$ = Translate$(Char$(Zeile#,0,Len%-1), ,Space$(XSciProf.Tab%))
Dispose Zeile#
Return Z$
| 10/21/07 ▲ | |
| |
| | | | | - Page 2 - |
| Jörg Sellmeyer | everything clear, i'm eh ne nachteule |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/24/07 ▲ |
| |
| | GDL | now goes through chance everything, if I to waitinput NEN setfocus(edit&) einsetze. CompileMarkSeparation
whilenot ende%
setfocus(edit&)
waitinput
if (%umessage=16) or (menuitem(450))
aufraeumen
ende%=1
elseIf %wmNotify and (%NotifyCode = ~SCN_MARGINCLICK)
I% = sendmessage(edit&,~SCI_POSITIONFROMPOINT,0,%MouseY - 80)
Der Wert 80 in obiger Zeile wurde durch Testen ermittelt.Sonst geht
Aufklappen nicht richtig !
I% = sendmessage(edit&,~SCI_LINEFROMPOSITION,I%,0) + 1
sendmessage(edit&,~SCI_TOGGLEFOLD,I%,0)
ElseIf MenuItem(13) Enter-Taste
if not(sendmessage(edit&,~SCI_GETLINEVISIBLE,aktuellezeile_(), 0)) gefaltet
sendmessage(edit&,~SCI_TOGGLEFOLD,aktuellezeile_(), 0)
endif
sendmessage(edit&,~SCI_ADDTEXT, 2, Addr(CRLF$))
CRLine% = aktuellezeile_() - 1
i% = sendmessage(edit&,~SCI_GETLINEINDENTATION, CRLine% - 1, 0)
sendmessage(edit&,~SCI_SETLINEINDENTATION, CRLine%, I%)
i% =sendmessage(edit&,~SCI_GETLINEINDENTPOSITION, CRLine%, 0)
sendmessage(edit&,~SCI_GOTOPOS, i%, 0)
zeile_ermitteln
the it now goes is certainly NEN Doppelfehler, the itself then aufhebt.important iss, that my Zusammengesuche ausm Xprofed at all goes. be still on the Search Why the waitinput durchbrochen becomes.becomes the in the XProfed class already set?
Hello Georg |
| | | | |
| | GDL | have yet moreover rumprobiert.
setfocus(edit&) or setfocus(editor_&) can to waitinput ,into individual inquire,so often stand as likes, It's all right not.standing But to waitinput goes everything.
Hello Georg |
| | | | |
| | GDL | @ Jörg,
have time everything so far abstracted,so far I yet be.The Exe is run.any code lying with.in the Ordner 01Test run.
Hello Georg |
| | | | |
| | Jörg Sellmeyer | GDL
have yet moreover rumprobiert.
setfocus(edit&) or setfocus(editor_&) can to waitinput ,into individual inquire,so often stand as likes, It's all right not.standing But to waitinput goes everything.
Hello Georg
You would have it none to individual inquire settle must, separate to the If-structure in the Hauptschleife. CompileMarkSeparation But letzendlich alike. i'd only The Variable editor_& not global define, separate inside the procedure. then must of course any further, Procedures, The the control bearing still in the first row one Parameters editor_&,...,... having, but you have then The Procedures beautiful gekapselt and can with want further Editcontrols in Your Program produce. your Includedatei becomes simply flexibler. Greeting Jörg |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/24/07 ▲ |
| |
| | | | - Page 3 - |
| | GDL | have with the whom Parameters now made.
come but now here again not further.
an File loading goes correct.want now these Proc for benefit circa too makros To loading.These are simple Text files.
only should these Text files among themselves eingefügt and be not always as new file. means read I The Number of vorhandenen Lines from and commit these with zei&. CompileMarkSeparation
proc makroladen
Parameters File$,editor_&,zei&
print str$(zei&)
Declare Len&, Erg&, BDatei#
Len& = FileSize(File$)
Dim BDatei#, Len& + 1 +1 für abschließendes Null-Byte
BlockRead(File$, BDatei#,zei&, Len&)
Byte BDatei#, Len& = 0
statt: sendmessage(editor_&,~SCI_SETTEXT,0,BDatei#)
sendmessage(editor_&,~SCI_SETTEXT,zei&,BDatei#) geht nicht
sendmessage(editor_&,~SCI_SETTEXT,zei&-1,BDatei#) geht nicht
sendmessage(editor_&,~SCI_SETSAVEPOINT, 0, 0)
sendmessage(editor_&,~SCI_EMPTYUNDOBUFFER, 0, 0)
Dispose BDatei#
Erg& = 1
| 10/26/07 ▲ | |
| |
| | | You could wm_paste benefit or rather settext editor_&,gettext$(editor_&)+
+neuerInhalt$ |
| | | | |
| | GDL | I have it now so resolved: I copy The File into Clipboard and setting it then through Insert into document. |
| | | | |
| | GDL | Posting has überschnitten. |
| | | | |
| | GDL | all this only, because I mean Modellbahnsteuerung DCC compatible made have. me alone had my rtf Gewurstel too gelangt. |
| | | | |
| | Jörg Sellmeyer | Hello Georg, look you time that here of Andreas Miethe on: [web]https://www.rgh-soft.de/forum01/read.php?f=7&i=12314&t=12260#reply_12314[/web] |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/26/07 ▲ |
| |
| | GDL | @Jörg,
have your suggestion with the Parameters übernommen.RVKcompiler erstrahlt soon Anwenderfreundlich as Untermodul in my Modellbahnsteuerungsprogramm.it'll to that program the Atmel Mikrokontroller needed.
The inc CompileMarkSeparation {$CQ}
$H XPrfEdit.ph Ausremmen wenn nicht XPSE
Declare KeyWord1$, KeyWord2$, KeyWord3$, KeyWord4$, KeyWord5$, KeyWord6$, Keyword7$, Keyword8$
Declare Par1$, Par2$,size%,editordll&,e_cBefehl&,e_cbBefehlChk%,tab%
declare e_cAktuell&,e_cNormal&,e_cPapier&,e_cKommentar&,e_cbKommentarChk%
declare e_cZahl&,e_cbZahlChk%,e_cStrings&,Font$, KeyWord$, Key$, Wert$
declare e_cbStringsChk%,e_cOperator&,e_cbOperatorChk%,e_cBezeichner&,e_cbBezeichnerChk%
declare e_cDirekt&,e_cbDirektChk%,e_cFunktion&,e_cbFunktionChk%
declare e_cSysvar&,e_cbSysvarChk%,e_cStruktur&,e_cbStrukturChk%
Struct TextRange = cpMin&,
cpMax&,
lpstrText&
editordll& = UseDLL(SciLexer.dll)
IfNot editordll&
MessageBox(SciLexer.dll nicht gefunden!,FEHLER,16)
EndIf
standardwerte
==============================================================
proc standardwerte
size%=10
font$=Courier New
Tab% = 8
e_cNormal& = RGB($00,$00,$00)
e_cAktuell& = RGB($FF,$FF,$00)
e_cKommentar& = RGB($FF,$00,$00)
e_cZahl& = RGB(0,0,255)
e_cFunktion& = RGB($00,$00,$80)
e_cStrings& = RGB(0,206,0)
e_cOperator& = RGB(214,18,239)
e_cStruktur& = RGB($00,$00,$00)
e_cBefehl& = RGB($00,$00,$DD)
e_cPapier& = RGB($FF,$FF,$FF)
e_cBezeichner&= RGB($00,$00,$00)
e_cSysvar& = RGB(214,18,111)
e_cDirekt& = RGB($FF,$00,$00)
e_cbKommentarChk% = 0
e_cbZahlChk% = 0
e_cbFunktionChk% = 1
e_cbStringsChk% = 0
e_cbOperatorChk% = 0
e_cbStrukturChk% = 1
e_cbBefehlChk% = 1
e_cbBezeichnerChk%= 0
e_cbSysvarChk% = 1
e_cbDirektChk% = 1
endproc
========================================================================
proc neues_edit
declare editor_&
parameters _x%,_y%,_b%,_h%,_eltern&
editor_& = Control(Scintilla, , ~WS_CHILD | ~WS_VISIBLE,_x%,_y%,_b%,_h%,_eltern&,4000,%hInstance,0)
sendMessage(editor_&,~SCI_USEPOPUP, 0, 0)
sendMessage(editor_&,~SCI_SETTABWIDTH,tab%, 0)
sendMessage(editor_&,~SCI_SETUSETABS, 0, 0)
sendMessage(editor_&,~SCI_SETINDENT,tab%, 0)
sendMessage(editor_&,~SCI_SETTABINDENTS, 1, 0)
sendMessage(editor_&,~SCI_SETBACKSPACEUNINDENTS, 1, 0)
sendMessage(editor_&,~SCI_STYLESETFONT, 32, Addr(Font$))
sendMessage(editor_&,~SCI_STYLESETSIZE, 32,Size%)
sendMessage(editor_&,~SCI_STYLECLEARALL, 0, 0)
Font$ = Arial + Chr$(0)
sendMessage(editor_&,~SCI_STYLESETFONT,~STYLE_LINENUMBER, Addr(Font$))
sendMessage(editor_&,~SCI_STYLESETSIZE,~STYLE_LINENUMBER,Size% - 4)
sendMessage(editor_&,~SCI_SETMARGINTYPEN,1,~SC_MARGIN_NUMBER)
sendMessage(editor_&,~SCI_SETMARGINWIDTHN,1,50)
Interne Tastaturfunktionen abklemmen (Tastenfunktionen werden anderweitig genutzt)
sendMessage(editor_&,~SCI_CLEARCMDKEY, 13, 0) Enter
sendMessage(editor_&,~SCI_CLEARCMDKEY, 70 + ~SCMOD_CTRL << 16, 0) f + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 70 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) F + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 71 + ~SCMOD_CTRL << 16, 0) g + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 71 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) G + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 72 + ~SCMOD_CTRL << 16, 0) h + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 72 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) H + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 73 + ~SCMOD_CTRL << 16, 0) i + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 73 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) I + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 76 + ~SCMOD_CTRL << 16, 0) l + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 76 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) L + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 77 + ~SCMOD_CTRL << 16, 0) l + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 77 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) M + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 79 + ~SCMOD_CTRL << 16, 0) o + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 79 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) O + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 82 + ~SCMOD_CTRL << 16, 0) r + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 82 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) R + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 83 + ~SCMOD_CTRL << 16, 0) s + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 83 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) S + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 84 + ~SCMOD_CTRL << 16, 0) t + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 84 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) T + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 87 + ~SCMOD_CTRL << 16, 0) w + Strg
sendMessage(editor_&,~SCI_CLEARCMDKEY, 87 + (~SCMOD_CTRL + ~SCMOD_SHIFT) << 16, 0) W + Strg
Lexer auswählen und mit Keywords bestücken
sendMessage(editor_&,~SCI_SETLEXER, 79, 0)
KeyWord1$ = add addfiles addfonts addhotkey addstring addwindows append appendmenu
+ appendmenubar arc assign beep blockwrite byte
+ char checkmenu chdir chord clear
+ clearclip clearlist cliploadbmp close cls color
+ copy copybmp copybmptomem copypic copysizedbmp copysizedpic createmenu
+ ddelink ddeexecute ddeterminate debugout dec declare
+ deleteobject dim dim! dim$ dim% dim& dispose
+ drawicon drawextbmp drawexticon drawlibicon drawpic drawsizedextbmp
+ drawsizedpic drawsysicon drawtext ellipse enablemenu enablewindow endpaint endprint
+ endsub erase execute exitwindows float fill font freedll
+ inc input input# insertmenu killtimer let line lineto listboxitem$
+ list! list$ list% list& loadbmp loadsizedbmp locate logout long
+ mcls mcopybmp mcopysizedbmp mloadbmp mkdir moveto music nextpage
+ orientation openrw outp outpb parameters password pie play playsound
+ popup print print# putbyte putchar putclip putlong putword randomize readtext
+ rectangle removemenu rename repaint reset return rewrite
+ rmdir roundrect run savebmp savebmptoclip screen screencopy
+ seek separator setcheck setclosemsg setdialogfont setfattr setfont
+ setmenuitem setpixel setscrollrange setscrollpos setstyle settext settimer
+ setwindowpos shell showcursor showmax showmin shownormal sleep
+ sound sqldone sqlexec startpaint startprint string sub
+ subpopup tbox textcolor traceon traceoff trackmenu usebrush
+ usecursor useextcursor useextmenu usefont useicon usepen usermessages
+ var wincopy window windowstyle windowtitle winhelp word writeini + Chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 1, Addr(KeyWord1$))
KeyWord2$ = .super abs addr addstring ansitooem$ arctan assign bin$ blockread byte call char$
+ choosedir$ chr$ classof clicked closecom comerror control cos cot create
+ ctod$ date$ db del$
+ deletestring destroywindow direxists diskfree disksize double dtoc$
+ editbox eof exp external extstring$ float fileexists filename$ filesearch$
+ filestatus$ filepos filesize findfirst$ findnext$ findwindow format$
+ ftp get getactivetab getactivewindow getbvalue getbyte getchar$ getcheck
+ getclip$ getcount getcursel getdir$ getenv$ getfattr getfdate$
+ getfilesize getfocus getftime$ getgvalue gethandle getkey$ getline$
+ getlinecount getlong getpixel getrvalue getselcount getscrollpos getstate getstring$ getstyle gettext$ getword height
+ hex$ hiword iconcount if inkey$ inp inpb input$ ins$ insertstring
+ inserttab instr int iskey itemid joy keyin left$ len lg list!
+ list$ list% list& listbox$ listboxitem$ ln loadfile$ loadpic loadsizedpic long longname$
+ lower$ loword makelong match$ mcisend$ mempos menuitem messagebox mid$ mkstr$ mouse
+ movearrtolist movehandletolist
+ movelisttoarr movelisttohandle movelisttomem movelisttostr$ movestrtolist new not oct$
+ oemtoansi$ opencom ord ogl par$ pi postmessage procaddr ptype$ pwd$ readcom$ readini$
+ rgb right$ rnd round rtf savefile$ scankey scrn selectstring sendkey
+ sendmessage sendstring set setactivewindow setbit setcom setcomext
+ setcomtimeouts setfocus shellexec shortname$ showwindow smtp
+ sin single sizeof space$ sqlinit sqr sqrt str$ string$ substr$
+ tab tabchanged tan testbit time$ tmouse toolbar translate$ trim$
+ typeof upper$ usedll val width winerror$ winexec winexecwait word writecom xor + Chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 2, Addr(KeyWord2$))
KeyWord3$ = asmstart asmend asminclude break case casenot caseof continue class def else elseif
+ endif end endselect endproc endwhile endwith errorproc getmessage if ifnot otherwise
+ proc progend rem repeat select struct subproc until waitinput waitkey waitmouse waitscan
+ while whilenot whileloop with + Chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 0, Addr(KeyWord3$))
KeyWord4$ = !input %bitspixel %bmpx %bmpy %button %childmessage %csrlin %cycaption %cymenu %dbdeleted %dbeof %dbfcount
+ %dbfdecs %dbflen %dbfnumber %dbheader %dbmemo %dbrecsize %dbversion %ddewin %desktop
+ %dlgproc %dlgwproc %dos16 %dos32 %errnumber %error %errorlevel %font %ftpconnected %ftpstatus %getcount
+ %getcursel %getfocus %getinputstate %hdc %hdc2 %input %hinstance &hmenu %hwnd %input %ioresult
+ %itemid %key %lastmessage %lfn %linux %matchlen %matchpos %maxx %maxy %mcierror %menuitem
+ %message %mousekey %mousepressed %mousex %mousey %mwnd %notifycode %os2
+ %parcount %pcount %peekmessage %pos %printing %progend %scankey %umessage %win16
+ %win32 %winbottom %winerror %windowstyle %winleft %winright %wintop %winver %wmnotify %wmpaint
+ %wmtimer &bmpcol &dbreccount &dbrecno &gettickcount &input &lastfocus &loop &lparam &memdc ¬ifywnd
+ &pdc &sqlcount &sqldbc &ulparam &uwparam &winproc &windproc &wparam + chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 3, Addr(KeyWord4$))
KeyWord5$ = $dbfname $dbftype $dblupdate $dblupdate4 $dosver $drive $ftpstatus $errfile $errstr
+ $getinput $gettext $input $match $profver $progdir $sqlenv $sqlerror $syspath $tempdir
+ $winpath $winver+chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 4, Addr(KeyWord5$))
Keyword6$=aaa aad aam aas adc add and arpl bound bsf bsr bswap bt btc btr bts call cbw cdq clc cld cli clts
+ cmc cmova cmovb cmovc cmove cmovg cmovl cmovo cmovp cmovs cmovz cmovna cmovnb cmovnc cmovne cmovng cmovnl cmovno
+ cmovnp cmovns cmovnz cmovae cmovbe cmovge cmovle cmovpe cmovpo cmovnae cmovnbe cmovnge cmovnle cmp cmpsb cmpsd cmpsw
+ cmpxchg cmpxchg8B cpuid cwd cwde daa das dec div enter hlt idiv imul in inc insb insd insw int int03 int3 into invd
+ invlpg iret iretd iretw ja jb jc je jg jl jo jp js jz jna jnb jnc jne jng jnl jno jnp jns jnz jae jbe jge jle jpe
+ jpo jnae jnbe jnge jnle jcxz jecxz jmp lahf lar lds lea leave les lfs lgdt lgs lidt lldt lmsw lock lodsb lodsd lodsw
+ loop loope loopne loopnz loopz lsl lss ltr mov movsb movsd movsw movsx movzx mul neg nop not or out outsb outsd outsw
+ pop popa popad popaw popf popfd popfw push pusha pushad pushaw pushf pushfd pushfw rcl rcr rdmsr rdpmc rdtsc rep repe
+ repne repnz repz ret retf retn rol ror sahf sal sar sbb scasb scasd scasw seta setb setc sete setg setl seto setp
+ sets setz setna setnb setnc setne setng setnl setno setnp setns setnz setae setbe setge setle setpe setpo setnae
+ setnbe setnge setnle sgdt shl shld shr shrd sidt sldt smint smintold smsw stc std sti stosb stosd stosw str sub syscall
+ sysenter sysexit sysret test verr verw wait wbinvd wrmsr xadd xchg xlatb xor .186 .286 .386 .486 .586 .686 .8086 .8087
+ .alpha .break .code .const .continue .cref .data .data? .dosseg .else .endif .endw .err .err2 .errb .errdef .errdif
+ .errdifi .erre .erridn .erridni .errnb .errndef .errnz .exit .if .k3d .lall .lfcond .list .listall .listif .listmacro
+ .listmacroall .mmx .model .no87 .nocref .nolist .nolistmacro .radix .repeat .sall .seq .sfcond .stack .startup .tfcond
+ .type .until .untilcxz .while .xall .xcref .xlist .xmm __FILE__ __LINE__ abs alias align assume bits byte byte catstr
+ class code comm comment common data db dd df dosseg dq dt dw dword echo else elseif elseif2 end endif endm endp ends equ
+ even exitm extern externdef extrn for forc fword goto group if if2 ifb ifdef ifdif ifdifi ife ifidn ifidni ifndef include
+ includelib instr invoke irp irpc label macro name option org %out oword page popcontext proc proto public purge
+ pushcontext qword real4 real8 real10 record repeat rept sbyte sdword segment sizestr struc struct substr subtitle
+ subttl sword tbyte textequ title typedef union while word+Chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 5, Addr(KeyWord6$))
Keyword7$=!( %( &( $( add$ add( addchoice and( charset closerw
+ createwindow createtext createedit createmultiedit createdialog createextdialog createvscroll
+ createhscroll createchoicebox createsortedlistbox createlistbox createicon creategroupbox
+ createbutton createdefbutton createcheckbox createradiobutton createfont
+ dbappendblank dbbrowse dbclose dbcreate dbcreateindex dbdelete dbedit dbfind
+ dbget$ dbgetfield dbgetmemo dbgo dbindex dbopen dbpack dbput
+ dbputfield dbputmemo dbputrec dbseek dbsetmemowidth dbundelete dbuse
+ decimals deletechoice div div& equ equ$ filemode goto gosub gt gt$ %lfn lt lt$
+ mod( movelisttochoice movelisttoedit movelisttolist mul neq neq$
+ numwidth or( pow setautopaint seterrorlevel setlfn settruecolor
+ sqlsetnull sqlsetdel strwidth sub( wend+Chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 6, Addr(KeyWord7$))
Keyword8$=setlfn getusage+Chr$(0)
sendMessage(editor_&,~SCI_SETKEYWORDS, 7, Addr(KeyWord8$))
Farben einstellen
editor_farben (editor_&)
Folding einstellem
sendMessage(editor_&,~SCI_SETSTYLEBITS,5)
Par1$ = foldz : Par2$ = 1z
sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
Par1$ = fold.compactz : Par2$ = 0z
sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
Par1$ = fold.commentz : Par2$ = 0z
sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
Par1$ = fold.preproccessorz : Par2$ = 0z
sendMessage(editor_&,~SCI_SETPROPERTY, Addr(Par1$), Addr(Par2$))
sendMessage(editor_&,~SCI_SETMARGINWIDTHN, 2, 0)
sendMessage(editor_&,~SCI_SETMARGINTYPEN,2,~SC_MARGIN_SYMBOL)
sendMessage(editor_&,~SCI_SETMARGINMASKN, 2,~SC_MASK_FOLDERS)
sendMessage(editor_&,~SCI_SETMARGINWIDTHN, 2,20)
Choose folding icon colours
sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDER, $FFFFFF)
sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDER, $FF0000)
sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDEROPEN, $FFFFFF)
sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDEROPEN, $FF0000)
sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDEROPENMID, $FFFFFF)
sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDEROPENMID, $FF0000)
sendMessage(editor_&,~SCI_MARKERSETFORE, ~SC_MARKNUM_FOLDEREND, $FFFFFF)
sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDEREND, $FF0000)
sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDERSUB, $FF0000)
sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDERTAIL, $FF0000)
sendMessage(editor_&,~SCI_MARKERSETBACK, ~SC_MARKNUM_FOLDERMIDTAIL, $FF0000)
sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDER, ~SC_MARK_BOXPLUS) PROC geschlossen
sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDEROPEN, ~SC_MARK_BOXMINUS) PROC geöffnet
sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDEREND, ~SC_MARK_BOXPLUSCONNECTED)
PROC geschlossen innerhalb PROC
sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDERMIDTAIL, ~SC_MARK_TCORNER) ENDPROC innerhalb PROC
sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDEROPENMID, ~SC_MARK_BOXMINUSCONNECTED)
PROC geöffnet innerhalb PROC
sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDERSUB, ~SC_MARK_VLINE) zw. PROC und ENDPROC
sendMessage(editor_&,~SCI_MARKERDEFINE, ~SC_MARKNUM_FOLDERTAIL, ~SC_MARK_LCORNER) ENDPROC
sendMessage(editor_&,~SCI_SETFOLDFLAGS, 16, 0) Draw line below if not expanded
sendMessage(editor_&,~SCI_SETMARGINSENSITIVEN, 2, 1)
Fertig!
ShowWindow(editor_&, 1)
return editor_&
endproc
===================================================================
proc editor_farben
parameters editor_&
Case e_cAktuell& = e_cNormal& : e_cAktuell& = $FFFFFF - e_cNormal&
ALle Farben auf die Standardfarbe setzen
sendmessage(editor_&,~SCI_STYLESETFORE, 32, e_cNormal&)
sendmessage(editor_&,~SCI_STYLESETBACK, 32, e_cPapier&)
sendmessage(editor_&,~SCI_STYLECLEARALL, 0, 0)
If e_cAktuell& <> e_cPapier&
sendmessage(editor_&,~SCI_SETCARETLINEVISIBLE, 1, 0)
sendmessage(editor_&,~SCI_SETCARETLINEBACK, e_cAktuell&,0) Hintergreund aktuelle Zeile
Else
sendmessage(editor_&,~SCI_SETCARETLINEVISIBLE,0,0)
EndIf
Spezielle Farben setzen
sendmessage(editor_&,~SCI_STYLESETFORE, 1, e_cKommentar&) Comment
sendmessage(editor_&,~SCI_STYLESETBOLD, 1, e_cbKommentarChk%)
sendmessage(editor_&,~SCI_STYLESETITALIC, 1, 1)
sendmessage(editor_&,~SCI_STYLESETFORE, 2, e_cZahl&) Number
sendmessage(editor_&,~SCI_STYLESETBOLD, 2, e_cbZahlChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 4, e_cStrings&) Strings
sendmessage(editor_&,~SCI_STYLESETBOLD, 4, e_cbStringsChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 19, e_cStrings&) UnderlineStrings
sendmessage(editor_&,~SCI_STYLESETUNDERLINE, 19, 1) UnderlineStrings
sendmessage(editor_&,~SCI_STYLESETBOLD, 19, 1 - e_cbStringsChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 6, e_cOperator&) Operator
sendmessage(editor_&,~SCI_STYLESETBOLD, 6, e_cbOperatorChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 8, e_cBezeichner&) Variablen
sendmessage(editor_&,~SCI_STYLESETBOLD, 8, e_cbBezeichnerChk%)
XProfan-Sprachumfang in fett
sendmessage(editor_&,~SCI_STYLESETFORE, 5, e_cDirekt&) Direktiven
sendmessage(editor_&,~SCI_STYLESETBOLD, 5, e_cbDirektChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 3, e_cFunktion&) Funktion
sendmessage(editor_&,~SCI_STYLESETBOLD, 3, e_cbFunktionChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 15, e_cSysvar&) Systemvariablen
sendmessage(editor_&,~SCI_STYLESETBOLD, 15, e_cbSysvarChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 10, e_cStruktur&) Struktur
sendmessage(editor_&,~SCI_STYLESETBOLD, 10, e_cbStrukturChk%)
sendmessage(editor_&,~SCI_STYLESETFORE, 11, e_cBefehl&) Befehle
sendmessage(editor_&,~SCI_STYLESETBOLD, 11, e_cbBefehlChk%)
Asseembler
sendmessage(editor_&,~SCI_STYLESETFORE, 14, e_cSysvar&) Systemvariablen
Veraltete Keywords
sendmessage(editor_&,~SCI_STYLESETBACK, 9, $00FFFF) überholt = gelb
sendmessage(editor_&,~SCI_STYLESETBACK, 17, $0000FF) veraltet = rot
sendmessage(editor_&,~SCI_STYLESETFORE, ~STYLE_LINENUMBER, 0)
endproc
================================================================
proc einfuegen_
parameters editor_&
Return sendmessage(editor_&,~SCI_PASTE, 0, 0)
endproc
==========================================================
Proc editloeschen_
parameters editor_&
Return sendmessage(editor_&,~SCI_CLEARALL, 0, 0)
EndProc
========================================================
Proc ausschneiden_
parameters editor_&
Return sendmessage(editor_&,~SCI_CUT, 0, 0)
EndProc
===================================================
Proc kopieren_
parameters editor_&
Return sendmessage(editor_&,~SCI_COPY, 0, 0)
EndProc
===================================================
Proc laden_
Parameters File$,editor_&
Declare Len&, Erg&, BDatei#
Len& = FileSize(File$)
Dim BDatei#, Len& + 1 +1 für abschließendes Null-Byte
BlockRead(File$, BDatei#, 0, Len&)
Byte BDatei#, Len& = 0
sendmessage(editor_&,~SCI_SETTEXT, 0, BDatei#)
sendmessage(editor_&,~SCI_SETSAVEPOINT, 0, 0)
sendmessage(editor_&,~SCI_EMPTYUNDOBUFFER, 0, 0)
Dispose BDatei#
Erg& = 1
Return Erg&
EndProc
===========================================================
Proc speichern_
Parameters File$,editor_&
Declare Len&, BDatei#
len&=sendmessage(editor_&,~SCI_GETLENGTH,0,0)+1
case len&=0:beep
case len&=0:len&=100000
Dim BDatei#,Len&
sendmessage(editor_&,~SCI_GETTEXT, Len&, BDatei#)
BlockWrite File$, BDatei#, 0, Len&
Dispose BDatei#
EndProc
===================================================================
Proc aktuellezeile_
parameters editor_&
Return Int(sendmessage(editor_&,~SCI_LINEFROMPOSITION,sendmessage(editor_&,~SCI_GETCURRENTPOS, 0, 0), 0) + 1)
EndProc
=======================================================
Proc retur_
parameters editor_&
Return sendmessage(editor_&,~SCI_UNDO, 0, 0)
EndProc
======================================================================
Proc GetLine$_
Parameters Nr%,Z$,editor_&
Declare Len%, Zeile#
Dim Zeile#,32767
Len% = .SciMessage(~SCI_GETLINE, Nr%, Zeile#)
Len% = sendmessage(editor_&,~SCI_GETLINE,Nr%,Zeile#)
Z$ = Char$(Zeile#,0,Len%-1)
dispose zeile#
return z$
endproc
========================================================
proc freieditordll_
FreeDLL editordll&
endproc
==============================================================
Proc anzahl_zeilen
parameters editor_&
Return sendmessage(editor_&,~SCI_GETLINECOUNT,0,0)
EndProc
=============================================================
Proc suchmarke
Cursor ganz nach oben
Parameters editor_&,Text$,bWord%,bCase%,Direction%
sendmessage(editor_&,~SCI_GOTOLINE,0,0)
Declare Flag%, ZText$, Erg&, P&
If Direction% = 0
P& = sendmessage(editor_&,~SCI_GETSELECTIONEND, 0, 0)
Else
P& = sendmessage(editor_&,~SCI_GETSELECTIONSTART, 0, 0) - 1
EndIf
sendmessage(editor_&,~SCI_SETSEL, P&, P&)
Case bWord% : Flag% = Flag% + ~SCFIND_WHOLEWORD
Case bCase% : Flag% = Flag% + ~SCFIND_MATCHCASE
sendmessage(editor_&,~SCI_SEARCHANCHOR, 0, 0)
ZText$ = Text$ + chr$(0)
If Direction% = 0
Erg& = sendmessage(editor_&,~SCI_SEARCHNEXT, Flag%, Addr(ZText$))
Else
Erg& = sendmessage(editor_&,~SCI_SEARCHPREV, Flag%, Addr(ZText$))
EndIf
If Erg& <> - 1
if not(sendmessage(editor_&,~SCI_GETLINEVISIBLE, aktuellezeile_(editor_&), 0)) gefaltet
sendmessage(editor_&,~SCI_TOGGLEFOLD, aktuellezeile_(editor_&), 0)
endif
sendmessage(editor_&,~SCI_SETYCARETPOLICY, ~CARET_SLOP, 10)
sendmessage(editor_&,~SCI_SCROLLCARET,0,0)
sendmessage(editor_&,~SCI_SETYCARETPOLICY, ~CARET_EVEN, 0)
EndIf
Return Erg&
EndProc
======================================< =====================
|
| | | | |
|
AnswerTopic-Options | 14.837 Views |
Themeninformationenthis Topic has 4 subscriber: |
|