commit ec7b0c2da93fcf89188cbc438dfa71c54df8ca49 Author: donho Date: Tue Aug 7 00:55:50 2007 +0000 v4.2 ready git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@1 f5eea248-9336-0410-98b8-ebc06183d4e3 diff --git a/PowerEditor/bin/ConvertExt.enc b/PowerEditor/bin/ConvertExt.enc new file mode 100644 index 00000000..f15ec8ad --- /dev/null +++ b/PowerEditor/bin/ConvertExt.enc @@ -0,0 +1,93 @@ + +// this is a comment + +// File structure: +// +// GROUP "Group Name" - language group (Russian, Polish etc.) +// TABLE "Table Name" - encoding table in this group (cp1251 etc.) +// { +// - hex values of your alphabet's symbols +// according to the encoding (codepage) +// } +// + + +// modify this file as you need + + +// EXAMPLE: + +GROUP "Russian..." + + // first TABLE of the GROUP describes + // default (WINDOWS) encoding + +// TABLE "cp1251" + { + E0 E1 E2 E3 E4 E5 B8 E6 E7 E8 // 'a' ... + E9 EA EB EC ED EE EF F0 F1 F2 + F3 F4 F5 F6 F7 F8 F9 FA FB FC + FD FE FF BA BF // + ukrainian [ye:] and [yi:] + C0 C1 C2 C3 C4 C5 A8 C6 C7 C8 // 'A' ... + C9 CA CB CC CD CE CF D0 D1 D2 + D3 D4 D5 D6 D7 D8 D9 DA DB DC + DD DE DF AA AF // + ukrainian [Ye:] and [Yi:] + } + + // second, third etc. TABLE of the GROUP describes + // additional encodings particular to the GROUP + // (to your language/alphabet) + +// TABLE "cp866" + { + A0 A1 A2 A3 A4 A5 F1 A6 A7 A8 // 'a' ... + A9 AA AB AC AD AE AF E0 E1 E2 + E3 E4 E5 E6 E7 E8 E9 EA EB EC + ED EE EF F3 F5 // + ukrainian [ye:] and [yi:] + 80 81 82 83 84 85 F0 86 87 88 // 'A' ... + 89 8A 8B 8C 8D 8E 8F 90 91 92 + 93 94 95 96 97 98 99 9A 9B 9C + 9D 9E 9F F2 F4 // + ukrainian [Ye:] and [Yi:] + } + +// TABLE "iso8859-5" + { + D0 D1 D2 D3 D4 D5 F1 D6 D7 D8 // 'a' ... + D9 DA DB DC DD DE DF E0 E1 E2 + E3 E4 E5 E6 E7 E8 E9 EA EB EC + ED EE EF F3 F4 // + ukrainian [ye:] and [yi:] + B0 B1 B2 B3 B4 B5 A1 B6 B7 B8 // 'A' ... + B9 BA BB BC BD BE BF C0 C1 C2 + C3 C4 C5 C6 C7 C8 C9 CA CB CC + CD CE CF A3 A4 // + ukrainian [Ye:] and [Yi:] + } + + TABLE "Default" + { + "àáâãäå¸æçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + "ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß" + "1234567890" + } + + TABLE "Reversed" + { + "ÿþýüûúùø÷öõôóòñðïîíìëêéèçæ¸åäãâáà" + "ßÞÝÜÛÚÙØ×ÖÕÔÓÒÑÐÏÎÍÌËÊÉÈÇƨÅÄÃÂÁÀ" + "0987654321" + } + +GROUP "Latin..." + + TABLE "Default" // original latin alphabet + { + "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "1234567890" + } + + TABLE "Reversed" // latin alphabet in a reverse order + { + "zyxwvutsrqponmlkjihgfedcba" + "ZYXWVUTSRQPONMLKJIHGFEDCBA" + "0987654321" + } diff --git a/PowerEditor/bin/ConvertExt.ini b/PowerEditor/bin/ConvertExt.ini new file mode 100644 index 00000000..9006dd9a --- /dev/null +++ b/PowerEditor/bin/ConvertExt.ini @@ -0,0 +1,2 @@ +[Options] +plug_f=0000 diff --git a/PowerEditor/bin/ConvertExt.lng b/PowerEditor/bin/ConvertExt.lng new file mode 100644 index 00000000..306ae189 --- /dev/null +++ b/PowerEditor/bin/ConvertExt.lng @@ -0,0 +1,14 @@ + +[Symbols] + +;default symbols (english) +SymbL0=`1234567890-=\qwertyuiop[]asdfghjkl;'zxcvbnm,./ +SymbH0=~!@#$%^&*()_+|QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>? + +;alternative symbols 1 (user_1) (F9) +SymbL1=¸1234567890-=\éöóêåíãøùçõúôûâàïðîëäæýÿ÷ñìèòüáþ. +SymbH1=¨!"¹;%:?*()_+/ÉÖÓÊÅÍÃØÙÇÕÚÔÛÂÀÏÐÎËÄÆÝß×ÑÌÈÒÜÁÞ, + +;alternative symbols 2 (user_2) (Alt+F9) +SymbL2='1234567890-=\éöóêåíãøùçõ¿ôiâàïðîëäæºÿ÷ñìèòüáþ. +SymbH2='!"¹;%:?*()_+/ÉÖÓÊÅÍÃØÙÇÕ¯ÔIÂÀÏÐÎËÄƪß×ÑÌÈÒÜÁÞ, diff --git a/PowerEditor/bin/LINEDRAW.TTF b/PowerEditor/bin/LINEDRAW.TTF new file mode 100644 index 00000000..5f57f844 Binary files /dev/null and b/PowerEditor/bin/LINEDRAW.TTF differ diff --git a/PowerEditor/bin/QuickText.ini b/PowerEditor/bin/QuickText.ini new file mode 100644 index 00000000..eb353678 --- /dev/null +++ b/PowerEditor/bin/QuickText.ini @@ -0,0 +1,88 @@ +[2] +case=case $: $\n$ +def=#define $\n$ +default=default $: $\n$ +dowhile=do\n{\n $\n}\nwhile ($);\n$ +dowhiles=do\n $\nwhile ($);\n$ +else=else\n{\n $\n}\n$ +elseif=else if ($)\n{\n $\n}\n$ +elseifs=else if ($)\n $\n$ +elses=else\n $\n$ +for=for ($;$;$)\n{\n $\n}\n$ +fors=for ($;$;$)\n $\n$ +func=$ $($)\n{\n $\n return $;\n}\n$ +if=if ($)\n{\n $\n}\n$ +ifelse=if ($)\n{\n $\n}\nelse\n{\n $\n}\n$ +ifelses=if ($)\n{\n $\n}\nelse\n $\n$ +ifs=if ($)\n $\n$ +ifselse=if ($)\n $\nelse\n{\n $\n}\n$ +ifselses=if ($)\n $\nelse\n $\n$ +inc=#include <$>\n$ +incl=#include "$"\n$ +main=int main(int argc, char* argv[])\n{\n $\n}\n +switch=switch ($)\n{\n $\n}\n$ +while=while ($)\n{\n $\n}\n$ +whiles=while ($)\n $\n$ +[3] +case=case $: $\n$ +class=class $ {\nprivate:\n $\nprotected:\n $\npublic:\n $\n};\n$ +def=#define $\n$ +default=default $: $\n$ +dowhile=do\n{\n $\n}\nwhile ($);\n$ +dowhiles=do\n $\nwhile ($);\n$ +else=else\n{\n $\n}\n$ +elseif=else if ($)\n{\n $\n}\n$ +elseifs=else if ($)\n $\n$ +elses=else\n $\n$ +for=for ($;$;$)\n{\n $\n}\n$ +fors=for ($;$;$)\n $\n$ +func=$ $($)\n{\n $\n return $;\n}\n$ +hclass=#ifndef $\n#define $\n\nclass $ {\nprivate:\n $\nprotected:\n $\npublic:\n $\n};\n\n#endif\n$ +if=if ($)\n{\n $\n}\n$ +ifelse=if ($)\n{\n $\n}\nelse\n{\n $\n}\n$ +ifelses=if ($)\n{\n $\n}\nelse\n $\n$ +ifs=if ($)\n $\n$ +ifselse=if ($)\n $\nelse\n{\n $\n}\n$ +ifselses=if ($)\n $\nelse\n $\n$ +inc=#include <$>\n$ +incl=#include "$"\n$ +main=int main(int argc, char* argv[])\n{\n $\n}\n +switch=switch ($)\n{\n $\n}\n$ +while=while ($)\n{\n $\n}\n$ +whiles=while ($)\n $\n$ +[8] +b=$$ +black=#000000 +blue=#0000FF +body=\n $\n\n$ +comment=\n$ +cyan=#00FFFF +form=
\n $\n
\n$ +green=#00FF00 +grey=#C0C0C0 +h1=

$

\n$ +h2=

$

\n$ +h3=

$

\n$ +h4=

$

\n$ +h5=
$
\n$ +h6=
$
\n$ +head=\n $\n\n$ +html=\n \n $\n $\n \n \n $\n \n\n$ +i=$$ +img=$\n$ +input=\n$ +li=
  • $
  • \n$ +link=$$ +mangenta=#FF00FF +ol=
      \n
    1. $
    2. \n $\n
    \n$ +p=

    $

    \n$ +pre=
    $
    \n$ +red=#FF0000 +span=$$ +table=\n \n \n $\n \n $\n
    $
    \n$ +td=$\n$ +title=$\n$ +tr=\n $\n\n$ +ul=\n$ +white=#FFFFFF +yellow=#FFFF00 diff --git a/PowerEditor/bin/SciLexer.dll b/PowerEditor/bin/SciLexer.dll new file mode 100644 index 00000000..a4c4a26f Binary files /dev/null and b/PowerEditor/bin/SciLexer.dll differ diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log new file mode 100644 index 00000000..98d77040 --- /dev/null +++ b/PowerEditor/bin/change.log @@ -0,0 +1,20 @@ +v4.2 fixed bugs and added features (from v4.1.2) : + +1. Fix the dockable dialog drag and drop problem under vista. +2. Add Column mode edition feature (Menu "Edit->Column Editor..."). +3. Fixed "To UPPER/lower case" bug in column mode. +4. Fix the display bug in User language define dialog. +5. Add new feature which backups files in a user specific directory. + + +Plugins included in v4.2 : + +1. TexFX v0.24a +2. Function list v1.2 +3. ConvertExt v1.1 +4. NppExec v0.2 beta 3 +5. Spell checker v1.1 +6. Quick text v0.02 +7. Explorer v1.4 +8. Hex editor v0.84 + diff --git a/PowerEditor/bin/config.xml b/PowerEditor/bin/config.xml new file mode 100644 index 00000000..35111dbe --- /dev/null +++ b/PowerEditor/bin/config.xml @@ -0,0 +1,77 @@ + + + + + standard + + show + + + + vertical + + hide + + + + + + + + yes + no + no + yes + + + + + + + + yes + no + + + + + + + diff --git a/PowerEditor/bin/contextMenu.xml b/PowerEditor/bin/contextMenu.xml new file mode 100644 index 00000000..2d42b4b6 --- /dev/null +++ b/PowerEditor/bin/contextMenu.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PowerEditor/bin/doLocalConf.xml b/PowerEditor/bin/doLocalConf.xml new file mode 100644 index 00000000..e69de29b diff --git a/PowerEditor/bin/insertExt.ini b/PowerEditor/bin/insertExt.ini new file mode 100644 index 00000000..2eeee4f8 --- /dev/null +++ b/PowerEditor/bin/insertExt.ini @@ -0,0 +1,6 @@ +[Function List] +Show all functions=0 +Sort by names=0 +showCmd=0 +[User Languages] +Count User Languages=0 diff --git a/PowerEditor/bin/langs.xml b/PowerEditor/bin/langs.xml new file mode 100644 index 00000000..2aa5e7ad --- /dev/null +++ b/PowerEditor/bin/langs.xml @@ -0,0 +1,247 @@ + + + + + + if else switch case default break goto return for while do continue typedef sizeof NULL + void struct union enum char short int long double float signed unsigned const static extern auto register volatile + + + + if else switch case default break goto return for while do continue typedef sizeof NULL new delete throw try catch namespace operator this const_cast static_cast dynamic_cast reinterpret_cast true false using typeid and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq + void struct union enum char short int long double float signed unsigned const static extern auto register volatile bool class private protected public friend inline template virtual asm explicit typename + a addindex addtogroup anchor arg attention author b brief bug c class code date def defgroup deprecated dontinclude e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception f$ f[ f] file fn hideinitializer htmlinclude htmlonly if image include ingroup internal invariant interface latexonly li line link mainpage name namespace nosubgrouping note overload p page par param post preref relates remarks return retval sa section see showinitializer since skip skipline struct subsection test throw throws todo typedef union until var verbatim verbinclude version warning weakgroup $ @ \ & < > # { } + + + + instanceof assert if else switch case default break goto return for while do continue new throw throws try catch finally this super extends implements import true false null + package transient strictfp void char short int long double float const static volatile byte boolean class interface native private protected public final abstract synchronized enum + + + + ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON BEGIN BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX DISCARDABLE EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE LISTBOX LTEXT MENU MENUEX MENUITEM MESSAGETABLE POPUP PUSHBUTTON RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY + + + + abstract as base break case catch checked continue default delegate do else event explicit extern false finally fixed for foreach goto if implicit in interface internal is lock namespace new null object operator out override params private protected public readonly ref return sealed sizeof stackalloc switch this throw true try typeof unchecked unsafe using virtual while + bool byte char class const decimal double enum float int long sbyte short static string struct uint ulong ushort void + + + + after append array auto_execok auto_import auto_load auto_load_index auto_qualify beep binary break case catch cd clock close concat continue dde default echo else elseif encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent flush for foreach format gets glob global history if incr info interp join lappend lindex linsert list llength load lrange lreplace lsearch lsort namespace open package pid pkg_mkIndex proc puts pwd read regexp regsub rename resource return scan seek set socket source split string subst switch tclLog tclMacPkgSearch tclPkgSetup tclPkgUnknown tell time trace unknown unset update uplevel upvar variable vwait while + bell bind bindtags button canvas checkbutton console destroy entry event focus font frame grab grid image label listbox menu menubutton message pack place radiobutton raise scale scrollbar text tk tkwait toplevel winfo wm + @scope body class code common component configbody constructor define destructor hull import inherit itcl itk itk_component itk_initialize itk_interior itk_option iwidgets keep method private protected public + tkButtonDown tkButtonEnter tkButtonInvoke tkButtonLeave tkButtonUp tkCancelRepeat tkCheckRadioInvoke tkDarken tkEntryAutoScan tkEntryBackspace tkEntryButton1 tkEntryClosestGap tkEntryInsert tkEntryKeySelect tkEntryMouseSelect tkEntryNextWord tkEntryPaste tkEntryPreviousWord tkEntrySeeInsert tkEntrySetCursor tkEntryTranspose tkEventMotifBindings tkFDGetFileTypes tkFirstMenu tkFocusGroup_Destroy tkFocusGroup_In tkFocusGroup_Out tkFocusOK tkListboxAutoScan tkListboxBeginExtend tkListboxBeginSelect tkListboxBeginToggle tkListboxCancel tkListboxDataExtend tkListboxExtendUpDown tkListboxMotion tkListboxSelectAll tkListboxUpDown tkMbButtonUp tkMbEnter tkMbLeave tkMbMotion tkMbPost tkMenuButtonDown tkMenuDownArrow tkMenuDup tkMenuEscape tkMenuFind tkMenuFindName tkMenuFirstEntry tkMenuInvoke tkMenuLeave tkMenuLeftArrow tkMenuMotion tkMenuNextEntry tkMenuNextMenu tkMenuRightArrow tkMenuUnpost tkMenuUpArrow tkMessageBox tkPostOverPoint tkRecolorTree tkRestoreOldGrab tkSaveGrabInfo tkScaleActivate tkScaleButton2Down tkScaleButtonDown tkScaleControlPress tkScaleDrag tkScaleEndDrag tkScaleIncrement tkScreenChanged tkScrollButton2Down tkScrollButtonDown tkScrollButtonUp tkScrollByPages tkScrollByUnits tkScrollDrag tkScrollEndDrag tkScrollSelect tkScrollStartDrag tkScrollToPos tkScrollTopBottom tkTabToWindow tkTearOffMenu tkTextAutoScan tkTextButton1 tkTextClosestGap tkTextInsert tkTextKeyExtend tkTextKeySelect tkTextNextPara tkTextNextPos tkTextNextWord tkTextPaste tkTextPrevPara tkTextPrevPos tkTextResetAnchor tkTextScrollPages tkTextSelectTo tkTextSetCursor tkTextTranspose tkTextUpDownLine tkTraverseToMenu tkTraverseWithinMenu tk_bisque tk_chooseColor tk_dialog tk_focusFollowsMouse tk_focusNext tk_focusPrev tk_getOpenFile tk_getSaveFile tk_messageBox tk_optionMenu tk_popup tk_setPalette tk_textCopy tk_textCut tk_textPaste + + + + if else switch case default break goto return for while do continue typedef sizeof NULL self super nil NIL + interface implementation protocol end private protected public class selector encode defs + void struct union enum char short int long double float signed unsigned const static extern auto register volatile id Class SEL IMP BOOL + oneway in out inout bycopy byref + + + + aaa aad aam aas adc add and call cbw clc cld cli cmc cmp cmps cmpsb cmpsw cwd daa das dec div esc hlt idiv imul in inc int into iret ja jae jb jbe jc jcxz je jg jge jl jle jmp jna jnae jnb jnbe jnc jne jng jnge jnl jnle jno jnp jns jnz jo jp jpe jpo js jz lahf lds lea les lods lodsb lodsw loop loope loopew loopne loopnew loopnz loopnzw loopw loopz loopzw mov movs movsb movsw mul neg nop not or out pop popf push pushf rcl rcr ret retf retn rol ror sahf sal sar sbb scas scasb scasw shl shr stc std sti stos stosb stosw sub test wait xchg xlat xlatb xor bound enter ins insb insw leave outs outsb outsw popa pusha pushw arpl lar lsl sgdt sidt sldt smsw str verr verw clts lgdt lidt lldt lmsw ltr bsf bsr bt btc btr bts cdq cmpsd cwde insd iretd iretdf iretf jecxz lfs lgs lodsd loopd looped loopned loopnzd loopzd lss movsd movsx movzx outsd popad popfd pushad pushd pushfd scasd seta setae setb setbe setc sete setg setge setl setle setna setnae setnb setnbe setnc setne setng setnge setnl setnle setno setnp setns setnz seto setp setpe setpo sets setz shld shrd stosd bswap cmpxchg invd invlpg wbinvd xadd lock rep repe repne repnz repz cflush cpuid emms femms cmovo cmovno cmovb cmovc cmovnae cmovae cmovnb cmovnc cmove cmovz cmovne cmovnz cmovbe cmovna cmova cmovnbe cmovs cmovns cmovp cmovpe cmovnp cmovpo cmovl cmovnge cmovge cmovnl cmovle cmovng cmovg cmovnle cmpxchg486 cmpxchg8b loadall loadall286 ibts icebp int1 int3 int01 int03 iretw popaw popfw pushaw pushfw rdmsr rdpmc rdshr rdtsc rsdc rsldt rsm rsts salc smi smint smintold svdc svldt svts syscall sysenter sysexit sysret ud0 ud1 ud2 umov xbts wrmsr wrshr + f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcom fcomp fcompp fdecstp fdisi fdiv fdivp fdivr fdivrp feni ffree fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisub fisubr fld fld1 fldcw fldenv fldenvw fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnsavew fnstcw fnstenv fnstenvw fnstsw fpatan fprem fptan frndint frstor frstorw fsave fsavew fscale fsqrt fst fstcw fstenv fstenvw fstp fstsw fsub fsubp fsubr fsubrp ftst fwait fxam fxch fxtract fyl2x fyl2xp1 fsetpm fcos fldenvd fnsaved fnstenvd fprem1 frstord fsaved fsin fsincos fstenvd fucom fucomp fucompp fcomi fcomip ffreep fcmovb fcmove fcmovbe fcmovu fcmovnb fcmovne fcmovnbe fcmovnu + ah al ax bh bl bp bx ch cl cr0 cr2 cr3 cr4 cs cx dh di dl dr0 dr1 dr2 dr3 dr6 dr7 ds dx eax ebp ebx ecx edi edx es esi esp fs gs si sp ss st tr3 tr4 tr5 tr6 tr7 st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 + .186 .286 .286c .286p .287 .386 .386c .386p .387 .486 .486p .8086 .8087 .alpha .break .code .const .continue .cref .data .data? .dosseg .else .elseif .endif .endw .err .err1 .err2 .errb .errdef .errdif .errdifi .erre .erridn .erridni .errnb .errndef .errnz .exit .fardata .fardata? .if .lall .lfcond .list .listall .listif .listmacro .listmacroall .model .no87 .nocref .nolist .nolistif .nolistmacro .radix .repeat .sall .seq .sfcond .stack .startup .tfcond .type .until .untilcxz .while .xall .xcref .xlist alias align assume catstr comm comment db dd df dosseg dq dt dup dw echo else elseif elseif1 elseif2 elseifb elseifdef elseifdif elseifdifi elseife elseifidn elseifidni elseifnb elseifndef end endif endm endp ends eq equ even exitm extern externdef extrn for forc ge goto group gt high highword if if1 if2 ifb ifdef ifdif ifdifi ife ifidn ifidni ifnb ifndef include includelib instr invoke irp irpc label le length lengthof local low lowword lroffset lt macro mask mod .msfloat name ne offset opattr option org %out page popcontext proc proto ptr public purge pushcontext record repeat rept seg segment short size sizeof sizestr struc struct substr subtitle subttl textequ this title type typedef union while width db dw dd dq dt resb resw resd resq rest incbin equ times %define %idefine %xdefine %xidefine %undef %assign %iassign %strlen %substr %macro %imacro %endmacro %rotate .nolist %if %elif %else %endif %ifdef %ifndef %elifdef %elifndef %ifmacro %ifnmacro %elifmacro %elifnmacro %ifctk %ifnctk %elifctk %elifnctk %ifidn %ifnidn %elifidn %elifnidn %ifidni %ifnidni %elifidni %elifnidni %ifid %ifnid %elifid %elifnid %ifstr %ifnstr %elifstr %elifnstr %ifnum %ifnnum %elifnum %elifnnum %error %rep %endrep %exitrep %include %push %pop %repl struct endstruc istruc at iend align alignb %arg %stacksize %local %line bits use16 use32 section absolute extern global common cpu org section group import export + $ ? @b @f addr basic byte c carry? dword far far16 fortran fword near near16 overflow? parity? pascal qword real4 real8 real10 sbyte sdword sign? stdcall sword syscall tbyte vararg word zero? flat near32 far32 abs all assumes at casemap common compact cpu dotname emulator epilogue error export expr16 expr32 farstack flat forceframe huge language large listing ljmp loadds m510 medium memory nearstack nodotname noemulator nokeyword noljmp nom510 none nonunique nooldmacros nooldstructs noreadonly noscoped nosignextend nothing notpublic oldmacros oldstructs os_dos para private prologue radix readonly req scoped setif2 smallstack tiny use16 use32 uses a16 a32 o16 o32 byte word dword nosplit $ $$ seq wrt flat large small .text .data .bss near far %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 + addpd addps addsd addss andpd andps andnpd andnps cmpeqpd cmpltpd cmplepd cmpunordpd cmpnepd cmpnltpd cmpnlepd cmpordpd cmpeqps cmpltps cmpleps cmpunordps cmpneps cmpnltps cmpnleps cmpordps cmpeqsd cmpltsd cmplesd cmpunordsd cmpnesd cmpnltsd cmpnlesd cmpordsd cmpeqss cmpltss cmpless cmpunordss cmpness cmpnltss cmpnless cmpordss comisd comiss cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtpi2ps cvtps2dq cvtps2pd cvtps2pi cvtss2sd cvtss2si cvtsd2si cvtsd2ss cvtsi2sd cvtsi2ss cvttpd2dq cvttpd2pi cvttps2dq cvttps2pi cvttsd2si cvttss2si divpd divps divsd divss fxrstor fxsave ldmxscr lfence mfence maskmovdqu maskmovdq maxpd maxps paxsd maxss minpd minps minsd minss movapd movaps movdq2q movdqa movdqu movhlps movhpd movhps movd movq movlhps movlpd movlps movmskpd movmskps movntdq movnti movntpd movntps movntq movq2dq movsd movss movupd movups mulpd mulps mulsd mulss orpd orps packssdw packsswb packuswb paddb paddsb paddw paddsw paddd paddsiw paddq paddusb paddusw pand pandn pause paveb pavgb pavgw pavgusb pdistib pextrw pcmpeqb pcmpeqw pcmpeqd pcmpgtb pcmpgtw pcmpgtd pf2id pf2iw pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pmachriw pmaddwd pmagw pmaxsw pmaxub pminsw pminub pmovmskb pmulhrwc pmulhriw pmulhrwa pmulhuw pmulhw pmullw pmuludq pmvzb pmvnzb pmvlzb pmvgezb pfnacc pfpnacc por prefetch prefetchw prefetchnta prefetcht0 prefetcht1 prefetcht2 pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pf2iw pinsrw psadbw pshufd pshufhw pshuflw pshufw psllw pslld psllq pslldq psraw psrad psrlw psrld psrlq psrldq psubb psubw psubd psubq psubsb psubsw psubusb psubusw psubsiw pswapd punpckhbw punpckhwd punpckhdq punpckhqdq punpcklbw punpcklwd punpckldq punpcklqdq pxor rcpps rcpss rsqrtps rsqrtss sfence shufpd shufps sqrtpd sqrtps sqrtsd sqrtss stmxcsr subpd subps subsd subss ucomisd ucomiss unpckhpd unpckhps unpcklpd unpcklps xorpd xorps + + + + !doctype a abbr accept-charset accept accesskey acronym action address align alink alt applet archive area axis b background base basefont bdo bgcolor big blockquote body border br button caption cellpadding cellspacing center char charoff charset checkbox checked cite class classid clear code codebase codetype col colgroup color cols colspan compact content coords data datafld dataformatas datapagesize datasrc datetime dd declare defer del dfn dir disabled div dl dt em enctype event face fieldset file font for form frame frameborder frameset h1 h2 h3 h4 h5 h6 head headers height hidden hr href hreflang hspace html http-equiv i id iframe image img input ins isindex ismap kbd label lang language leftmargin legend li link longdesc map marginwidth marginheight maxlength media menu meta method multiple name noframes nohref noresize noscript noshade nowrap object ol onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseover onmouseout onmouseup optgroup option onreset onselect onsubmit onunload p param password profile pre prompt public q radio readonly rel reset rev rows rowspan rules s samp scheme scope script select selected shape size small span src standby start strike strong style sub submit summary sup tabindex table target tbody td text textarea tfoot th thead title topmargin tr tt type u ul usemap valign value valuetype var version vlink vspace width xml xmlns + + + + abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with true false prototype + + + + and or xor __file__ __line__ array as break case cfunction class const continue declare default die do echo else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval exit extends for foreach function global if include include_once isset list new old_function print require require_once return static switch unset use var while __function__ __class__ php_version php_os default_include_path pear_install_dir pear_extension_dir php_extension_dir php_bindir php_libdir php_datadir php_sysconfdir php_localstatedir php_config_file_path php_output_handler_start php_output_handler_cont php_output_handler_end e_error e_warning e_parse e_notice e_core_error e_core_warning e_compile_error e_compile_warning e_user_error e_user_warning e_user_notice e_all true false bool boolean int integer float double real string array object resource null class extends parent stdclass directory __sleep __wakeup interface implements abstract public protected private + + + + addhandler addressof andalso alias and ansi as assembly attribute auto begin boolean byref byte byval call case catch cbool cbyte cchar cdate cdec cdbl char cint class clng cobj compare const continue cshort csng cstr ctype currency date decimal declare default delegate dim do double each else elseif end enum erase error event exit explicit false finally for friend function get gettype global gosub goto handles if implement implements imports in inherits integer interface is let lib like load long loop lset me mid mod module mustinherit mustoverride mybase myclass namespace new next not nothing notinheritable notoverridable object on option optional or orelse overloads overridable overrides paramarray preserve private property protected public raiseevent readonly redim rem removehandler rset resume return select set shadows shared short single static step stop string structure sub synclock then throw to true try type typeof unload unicode until variant wend when while with withevents writeonly xor + + + + abs absolute access acos add add_months adddate admin after aggregate all allocate alter and any app_name are array as asc ascii asin assertion at atan atn2 audit authid authorization autonomous_transaction avg before begin benchmark between bfilename bin binary binary_checksum binary_integer bit bit_count bit_and bit_or blob body boolean both breadth bulk by call cascade cascaded case cast catalog ceil ceiling char char_base character charindex chartorowid check checksum checksum_agg chr class clob close cluster coalesce col_length col_name collate collation collect column comment commit completion compress concat concat_ws connect connection constant constraint constraints constructorcreate contains containsable continue conv convert corr corresponding cos cot count count_big covar_pop covar_samp create cross cube cume_dist current current_date current_path current_role current_time current_timestamp current_user currval cursor cycle data datalength databasepropertyex date date_add date_format date_sub dateadd datediff datename datepart day db_id db_name deallocate dec declare decimal decode default deferrable deferred degrees delete dense_rank depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary disconnect difference distinct do domain double drop dump dynamic each else elsif empth encode encrypt end end-exec equals escape every except exception exclusive exec execute exists exit exp export_set extends external extract false fetch first first_value file float floor file_id file_name filegroup_id filegroup_name filegroupproperty fileproperty for forall foreign format formatmessage found freetexttable from from_days fulltextcatalog fulltextservice function general get get_lock getdate getansinull getutcdate global go goto grant greatest group grouping having heap hex hextoraw host host_id host_name hour ident_incr ident_seed ident_current identified identity if ifnull ignore immediate in increment index index_col indexproperty indicator initcap initial initialize initially inner inout input insert instr instrb int integer interface intersect interval into is is_member is_srvrolemember is_null is_numeric isdate isnull isolation iterate java join key lag language large last last_day last_value lateral lcase lead leading least left len length lengthb less level like limit limited ln lpad local localtime localtimestamp locator lock log log10 long loop lower ltrim make_ref map match max maxextents mid min minus minute mlslabel mod mode modifies modify module month months_between names national natural naturaln nchar nclob new new_time newid next next_day nextval no noaudit nocompress nocopy none not nowait null nullif number number_base numeric nvl nvl2 object object_id object_name object_property ocirowid oct of off offline old on online only opaque open operator operation option or ord order ordinalityorganization others out outer output package pad parameter parameters partial partition path pctfree percent_rank pi pls_integer positive positiven postfix pow power pragma precision prefix preorder prepare preserve primary prior private privileges procedure public radians raise rand range rank ratio_to_export raw rawtohex read reads real record recursive ref references referencing reftohex relative release release_lock rename repeat replace resource restrict result return returns reverse revoke right rollback rollup round routine row row_number rowid rowidtochar rowlabel rownum rows rowtype rpad rtrim savepoint schema scroll scope search second section seddev_samp select separate sequence session session_user set sets share sign sin sinh size smallint some soundex space specific specifictype sql sqlcode sqlerrm sqlexception sqlstate sqlwarning sqrt start state statement static std stddev stdev_pop strcmp structure subdate substr substrb substring substring_index subtype successful sum synonym sys_context sys_guid sysdate system_user table tan tanh temporary terminate than then time timestamp timezone_abbr timezone_minute timezone_hour timezone_region to to_char to_date to_days to_number to_single_byte trailing transaction translate translation treat trigger trim true trunc truncate type ucase uid under union unique unknown unnest update upper usage use user userenv using validate value values var_pop var_samp varchar varchar2 variable variance varying view vsize when whenever where with without while with work write year zone + + + + NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD BEGIN CORE DESTROY END EQ GE GT INIT LE LT NE CHECK abs accept alarm and atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir cmp connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eq eval exec exists exit exp fcntl fileno flock for foreach fork format formline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst le length link listen local localtime lock log lstat lt m map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q qq qr quotemeta qu qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir s scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn while write x xor y + + + + and as assert break class continue def del elif else except exec finally for from global if import in is lambda None not or pass print raise return triple try while with yield + + + + and array asm begin case cdecl class const constructor default destructor div do downto else end end. except exit exports external far file finalization finally for function goto if implementation in index inherited initialization inline interface label library message mod near nil not object of on or out overload override packed pascal private procedure program property protected public published raise read record register repeat resourcestring safecall set shl shr stdcall stored string then threadvar to try type unit until uses var virtual while with write xor + + + + rem set if else exist errorlevel for in do break call chcp cd chdir choice cls country ctty date del erase dir echo exit goto loadfix loadhigh mkdir md move path pause prompt rename ren rmdir rd shift time type ver verify vol com con lpt nul defined not errorlevel cmdextversion + + + + + + + addhandler addressof andalso alias and ansi as assembly attribute auto begin boolean byref byte byval call case catch cbool cbyte cchar cdate cdec cdbl char cint class clng cobj compare const continue cshort csng cstr ctype currency date decimal declare default delegate dim do double each else elseif end enum erase error event exit explicit false finally for friend function get gettype global gosub goto handles if implement implements imports in inherits integer interface is let lib like load long loop lset me mid mod module mustinherit mustoverride mybase myclass namespace new next not nothing notinheritable notoverridable object on option optional or orelse overloads overridable overrides paramarray preserve private property protected public raiseevent readonly redim rem removehandler rset resume return select set shadows shared short single static step stop string structure sub synclock then throw to true try type typeof unload unicode until variant wend when while with withevents writeonly xor + + + + + + + + + + + + + + + + azimuth background background-attachment background-color background-image background-position background-repeat border border-bottom border-bottom-color border-bottom-style border-bottom-width border-collapse border-color border-left border-left-color border-left-style border-left-width border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-style border-top-width border-width bottom caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor direction display elevation empty-cells float font font-family font-size font-size-adjust font-stretch font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top marker-offset marks max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-bottom padding-left padding-right padding-top page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes richness right size speak speak-header speak-numeral speak-ponctuation speech-rate stress table-layout text-align text-decoration text-indent text-shadow text-transform top unicode-bidi vertical-align visibility voice-family volume white-space widows width word-spacing z-index + active after before first first-child first-letter first-line focus hover lang left link right visited + + + + and break do else elseif end false for function if in local nil not or repeat return then true until while + _VERSION assert collectgarbage dofile error gcinfo loadfile loadstring print tonumber tostring type unpack _ALERT _ERRORMESSAGE _INPUT _PROMPT _OUTPUT _STDERR _STDIN _STDOUT call dostring foreach foreachi getn globals newtype rawget rawset require sort tinsert tremove _G getfenv getmetatable ipairs loadlib next pairs pcall rawegal rawget rawset require setfenv setmetatable xpcall string table math coroutine io os debug + abs acos asin atan atan2 ceil cos deg exp floor format frexp gsub ldexp log log10 max min mod rad random randomseed sin sqrt strbyte strchar strfind strlen strlower strrep strsub strupper tan string.byte string.char string.dump string.find string.len string.lower string.rep string.sub string.upper string.format string.gfind string.gsub table.concat table.foreach table.foreachi table.getn table.sort table.insert table.remove table.setn math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod math.pi math.rad math.random math.randomseed math.sin math.sqrt math.tan + openfile closefile readfrom writeto appendto remove rename flush seek tmpfile tmpname read write clock date difftime execute exit getenv setlocale time coroutine.create coroutine.resume coroutine.status coroutine.wrap coroutine.yield io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write io.stdin io.stdout io.stderr os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpname + + + + Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirShow DirText DirVar DirVerify DisabledBitmap EnabledBitmap EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileSeek FileWrite FileWriteByte FindClose FindFirst FindNext FindWindow FlushINI Function FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LangStringUP LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText MessageBox MiscButtonText Name OutFile Page PageEx PageExEnd PluginDir Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath Section SectionDivider SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroup SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressionLevel SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetShellVarContext SetSilent SetStaticBkColor ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubSection SubSectionEnd UninstallButtonText UninstallCaption UninstallEXEName UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle !AddIncludeDir !AddPluginDir !appendfile !cd !define !delfile !echo !else !endif !error !execute !ifdef !ifmacrodef !ifmacrondef !ifndef !include !insertmacro !macro !macroend !packhdr !system !tempfile !undef !verbose !warning + $0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $R0 $R1 $R2 $R3 $R4 $R5 $R6 $R7 $R8 $R9 $APPDATA $CMDLINE $DESKTOP $EXEDIR $HWNDPARENT $INSTDIR $OUTDIR $PROGRAMFILES ${NSISDIR} $\n $\r $QUICKLAUNCH $SMPROGRAMS $SMSTARTUP $STARTMENU $SYSDIR $TEMP $WINDIR + ARCHIVE FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM FILE_ATTRIBUTE_TEMPORARY HIDDEN HKCC HKCR HKCU HKDD HKEY_CLASSES_ROOT HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_DYN_DATA HKEY_LOCAL_MACHINE HKEY_PERFORMANCE_DATA HKEY_USERS HKLM HKPD HKU IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES MB_ABORTRETRYIGNORE MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP MB_OK MB_OKCANCEL MB_RETRYCANCEL MB_RIGHT MB_SETFOREGROUND MB_TOPMOST MB_YESNO MB_YESNOCANCEL NORMAL OFFLINE READONLY SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWNORMAL SYSTEM TEMPORARY auto colored false force hide ifnewer nevershow normal off on show silent silentlog smooth true try + + + + + + + + add for lt tellTarget and function ne this break ge new typeof continue gt not var delete if on void do ifFrameLoaded onClipEvent while else in or with eq le return instanceof case default switch + arguments constructor class dynamic false extends implements import interface intrinsic newline null private public super static true undefined Accessibility Arguments Array Boolean Button Camera ContextMenu ContextMenuItem CustomActions Color Date Error Function Key LoadVars LocalConnection Math Microphone Mouse MovieClip MovieClipLoader NetConnection NetStream Number PrintJob Object TextField StyleSheet TextFormat TextSnapshot SharedObject Selection Sound Stage String System XML XMLNode XMLSocket Void abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan onActivity onChanged onClose onConnect onData onDragOut onDragOver onEnterFrame onID3 onKeyDown onKeyUp onKillFocus onLoad onLoadComplete onLoadError onLoadInit onLoadProgress onLoadStart onMouseDown onMouseMove onMouseUp onMouseWheel onPress onRelease onReleaseOutside onResize onRollOut onRollOver onScroller onSelect onSetFocus onSoundComplete onStatus onUnload onUpdate onXML addListener addPage addProperty addRequestHeader allowDomain allowInsecureDomain appendChild apply applyChanges asfunction attachAudio attachMovie attachSound attachVideo beginFill beginGradientFill call ceil charAt charCodeAt clear clearInterval cloneNode close concat connect copy cos createElement createEmptyMovieClip createTextField createTextNode curveTo domain duplicateMovieClip endFill escape eval evaluate exp findText floor fscommand flush fromCharCode get getAscii getBeginIndex getBounds getBytesLoaded getBytesTotal getCaretIndex getCode getCount getDate getDay getDepth getEndIndex getFocus getFontList getFullYear getHours getInstanceAtDepth getLocal getMilliseconds getMinutes getMonth getNewTextFormat getNextHighestDepth getPan getProggress getProperty getRGB getSeconds getSelected getSelectedText getSize getStyle getStyleNames getSWFVersion getText getTextExtent getTextFormat getTextSnapshot getTime getTimer getTimezoneOffset getTransform getURL getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getVersion getVolume getYear globalToLocal gotoAndPlay gotoAndStop hasChildNodes hide hideBuiltInItems hitTest hitTestTextNearPos indexOf insertBefore install isActive isDown isToggled join lastIndexOf lineStyle lineTo list load loadClip loadMovie loadMovieNum loadSound loadVariables loadVariablesNum localToGlobal log mbchr mblength mbord mbsubstring min MMExecute moveTo nextFrame nextScene parseCSS parseFloat parseInt parseXML pause play pop pow prevScene print printAsBitmap printAsBitmapNum printNum push random registerClass removeListener removeMovieClip removeNode removeTextField replaceSel replaceText reverse round seek send sendAndLoad setBufferTime set setDate setFocus setFullYear setGain setHours setInterval setMask setMilliseconds setMinutes setMode setMonth setMotionLevel setNewTextFormat setPan setProperty setQuality setRate setRGB setSeconds setSelectColor setSelected setSelection setSilenceLevel setStyle setTextFormat setTime setTransform setUseEchoSuppression setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setVolume setYear shift show showSettings silenceLevel silenceTimeout sin slice sort sortOn splice split sqrt start startDrag stop stopAllSounds stopDrag substr substring swapDepths tan toggleHighQuality toLowerCase toString toUpperCase trace unescape uninstall unLoadClip unloadMovie unloadMovieNum unshift unwatch updateAfterEvent updateProperties useEchoSuppression valueOf watch endinitclip include initclip __proto__ _accProps _alpha _currentframe _droptarget _focusrect _framesloaded _global _height _highquality _level _lockroot _name _parent _quality _root _rotation _soundbuftime _target _totalframes _url _visible _width _x _xmouse _xscale _y _ymouse _yscale activityLevel align allowDomain allowInsecureDomain attributes autoSize avHardwareDisable background backgroundColor bandwidth blockIndent bold border borderColor bottomScroll bufferLenght bufferTime builtInItems bullet bytesLoaded bytesTotal callee caller capabilities caption childNodes color condenseWhite contentType currentFps customItems data deblocking docTypeDecl duration embedFonts enabled exactSettings firstChild focusEnabled font fps gain globalStyleFormat hasAccessibility hasAudio hasAudioEncoder hasEmbeddedVideo hasMP3 hasPrinting hasScreenBroadcast hasScreenPlayback hasStreamingAudio hasStreamingVideo hasVideoEncoder height hitArea hscroll html htmlText indent index italic instanceof int ignoreWhite isDebugger isDown isFinite italic language lastChild leading leftMargin length loaded localFileReadDisable manufacturer maxChars maxhscroll maxscroll menu message motionLevel motionTimeout mouseWheelEnabled multiline muted name names NaN nextSibling nodeName nodeType nodeValue os parentNode password pixelAspectRatio playerType previousSibling prototype quality rate restrict resolutionX resolutionY rightMargin scaleMode screenColor screenDPI screenResolutionX screenResolutionY scroll selectable separatorBefore showMenu size smoothing status styleSheet tabChildren tabEnabled tabIndex tabStops target targetPath text textColor textHeight textWidth time trackAsMenu type underline url useCodepage useEchoSuppression useHandCursor variable version visible width wordWrap xmlDecl + + + + alias ar asa awk banner basename bash bc bdiff break bunzip2 bzip2 cal calendar case cat cc cd chmod cksum clear cmp col comm compress continue cp cpio crypt csplit ctags cut date dc dd declare deroff dev df diff diff3 dircmp dirname do done du echo ed egrep elif else env esac eval ex exec exit expand export expr false fc fgrep fi file find fmt fold for function functions getconf getopt getopts grep gres hash head help history iconv id if in integer jobs join kill local lc let line ln logname look ls m4 mail mailx make man mkdir more mt mv newgrp nl nm nohup ntps od pack paste patch pathchk pax pcat perl pg pr print printf ps pwd read readonly red return rev rm rmdir sed select set sh shift size sleep sort spell split start stop strings strip stty sum suspend sync tail tar tee test then time times touch tr trap true tsort tty type typeset ulimit umask unalias uname uncompress unexpand uniq unpack unset until uudecode uuencode vi vim vpax wait wc whence which while who wpaste wstart xargs zcat + + + + access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision else elseif elsewhere encoding end endassociate endblockdata enddo endfile endforall endfunction endif endinterface endmodule endprogram endselect endsubroutine endtype endwhere entry eor equivalence err errmsg exist exit external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private program protected public quote read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream subroutine target then to type unformatted unit use value volatile wait where while write + abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 amax1 amin0 amin1 amod anint any asin asind associated atan atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh eoshift epsilon errsns exp exponent float floati floatj floatk floor fraction free huge iabs iachar iand ibclr ibits ibset ichar idate idim idint idnint ieor ifix iiabs iiand iibclr iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr kibits kibset kidim kidint kidnnt kieor kifix kind kint kior kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 logical lshift malloc matmul max max0 max1 maxexponent maxloc maxval merge min min0 min1 minexponent minloc minval mod modulo mvbits nearest nint not nworkers number_of_processors pack popcnt poppar precision present product radix random random_number random_seed range real repeat reshape rrspacing rshift scale scan secnds selected_int_kind selected_real_kind set_exponent shape sign sin sind sinh size sizeof sngl snglq spacing spread sqrt sum system_clock tan tand tanh tiny transfer transpose trim ubound unpack verify + cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg dcotan dcotand decode dimag dll_export dll_import doublecomplex dreal dvchk encode find flen flush getarg getcharqq getcl getdat getenv gettim hfix ibchng identifier imag int1 int2 int4 intc intrup invalop iostat_msg isha ishc ishl jfix lacfar locking locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq precfill prompt qabs qacos qacosd qasin qasind qatan qatand qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment setdat settim system timer undfl unlock union val virtual volatile zabs zcos zexp zlog zsin zsqrt + + + + not defun + - * / = < > <= >= princ eval apply funcall quote identity function complement backquote lambda set setq setf defun defmacro gensym make symbol intern symbol name symbol value symbol plist get getf putprop remprop hash make array aref car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr cons list append reverse last nth nthcdr member assoc subst sublis nsubst nsublis remove length list length mapc mapcar mapl maplist mapcan mapcon rplaca rplacd nconc delete atom symbolp numberp boundp null listp consp minusp zerop plusp evenp oddp eq eql equal cond case and or let l if prog prog1 prog2 progn go return do dolist dotimes catch throw error cerror break continue errset baktrace evalhook truncate float rem min max abs sin cos tan expt exp sqrt random logand logior logxor lognot bignums logeqv lognand lognor logorc2 logtest logbitp logcount integer length nil + + + + + - * / = < > <= >= => abs acos and angle append apply asin assoc assoc assq assv atan begin boolean? caar cadr call-with-current-continuation call/cc call-with-input-file call-with-output-file call-with-values car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr case ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cond cons cos current-input-port current-output-port define define-syntax delay denominator display do dynamic-wind else eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor for-each force gcd if imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lambda lcm length let let* let-syntax letrec letrec-syntax list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector map max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file or output-port? pair? peek-char input-port? output-port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? syntax-rules transcript-off transcript-on truncate unquote unquote-splicing values vector vector->list vector-fill! vector-length vector-ref vector-set! vector? with-input-from-file with-output-to-file write write-char zero? + + + + __FILE__ and def end in or self unless __LINE__ begin defined? ensure module redo super until BEGIN break do false next rescue then when END case else for nil retry true while alias class elsif if not return undef yield + + + + $error = == FontDirectory StandardEncoding UserObjects abs add aload anchorsearch and arc arcn arcto array ashow astore atan awidthshow begin bind bitshift bytesavailable cachestatus ceiling charpath clear cleardictstack cleartomark clip clippath closefile closepath concat concatmatrix copy copypage cos count countdictstack countexecstack counttomark currentcmykcolor currentcolorspace currentdash currentdict currentfile currentflat currentfont currentgray currenthsbcolor currentlinecap currentlinejoin currentlinewidth currentmatrix currentmiterlimit currentpagedevice currentpoint currentrgbcolor currentscreen currenttransfer cvi cvlit cvn cvr cvrs cvs cvx def defaultmatrix definefont dict dictstack div dtransform dup echo end eoclip eofill eq erasepage errordict exch exec execstack executeonly executive exit exp false file fill findfont flattenpath floor flush flushfile for forall ge get getinterval grestore grestoreall gsave gt idetmatrix idiv idtransform if ifelse image imagemask index initclip initgraphics initmatrix inustroke invertmatrix itransform known kshow le length lineto ln load log loop lt makefont mark matrix maxlength mod moveto mul ne neg newpath noaccess nor not null nulldevice or pathbbox pathforall pop print prompt pstack put putinterval quit rand rcheck rcurveto read readhexstring readline readonly readstring rectstroke repeat resetfile restore reversepath rlineto rmoveto roll rotate round rrand run save scale scalefont search setblackgeneration setcachedevice setcachelimit setcharwidth setcolorscreen setcolortransfer setdash setflat setfont setgray sethsbcolor setlinecap setlinejoin setlinewidth setmatrix setmiterlimit setpagedevice setrgbcolor setscreen settransfer setvmthreshold show showpage sin sqrt srand stack start status statusdict stop stopped store string stringwidth stroke strokepath sub systemdict token token transform translate true truncate type ueofill undefineresource userdict usertime version vmstatus wcheck where widthshow write writehexstring writestring xcheck xor + GlobalFontDirectory ISOLatin1Encoding SharedFontDirectory UserObject arct colorimage cshow currentblackgeneration currentcacheparams currentcmykcolor currentcolor currentcolorrendering currentcolorscreen currentcolorspace currentcolortransfer currentdevparams currentglobal currentgstate currenthalftone currentobjectformat currentoverprint currentpacking currentpagedevice currentshared currentstrokeadjust currentsystemparams currentundercolorremoval currentuserparams defineresource defineuserobject deletefile execform execuserobject filenameforall fileposition filter findencoding findresource gcheck globaldict glyphshow gstate ineofill infill instroke inueofill inufill inustroke languagelevel makepattern packedarray printobject product realtime rectclip rectfill rectstroke renamefile resourceforall resourcestatus revision rootfont scheck selectfont serialnumber setbbox setblackgeneration setcachedevice2 setcacheparams setcmykcolor setcolor setcolorrendering setcolorscreen setcolorspace setcolortranfer setdevparams setfileposition setglobal setgstate sethalftone setobjectformat setoverprint setpacking setpagedevice setpattern setshared setstrokeadjust setsystemparams setucacheparams setundercolorremoval setuserparams setvmthreshold shareddict startjob uappend ucache ucachestatus ueofill ufill undef undefinefont undefineresource undefineuserobject upath ustroke ustrokepath vmreclaim writeobject xshow xyshow yshow + cliprestore clipsave composefont currentsmoothness findcolorrendering setsmoothness shfill + .begintransparencygroup .begintransparencymask .bytestring .charboxpath .currentaccuratecurves .currentblendmode .currentcurvejoin .currentdashadapt .currentdotlength .currentfilladjust2 .currentlimitclamp .currentopacityalpha .currentoverprintmode .currentrasterop .currentshapealpha .currentsourcetransparent .currenttextknockout .currenttexturetransparent .dashpath .dicttomark .discardtransparencygroup .discardtransparencymask .endtransparencygroup .endtransparencymask .execn .filename .filename .fileposition .forceput .forceundef .forgetsave .getbitsrect .getdevice .inittransparencymask .knownget .locksafe .makeoperator .namestring .oserrno .oserrorstring .peekstring .rectappend .runandhide .setaccuratecurves .setblendmode .setcurvejoin .setdashadapt .setdebug .setdefaultmatrix .setdotlength .setfilladjust2 .setlimitclamp .setmaxlength .setopacityalpha .setoverprintmode .setrasterop .setsafe .setshapealpha .setsourcetransparent .settextknockout .settexturetransparent .stringbreak .stringmatch .tempfile .type1decrypt .type1encrypt .type1execchar .unread arccos arcsin copydevice copyscanlines currentdevice finddevice findlibfile findprotodevice flushpage getdeviceprops getenv makeimagedevice makewordimagedevice max min putdeviceprops setdevice + + + access after alias all architecture array assert attribute begin block body buffer bus case component configuration constant disconnect downto else elsif end entity exit file for function generate generic group guarded if impure in inertial inout is label library linkage literal loop map new next null of on open others out package port postponed procedure process pure range record register reject report return select severity shared signal subtype then to transport type unaffected units until use variable wait when while with + abs and mod nand nor not or rem rol ror sla sll sra srl xnor xor + left right low high ascending image value pos val succ pred leftof rightof base range reverse_range length delayed stable quiet transaction event active last_event last_active last_value driving driving_value simple_name path_name instance_name + now readline read writeline write endfile resolved to_bit to_bitvector to_stdulogic to_stdlogicvector to_stdulogicvector to_x01 to_x01z to_UX01 rising_edge falling_edge is_x shift_left shift_right rotate_left rotate_right resize to_integer to_unsigned to_signed std_match to_01 + std ieee work standard textio std_logic_1164 std_logic_arith std_logic_misc std_logic_signed std_logic_textio std_logic_unsigned numeric_bit numeric_std math_complex math_real vital_primitives vital_timing + boolean bit character severity_level integer real time delay_length natural positive string bit_vector file_open_kind file_open_status line text side width std_ulogic std_ulogic_vector std_logic std_logic_vector X01 X01Z UX01 UX01Z unsigned signed + + + + + ifTrue: ifFalse: whileTrue: whileFalse: ifNil: ifNotNil: whileTrue whileFalse repeat isNil notNil + + + + ? and beep big break call cd cls color cookie1 copy debug del dim display do until exit flushkb for each next function endfunction get gets global go gosub goto if else endif md or password play quit rd redim return run select case endselect set setl setm settime shell sleep small use while loop + abs addkey addprinterconnection addprogramgroup addprogramitem asc ascan at backupeventlog box cdbl chr cint cleareventlog close comparefiletimes createobject cstr dectohex delkey delprinterconnection delprogramgroup delprogramitem deltree delvalue dir enumgroup enumipinfo enumkey enumlocalgroup enumvalue execute exist existkey expandenvironmentvars fix formatnumber freefilehandle getdiskspace getfileattr getfilesize getfiletime getfileversion getobject iif ingroup instr instrrev int isdeclared join kbhit keyexist lcase left len loadhive loadkey logevent logoff ltrim memorysize messagebox open readline readprofilestring readtype readvalue redirectoutput right rnd round rtrim savekey sendkeys sendmessage setascii setconsole setdefaultprinter setfileattr setfocus setoption setsystemstate settitle setwallpaper showprogramgroup shutdown sidtoname split srnd substr trim ubound ucase unloadhive val vartype vartypename writeline writeprofilestring writevalue + address build color comment cpu crlf csd curdir date day domain dos error fullname homedir homedrive homeshr hostname inwin ipaddress0 ipaddress1 ipaddress2 ipaddress3 kix lanroot ldomain ldrive lm logonmode longhomedir lserver maxpwage mdayno mhz monthno month msecs pid primarygroup priv productsuite producttype pwage ras result rserver scriptdir scriptexe scriptname serror sid site startdir syslang ticks time userid userlang wdayno wksta wuserid ydayno year + + + + and byref case continueloop dim do else elseif endfunc endif endselect exit exitloop for func global if local next not or return select step then to until wend while exit + abs acos adlibdisable adlibenable asc asin atan autoitsetoption autoitwingettitle autoitwinsettitle bitand bitnot bitor bitshift bitxor blockinput break call cdtray chr clipget clipput controlclick controlcommand controldisable controlenable controlfocus controlgetfocus controlgetpos controlgettext controlhide controlmove controlsend controlsettext controlshow cos dec dircopy dircreate dirmove dirremove drivegetdrive drivegetfilesystem drivegetlabel drivegetserial drivegettype drivesetlabel drivespacefree drivespacetotal drivestatus envget envset envupdate eval exp filechangedir fileclose filecopy filecreateshortcut filedelete fileexists filefindfirstfile filefindnextfile filegetattrib filegetlongname filegetshortname filegetsize filegettime filegetversion fileinstall filemove fileopen fileopendialog fileread filereadline filerecycle filerecycleempty filesavedialog fileselectfolder filesetattrib filesettime filewrite filewriteline guicreate guicreateex guidefaultfont guidelete guigetcontrolstate guihide guimsg guiread guirecvmsg guisendmsg guisetcontrol guisetcontroldata guisetcontrolex guisetcontrolfont guisetcontrolnotify guisetcoord guisetcursor guishow guiwaitclose guiwrite hex hotkeyset inidelete iniread iniwrite inputbox int isadmin isarray isdeclared isfloat isint isnumber isstring log memgetstats mod mouseclick mouseclickdrag mousedown mousegetcursor mousegetpos mousemove mouseup mousewheel msgbox number pixelchecksum pixelgetcolor pixelsearch processclose processexists processsetpriority processwait processwaitclose progressoff progresson progressset random regdelete regenumkey regenumval regread regwrite round run runasset runwait send seterror shutdown sin sleep soundplay soundsetwavevolume splashimageon splashoff splashtexton sqrt statusbargettext string stringaddcr stringformat stringinstr stringisalnum stringisalpha stringisascii stringisdigit stringisfloat stringisint stringislower stringisspace stringisupper stringisxdigit stringleft stringlen stringlower stringmid stringreplace stringright stringsplit stringstripcr stringstripws stringtrimleft stringtrimright stringupper tan timerstart timerstop tooltip traytip ubound urldownloadtofile winactivate winactive winclose winexists wingetcaretpos wingetclasslist wingetclientsize wingethandle wingetpos wingetstate wingettext wingettitle winkill winmenuselectitem winminimizeall winminimizeallundo winmove winsetontop winsetstate winsettitle winwait winwaitactive winwaitclose winwaitnotactive + @appdatacommondir @appdatadir @autoitversion @commonfilesdir @compiled @computername @comspec @cr @crlf @desktopcommondir @desktopdir @desktopheight @desktopwidth @documentscommondir @error @favoritescommondir @favoritesdir @homedrive @homepath @homeshare @hour @ipaddress1 @ipaddress2 @ipaddress3 @ipaddress4 @lf @logondnsdomain @logondomain @logonserver @mday @min @mon @mydocumentsdir @osbuild @oslang @osservicepack @ostype @osversion @programfilesdir @programscommondir @programsdir @scriptdir @scriptfullpath @scriptname @sec @startmenucommondir @startmenudir @startupcommondir @startupdir @sw_hide @sw_maximize @sw_minimize @sw_restore @sw_show @systemdir @tab @tempdir @userprofiledir @username @wday @windowsdir @workingdir @yday @year + {!} {#} {^} {{} {}} {+} {alt} {altdown} {altup} {appskey} {asc} {backspace} {browser_back} {browser_favorites} {browser_forward} {browser_home} {browser_refresh} {browser_search} {browser_stop} {bs} {capslock} {ctrlbreak} {ctrldown} {ctrlup} {del} {delete} {down} {end} {enter} {esc} {escape} {f1} {f10} {f11} {f12} {f2} {f3} {f4} {f5} {f6} {f7} {f8} {f9} {home} {ins} {insert} {lalt} {launch_app1} {launch_app2} {launch_mail} {launch_media} {lctrl} {left} {lshift} {lwin} {lwindown} {media_next} {media_play_pause} {media_prev} {media_stop} {numlock} {numpad0} {numpad1} {numpad2} {numpad3} {numpad4} {numpad5} {numpad6} {numpad7} {numpad8} {numpad9} {numpadadd} {numpaddiv} {numpaddot} {numpadenter} {numpadmult} {numpadsub} {pause} {pgdn} {pgup} {printscreen} {ralt} {rctrl} {right} {rshift} {rwin} {rwindown} {scrolllock} {shiftdown} {shiftup} {sleep} {space} {tab} {up} {volume_down} {volume_mute} {volume_up} + #include #include-once + #region #endregion + + + + + and as assert asr begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new object of open or private rec sig struct then to true try type val virtual when while with + option Some None ignore ref lnot succ pred + array bool char float int list string unit + + + + abort abstract accept access aliased all and array at begin body case constant declare delay delta digits do else elsif end entry exception exit for function generic goto if in is limited loop new not null of others out or package pragma private procedure protected raise range record renames requeue return reverse select separate subtype tagged task terminate then type until use when while with + + + + always and assign attribute begin buf bufif0 bufif1 case casex casez cmos deassign default defparam disable edge else end endattribute endcase endfunction endmodule endprimitive endspecify endtable endtask event for force forever fork function highz0 highz1 if ifnone initial inout input integer join medium module large localparam macromodule nand negedge nmos nor not notif0 notif1 or output parameter pmos posedge primitive pull0 pull1 pulldown pullup rcmos real realtime reg release repeat rnmos rpmos rtran rtranif0 rtranif1 scalared signed small specify specparam strength strong0 strong1 supply0 supply1 table task time tran tranif0 tranif1 tri tri0 tri1 triand trior trireg unsigned vectored wait wand weak0 weak1 while wire wor xnor xor + $readmemb $readmemh $sreadmemb $sreadmemh $display $write $strobe $monitor $fdisplay $fwrite $fstrobe $fmonitor $fopen $fclose $time $stime $realtime $scale $printtimescale $timeformat $stop $finish $save $incsave $restart $input $log $nolog $key $nokey $scope $showscopes $showscopes $showvars $showvars $countdrivers $list $monitoron $monitoroff $dumpon $dumpoff $dumpfile $dumplimit $dumpflush $dumpvars $dumpall $reset $reset $reset $reset $reset $random $getpattern $rtoi $itor $realtobits $bitstoreal $setup $hold $setuphold $period $width $skew $recovery + + + + + break case catch continue else elseif end for function global if otherwise persistent return switch try while + + + + as case class data default deriving do else hiding if import in infix infixl infixr instance let module newtype of proc qualified rec then type where _ + + + + code components custommessages dirs files icons ini installdelete langoptions languages messages registry run setup types tasks uninstalldelete uninstallrun _istool + allowcancelduringinstall allownoicons allowrootdirectory allowuncpath alwaysrestart alwaysshowcomponentslist alwaysshowdironreadypage alwaysshowgrouponreadypage alwaysusepersonalgroup appcomments appcontact appcopyright appenddefaultdirname appenddefaultgroupname appid appmodifypath appmutex appname apppublisher apppublisherurl appreadmefile appsupporturl appupdatesurl appvername appversion architecturesallowed architecturesinstallin64bitmode backcolor backcolor2 backcolordirection backsolid changesassociations changesenvironment compression copyrightfontname copyrightfontsize createappdir createuninstallregkey defaultdirname defaultgroupname defaultuserinfoname defaultuserinfoorg defaultuserinfoserial dialogfontname dialogfontsize direxistswarning disabledirpage disablefinishedpage disableprogramgrouppage disablereadymemo disablereadypage disablestartupprompt diskclustersize diskslicesize diskspanning enablesdirdoesntexistwarning encryption extradiskspacerequired flatcomponentslist infoafterfile infobeforefile internalcompresslevel languagedetectionmethod languagecodepage languageid languagename licensefile mergeduplicatefiles minversion onlybelowversion outputbasefilename outputdir outputmanifestfile password privilegesrequired reservebytes restartifneededbyrun setupiconfile showcomponentsizes showlanguagedialog showtaskstreelines slicesperdisk solidcompression sourcedir timestamprounding timestampsinutc titlefontname titlefontsize touchdate touchtime uninstallable uninstalldisplayicon uninstalldisplayname uninstallfilesdir uninstalllogmode uninstallrestartcomputer updateuninstalllogappname usepreviousappdir usepreviousgroup useprevioussetuptype useprevioustasks useprevioususerinfo userinfopage usesetupldr versioninfocompany versioninfocopyright versioninfodescription versioninfotextversion versioninfoversion welcomefontname welcomefontsize windowshowcaption windowstartmaximized windowresizable windowvisible wizardimagebackcolor wizardimagefile wizardimagestretch wizardsmallimagefile + afterinstall attribs beforeinstall check comment components copymode description destdir destname excludes extradiskspacerequired filename flags fontinstall groupdescription hotkey infoafterfile infobeforefile iconfilename iconindex key languages licensefile messagesfile minversion name onlybelowversion parameters permissions root runonceid section source statusmsg string subkey tasks type types valuedata valuename valuetype workingdir + append define dim else emit endif endsub error expr file for if ifdef ifexist ifndef ifnexist include insert pragma sub undef + begin break case const continue do downto else end except finally for function if of procedure repeat then to try until uses var while with + + + + + + + + + + add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory build_command build_name cmake_minimum_required configure_file create_test_sourcelist else elseif enable_language enable_testing endforeach endif endmacro endwhile exec_program execute_process export_library_dependencies file find_file find_library find_package find_path find_program fltk_wrap_ui foreach get_cmake_property get_directory_property get_filename_component get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install install_files install_programs install_targets link_directories link_libraries list load_cache load_command macro make_directory mark_as_advanced math message option output_required_files project qt_wrap_cpp qt_wrap_ui remove remove_definitions separate_arguments set set_directory_properties set_source_files_properties set_target_properties set_tests_properties site_name source_group string subdir_depends subdirs target_link_libraries try_compile try_run use_mangled_mesa utility_source variable_requires vtk_make_instantiator vtk_wrap_java vtk_wrap_python vtk_wrap_tcl while write_file + ABSOLUTE ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ALL AND APPEND ARGS ASCII BEFORE CACHE CACHE_VARIABLES CLEAR COMMAND COMMANDS COMMAND_NAME COMMENT COMPARE COMPILE_FLAGS COPYONLY DEFINED DEFINE_SYMBOL DEPENDS DOC EQUAL ESCAPE_QUOTES EXCLUDE EXCLUDE_FROM_ALL EXISTS EXPORT_MACRO EXT EXTRA_INCLUDE FATAL_ERROR FILE FILES FORCE FUNCTION GENERATED GLOB GLOB_RECURSE GREATER GROUP_SIZE HEADER_FILE_ONLY HEADER_LOCATION IMMEDIATE INCLUDES INCLUDE_DIRECTORIES INCLUDE_INTERNALS INCLUDE_REGULAR_EXPRESSION LESS LINK_DIRECTORIES LINK_FLAGS LOCATION MACOSX_BUNDLE MACROS MAIN_DEPENDENCY MAKE_DIRECTORY MATCH MATCHALL MATCHES MODULE NAME NAME_WE NOT NOTEQUAL NO_SYSTEM_PATH OBJECT_DEPENDS OPTIONAL OR OUTPUT OUTPUT_VARIABLE PATH PATHS POST_BUILD POST_INSTALL_SCRIPT PREFIX PREORDER PRE_BUILD PRE_INSTALL_SCRIPT PRE_LINK PROGRAM PROGRAM_ARGS PROPERTIES QUIET RANGE READ REGEX REGULAR_EXPRESSION REPLACE REQUIRED RETURN_VALUE RUNTIME_DIRECTORY SEND_ERROR SHARED SOURCES STATIC STATUS STREQUAL STRGREATER STRLESS SUFFIX TARGET TOLOWER TOUPPER VAR VARIABLES VERSION WIN32 WRAP_EXCLUDE WRITE APPLE MINGW MSYS CYGWIN BORLAND WATCOM MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 CMAKE_COMPILER_2005 OFF ON + + + + + diff --git a/PowerEditor/bin/license.txt b/PowerEditor/bin/license.txt new file mode 100644 index 00000000..ba835c30 --- /dev/null +++ b/PowerEditor/bin/license.txt @@ -0,0 +1,88 @@ +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + +a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + +b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + +c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + +a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + +b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + +c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + +END OF TERMS AND CONDITIONS diff --git a/PowerEditor/bin/md5summer.exe b/PowerEditor/bin/md5summer.exe new file mode 100644 index 00000000..d33cbcc6 Binary files /dev/null and b/PowerEditor/bin/md5summer.exe differ diff --git a/PowerEditor/bin/nppIExplorerShell.exe b/PowerEditor/bin/nppIExplorerShell.exe new file mode 100644 index 00000000..d14630ea Binary files /dev/null and b/PowerEditor/bin/nppIExplorerShell.exe differ diff --git a/PowerEditor/bin/nppcm.dll b/PowerEditor/bin/nppcm.dll new file mode 100644 index 00000000..eea8387e Binary files /dev/null and b/PowerEditor/bin/nppcm.dll differ diff --git a/PowerEditor/bin/nppv42RC.zip b/PowerEditor/bin/nppv42RC.zip new file mode 100644 index 00000000..a0bdb950 Binary files /dev/null and b/PowerEditor/bin/nppv42RC.zip differ diff --git a/PowerEditor/bin/plugins/APIs/c.api b/PowerEditor/bin/plugins/APIs/c.api new file mode 100644 index 00000000..7fb9d429 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/c.api @@ -0,0 +1,682 @@ +#define +#elif +#else +#endif +#error +#if +#ifdef +#ifndef +#include +#line +#pragma +#undef +FP_OFF +FP_SEG +MK_FP +_OvrInitEms +_OvrInitExt +__asm +__based1 +__cdecl +__declspec +__emit__ +__except +__fastcall +__finally +__inline +__int16 +__int32 +__int64 +__int8 +__leave +__multiple_inheritance +__single_inheritance +__stdcall +__try +__virtual_inheritance +_atold +_bios_disk +_bios_equiplist +_bios_keybrd +_bios_memsize +_bios_printer +_bios_serialcom +_bios_timeofday +_c_exit +_cexit +_chain_intr +_chdrive +_chmod +_clear87 +_close +_control87 +_creat +_disable +_dos_allocmem +_dos_close +_dos_creat +_dos_creatnew +_dos_findfirst +_dos_findnext +_dos_freemem +_dos_getdate +_dos_getdiskfree +_dos_getdrive +_dos_getfileattr +_dos_getftime +_dos_gettime +_dos_getvect +_dos_keep +_dos_open +_dos_read +_dos_setblock +_dos_setdate +_dos_setdrive +_dos_setfileattr +_dos_setftime +_dos_settime +_dos_setvect +_dos_write +_enable +_exit +_fmemccpy +_fmemchr +_fmemcmp +_fmemcpy +_fmemicmp +_fmemset +_fpreset +_fsopen +_fstrcat +_fstrchr +_fstrcmp +_fstrcpy +_fstrcspn +_fstrdup +_fstricmp +_fstrlen +_fstrlwr +_fstrncat +_fstrncmp +_fstrncpy +_fstrnicmp +_fstrnset +_fstrpbrk +_fstrrchr +_fstrrev +_fstrset +_fstrspn +_fstrstr +_fstrtok +_fstrupr +_fullpath +_getdcwd +_getdrive +_graphfreemem +_graphgetmem +_harderr +_hardresume +_hardretn +_lrotl +_lrotr +_makepath +_matherrl +_open +_read +_rotl +_rotr +_searchenv +_setcursortype +_splitpath +_status87 +_strdate +_strerror +_strtime +_strtold +_tolower +_toupper +_write +abort +abs +absread +abswrite +access +acos +acosl +allocmem +arc +arg +asctime +asin +asinl +assert +atan +atan2 +atan2l +atanl +atexit +atof +atoi +atol +auto +bar +bar3d +bcd +bdos +bdosptr +bioscom +biosdisk +biosequip +bioskey +biosmemory +biosprint +biostime +break +brk +bsearch +cabs +cabsl +calloc +case +ceil +ceill +cerr +cgets +char +chdir +chmod +chsize +cin +circle +cleardevice +clearerr +clearviewport +clock +close +closedir +closegraph +clreol +clrscr +complex +conj +const +continue +coreleft +cos +cosh +coshl +cosl +country +cprintf +cputs +creat +creatnew +creattemp +cscanf +ctime +ctrlbrk +default +delay +delline +detectgraph +difftime +disable +div +dllexport +dllexport2 +dllimport +dllimport2 +do +dosexterr +dostounix +double +drawpoly +dup +dup2 +ecvt +ellipse +else +enable +enum +eof +execl +execle +execlp +execlpe +execv +execve +execvp +execvpe +exit +exp +expl +extern +fabs +fabsl +farcalloc +farcoreleft +farfree +farheapcheck +farheapcheckfree +farheapchecknode +farheapfillfree +farheapwalk +farmalloc +farrealloc +fclose +fcloseall +fcvt +fdopen +feof +ferror +fflush +fgetc +fgetchar +fgetpos +fgets +filelength +fileno +fillellipse +fillpoly +findfirst +findnext +float +floodfill +floor +floorl +flushall +fmod +fmodl +fnmerge +fnsplit +fopen +for +fprintf +fputc +fputchar +fputs +fread +free +freemem +freopen +frexp +frexpl +friend +fscanf +fseek +fsetpos +fstat +ftell +ftime +fwrite +gcvt +geninterrupt +getarccoords +getaspectratio +getbkcolor +getc +getcbrk +getch +getchar +getche +getcolor +getcurdir +getcwd +getdate +getdefaultpalette +getdfree +getdisk +getdrivername +getdta +getenv +getfat +getfatd +getfillpattern +getfillsettings +getftime +getgraphmode +getimage +getlinesettings +getmaxcolor +getmaxmode +getmaxx +getmaxy +getmodename +getmoderange +getpalette +getpalettesize +getpass +getpid +getpixel +getpsp +gets +gettext +gettextinfo +gettextsettings +gettime +getvect +getverify +getviewsettings +getw +getx +gety +gmtime +goto +gotoxy +graphdefaults +grapherrormsg +graphresult +harderr +hardresume +hardretn +heapcheck +heapcheckfree +heapchecknode +heapfillfree +heapwalk +highvideo +hypot +hypotl +if +imag +imagesize +initgraph +inp +inport +inportb +inpw +insline +installuserdriver +installuserfont +int +int86 +int86x +intdos +intdosx +intr +ioctl +isalnum +isalpha +isascii +isatty +iscntrl +isdigit +isgraph +islower +isprint +ispunct +isspace +isupper +isxdigit +itoa +kbhit +keep +labs +ldexp +ldexpl +ldiv +lfind +line +linerel +lineto +localeconv +localtime +lock +locking +log +log10 +log10l +logl +long +longjmp +lowvideo +lsearch +lseek +ltoa +malloc +matherr +max +mblen +mbstowcs +mbtowc +memccpy +memchr +memcmp +memcpy +memicmp +memmove +memset +min +mkdir +mktemp +mktime +modf +modfl +movedata +moverel +movetext +moveto +movmem +namespace +norm +normvideo +nosound +open +opendir +operator +outp +outport +outportb +outpw +outtext +outtextxy +parsfnm +peek +peekb +perror +pieslice +poke +pokeb +polar +poly +polyl +pow +pow10 +pow10l +powl +printf +private +protected +public +putc +putch +putchar +putenv +putimage +putpixel +puts +puttext +putw +qsort +raise +rand +randbrd +randbwr +random +randomize +read +readdir +real +realloc +rectangle +register +registerbgidriver +registerbgifont +registerfarbgidriver +registerfarbgifont +remove +rename +restorecrtmode +return +rewind +rewinddir +rmdir +rmtmp +sbrk +scanf +searchpath +sector +segread +set_new_handler +setactivepage +setallpalette +setaspectratio +setbkcolor +setblock +setbuf +setcbrk +setcolor +setdate +setdisk +setdta +setfillpattern +setfillstyle +setftime +setgraphbufsize +setgraphmode +setjmp +setlinestyle +setlocale +setmem +setmode +setpalette +setrgbpalette +settextjustify +settextstyle +settime +setusercharsize +setvbuf +setvect +setverify +setviewport +setvisualpage +setwritemode +short +signal +signed +sin +sinh +sinhl +sinl +sizeof +sleep +sopen +sound +spawnl +spawnle +spawnlp +spawnlpe +spawnv +spawnve +spawnvp +spawnvpe +sprintf +sqrt +sqrtl +srand +sscanf +stackavail +stat +static +stime +stpcpy +strcat +strchr +strcmp +strcmpi +strcoll +strcpy +strcspn +strdup +strerror +strftime +stricmp +strlen +strlwr +strncat +strncmp +strncmpi +strncpy +strnicmp +strnset +strpbrk +strrchr +strrev +strset +strspn +strstr +strtod +strtok +strtol +strtoul +struct +strupr +strxfrm +swab +switch +system +tan +tanh +tanhl +tanl +tell +template +tempnam +textattr +textbackground +textcolor +textheight +textmode +textwidth +thread +thread2 +time +tmpfile +tmpnam +toascii +tolower +toupper +try +typedef +tzset +ultoa +umask +ungetc +ungetch +union +unixtodos +unlink +unlock +unsigned +using +utime +va_arg +va_end +va_list +va_start +vfprintf +vfscanf +virtual +void +volatile +vprintf +vscanf +vsprintf +vsscanf +wcstombs +wctomb +wherex +wherey +while +window +write diff --git a/PowerEditor/bin/plugins/APIs/cpp.api b/PowerEditor/bin/plugins/APIs/cpp.api new file mode 100644 index 00000000..bdb56679 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/cpp.api @@ -0,0 +1,1182 @@ +#define +#elif +#else +#endif +#error +#if +#ifdef +#ifndef +#include +#line +#pragma +#undef +__asm +__based1 +__cdecl +__declspec +__emit__ +__except +__fastcall +__finally +__inline +__int16 +__int32 +__int64 +__int8 +__leave +__multiple_inheritance +__single_inheritance +__stdcall +__try +__virtual_inheritance +_atold +_bios_disk +_bios_equiplist +_bios_keybrd +_bios_memsize +_bios_printer +_bios_serialcom +_bios_timeofday +_c_exit +_cexit +_chain_intr +_chdrive +_chmod +_clear87 +_close +_control87 +_creat +_disable +_dos_allocmem +_dos_close +_dos_creat +_dos_creatnew +_dos_findfirst +_dos_findnext +_dos_freemem +_dos_getdate +_dos_getdiskfree +_dos_getdrive +_dos_getfileattr +_dos_getftime +_dos_gettime +_dos_getvect +_dos_keep +_dos_open +_dos_read +_dos_setblock +_dos_setdate +_dos_setdrive +_dos_setfileattr +_dos_setftime +_dos_settime +_dos_setvect +_dos_write +_enable +_exit +_fmemccpy +_fmemchr +_fmemcmp +_fmemcpy +_fmemicmp +_fmemset +_fpreset +_fsopen +_fstrcat +_fstrchr +_fstrcmp +_fstrcpy +_fstrcspn +_fstrdup +_fstricmp +_fstrlen +_fstrlwr +_fstrncat +_fstrncmp +_fstrncpy +_fstrnicmp +_fstrnset +_fstrpbrk +_fstrrchr +_fstrrev +_fstrset +_fstrspn +_fstrstr +_fstrtok +_fstrupr +_fullpath +_getdcwd +_getdrive +_graphfreemem +_graphgetmem +_harderr +_hardresume +_hardretn +_lrotl +_lrotr +_makepath +_matherrl +_open +_OvrInitEms +_OvrInitExt +_read +_rotl +_rotr +_searchenv +_setcursortype +_splitpath +_status87 +_strdate +_strerror +_strtime +_strtold +_tolower +_toupper +_write +~sentry +abort +abs +absread +abswrite +access +accumulate +acos +acosl +address +adjacent_difference +adjacent_find +advance +allocate +allocator +allocmem +always_noconv +any +append +arc +arg +asctime +asin +asinl +asm +assert +assign +at +atan +atan2 +atan2l +atanl +atexit +atof +atoi +atol +auto +auto_ptr +back +back_insert_iterator +back_inserter +bad +bar +bar3d +basic_string +bcd +bdos +bdosptr +begin +bidirectional_iterator +binary_function +binary_negate +binary_search +bind1st +bind2nd +binder1st +binder2nd +bioscom +biosdisk +biosequip +bioskey +biosmemory +biosprint +biostime +bitset +bool +boolalpha +break +brk +bsearch +c_str +cabs +cabsl +calloc +capacity +case +catch +category +ceil +ceill +cerr +cgets +char +char_type +chdir +chmod +chsize +cin +circle +class +classic_table +clear +cleardevice +clearerr +clearviewport +clock +clog +close +closedir +closegraph +clreol +clrscr +compare +complex +conj +const +const_cast +const_pointer +const_reference +construct +container +continue +copy +copy_backward +copyfmt +coreleft +cos +cosh +coshl +cosl +count +count_if +country +cout +cprintf +cputs +creat +creatnew +creattemp +cscanf +ctime +ctrlbrk +curr_symbol +data +date_order +deallocate +dec +decimal_point +default +delay +delete +delline +denorm_min +deque +destroy +detectgraph +difference_type +difftime +digits +digits10 +disable +distance +div +divides +dllexport +dllexport2 +dllimport +dllimport2 +do +do_always_noconv +do_close +do_compare +do_curr_symbol +do_decimal_point +do_encoding +do_get +do_grouping +do_hash +do_in +do_is +do_length +do_max_length +do_narrow +do_neg_format +do_open +do_out +do_pos_format +do_scan_is +do_scan_not +do_thousands_sep +do_tolower +do_toupper +do_transform +do_widen +dosexterr +dostounix +double +drawpoly +dup +dup2 +dynamic_cast +eback +ecvt +egptr +ellipse +else +empty +enable +encoding +end +endl +ends +enum +eof +epptr +epsilon +eq +eq_int_type +equal +equal_range +equal_to +erase +event_callback +exceptions +execl +execle +execlp +execlpe +execv +execve +execvp +execvpe +exit +exp +expl +explicit +extern +extern_type +fabs +fabsl +facet +fail +failed +failure +false +falsename +farcalloc +farcoreleft +farfree +farheapcheck +farheapcheckfree +farheapchecknode +farheapfillfree +farheapwalk +farmalloc +farrealloc +fclose +fcloseall +fcvt +fdopen +feof +ferror +fflush +fgetc +fgetchar +fgetpos +fgets +filebuf +filelength +fileno +fill +fill_n +fillellipse +fillpoly +find +find_end +find_first_not_of +find_first_of +find_if +find_last_not_of +find_last_of +findfirst +findnext +fixed +flags +flip +float +floodfill +floor +floorl +flush +flushall +fmod +fmodl +fmtflags +fnmerge +fnsplit +fopen +for +for_each +forward_iterator +FP_OFF +FP_SEG +fprintf +fputc +fputchar +fputs +frac_digits +fread +free +freemem +freeze +freopen +frexp +frexpl +friend +front +front_insert_iterator +front_inserter +fscanf +fseek +fsetpos +fstat +fstream +ftell +ftime +fwrite +gbump +gcount +gcvt +generate +generate_n +geninterrupt +get +get_allocator +get_date +get_monthname +get_temporary_buffer +get_time +get_weekday +get_year +getarccoords +getaspectratio +getbkcolor +getc +getcbrk +getch +getchar +getche +getcolor +getcurdir +getcwd +getdate +getdefaultpalette +getdfree +getdisk +getdrivername +getdta +getenv +getfat +getfatd +getfillpattern +getfillsettings +getftime +getgraphmode +getimage +getline +getlinesettings +getloc +getmaxcolor +getmaxmode +getmaxx +getmaxy +getmodename +getmoderange +getpalette +getpalettesize +getpass +getpid +getpixel +getpsp +gets +gettext +gettextinfo +gettextsettings +gettime +getvect +getverify +getviewsettings +getw +getx +gety +gmtime +good +goto +gotoxy +gptr +graphdefaults +grapherrormsg +graphresult +greater +greater_equal +grouping +harderr +hardresume +hardretn +has_denorm +has_infinity +has_quiet_NaN +has_signaling_NaN +hash +heapcheck +heapcheckfree +heapchecknode +heapfillfree +heapwalk +hex +highvideo +hypot +hypotl +id +if +ifstream +ignore +imag +imagesize +imbue +in +includes +infinity +init +initgraph +inline +inner_product +inp +inplace_merge +inport +inportb +input_iterator +inpw +insert +insert_iterator +inserter +insline +installuserdriver +installuserfont +int +int_type +int86 +int86x +intdos +intdosx +intern_type +internal +Intl +intr +ioctl +ios +ios_type +iostate +is +is_bounded +is_exact +is_iec559 +is_integer +is_modulo +is_open +is_signed +is_specialized +is_sync +isalnum +isalpha +isascii +isatty +iscntrl +isdigit +isgraph +islower +isprint +ispunct +isspace +istream +istream_type +istringstream +isupper +isxdigit +iter_swap +iter_type +itoa +iword +kbhit +keep +key_comp +labs +ldexp +ldexpl +ldiv +left +length +less +less_equal +lexicographical_compare +lfind +line +linerel +lineto +list +localeconv +localtime +lock +locking +log +log10 +log10l +logical_and +logical_not +logical_or +logl +long +longjmp +lower_bound +lowvideo +lsearch +lseek +lt +ltoa +make_heap +make_pair +malloc +map +matherr +max +max_element +max_exponent +max_exponent10 +max_length +max_size +mblen +mbstowcs +mbtowc +memccpy +memchr +memcmp +memcpy +memicmp +memmove +memset +merge +min +min_element +min_exponent +min_exponent10 +minus +mismatch +MK_FP +mkdir +mktemp +mktime +modf +modfl +modulus +move +movedata +moverel +movetext +moveto +movmem +multimap +multiset +mutable +name +namespace +narrow +neg_format +negate +negative_sign +new +next_permutation +noboolalpha +none +norm +normvideo +noshowbase +noshowpoint +noshowpos +noskipws +nosound +not_eof +not_equal_to +not1 +not2 +nounitbuf +nouppercase +nth_element +numeric_limits +oct +off_type +ofstream +open +opendir +openmode +operator +operator- +operator! +operator!= +operator& +operator&= +operator() +operator* +operator*= +operator/ +operator/= +operator[] +operator^ +operator^= +operator~ +operator+ +operator++ +operator+= +operator< +operator<< +operator<<= +operator<= +operator= +operator-= +operator== +operator> +operator-> +operator>= +operator>> +operator>>= +ostream +ostream_type +ostringstream +out +outp +outport +outportb +output_iterator +outpw +outtext +outtextxy +overflow +pair +parsfnm +partial_sort +partial_sort_copy +partial_sum +partition +pbackfail +pbase +pbump +pcount +peek +peekb +perror +pieslice +plus +pointer +pointer_to_binary_function +pointer_to_unary_function +poke +pokeb +polar +poly +polyl +pop +pop_back +pop_front +pop_heap +pos_format +pos_type +positive_sign +pow +pow10 +pow10l +powl +pptr +precision +prev_permutation +printf +priority_queue +private +protected +ptr_fun +pubimbue +public +pubseekoff +pubseekpos +pubsetbuf +pubsync +push +push_back +push_front +push_heap +put +putback +putc +putch +putchar +putenv +putimage +putpixel +puts +puttext +putw +pword +qsort +queue +quiet_NaN +radix +raise +rand +randbrd +randbwr +random +random_access_iterator +random_shuffle +randomize +raw_storage_iterator +rbegin +rdbuf +rdstate +read +readdir +readsome +real +realloc +rectangle +reference +register +register_callback +registerbgidriver +registerbgifont +registerfarbgidriver +registerfarbgifont +reinterpret_cast +release +remove +remove_copy +remove_copy_if +remove_if +rename +rend +replace +replace_copy +replace_copy_if +replace_if +reserve +reset +resetiosflag +resize +restorecrtmode +return +return_temporary_buffer +reverse +reverse_bidirectional_iterator +reverse_copy +reverse_iterator +rewind +rewinddir +rfind +right +rmdir +rmtmp +rotate +rotate_copy +round_error +round_style +sb_type +sbrk +sbumpc +scan_is +scan_not +scanf +scientific +search +search_n +searchpath +sector +seekdir +seekg +seekoff +seekp +seekpos +segread +sentry +set +set_difference +set_intersection +set_new_handler +set_symmetric_difference +set_union +setactivepage +setallpalette +setaspectratio +setbase +setbkcolor +setblock +setbuf +setcbrk +setcolor +setdate +setdisk +setdta +setf +setfill +setfillpattern +setfillstyle +setftime +setg +setgraphbufsize +setgraphmode +setiosflag +setjmp +setlinestyle +setlocale +setmem +setmode +setp +setpalette +setprecision +setrgbpalette +setstate +settextjustify +settextstyle +settime +setusercharsize +setvbuf +setvect +setverify +setviewport +setvisualpage +setw +setwritemode +sgetc +sgetn +short +showbase +showmanyc +showpoint +showpos +signal +signaling_NaN +signed +sin +sinh +sinhl +sinl +size +size_type +sizeof +skipws +sleep +snextc +sopen +sort +sort_heap +sound +spawnl +spawnle +spawnlp +spawnlpe +spawnv +spawnve +spawnvp +spawnvpe +splice +sprintf +sputbackc +sputc +sputn +sqrt +sqrtl +srand +sscanf +stable_partition +stable_sort +stack +stackavail +stat +state +state_type +static +static_cast +stime +stpcpy +str +strcat +strchr +strcmp +strcmpi +strcoll +strcpy +strcspn +strdup +streambuf +streambuf_type +strerror +strftime +stricmp +string +string_type +stringbuf +stringstream +strlen +strlwr +strncat +strncmp +strncmpi +strncpy +strnicmp +strnset +strpbrk +strrchr +strrev +strset +strspn +strstr +strtod +strtok +strtol +strtoul +struct +strupr +strxfrm +substr +sungetc +swab +swap +swap_ranges +switch +sync +sync_with_stdio +system +table +tan +tanh +tanhl +tanl +tell +tellg +tellp +template +tempnam +test +textattr +textbackground +textcolor +textheight +textmode +textwidth +this +thousands_sep +thread +thread2 +throw +tie +time +times +tinyness_before +tmpfile +tmpnam +to_char_type +to_int_type +to_string +to_ulong +toascii +tolower +top +toupper +traits +traits_type +transform +traps +true +truename +try +typedef +typeid +typename +tzset +uflow +ultoa +umask +unary_function +unary_negate +underflow +unget +ungetc +ungetch +uninitialized_copy +uninitialized_fill +uninitialized_fill_n +union +unique +unique_copy +unitbuf +unixtodos +unlink +unlock +unsetf +unsigned +upper_bound +uppercase +using +utime +va_arg +va_end +va_list +va_start +value_comp +value_type +vector +vfprintf +vfscanf +virtual +void +void* +volatile +vprintf +vscanf +vsprintf +vsscanf +wcerr +wchar_t +wcin +wclog +wcout +wcstombs +wctomb +wfilebuf +wfstream +what +wherex +wherey +which_open_mode +while +widen +width +wifstream +window +wios +wistream +wistringstream +wofstream +wostream +wostringstream +write +ws +wstreambuf +wstring +wstringbuf +wstringstream +xalloc +xsgetn +xsputn diff --git a/PowerEditor/bin/plugins/APIs/cs.api b/PowerEditor/bin/plugins/APIs/cs.api new file mode 100644 index 00000000..0743b648 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/cs.api @@ -0,0 +1,228 @@ +abstract +as +base +bool +break +byte +byte +case +catch +char +checked +class +Comparer +Console +Console.Write( +Console.WriteLine( +const +continue +DateTime +decimal +default +Delegate +delegate +Dictionary +Dictionary.Enumerator +Dictionary.KeyCollection +Dictionary.KeyCollection.Enumerator +Dictionary.ValueCollection +Dictionary.ValueCollection.Enumerator +do +double +double +else +enum +EqualityComparer +event +Exception +explicit +extern +false +FileStream +finally +fixed +float +float +for +foreach +goto +ICollection +IComparer +IDictionary +IEnumerable +IEnumerator +IEqualityComparer +if +IList +implicit +in +int +Int16 +Int32 +Int64 +interface +internal +IntPtr +is +KeyNotFoundException +KeyValuePair +LinkedList +LinkedList.Enumerator +LinkedListNode +List +List.Enumerator +lock +long +Microsoft.CSharp +Microsoft.JScript +Microsoft.VisualBasic +Microsoft.Vsa +Microsoft.Win32 +namespace +new +null +object +object +operator +out +override +params +private +protected +public +Queue +Queue.Enumerator +readonly +ref +return +sbyte +sbyte +sealed +short +sizeof +SortedDictionary +SortedDictionary.Enumerator +SortedDictionary.KeyCollection +SortedDictionary.KeyCollection.Enumerator +SortedDictionary.ValueCollection +SortedDictionary.ValueCollection.Enumerator +SortedList +Stack +Stack.Enumerator +stackalloc +static +StreamWriter +string +StringBuilder +struct +switch +System +System.CodeDom +System.CodeDom.Compiler +System.Collections +System.Collections.Specialized +System.ComponentModel +System.ComponentModel.Design +System.ComponentModel.Design.Serialization +System.Configuration +System.Configuration.Assemblies +System.Configuration.Install +System.Data +System.Data.Common +System.Data.OleDb +System.Data.SqlClient +System.Data.SqlTypes +System.Diagnostics +System.Diagnostics.SymbolStore +System.DirectoryServices +System.Drawing +System.Drawing.Design +System.Drawing.Drawing2D +System.Drawing.Imaging +System.Drawing.Printing +System.Drawing.Text +System.EnterpriseServices +System.EnterpriseServices.CompensatingResourceManager +System.Globalization +System.IO +System.IO.IsolatedStorage +System.Management +System.Management.Instrumentation +System.Messaging +System.Net +System.Net.Sockets +System.Reflection +System.Reflection.Emit +System.Resources +System.Runtime.CompilerServices +System.Runtime.InteropServices +System.Runtime.InteropServices.Expando +System.Runtime.Remoting +System.Runtime.Remoting.Activation +System.Runtime.Remoting.Channels +System.Runtime.Remoting.Channels.Http +System.Runtime.Remoting.Channels.Tcp +System.Runtime.Remoting.Contexts +System.Runtime.Remoting.Lifetime +System.Runtime.Remoting.Messaging +System.Runtime.Remoting.Metadata +System.Runtime.Remoting.Metadata.W3cXsd2001 +System.Runtime.Remoting.MetadataServices +System.Runtime.Remoting.Proxies +System.Runtime.Remoting.Services +System.Runtime.Serialization +System.Runtime.Serialization.Formatters +System.Runtime.Serialization.Formatters.Binary +System.Runtime.Serialization.Formatters.Soap +System.Security +System.Security.Cryptography +System.Security.Cryptography.X509Certificates +System.Security.Cryptography.Xml +System.Security.Permissions +System.Security.Policy +System.Security.Principal +System.ServiceProcess +System.Text +System.Text.RegularExpressions +System.Threading +System.Timers +System.Web +System.Web.Caching +System.Web.Configuration +System.Web.Hosting +System.Web.Mail +System.Web.Security +System.Web.Services +System.Web.Services.Configuration +System.Web.Services.Description +System.Web.Services.Discovery +System.Web.Services.Protocols +System.Web.SessionState +System.Web.UI +System.Web.UI.Design +System.Web.UI.Design.WebControls +System.Web.UI.HtmlControls +System.Web.UI.WebControls +System.Windows.Forms +System.Windows.Forms.Design +System.Xml +System.Xml.Schema +System.Xml.Serialization +System.Xml.XPath +System.Xml.Xsl +TextWriter +this +throw +true +try +typeof +uint +ulong +unchecked +unsafe +ushort +using +virtual +void +volatile +while \ No newline at end of file diff --git a/PowerEditor/bin/plugins/APIs/css.api b/PowerEditor/bin/plugins/APIs/css.api new file mode 100644 index 00000000..824f66c8 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/css.api @@ -0,0 +1,357 @@ +:active +:after +:before +:first +:first-child +:first-letter +:first-line +:focus +:hover +:lang +:left +:link +:right +:visited +@charset +@font-face +@import +@media +@page +ActiveBorder +ActiveCaption +AppWorkspace +ButtonFace +ButtonHighlight +ButtonShadow +ButtonText +CaptionText +GrayText +Highlight +HighlightText +InactiveBorder +InactiveCaption +InactiveCaptionText +InfoBackground +InfoText +MenuText +Scrollbar +ThreeDDarkShadow +ThreeDFace +ThreeDHighlight +ThreeDLightShadow +ThreeDShadow +Window +WindowFrame +WindowText +above +absolute +always +aqua +armenian +attr +auto +avoid +azimuth +background +background-attachment +background-color +background-image +background-position +background-repeat +baseline +behind +below +bidi-override +black +blink +block +blue +bold +bolder +border +border-bottom +border-bottom-color +border-bottom-style +border-bottom-width +border-collapse +border-color +border-left +border-left-color +border-left-style +border-left-width +border-right +border-right-color +border-right-style +border-right-width +border-spacing +border-style +border-top +border-top-color +border-top-style +border-top-width +border-width +both +bottom +capitalize +caption +caption-side +center +center-left +center-right +circle +cjk-ideographic +clear +clip +close-quote +code +collapse +color +compact +condensed +content +continuous +counter-increment +counter-reset +crop +cros +crosshair +cue +cue-after +cue-before +cursor +decimal +decimal-leading-zero +default +deg +digits +direction +disc +display +e-resize +elevation +em +embed +empty-cells +ex +expanded +extra-condensed +extra-expanded +far-left +far-right +fast +faster +fixed +float +font +font-family +font-size +font-size-adjust +font-stretch +font-style +font-variant +font-weight +fuchsia +georgian +grad +gray +green +hebrew +height +help +hidden +hide +high +higher +hiragana +hiragana-iroha +hz +icon +inherit +inline +inline-table +inside +italic +justify +katakana +katakana-iroha +khz +landscape +left +left-side +leftwards +letter-spacing +level +lighter +lime +line-height +line-through +list-item +list-style +list-style-image +list-style-position +list-style-type +loud +low +lower +lower-alpha +lower-greek +lower-latin +lower-roman +lowercase +ltr +margin +margin-bottom +margin-left +margin-right +margin-top +marker +marker-offset +marks +maroon +max-height +max-width +medium +menu +message-box +middle +min-height +min-width +mix +move +ms +n-resize +narrower +navy +ne-resize +no-close-quote +no-open-quote +no-repeat +none +normal +nowrap +nw-resize +oblique +olive +once +open-quote +orphans +outline +outline-color +outline-style +outline-width +outside +overflow +overline +padding +padding-bottom +padding-left +padding-right +padding-top +page +page-break-after +page-break-before +page-break-inside +pause +pause-after +pause-before +pitch +pitch-range +play-during +pointer +portrait +position +pre +pt +purple +px +quotes +rad +red +relative +repeat +repeat-x +repeat-y +richness +right +right-side +rightwards +rtl +run-in +s-resize +scroll +se-resize +semi-condensed +semi-expanded +separate +show +silent +silver +size +slow +slower +small-caps +small-caption +soft +speak +speak-header +speak-numeral +speak-ponctuation +speech-rate +spell-out +square +static +status-bar +stress +sub +super +sw-resize +table +table-caption +table-cell +table-column +table-column-group +table-footer-group +table-header-group +table-layout +table-row +table-row-group +teal +text +text-align +text-bottom +text-decoration +text-indent +text-shadow +text-top +text-transform +top +transparent +ultra-condensed +ultra-expanded +underline +unicode-bidi +upper-alpha +upper-latin +upper-roman +uppercase +vertical-align +visibility +visible +voice-family +volume +w-resize +wait +white +white-space +wider +widows +width +word-spacing +x-fast +x-high +x-loud +x-low +x-slow +x-soft +yellow +z-index diff --git a/PowerEditor/bin/plugins/APIs/flash.api b/PowerEditor/bin/plugins/APIs/flash.api new file mode 100644 index 00000000..dd2cd0e4 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/flash.api @@ -0,0 +1,930 @@ +"allowscale" +"exec" +"fullscreen" +"quit" +"showmenu" +"trapallkeys" +#include +ALT +ASSetNative +ASSetPropFlags +ASconstructor +ASnative +Accessibility +Accessibility.isActive +Array +Array +AsBroadcaster +BACKSPACE +BACKSPACE +Boolean +Boolean +Button +CAPSLOCK +CAPSLOCK +CONTROL +CONTROL +Camera +Capabilities +Color +Color +Cookie +CustomActions +CustomActions.get +CustomActions.install +CustomActions.list +CustomActions.uninstall +DELETEKEY +DELETEKEY +DOWN +DOWN +Date +Date +Date.UTC +END +END +ENTER +ENTER +ESCAPE +ESCAPE +FStyleFormat +HOME +HOME +INSERT +INSERT +Infinity +IsActive +Key +Key +Key.ALT +Key.BACKSPACE +Key.CAPSLOCK +Key.CONTROL +Key.DELETEKEY +Key.DOWN +Key.END +Key.ENTER +Key.ESCAPE +Key.HOME +Key.INSERT +Key.LEFT +Key.PGDN +Key.PGUP +Key.RIGHT +Key.SHIFT +Key.SPACE +Key.TAB +Key.UP +Key.getAscii +Key.getCode +Key.isDown +Key.isToggled +LEFT +LEFT +LN10 +LN10 +LN2 +LN2 +LOG10E +LOG10E +LOG2E +LOG2E +LoadVars +LocalConnection +MAX_VALUE +MAX_VALUE +MIN_VALUE +MIN_VALUE +MMSave +Math +Math +Math.E +Math.LN10 +Math.LN2 +Math.LOG10E +Math.LOG2E +Math.PI +Math.SQRT1_2 +Math.SQRT2 +Math.abs +Math.acos +Math.asin +Math.atan +Math.atan2 +Math.ceil +Math.cos +Math.exp +Math.floor +Math.log +Math.max +Math.min +Math.pow +Math.random +Math.round +Math.sin +Math.sqrt +Math.tan +Microphone +Mouse +Mouse +Mouse.hide +Mouse.show +MovieClip +MovieClip +NEGATIVE_INFINITY +NEGATIVE_INFINITY +NaN +NaN +NetConnection +NetStream +Number +Number +Number.MAX_VALUE +Number.MIN_VALUE +Number.NEGATIVE_INFINITY +Number.NaN +Number.POSITIVE_INFINITY +Object +Object +Object.registerClass +PGDN +PGDN +PGUP +PGUP +PI +PI +POSITIVE_INFINITY +POSITIVE_INFINITY +Product +RIGHT +RIGHT +SHIFT +SHIFT +SPACE +SPACE +SQRT1_2 +SQRT1_2 +SQRT2 +SQRT2 +Selection +Selection +Selection.getBeginIndex +Selection.getCaretIndex +Selection.getEndIndex +Selection.getFocus +Selection.setFocus +Selection.setSelection +SendEvent +SharedObject +ShowSettings +Sound +Sound +Stage +Stage.align +Stage.height +Stage.scaleMode +Stage.showMenu +Stage.width +String +String +String.fromCharCode +System +System.capabilities +System.capabilities.hasAccessibility +System.capabilities.hasAudio +System.capabilities.hasAudioEncoder +System.capabilities.hasMP3 +System.capabilities.hasVideoEncoder +System.capabilities.input +System.capabilities.isDebugger +System.capabilities.language +System.capabilities.manufacturer +System.capabilities.os +System.capabilities.pixelAspectRatio +System.capabilities.screenColor +System.capabilities.screenDPI +System.capabilities.screenResolutionX +System.capabilities.screenResolutionY +System.capabilities.serverString +System.capabilities.version +System.security.allowDomain +TAB +TAB +TextField +TextFormat +UP +UP +UTC +UTC +Video +XML +XML +XMLNode +XMLSocket +XMLSocket +__proto__ +_alpha +_alpha +_currentframe +_currentframe +_droptarget +_droptarget +_focusrect +_focusrect +_framesloaded +_framesloaded +_global +_height +_height +_highquality +_highquality +_level +_listeners +_name +_name +_parent +_parent +_quality +_quality +_root +_root +_rotation +_rotation +_soundbuftime +_soundbuftime +_target +_target +_totalframes +_totalframes +_url +_url +_visible +_visible +_width +_width +_x +_x +_xmouse +_xmouse +_xscale +_xscale +_y +_y +_ymouse +_ymouse +_yscale +_yscale +a +abs +abs +acos +acos +add +add +addListener +addProperty +addheader +align +allowDomain +and +appendChild +appendChild +apply +arguments +arguments.callee +arguments.caller +asin +asin +atan +atan +atan2 +atan2 +attachAudio +attachMovie +attachMovie +attachSound +attachSound +attachVideo +attributes +attributes +autoSize +background +backgroundColor +beginFill +beginGradientFill +blockIndent +bold +border +borderColor +bottomScroll +break +break +broadcastMessage +bullet +call +call +callee +caller +capabilities +case +ceil +ceil +charAt +charAt +charCodeAt +charCodeAt +childNodes +childNodes +chr +chr +clear +clearInterval +cloneNode +cloneNode +close +close +color +concat +concat +condenseWhite +connect +connect +constructor +constructor +contentType +continue +continue +cos +cos +createElement +createElement +createEmptyMovieClip +createTextField +createTextNode +createTextNode +curveTo +data +data +decode +default +delete +delete +do +do +docTypeDecl +docTypeDecl +domain +dragOut +dragOut +dragOver +dragOver +duplicateMovieClip +duplicateMovieClip +duration +else +else +embedFonts +enabled +endFill +enterFrame +enterFrame +eq +escape +escape +eval +eval +evaluate +exp +exp +false +false +firstChild +firstChild +floor +floor +flush +focusEnabled +font +for +for +fromCharCode +fromCharCode +fscommand +fscommand +function +function +ge +get +getAscii +getAscii +getBeginIndex +getBeginIndex +getBounds +getBounds +getBytesLoaded +getBytesLoaded +getBytesTotal +getBytesTotal +getCaretIndex +getCaretIndex +getCode +getCode +getCookie +getDate +getDate +getDay +getDay +getDepth +getDuration +getEndIndex +getEndIndex +getFocus +getFocus +getFontList +getFullYear +getFullYear +getHours +getHours +getMilliseconds +getMilliseconds +getMinutes +getMinutes +getMonth +getMonth +getNewTextFormat +getPan +getPan +getPosition +getProperty +getProperty +getRGB +getRGB +getSeconds +getSeconds +getSize +getTextExtent +getTextFormat +getTime +getTime +getTimer +getTimer +getTimezoneOffset +getTimezoneOffset +getTransform +getTransform +getURL +getURL +getUTCDate +getUTCDate +getUTCDay +getUTCDay +getUTCFullYear +getUTCFullYear +getUTCHours +getUTCHours +getUTCMilliseconds +getUTCMilliseconds +getUTCMinutes +getUTCMinutes +getUTCMonth +getUTCMonth +getUTCSeconds +getUTCSeconds +getUTCYear +getVersion +getVersion +getVolume +getVolume +getYear +getYear +globalToLocal +globalToLocal +gotoAndPlay +gotoAndPlay +gotoAndStop +gotoAndStop +gt +hasAccessibility +hasAudio +hasAudioEncoder +hasChildNodes +hasChildNodes +hasMP3 +hasOwnProperty +hasVideoEncoder +height +hide +hide +hitArea +hitTest +hitTest +hscroll +html +htmlText +if +if +ifFrameLoaded +ifFrameLoaded +ignoreWhite +in +in +include +indent +indexOf +indexOf +input +insertBefore +insertBefore +install +instanceof +int +int +isActive +isDebugger +isDown +isDown +isFinite +isFinite +isNaN +isNaN +isPropertyEnumerable +isPrototypeOf +isToggled +isToggled +italic +john@3wgraphics.net +join +join +keyDown +keyPress +keyPress +keyUp +language +lastChild +lastChild +lastIndexOf +lastIndexOf +le +leading +leftMargin +length +length +lineStyle +lineTo +list +load +load +loadMovie +loadMovie +loadMovieNum +loadMovieNum +loadSound +loadVariables +loadVariables +loadVariablesNum +loadVariablesNum +loaded +loaded +localToGlobal +localToGlobal +log +log +lt +manufacturer +max +max +maxChars +maxhscroll +maxscroll +maxscroll +mbchr +mbchr +mblength +mblength +mbord +mbord +mbsubstring +mbsubstring +metaInfo +meth +min +min +mouseDown +mouseDown +mouseMove +mouseUp +mouseUp +moveTo +multiline +ne +new +new +newline +newline +nextFrame +nextFrame +nextScene +nextScene +nextSibling +nextSibling +nodeName +nodeName +nodeType +nodeType +nodeValue +nodeValue +not +null +null +number +on +on +onChanged +onClipEvent +onClipEvent +onClose +onClose +onConnect +onConnect +onData +onDragOut +onDragOver +onEnterFrame +onKeyDown +onKeyUp +onKillFocus +onLoad +onLoad +onMouseDown +onMouseMove +onMouseUp +onPress +onRelease +onReleaseOutside +onResize +onRollOut +onRollOver +onScroller +onSetFocus +onSoundComplete +onUnload +onXML +onXML +or +ord +ord +os +parentNode +parentNode +parseFloat +parseFloat +parseInt +parseInt +parseXML +parseXML +password +pause +pixelAspectRatio +play +play +pop +pop +position +pow +pow +press +press +prevFrame +prevFrame +prevScene +prevScene +previousSibling +previousSibling +print +print +printAsBitmap +printAsBitmap +printAsBitmapNum +printNum +printNum +prototype +publish +push +push +random +random +receiveAudio +receiveVideo +registerClass +release +release +releaseOutside +releaseOutside +removeListener +removeMovieClip +removeMovieClip +removeNode +removeNode +removeTextField +replaceSel +restrict +return +return +reverse +reverse +rightMargin +rollOut +rollOut +rollOver +rollOver +round +round +scaleMode +screenColor +screenDPI +screenResolutionX +screenResolutionY +scroll +scroll +scrollString +security +seek +selectable +send +send +sendAndLoad +sendAndLoad +serverString +set +set +setBufferTime +setCookie +setDate +setDate +setDuration +setFocus +setFocus +setFps +setFullYear +setFullYear +setGain +setHours +setHours +setInterval +setKeyFrameInterval +setLoopback +setMask +setMilliseconds +setMilliseconds +setMinutes +setMinutes +setMode +setMonth +setMonth +setMotionLevel +setNewTextFormat +setPan +setPan +setPosition +setProperty +setProperty +setQuality +setRGB +setRGB +setRate +setSeconds +setSeconds +setSelection +setSelection +setSilenceLevel +setTextFormat +setTime +setTime +setTransform +setTransform +setUTCDate +setUTCDate +setUTCFullYear +setUTCFullYear +setUTCHours +setUTCHours +setUTCMilliseconds +setUTCMilliseconds +setUTCMinutes +setUTCMinutes +setUTCMonth +setUTCMonth +setUTCSeconds +setUTCSeconds +setUseEchoSuppression +setVolume +setVolume +setYear +setYear +shift +shift +show +show +showMenu +sin +sin +size +slice +slice +sort +sort +sortOn +splice +splice +split +split +sqrt +sqrt +start +start +startDrag +startDrag +status +status +stop +stop +stopAllSounds +stopAllSounds +stopDrag +stopDrag +substr +substr +substring +substring +super +swapDepths +swapDepths +switch +tabChildren +tabEnabled +tabIndex +tabStops +tan +tan +target +targetPath +targetPath +tellTarget +tellTarget +text +textColor +textHeight +textWidth +this +this +toLocaleString +toLowerCase +toLowerCase +toString +toString +toUpperCase +toUpperCase +toggleHighQuality +toggleHighQuality +trace +trace +trackAsMenu +true +true +type +typeof +typeof +undefined +underline +unescape +unescape +uninstall +unload +unloadMovie +unloadMovie +unloadMovieNum +unloadMovieNum +unshift +unshift +unwatch +updateAfterEvent +updateAfterEvent +url +useHandCursor +valueOf +valueOf +var +var +variable +version +void +void +watch +while +while +width +with +with +wordWrap +xmlDecl +xmlDecl diff --git a/PowerEditor/bin/plugins/APIs/fortran.api b/PowerEditor/bin/plugins/APIs/fortran.api new file mode 100644 index 00000000..96385e08 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/fortran.api @@ -0,0 +1,576 @@ +and. +eq. +eqv. +ge. +gt. +le. +lt. +ne. +neqv. +not. +or. +abs +access +achar +acos +acosd +action +adjustl +adjustr +admit +advance +aimag +aimax0 +aimin0 +aint +ajmax0 +ajmin0 +akmax0 +akmin0 +all +allocatable +allocate +allocated +alog +alog10 +amax0 +amax1 +amin0 +amin1 +amod +anint +any +apostrophe +asin +asind +assign +assignment +associate +associated +asynchronous +at +atan +atan2 +atan2d +atand +backspace +bind +bit_size +bitest +bitl +bitlr +bitrl +bjtest +bktest +blank +block +blockdata +blocksize +break +btest +cabs +call +carg +carriagecontrol +case +ccos +cdabs +cdcos +cdexp +cdlog +cdsin +cdsqrt +ceiling +cexp +char +character +class +clog +close +cmplx +common +complex +conjg +contains +continue +cos +cosd +cosh +cotan +cotand +count +cpu_time +cshift +csin +csqrt +cycle +dabs +dacos +dacosd +dasin +dasind +data +datan +datan2 +datan2d +datand +date +date_and_time +dble +dcmplx +dconjg +dcos +dcosd +dcosh +dcotan +dcotand +ddim +deallocate +decimal +decode +default +delim +dexp +dfloat +dfloti +dflotj +dflotk +digits +dim +dimag +dimension +dint +direct +dll_import +dlog +dlog10 +dmax1 +dmin1 +dmod +dnint +do +dot_product +double +doublecomplex +doubleprecision +dowhile +dprod +dreal +dsign +dsin +dsind +dsinh +dsqrt +dtan +dtand +dtanh +dvchk +else +elseif +elsewhere +encode +encoding +end +endassociate +endblockdata +enddo +endfile +endforall +endfunction +endif +endinterface +endmodule +endprogram +endselect +endsubroutine +endtype +endwhere +endwhile +entry +eor +eoshift +epsilon +equivalence +err +errmsg +error +errsns +execute +exist +exit +exp +exponent +external +file +find +flen +float +floati +floatj +floatk +floor +flush +fmt +forall +form +format +formatted +fraction +free +from +function +getarg +getcharqq +getcl +getdat +getenv +gettim +go +goto +guess +hfix +huge +iabs +iachar +iand +ibchng +ibclr +ibits +ibset +ichar +id +idate +identifier +idim +idint +idnint +ieor +if +ifix +iiabs +iiand +iibclr +iibits +iibset +iidim +iidint +iidnnt +iieor +iifix +iint +iior +iiqint +iiqnnt +iishft +iishftc +iisign +ilen +imag +imax0 +imax1 +imin0 +imin1 +imod +implicit +in +include +index +inint +inot +inout +inquire +int +int1 +int2 +int4 +int8 +intc +integer +intent +interface +intrinsic +intrup +invalop +iolength +iomsg +ior +iostat +iostat_msg +iqint +iqnint +isha +ishc +ishft +ishft +ishftc +ishl +isign +isnan +izext +jfix +jiand +jibclr +jibits +jibset +jidim +jidint +jidnnt +jieor +jifix +jint +jior +jiqint +jishft +jishftc +jisign +jmax0 +jmax1 +jmin0 +jmin1 +jmod +jnint +jnot +jzext +kiabs +kiand +kibclr +kibits +kibset +kidim +kidint +kieor +kifix +kind +kint +kior +kishft +kishftc +kisign +kmax0 +kmax1 +kmin0 +kmin1 +kmod +knint +knot +kzext +lacfar +lbound +leadz +len +len_trim +lenlge +lge +lgt +lle +llt +location +locking +locnear +log +log10 +logical +loop +lshift +malloc +map +matmul +max +max0 +max1 +maxexponent +maxloc +maxval +merge +min +min0 +min1 +minexponent +minloc +minval +mod +module +modulo +mvbits +name +named +namelist +nargs +nbreak +ndperr +ndpexc +nearest +nextrec +nint +nml +none +not +nullify +number +number_of_processors +nworkers +offset +only +open +opened +operator +optional +otherwise +out +ovefl +pack +pad +parameter +pass +pause +peekcharqq +pending +pointer +popcnt +poppar +pos +position +precfill +precision +present +print +private +procedure +product +program +prompt +protected +public +qabs +qacos +qacosd +qasin +qasind +qatan +qatan2 +qatand +qcmplx +qconjg +qcos +qcosd +qcosh +qdim +qexp +qext +qextd +qfloat +qimag +qlog +qlog10 +qmax1 +qmin1 +qmod +qreal +qsign +qsin +qsind +qsinh +qsqrt +qtan +qtand +qtanh +quit +quote +radix +radix +ran +rand +random +random_number +random_seed +randu +range +read +readwrite +real +rec +recl +record +recordtype +recursive +remote +repeat +reshape +result +return +rewind +rewrite +rrspacing +rshift +save +scale +scan +secnds +segment +select +selectcase +selected_int_kind +selected_real_kind +selecttype +sequence +sequential +set_exponent +setdat +settim +shape +sign +sin +sind +sinh +size +sizeof +sngl +snglq +spacing +spread +sqrt +stat +status +stop +stream +structure +subroutine +sum +system +system_clock +tan +tand +tanh +target +then +timer +tiny +to +transfer +transpose +trim +type +ubound +undfl +unformatted +union +unit +unlock +unpack +until +use +val +value +verify +virtual +volatile +wait +where +while +write +zabs +zcos +zexp +zlog +zsin +zsqrt \ No newline at end of file diff --git a/PowerEditor/bin/plugins/APIs/java.api b/PowerEditor/bin/plugins/APIs/java.api new file mode 100644 index 00000000..3ca6390e --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/java.api @@ -0,0 +1,3700 @@ +ARG_IN +ARG_INOUT +ARG_OUT +ASCII +AVT +AVTPart +AVTPartSimple +AVTPartXPath +AWTError +AWTEvent +AWTEventListener +AWTEventListenerProxy +AWTEventMulticaster +AWTException +AWTKeyStroke +AWTPermission +AbstractAction +AbstractActionPropertyChangeListener +AbstractBorder +AbstractButton +AbstractCellEditor +AbstractCollection +AbstractColorChooserPanel +AbstractDocument +AbstractFilter +AbstractInterruptibleChannel +AbstractLayoutCache +AbstractList +AbstractListModel +AbstractMap +AbstractMethodError +AbstractPreferences +AbstractSelectableChannel +AbstractSelectionKey +AbstractSelector +AbstractSequentialList +AbstractSet +AbstractSpinnerModel +AbstractTableModel +AbstractUndoableEdit +AbstractView +AbstractWriter +AccessControlContext +AccessControlException +AccessController +AccessException +Accessible +AccessibleAction +AccessibleBundle +AccessibleComponent +AccessibleContext +AccessibleEditableText +AccessibleExtendedComponent +AccessibleExtendedTable +AccessibleHTML +AccessibleHyperlink +AccessibleHypertext +AccessibleIcon +AccessibleKeyBinding +AccessibleObject +AccessibleRelation +AccessibleRelationSet +AccessibleResourceBundle +AccessibleRole +AccessibleSelection +AccessibleState +AccessibleStateSet +AccessibleTable +AccessibleTableModelChange +AccessibleText +AccessibleValue +AccountExpiredException +Acl +AclEntry +AclNotFoundException +Action +ActionEvent +ActionListener +ActionMap +ActionMapUIResource +Activatable +ActivateFailedException +ActivationDesc +ActivationException +ActivationGroup +ActivationGroupDesc +ActivationGroupID +ActivationID +ActivationInstantiator +ActivationMonitor +ActivationSystem +Activator +ActivatorHelper +ActivatorHolder +ActivatorOperations +ActiveEvent +ActiveObjectMap +AdapterActivator +AdapterActivatorOperations +AdapterAlreadyExists +AdapterAlreadyExistsHelper +AdapterInactive +AdapterInactiveHelper +AdapterNonExistent +AdapterNonExistentHelper +AddressHelper +AddressingDispositionException +AddressingDispositionHelper +Adjustable +AdjustmentEvent +AdjustmentListener +Adler32 +AdobeMarkerSegment +AffineTransform +AffineTransformOp +AlgorithmParameterGenerator +AlgorithmParameterGeneratorSpi +AlgorithmParameterSpec +AlgorithmParameters +AlgorithmParametersSpi +AllPermission +AlphaComposite +AlreadyBound +AlreadyBoundException +AlreadyBoundHelper +AlreadyBoundHolder +AlreadyConnectedException +AlternateIIOPAddressComponent +AncestorEvent +AncestorListener +AncestorNotifier +AncestorStepPattern +And +Annotation +Any +AnyHolder +AnyImpl +AnyImplHelper +AnySeqHelper +AnySeqHolder +AppConfigurationEntry +Applet +AppletContext +AppletInitializer +AppletStub +ApplicationException +Arc2D +ArcIterator +Area +AreaAveragingScaleFilter +Arg +ArithmeticException +Array +ArrayIndexOutOfBoundsException +ArrayList +ArrayStoreException +Arrays +AssertionError +AssertionStatusDirectives +AsyncBoxView +AsynchInvoke +AsynchronousCloseException +AttList +Attr +Attribute +AttributeDecl +AttributeException +AttributeInUseException +AttributeIterator +AttributeList +AttributeListImpl +AttributeModificationException +AttributeNode +AttributeNode1 +AttributeSet +AttributeSetUtilities +AttributeValue +AttributedCharacterIterator +AttributedString +Attributes +AttributesEx +AttributesExImpl +AttributesImpl +AudioClip +AuthPermission +AuthenticationException +AuthenticationNotSupportedException +Authenticator +Autoscroll +Autoscroller +AxesWalker +Axis +BAD_CONTEXT +BAD_INV_ORDER +BAD_OPERATION +BAD_PARAM +BAD_POLICY +BAD_POLICY_TYPE +BAD_POLICY_VALUE +BAD_TYPECODE +BRView +BackingStoreException +BadKind +BadLocationException +BadServerDefinition +BadServerDefinitionHelper +BadServerDefinitionHolder +BadServerIdHandler +BandCombineOp +BandedSampleModel +Base64 +BasicArrowButton +BasicAttribute +BasicAttributes +BasicBorders +BasicButtonListener +BasicButtonUI +BasicCheckBoxMenuItemUI +BasicCheckBoxUI +BasicColorChooserUI +BasicComboBoxEditor +BasicComboBoxRenderer +BasicComboBoxUI +BasicComboPopup +BasicDesktopIconUI +BasicDesktopPaneUI +BasicDirectoryModel +BasicDragGestureRecognizer +BasicDropTargetListener +BasicEditorPaneUI +BasicFileChooserUI +BasicFormattedTextFieldUI +BasicGraphicsUtils +BasicHTML +BasicIconFactory +BasicInternalFrameTitlePane +BasicInternalFrameUI +BasicLabelUI +BasicListUI +BasicLookAndFeel +BasicMenuBarUI +BasicMenuItemUI +BasicMenuUI +BasicOptionPaneUI +BasicPanelUI +BasicPasswordFieldUI +BasicPermission +BasicPopupMenuSeparatorUI +BasicPopupMenuUI +BasicProgressBarUI +BasicRadioButtonMenuItemUI +BasicRadioButtonUI +BasicRootPaneUI +BasicScrollBarUI +BasicScrollPaneUI +BasicSeparatorUI +BasicSliderUI +BasicSpinnerUI +BasicSplitPaneDivider +BasicSplitPaneUI +BasicStroke +BasicTabbedPaneUI +BasicTableHeaderUI +BasicTableUI +BasicTextAreaUI +BasicTextFieldUI +BasicTextPaneUI +BasicTextUI +BasicToggleButtonUI +BasicToolBarSeparatorUI +BasicToolBarUI +BasicToolTipUI +BasicTransferable +BasicTreeUI +BasicViewportUI +BatchUpdateException +BeanContext +BeanContextChild +BeanContextChildComponentProxy +BeanContextChildSupport +BeanContextContainerProxy +BeanContextEvent +BeanContextMembershipEvent +BeanContextMembershipListener +BeanContextProxy +BeanContextServiceAvailableEvent +BeanContextServiceProvider +BeanContextServiceProviderBeanInfo +BeanContextServiceRevokedEvent +BeanContextServiceRevokedListener +BeanContextServices +BeanContextServicesListener +BeanContextServicesSupport +BeanContextSupport +BeanDescriptor +BeanInfo +Beans +BevelBorder +Bidi +BigDecimal +BigInteger +BinaryRefAddr +BindException +Binding +BindingHelper +BindingHolder +BindingIterator +BindingIteratorHelper +BindingIteratorHolder +BindingIteratorImpl +BindingIteratorOperations +BindingIteratorPOA +BindingListHelper +BindingListHolder +BindingType +BindingTypeHelper +BindingTypeHolder +BitSet +BitSieve +Bits +Blob +BlockView +Book +Bool +BoolStack +Boolean +BooleanHolder +BooleanSeqHelper +BooleanSeqHolder +BootStrapActivation +BootstrapServer +Border +BorderFactory +BorderLayout +BorderUIResource +BoundedRangeModel +Bounds +Box +BoxLayout +BoxView +BoxedValueHelper +BreakDictionary +BreakIterator +Buffer +BufferCapabilities +BufferManagerFactory +BufferManagerRead +BufferManagerReadGrow +BufferManagerReadStream +BufferManagerWrite +BufferManagerWriteCollect +BufferManagerWriteGrow +BufferManagerWriteStream +BufferOverflowException +BufferQueue +BufferStrategy +BufferUnderflowException +BufferedImage +BufferedImageFilter +BufferedImageOp +BufferedInputStream +BufferedOutputStream +BufferedReader +BufferedWriter +Button +ButtonGroup +ButtonModel +ButtonPeer +ButtonUI +Byte +ByteArrayInputStream +ByteArrayOutputStream +ByteBuffer +ByteBufferAsCharBufferB +ByteBufferAsCharBufferL +ByteBufferAsCharBufferRB +ByteBufferAsCharBufferRL +ByteBufferAsDoubleBufferB +ByteBufferAsDoubleBufferL +ByteBufferAsDoubleBufferRB +ByteBufferAsDoubleBufferRL +ByteBufferAsFloatBufferB +ByteBufferAsFloatBufferL +ByteBufferAsFloatBufferRB +ByteBufferAsFloatBufferRL +ByteBufferAsIntBufferB +ByteBufferAsIntBufferL +ByteBufferAsIntBufferRB +ByteBufferAsIntBufferRL +ByteBufferAsLongBufferB +ByteBufferAsLongBufferL +ByteBufferAsLongBufferRB +ByteBufferAsLongBufferRL +ByteBufferAsShortBufferB +ByteBufferAsShortBufferL +ByteBufferAsShortBufferRB +ByteBufferAsShortBufferRL +ByteBufferWithInfo +ByteChannel +ByteHolder +ByteLookupTable +ByteOrder +CDATASection +CDREncapsCodec +CDRInputStream +CDRInputStreamBase +CDRInputStream_1_0 +CDRInputStream_1_1 +CDRInputStream_1_2 +CDROutputStream +CDROutputStreamBase +CDROutputStream_1_0 +CDROutputStream_1_1 +CDROutputStream_1_2 +CDataNode +CMMException +COMM_FAILURE +COMMarkerSegment +CORBAObjectImpl +CRC32 +CRL +CRLException +CRLSelector +CSS +CSS2Properties +CSSCharsetRule +CSSFontFaceRule +CSSImportRule +CSSMediaRule +CSSPageRule +CSSParser +CSSPrimitiveValue +CSSRule +CSSRuleList +CSSStyleDeclaration +CSSStyleRule +CSSStyleSheet +CSSUnknownRule +CSSValue +CSSValueList +CTX_RESTRICT_SCOPE +CacheTable +CachedCodeBase +Calendar +CallableStatement +Callback +CallbackHandler +CancelRequestMessage +CancelRequestMessage_1_0 +CancelRequestMessage_1_1 +CancelRequestMessage_1_2 +CancelablePrintJob +CancelledKeyException +CannotProceed +CannotProceedException +CannotProceedHelper +CannotProceedHolder +CannotRedoException +CannotUndoException +Canvas +CanvasPeer +CardLayout +Caret +CaretEvent +CaretListener +CellEditor +CellEditorListener +CellRendererPane +CenterLayout +CertPath +CertPathBuilder +CertPathBuilderException +CertPathBuilderResult +CertPathBuilderSpi +CertPathParameters +CertPathValidator +CertPathValidatorException +CertPathValidatorResult +CertPathValidatorSpi +CertSelector +CertStore +CertStoreException +CertStoreParameters +CertStoreSpi +Certificate +CertificateEncodingException +CertificateException +CertificateExpiredException +CertificateFactory +CertificateFactorySpi +CertificateNotYetValidException +CertificateParsingException +ChangeEvent +ChangeListener +ChangedCharSetException +Channel +ChannelBinding +Channels +CharArrayIterator +CharArrayReader +CharArrayWriter +CharBuffer +CharConversionException +CharHolder +CharInfo +CharKey +CharSeqHelper +CharSeqHolder +CharSequence +CharSet +Character +CharacterBreakData +CharacterCodingException +CharacterData +CharacterIterator +CharacterIteratorFieldDelegate +Charset +CharsetDecoder +CharsetEncoder +CharsetProvider +Checkbox +CheckboxGroup +CheckboxMenuItem +CheckboxMenuItemPeer +CheckboxPeer +CheckedInputStream +CheckedOutputStream +Checksum +ChildIterator +ChildTestIterator +Choice +ChoiceCallback +ChoiceFormat +ChoicePeer +Chromaticity +ChunkedIntArray +Class +ClassCastException +ClassCircularityError +ClassDesc +ClassFormatError +ClassLoader +ClassNotFoundException +ClientDelegate +ClientGIOP +ClientRequest +ClientRequestImpl +ClientRequestInfo +ClientRequestInfoImpl +ClientRequestInfoOperations +ClientRequestInterceptor +ClientRequestInterceptorOperations +ClientResponse +ClientResponseImpl +ClientSC +ClientSubcontract +Clipboard +ClipboardOwner +Clob +CloneNotSupportedException +Cloneable +ClonerToResultTree +ClosedByInterruptException +ClosedChannelException +ClosedSelectorException +Closure +CodeSetCache +CodeSetComponentInfo +CodeSetConversion +CodeSetServiceContext +CodeSets +CodeSetsComponent +CodeSource +Codec +CodecFactory +CodecFactoryHelper +CodecFactoryImpl +CodecFactoryOperations +CodecOperations +CoderMalfunctionError +CoderResult +CodingErrorAction +CollationElementIterator +CollationKey +CollationRules +Collator +Collection +CollectionCertStoreParameters +Collections +Color +ColorChooserComponentFactory +ColorChooserUI +ColorConvertOp +ColorModel +ColorPaintContext +ColorSelectionModel +ColorSpace +ColorSupported +ColorUIResource +ComboBoxEditor +ComboBoxModel +ComboBoxUI +ComboPopup +CommandHandler +Comment +CommentNode +CommentView +CommunicationException +Comparable +Comparator +Compiler +CompletionStatus +CompletionStatusHelper +Component +ComponentAdapter +ComponentColorModel +ComponentEvent +ComponentIdHelper +ComponentInputMap +ComponentInputMapUIResource +ComponentListener +ComponentOrientation +ComponentPeer +ComponentSampleModel +ComponentUI +ComponentView +Composite +CompositeContext +CompositeName +CompositeView +CompoundBorder +CompoundEdit +CompoundName +Compression +ConcurrentModificationException +Condition +Conditional +ConfigFile +Configuration +ConfigurationException +ConfirmationCallback +ConnectException +ConnectIOException +Connection +ConnectionEvent +ConnectionEventListener +ConnectionPendingException +ConnectionPool +ConnectionPoolDataSource +ConnectionPoolManager +ConnectionTable +ConsoleHandler +Constant +Constants +Constructor +Container +ContainerAdapter +ContainerEvent +ContainerListener +ContainerOrderFocusTraversalPolicy +ContainerPeer +ContentHandler +ContentHandlerFactory +ContentModel +ContentModelState +Context +ContextImpl +ContextList +ContextListImpl +ContextMatchStepPattern +ContextNodeList +ContextNotEmptyException +ContextualRenderedImageFactory +ContinuationContext +ContinuationDirContext +Control +ControlFactory +ConvolveOp +CookieHolder +Copies +CopiesSupported +CorbaLoc +CorbaName +CorbaResourceUtil +CoroutineManager +CoroutineParser +CoroutineSAXFilterTest +CoroutineSAXParser +CoroutineSAXParser_Xerces +Counter +CountersTable +CredentialExpiredException +CropImageFilter +Crypt +CubicCurve2D +CubicIterator +Currency +CurrencyData +Current +CurrentHelper +CurrentHolder +CurrentOperations +Cursor +CustomMarshal +CustomStringPool +CustomValue +Customizer +DATA_CONVERSION +DGC +DHTMarkerSegment +DOM2DTM +DOM2Helper +DOMBuilder +DOMException +DOMHelper +DOMImplementation +DOMImplementationCSS +DOMImplementationImpl +DOMLocator +DOMOrder +DOMResult +DOMSerializer +DOMSource +DQTMarkerSegment +DRIMarkerSegment +DSAKey +DSAKeyPairGenerator +DSAParameterSpec +DSAParams +DSAPrivateKey +DSAPrivateKeySpec +DSAPublicKey +DSAPublicKeySpec +DTD +DTDConstants +DTDHandler +DTM +DTMAxisIterator +DTMAxisIteratorBase +DTMAxisTraverser +DTMConfigurationException +DTMDOMException +DTMDefaultBase +DTMDefaultBaseIterators +DTMDefaultBaseTraversers +DTMDocument +DTMDocumentImpl +DTMException +DTMFilter +DTMIterator +DTMManager +DTMManagerDefault +DTMNamedNodeMap +DTMNodeIterator +DTMNodeList +DTMNodeProxy +DTMSafeStringPool +DTMStringPool +DTMTreeWalker +DTMWSFilter +DataBuffer +DataBufferByte +DataBufferDouble +DataBufferFloat +DataBufferInt +DataBufferShort +DataBufferUShort +DataFlavor +DataFormatException +DataInput +DataInputStream +DataNode +DataOutput +DataOutputStream +DataSource +DataTruncation +DatabaseMetaData +DatagramChannel +DatagramPacket +DatagramSocket +DatagramSocketImpl +DatagramSocketImplFactory +Date +DateFormat +DateFormatSymbols +DateFormatter +DateTimeAtCompleted +DateTimeAtCreation +DateTimeAtProcessing +DateTimeSyntax +DebugGraphics +DebugGraphicsFilter +DebugGraphicsInfo +DebugGraphicsObserver +DecimalFormat +DecimalFormatProperties +DecimalFormatSymbols +DecimalToRoman +DeclHandler +DefaultBoundedRangeModel +DefaultButtonModel +DefaultCaret +DefaultCellEditor +DefaultColorSelectionModel +DefaultComboBoxModel +DefaultConnectionPool +DefaultDesktopManager +DefaultEditorKit +DefaultErrorHandler +DefaultFocusManager +DefaultFocusTraversalPolicy +DefaultFormatter +DefaultFormatterFactory +DefaultHSBChooserPanel +DefaultHandler +DefaultHighlighter +DefaultKeyboardFocusManager +DefaultListCellRenderer +DefaultListModel +DefaultListSelectionModel +DefaultMenuLayout +DefaultMetalTheme +DefaultMutableTreeNode +DefaultPersistenceDelegate +DefaultPreviewPanel +DefaultRGBChooserPanel +DefaultSingleSelectionModel +DefaultSocketFactory +DefaultStyledDocument +DefaultSwatchChooserPanel +DefaultTableCellRenderer +DefaultTableColumnModel +DefaultTableModel +DefaultTextUI +DefaultTreeCellEditor +DefaultTreeCellRenderer +DefaultTreeModel +DefaultTreeSelectionModel +DefaultValidationErrorHandler +DefinitionKind +DefinitionKindHelper +Deflater +DeflaterOutputStream +Delegate +DelegateImpl +DelegatingDefaultFocusManager +DelegationPermission +DescendantIterator +DesignMode +DesktopIconUI +DesktopManager +DesktopPaneUI +Destination +DestroyFailedException +Destroyable +Dialog +DialogCallbackHandler +DialogPeer +Dictionary +DictionaryBasedBreakIterator +DigestException +DigestInputStream +DigestOutputStream +DigitList +DigraphNode +Dimension +Dimension2D +DimensionUIResource +DirContext +DirObjectFactory +DirStateFactory +DirectByteBuffer +DirectByteBufferR +DirectCharBufferRS +DirectCharBufferRU +DirectCharBufferS +DirectCharBufferU +DirectColorModel +DirectDoubleBufferRS +DirectDoubleBufferRU +DirectDoubleBufferS +DirectDoubleBufferU +DirectFloatBufferRS +DirectFloatBufferRU +DirectFloatBufferS +DirectFloatBufferU +DirectIntBufferRS +DirectIntBufferRU +DirectIntBufferS +DirectIntBufferU +DirectLongBufferRS +DirectLongBufferRU +DirectLongBufferS +DirectLongBufferU +DirectShortBufferRS +DirectShortBufferRU +DirectShortBufferS +DirectShortBufferU +DirectoryManager +DisplayMode +Div +DnDConstants +DnDEventMulticaster +Doc +DocAttribute +DocAttributeSet +DocFlavor +DocPrintJob +Doctype +Document +DocumentBuilder +DocumentBuilderFactory +DocumentBuilderFactoryImpl +DocumentBuilderImpl +DocumentCSS +DocumentEvent +DocumentEx +DocumentFilter +DocumentFragment +DocumentHandler +DocumentListener +DocumentName +DocumentParser +DocumentStyle +DocumentTraversal +DocumentType +DocumentView +DomEx +DomainCombiner +DomainManager +DomainManagerOperations +Double +DoubleBuffer +DoubleHolder +DoubleSeqHelper +DoubleSeqHolder +DragGestureEvent +DragGestureListener +DragGestureRecognizer +DragSource +DragSourceAdapter +DragSourceContext +DragSourceContextPeer +DragSourceDragEvent +DragSourceDropEvent +DragSourceEvent +DragSourceListener +DragSourceMotionListener +Driver +DriverManager +DriverPropertyInfo +DropTarget +DropTargetAdapter +DropTargetContext +DropTargetContextPeer +DropTargetDragEvent +DropTargetDropEvent +DropTargetEvent +DropTargetListener +DropTargetPeer +DuplicateName +DuplicateNameHelper +DuplicateServiceContext +DynAny +DynAnyBasicImpl +DynAnyCollectionImpl +DynAnyComplexImpl +DynAnyConstructedImpl +DynAnyFactory +DynAnyFactoryHelper +DynAnyFactoryImpl +DynAnyFactoryOperations +DynAnyHelper +DynAnyImpl +DynAnyOperations +DynAnySeqHelper +DynAnyUtil +DynArray +DynArrayHelper +DynArrayImpl +DynArrayOperations +DynEnum +DynEnumHelper +DynEnumImpl +DynEnumOperations +DynFixed +DynFixedHelper +DynFixedImpl +DynFixedOperations +DynSequence +DynSequenceHelper +DynSequenceImpl +DynSequenceOperations +DynStruct +DynStructHelper +DynStructImpl +DynStructOperations +DynUnion +DynUnionHelper +DynUnionImpl +DynUnionOperations +DynValue +DynValueBox +DynValueBoxImpl +DynValueBoxOperations +DynValueCommon +DynValueCommonImpl +DynValueCommonOperations +DynValueHelper +DynValueImpl +DynValueOperations +DynamicImplementation +ENCODING_CDR_ENCAPS +EOFException +EditableView +EditorKit +ElemApplyImport +ElemApplyTemplates +ElemAttribute +ElemAttributeSet +ElemCallTemplate +ElemChoose +ElemComment +ElemCopy +ElemCopyOf +ElemDesc +ElemElement +ElemEmpty +ElemExtensionCall +ElemExtensionDecl +ElemExtensionScript +ElemFallback +ElemForEach +ElemIf +ElemLiteralResult +ElemMessage +ElemNumber +ElemOtherwise +ElemPI +ElemParam +ElemSort +ElemTemplate +ElemTemplateElement +ElemText +ElemTextLiteral +ElemUnknown +ElemUse +ElemValueOf +ElemVariable +ElemWhen +ElemWithParam +Element +ElementCSSInlineStyle +ElementDecl +ElementEx +ElementFactory +ElementIterator +ElementNode +ElementNode2 +ElementValidator +Ellipse2D +EllipseIterator +EmptyBorder +EmptyStackException +EncapsInputStream +EncapsOutputStream +EncodedKeySpec +Encoder +Encoding +EncodingInfo +Encodings +EndOfInputException +EndPoint +EndPointImpl +EndPointInfo +EndPointInfoHelper +EndPointInfoHolder +EndSelectionEvent +EndpointInfoListHelper +EndpointInfoListHolder +Entity +EntityDecl +EntityReference +EntityResolver +EntryPair +EntryPoint +EnumSyntax +Enumeration +Environment +EnvironmentCheck +EnvironmentImpl +Equals +Error +ErrorHandler +ErrorListener +ErrorManager +EtchedBorder +Event +EventContext +EventDirContext +EventDispatchThread +EventException +EventHandler +EventListener +EventListenerList +EventListenerProxy +EventObject +EventQueue +EventSetDescriptor +EventTarget +Exception +ExceptionInInitializerError +ExceptionList +ExceptionListImpl +ExceptionListener +ExpandVetoException +ExpandedNameTable +ExportException +Expression +ExpressionContext +ExtendedRequest +ExtendedResponse +ExtensionHandler +ExtensionHandlerGeneral +ExtensionHandlerJava +ExtensionHandlerJavaClass +ExtensionHandlerJavaPackage +Extensions +ExtensionsTable +ExternalEntity +Externalizable +FREE_MEM +FVDCodeBaseImpl +FactoryConfigurationError +FactoryEnumeration +FactoryFinder +FailedLoginException +FastStringBuffer +FeatureDescriptor +Fidelity +Field +FieldNameHelper +FieldPosition +FieldView +File +FileCacheImageInputStream +FileCacheImageOutputStream +FileChannel +FileChooserUI +FileDescriptor +FileDialog +FileDialogPeer +FileFilter +FileHandler +FileImageInputStream +FileImageInputStreamSpi +FileImageOutputStream +FileImageOutputStreamSpi +FileInputStream +FileLock +FileLockInterruptionException +FileNameMap +FileNotFoundException +FileOutputStream +FilePermission +FileReader +FileSystem +FileSystemView +FileView +FileWriter +FilenameFilter +Filter +FilterExprWalker +FilterInputStream +FilterOutputStream +FilterReader +FilterWriter +FilteredImageSource +FinalReference +Finalizer +Finishings +FixedHeightLayoutCache +FixedHolder +FlatteningPathIterator +FlavorException +FlavorMap +FlavorTable +Float +FloatBuffer +FloatHolder +FloatSeqHelper +FloatSeqHolder +FloatingDecimal +FlowLayout +FlowView +FocusAdapter +FocusEvent +FocusListener +FocusManager +FocusTraversalPolicy +Font +FontFormatException +FontMetrics +FontPeer +FontRenderContext +FontUIResource +FormView +Format +FormatMismatch +FormatMismatchHelper +Formatter +ForwardException +ForwardRequest +ForwardRequestHelper +FoundIndex +FragmentMessage +FragmentMessage_1_1 +FragmentMessage_1_2 +Frame +FramePeer +FrameSetView +FrameView +FreezableList +FuncBoolean +FuncCeiling +FuncConcat +FuncContains +FuncCount +FuncCurrent +FuncDoclocation +FuncDocument +FuncExtElementAvailable +FuncExtFunction +FuncExtFunctionAvailable +FuncFalse +FuncFloor +FuncFormatNumb +FuncGenerateId +FuncId +FuncKey +FuncLang +FuncLast +FuncLoader +FuncLocalPart +FuncNamespace +FuncNormalizeSpace +FuncNot +FuncNumber +FuncPosition +FuncQname +FuncRound +FuncStartsWith +FuncString +FuncStringLength +FuncSubstring +FuncSubstringAfter +FuncSubstringBefore +FuncSum +FuncSystemProperty +FuncTranslate +FuncTrue +FuncUnparsedEntityURI +Function +Function2Args +Function3Args +FunctionDef1Arg +FunctionMultiArgs +FunctionOneArg +FunctionPattern +FunctionTable +Future +GIFImageMetadata +GIFImageMetadataFormat +GIFImageMetadataFormatResources +GIFImageReader +GIFImageReaderSpi +GIFStreamMetadata +GIFStreamMetadataFormat +GIFStreamMetadataFormatResources +GIOPImpl +GIOPVersion +GSSContext +GSSCredential +GSSException +GSSManager +GSSName +GSSUtil +GZIPInputStream +GZIPOutputStream +GapContent +GapVector +GatheringByteChannel +GeneralPath +GeneralPathIterator +GeneralSecurityException +GenerateEvent +GenericIdEncapsulation +GenericPOAClientSC +GenericPOAServerSC +GenericTaggedComponent +GenericTaggedProfile +GetEndPointInfoAgainException +GetORBPropertiesFileAction +GlyphJustificationInfo +GlyphMetrics +GlyphPainter1 +GlyphPainter2 +GlyphVector +GlyphView +GradientPaint +GradientPaintContext +GraphicAttribute +Graphics +Graphics2D +GraphicsCallback +GraphicsConfigTemplate +GraphicsConfiguration +GraphicsDevice +GraphicsEnvironment +GraphicsWrapper +GrayFilter +GregorianCalendar +GridBagConstraints +GridBagLayout +GridLayout +Group +Gt +Gte +Guard +GuardedObject +HRuleView +HTML +HTMLAnchorElement +HTMLAppletElement +HTMLAreaElement +HTMLBRElement +HTMLBaseElement +HTMLBaseFontElement +HTMLBodyElement +HTMLButtonElement +HTMLCollection +HTMLDListElement +HTMLDOMImplementation +HTMLDirectoryElement +HTMLDivElement +HTMLDocument +HTMLEditorKit +HTMLElement +HTMLFieldSetElement +HTMLFontElement +HTMLFormElement +HTMLFrameElement +HTMLFrameHyperlinkEvent +HTMLFrameSetElement +HTMLHRElement +HTMLHeadElement +HTMLHeadingElement +HTMLHtmlElement +HTMLIFrameElement +HTMLImageElement +HTMLInputElement +HTMLIsIndexElement +HTMLLIElement +HTMLLabelElement +HTMLLegendElement +HTMLLinkElement +HTMLMapElement +HTMLMenuElement +HTMLMetaElement +HTMLModElement +HTMLOListElement +HTMLObjectElement +HTMLOptGroupElement +HTMLOptionElement +HTMLParagraphElement +HTMLParamElement +HTMLPreElement +HTMLQuoteElement +HTMLScriptElement +HTMLSelectElement +HTMLStyleElement +HTMLTableCaptionElement +HTMLTableCellElement +HTMLTableColElement +HTMLTableElement +HTMLTableRowElement +HTMLTableSectionElement +HTMLTextAreaElement +HTMLTitleElement +HTMLUListElement +HTMLWriter +Handler +HandlerBase +HasControls +HashAttributeSet +HashDocAttributeSet +HashMap +HashPrintJobAttributeSet +HashPrintRequestAttributeSet +HashPrintServiceAttributeSet +HashSet +Hashtable +HeadlessException +HeapByteBuffer +HeapByteBufferR +HeapCharBuffer +HeapCharBufferR +HeapDoubleBuffer +HeapDoubleBufferR +HeapFloatBuffer +HeapFloatBufferR +HeapIntBuffer +HeapIntBufferR +HeapLongBuffer +HeapLongBufferR +HeapShortBuffer +HeapShortBufferR +HexOutputStream +HiddenTagView +HierarchyBoundsAdapter +HierarchyBoundsListener +HierarchyEvent +HierarchyListener +Highlighter +HostInfo +HttpURLConnection +HyperlinkEvent +HyperlinkListener +ICC_ColorSpace +ICC_Profile +ICC_ProfileGray +ICC_ProfileRGB +IDLEntity +IDLType +IDLTypeHelper +IDLTypeOperations +ID_ASSIGNMENT_POLICY_ID +ID_UNIQUENESS_POLICY_ID +IIOByteBuffer +IIOException +IIOImage +IIOInvalidTreeException +IIOMetadata +IIOMetadataController +IIOMetadataFormat +IIOMetadataFormatImpl +IIOMetadataNode +IIOPAddress +IIOPAddressBase +IIOPAddressFutureImpl +IIOPAddressImpl +IIOPConnection +IIOPInputStream +IIOPInputStream_1_3 +IIOPInputStream_1_3_1 +IIOPOutputStream +IIOPOutputStream_1_3 +IIOPOutputStream_1_3_1 +IIOPProfile +IIOPProfileTemplate +IIOP_CLEAR_TEXT +IIOParam +IIOParamController +IIOReadProgressListener +IIOReadUpdateListener +IIOReadWarningListener +IIORegistry +IIOServiceProvider +IIOWriteProgressListener +IIOWriteWarningListener +IMPLICIT_ACTIVATION_POLICY_ID +IMP_LIMIT +INITIALIZE +INSObjectKeyEntry +INSObjectKeyMap +INSSubcontract +INTERNAL +INTF_REPOS +INVALID_TRANSACTION +INV_FLAG +INV_IDENT +INV_OBJREF +INV_POLICY +IOException +IOR +IORAddressingInfo +IORAddressingInfoHelper +IORHelper +IORHolder +IORInfo +IORInfoExt +IORInfoImpl +IORInfoOperations +IORInterceptor +IORInterceptorOperations +IORTemplate +IRObject +IRObjectOperations +Icon +IconUIResource +IconView +IdAssignmentPolicy +IdAssignmentPolicyImpl +IdAssignmentPolicyOperations +IdAssignmentPolicyValue +IdEncapsulation +IdEncapsulationBase +IdEncapsulationContainerBase +IdEncapsulationFactory +IdEncapsulationFactoryFinder +IdUniquenessPolicy +IdUniquenessPolicyImpl +IdUniquenessPolicyOperations +IdUniquenessPolicyValue +Identifiable +IdentifiableContainerBase +IdentifierHelper +Identity +IdentityHashMap +IdentityHashtable +IdentityScope +IllegalAccessError +IllegalAccessException +IllegalArgumentException +IllegalBlockingModeException +IllegalCharsetNameException +IllegalComponentStateException +IllegalMonitorStateException +IllegalPathStateException +IllegalSelectorException +IllegalStateException +IllegalThreadStateException +Image +ImageCapabilities +ImageConsumer +ImageFilter +ImageFormatException +ImageGraphicAttribute +ImageIO +ImageIcon +ImageInputStream +ImageInputStreamImpl +ImageInputStreamSpi +ImageObserver +ImageOutputStream +ImageOutputStreamImpl +ImageOutputStreamSpi +ImageProducer +ImageReadParam +ImageReader +ImageReaderSpi +ImageReaderWriterSpi +ImageTranscoder +ImageTranscoderSpi +ImageTypeSpecifier +ImageView +ImageWriteParam +ImageWriter +ImageWriterSpi +ImagingOpException +ImplicitActivationPolicy +ImplicitActivationPolicyImpl +ImplicitActivationPolicyOperations +ImplicitActivationPolicyValue +IncompatibleClassChangeError +InconsistentTypeCode +InconsistentTypeCodeHelper +IncrementalSAXSource +IncrementalSAXSource_Filter +IncrementalSAXSource_Xerces +IndexColorModel +IndexOutOfBoundsException +IndexedPropertyDescriptor +IndirectionException +Inet4Address +Inet6Address +InetAddress +InetSocketAddress +Inflater +InflaterInputStream +InheritableThreadLocal +InitialContext +InitialContextFactory +InitialContextFactoryBuilder +InitialDirContext +InitialLdapContext +InitialNameService +InitialNameServiceHelper +InitialNameServiceHolder +InitialNameServiceOperations +InitialNamingClient +InitialNamingImpl +InlineView +InputContext +InputEntity +InputEvent +InputMap +InputMapUIResource +InputMethod +InputMethodContext +InputMethodDescriptor +InputMethodEvent +InputMethodHighlight +InputMethodListener +InputMethodRequests +InputSource +InputStream +InputStreamAdapter +InputStreamHook +InputStreamImageInputStreamSpi +InputStreamReader +InputSubset +InputVerifier +Insets +InsetsUIResource +InstantiationError +InstantiationException +InsufficientResourcesException +IntBuffer +IntHolder +IntStack +IntVector +Integer +IntegerSyntax +InterOperableNamingImpl +Interceptor +InterceptorInvoker +InterceptorList +InterceptorOperations +InternalBindingKey +InternalBindingValue +InternalEntity +InternalError +InternalFrameAdapter +InternalFrameEvent +InternalFrameFocusTraversalPolicy +InternalFrameListener +InternalFrameUI +InternalRuntimeForwardRequest +InternationalFormatter +InterruptedException +InterruptedIOException +InterruptedNamingException +InterruptibleChannel +IntrospectionException +Introspector +Invalid +InvalidAddress +InvalidAddressHelper +InvalidAddressHolder +InvalidAlgorithmParameterException +InvalidAttributeIdentifierException +InvalidAttributeValueException +InvalidAttributesException +InvalidClassException +InvalidDnDOperationException +InvalidKeyException +InvalidKeySpecException +InvalidMarkException +InvalidName +InvalidNameException +InvalidNameHelper +InvalidNameHolder +InvalidORBid +InvalidORBidHelper +InvalidORBidHolder +InvalidObjectException +InvalidParameterException +InvalidParameterSpecException +InvalidPolicy +InvalidPolicyHelper +InvalidPreferencesFormatException +InvalidSearchControlsException +InvalidSearchFilterException +InvalidSeq +InvalidSlot +InvalidSlotHelper +InvalidTypeForEncoding +InvalidTypeForEncodingHelper +InvalidValue +InvalidValueHelper +InvocationEvent +InvocationHandler +InvocationInfo +InvocationTargetException +InvokeHandler +IsindexView +IstringHelper +ItemEvent +ItemListener +ItemSelectable +Iterator +IteratorPool +JApplet +JButton +JCheckBox +JCheckBoxMenuItem +JColorChooser +JComboBox +JComponent +JDKBridge +JDKClassLoader +JDesktopPane +JDialog +JEditorPane +JFIFMarkerSegment +JFileChooser +JFormattedTextField +JFrame +JIDLObjectKeyTemplate +JInternalFrame +JLabel +JLayeredPane +JList +JMenu +JMenuBar +JMenuItem +JOptionPane +JPEG +JPEGBuffer +JPEGCodec +JPEGDecodeParam +JPEGEncodeParam +JPEGHuffmanTable +JPEGImageDecoder +JPEGImageEncoder +JPEGImageMetadataFormat +JPEGImageMetadataFormatResources +JPEGImageReadParam +JPEGImageReader +JPEGImageReaderResources +JPEGImageReaderSpi +JPEGImageWriteParam +JPEGImageWriter +JPEGImageWriterResources +JPEGImageWriterSpi +JPEGMetadata +JPEGMetadataFormat +JPEGMetadataFormatResources +JPEGQTable +JPEGStreamMetadataFormat +JPEGStreamMetadataFormatResources +JPanel +JPasswordField +JPopupMenu +JProgressBar +JRadioButton +JRadioButtonMenuItem +JRootPane +JScrollBar +JScrollPane +JSeparator +JSlider +JSpinner +JSplitPane +JTabbedPane +JTable +JTableHeader +JTextArea +JTextComponent +JTextField +JTextPane +JToggleButton +JToolBar +JToolTip +JTree +JViewport +JWindow +JarEntry +JarException +JarFile +JarInputStream +JarOutputStream +JarURLConnection +JarVerifier +JavaCodebaseComponent +JavaUtils +JndiLoginModule +JobAttributes +JobHoldUntil +JobImpressions +JobImpressionsCompleted +JobImpressionsSupported +JobKOctets +JobKOctetsProcessed +JobKOctetsSupported +JobMediaSheets +JobMediaSheetsCompleted +JobMediaSheetsSupported +JobMessageFromOperator +JobName +JobOriginatingUserName +JobPriority +JobPrioritySupported +JobSheets +JobState +JobStateReason +JobStateReasons +KerberosKey +KerberosPrincipal +KerberosTicket +Kernel +Key +KeyAdapter +KeyAddr +KeyDeclaration +KeyEvent +KeyEventDispatcher +KeyEventPostProcessor +KeyException +KeyFactory +KeyFactorySpi +KeyImpl +KeyIterator +KeyListener +KeyManagementException +KeyManager +KeyPair +KeyPairGenerator +KeyPairGeneratorSpi +KeyRefIterator +KeySpec +KeyStore +KeyStoreException +KeyStoreLoginModule +KeyStoreSpi +KeyStroke +KeyTable +KeyWalker +KeyboardFocusManager +KeyboardManager +Keymap +Keywords +Krb5LoginModule +LDAPCertStoreParameters +LIFESPAN_POLICY_ID +LOCATION_FORWARD +Label +LabelPeer +LabelUI +LabelView +LanguageCallback +LastOwnerException +LayeredHighlighter +LayoutComparator +LayoutFocusTraversalPolicy +LayoutManager +LayoutManager2 +LayoutQueue +LdapContext +LdapReferralException +Lease +LegacyGlueFocusTraversalPolicy +LegacyHookGetFields +LegacyHookPutFields +Level +Lexer +LexicalHandler +LibraryManager +LifespanPolicy +LifespanPolicyImpl +LifespanPolicyOperations +LifespanPolicyValue +LightweightPeer +LimitExceededException +Line2D +LineBorder +LineBreakData +LineBreakMeasurer +LineIterator +LineMetrics +LineNumberInputStream +LineNumberReader +LineView +LinkException +LinkLoopException +LinkRef +LinkStyle +LinkageError +LinkedHashMap +LinkedHashSet +LinkedList +List +ListCellRenderer +ListDataEvent +ListDataListener +ListIterator +ListModel +ListPeer +ListResourceBundle +ListSelectionEvent +ListSelectionListener +ListSelectionModel +ListUI +ListView +ListenerThread +LoaderHandler +LocPathIterator +LocalClientRequestImpl +LocalClientResponseImpl +LocalObject +LocalServerRequestImpl +LocalServerResponseImpl +Locale +LocateRegistry +LocateReplyMessage +LocateReplyMessage_1_0 +LocateReplyMessage_1_1 +LocateReplyMessage_1_2 +LocateRequestMessage +LocateRequestMessage_1_0 +LocateRequestMessage_1_1 +LocateRequestMessage_1_2 +Locator +LocatorHelper +LocatorHolder +LocatorImpl +LocatorOperations +Lock +LogManager +LogRecord +LogStream +Logger +LoggingPermission +LoginContext +LoginException +LoginModule +Long +LongBuffer +LongHolder +LongLongSeqHelper +LongLongSeqHolder +LongSeqHelper +LongSeqHolder +LookAndFeel +LookupOp +LookupTable +Lt +Lte +MARSHAL +MalformedInputException +MalformedLinkException +MalformedURLException +Manifest +Map +MappedByteBuffer +MarkAndResetHandler +MarkerSegment +MarshalException +MarshalInputStream +MarshalOutputStream +MarshalledObject +MaskFormatter +MatchPatternIterator +Matcher +Math +MatteBorder +Media +MediaList +MediaName +MediaPrintableArea +MediaSize +MediaSizeName +MediaTracker +MediaTray +Member +MemoryCache +MemoryCacheImageInputStream +MemoryCacheImageOutputStream +MemoryHandler +MemoryImageSource +Menu +MenuBar +MenuBarPeer +MenuBarUI +MenuComponent +MenuComponentPeer +MenuContainer +MenuDragMouseEvent +MenuDragMouseListener +MenuElement +MenuEvent +MenuItem +MenuItemPeer +MenuItemUI +MenuKeyEvent +MenuKeyListener +MenuListener +MenuPeer +MenuSelectionManager +MenuShortcut +MergeCollation +Message +MessageBase +MessageCatalog +MessageDigest +MessageDigestSpi +MessageFormat +MessageMediator +MessageProp +Message_1_0 +Message_1_1 +Message_1_2 +MetaData +MetalBorders +MetalBumps +MetalButtonUI +MetalCheckBoxIcon +MetalCheckBoxUI +MetalComboBoxButton +MetalComboBoxEditor +MetalComboBoxIcon +MetalComboBoxUI +MetalDesktopIconUI +MetalFileChooserUI +MetalIconFactory +MetalInternalFrameTitlePane +MetalInternalFrameUI +MetalLabelUI +MetalLookAndFeel +MetalPopupMenuSeparatorUI +MetalProgressBarUI +MetalRadioButtonUI +MetalRootPaneUI +MetalScrollBarUI +MetalScrollButton +MetalScrollPaneUI +MetalSeparatorUI +MetalSliderUI +MetalSplitPaneDivider +MetalSplitPaneUI +MetalTabbedPaneUI +MetalTextFieldUI +MetalTheme +MetalTitlePane +MetalToggleButtonUI +MetalToolBarUI +MetalToolTipUI +MetalTreeUI +MetalUtils +Method +MethodDescriptor +MethodResolver +MimeType +MimeTypeParameterList +MimeTypeParseException +MinimalHTMLWriter +MinorCodes +Minus +MissingResourceException +MockAttributeSet +Mod +ModificationItem +Modifier +MotifBorders +MotifButtonListener +MotifButtonUI +MotifCheckBoxMenuItemUI +MotifCheckBoxUI +MotifComboBoxRenderer +MotifComboBoxUI +MotifDesktopIconUI +MotifDesktopPaneUI +MotifEditorPaneUI +MotifFileChooserUI +MotifGraphicsUtils +MotifIconFactory +MotifInternalFrameTitlePane +MotifInternalFrameUI +MotifLabelUI +MotifLookAndFeel +MotifMenuBarUI +MotifMenuItemUI +MotifMenuMouseListener +MotifMenuMouseMotionListener +MotifMenuUI +MotifOptionPaneUI +MotifPasswordFieldUI +MotifPopupMenuSeparatorUI +MotifPopupMenuUI +MotifProgressBarUI +MotifRadioButtonMenuItemUI +MotifRadioButtonUI +MotifScrollBarButton +MotifScrollBarUI +MotifScrollPaneUI +MotifSeparatorUI +MotifSliderUI +MotifSplitPaneDivider +MotifSplitPaneUI +MotifTabbedPaneUI +MotifTextAreaUI +MotifTextFieldUI +MotifTextPaneUI +MotifTextUI +MotifToggleButtonUI +MotifTreeCellRenderer +MotifTreeUI +MouseAdapter +MouseDragGestureRecognizer +MouseEvent +MouseInputAdapter +MouseInputListener +MouseListener +MouseMotionAdapter +MouseMotionListener +MouseWheelEvent +MouseWheelListener +MsgMgr +Mult +MultiButtonUI +MultiColorChooserUI +MultiComboBoxUI +MultiDesktopIconUI +MultiDesktopPaneUI +MultiDoc +MultiDocPrintJob +MultiDocPrintService +MultiFileChooserUI +MultiInternalFrameUI +MultiLabelUI +MultiListUI +MultiLookAndFeel +MultiMenuBarUI +MultiMenuItemUI +MultiOptionPaneUI +MultiPanelUI +MultiPixelPackedSampleModel +MultiPopupMenuUI +MultiProgressBarUI +MultiRootPaneUI +MultiScrollBarUI +MultiScrollPaneUI +MultiSeparatorUI +MultiSliderUI +MultiSpinnerUI +MultiSplitPaneUI +MultiTabbedPaneUI +MultiTableHeaderUI +MultiTableUI +MultiTextUI +MultiToolBarUI +MultiToolTipUI +MultiTreeUI +MultiUIDefaults +MultiViewportUI +MulticastSocket +MultipleComponentProfileHelper +MultipleComponentProfileHolder +MultipleDocumentHandling +MultipleMaster +MutableAttrListImpl +MutableAttributeSet +MutableBigInteger +MutableComboBoxModel +MutableTreeNode +MutationEvent +MuxingAttributeSet +NO_IMPLEMENT +NO_MEMORY +NO_PERMISSION +NO_RESOURCES +NO_RESPONSE +NSInfo +NSORB +NTDomainPrincipal +NTLoginModule +NTNumericCredential +NTSid +NTSidDomainPrincipal +NTSidGroupPrincipal +NTSidPrimaryGroupPrincipal +NTSidUserPrincipal +NTSystem +NTUserPrincipal +NVList +NVListImpl +Name +NameAlreadyBound +NameAlreadyBoundException +NameAlreadyBoundHelper +NameAlreadyBoundHolder +NameCallback +NameClassPair +NameComponent +NameComponentHelper +NameComponentHolder +NameDynAnyPair +NameDynAnyPairHelper +NameDynAnyPairSeqHelper +NameGenerator +NameHelper +NameHolder +NameImpl +NameNotFoundException +NameParser +NameServer +NameService +NameServiceStartThread +NameSpace +NameValuePair +NameValuePairHelper +NameValuePairSeqHelper +NamedNodeMap +NamedValue +NamedValueImpl +NamedWeakReference +NamespaceAlias +NamespaceChangeListener +NamespaceSupport +NamespaceSupport2 +NamespacedNode +Naming +NamingContext +NamingContextDataStore +NamingContextExt +NamingContextExtHelper +NamingContextExtHolder +NamingContextExtOperations +NamingContextExtPOA +NamingContextHelper +NamingContextHolder +NamingContextImpl +NamingContextOperations +NamingContextPOA +NamingEnumeration +NamingEvent +NamingException +NamingExceptionEvent +NamingListener +NamingManager +NamingSecurityException +NamingUtils +NativeLibLoader +NavigationFilter +Neg +NegativeArraySizeException +NetPermission +NetworkInterface +NewInstance +NewObjectKeyTemplateBase +NoClassDefFoundError +NoConnectionPendingException +NoContext +NoContextHelper +NoFramesView +NoInitialContextException +NoPermissionException +NoRouteToHostException +NoServant +NoServantHelper +NoSuchAlgorithmException +NoSuchAttributeException +NoSuchElementException +NoSuchEndPoint +NoSuchEndPointHelper +NoSuchEndPointHolder +NoSuchFieldError +NoSuchFieldException +NoSuchMethodError +NoSuchMethodException +NoSuchObjectException +NoSuchProviderException +NoSuchServiceContext +Node +NodeBase +NodeChangeEvent +NodeChangeListener +NodeConsumer +NodeEx +NodeFilter +NodeInfo +NodeIterator +NodeList +NodeLocator +NodeSet +NodeSetDTM +NodeSortKey +NodeSorter +NodeTest +NodeTestFilter +NodeVector +NonReadableChannelException +NonWritableChannelException +NoninvertibleTransformException +NotActiveException +NotBoundException +NotContextException +NotEmpty +NotEmptyHelper +NotEmptyHolder +NotEquals +NotFound +NotFoundHelper +NotFoundHolder +NotFoundReason +NotFoundReasonHelper +NotFoundReasonHolder +NotOwnerException +NotSerializableException +NotYetBoundException +NotYetConnectedException +Notation +NullPointerException +Number +NumberFormat +NumberFormatException +NumberFormatter +NumberOfDocuments +NumberOfInterveningJobs +NumberUp +NumberUpSupported +NumeratorFormatter +NumericShaper +OBJECT_NOT_EXIST +OBJ_ADAPTER +OMGVMCID +ORB +ORBAlreadyRegistered +ORBAlreadyRegisteredHelper +ORBAlreadyRegisteredHolder +ORBClassLoader +ORBConstants +ORBD +ORBInitInfo +ORBInitInfoImpl +ORBInitInfoOperations +ORBInitializer +ORBInitializerOperations +ORBPortInfo +ORBPortInfoHelper +ORBPortInfoHolder +ORBPortInfoListHelper +ORBPortInfoListHolder +ORBProperties +ORBSingleton +ORBSocketFactory +ORBThread +ORBTypeComponent +ORBUtility +ORBVersion +ORBVersionFactory +ORBVersionImpl +ORBVersionServiceContext +ORBidHelper +ORBidListHelper +ORBidListHolder +OSFCodeSetRegistry +ObjID +Object +ObjectAlreadyActive +ObjectAlreadyActiveHelper +ObjectArray +ObjectChangeListener +ObjectFactory +ObjectFactoryBuilder +ObjectHelper +ObjectHolder +ObjectId +ObjectIdHelper +ObjectIds +ObjectImpl +ObjectInput +ObjectInputStream +ObjectInputValidation +ObjectKey +ObjectKeyFactory +ObjectKeyTemplate +ObjectKeyTemplateBase +ObjectNotActive +ObjectNotActiveHelper +ObjectOutput +ObjectOutputStream +ObjectPool +ObjectStreamClass +ObjectStreamClassCorbaExt +ObjectStreamClassUtil_1_3 +ObjectStreamClass_1_3_1 +ObjectStreamConstants +ObjectStreamException +ObjectStreamField +ObjectView +Observable +Observer +OctetSeqHelper +OctetSeqHolder +Oid +OldJIDLObjectKeyTemplate +OldObjectKeyTemplateBase +OldPOAObjectKeyTemplate +OneStepIterator +OneStepIteratorForward +OpCodes +OpMap +OpenType +Operation +OperationNotSupportedException +Option +OptionComboBoxModel +OptionListModel +OptionPaneUI +OptionalDataException +Or +OrientationRequested +OutOfMemoryError +OutputDeviceAssigned +OutputKeys +OutputProperties +OutputStream +OutputStreamHook +OutputStreamImageOutputStreamSpi +OutputStreamWriter +OverlappingFileLockException +OverlayLayout +Owner +PDLOverrideSupported +PERSIST_STORE +PICurrent +PINode +PIORB +PKCS8EncodedKeySpec +PKIXBuilderParameters +PKIXCertPathBuilderResult +PKIXCertPathChecker +PKIXCertPathValidatorResult +PKIXParameters +PNGImageReader +PNGImageReaderSpi +PNGImageWriter +PNGImageWriterSpi +PNGMetadata +PNGMetadataFormat +PNGMetadataFormatResources +POA +POACurrent +POADestroyed +POAHelper +POAId +POAIdArray +POAIdBase +POAIdPOAView +POAImpl +POAManager +POAManagerImpl +POAManagerOperations +POANameHelper +POANameHolder +POAORB +POAObjectKeyTemplate +POAOperations +POAPolicyCombinationValidator +POAView +PRIVATE_MEMBER +PSSParameterSpec +PUBLIC_MEMBER +Package +PackagePrefixChecker +PackedColorModel +PageAttributes +PageFormat +PageRanges +Pageable +PagesPerMinute +PagesPerMinuteColor +Paint +PaintContext +PaintEvent +Panel +PanelPeer +PanelUI +Paper +ParagraphView +Parameter +ParameterBlock +ParameterDescriptor +ParameterMetaData +ParameterMode +ParameterModeHelper +ParameterModeHolder +ParentNode +ParseContext +ParseException +ParsePosition +Parser +Parser2 +ParserAdapter +ParserConfigurationException +ParserDelegator +ParserFactory +PartialResultException +PartiallyOrderedSet +PasswordAuthentication +PasswordCallback +PasswordView +PathIterator +Pattern +PatternEntry +PatternSyntaxException +Permission +PermissionCollection +Permissions +PersistenceDelegate +PersistentBindingIterator +PhantomReference +Pipe +PipeDocument +PipedInputStream +PipedOutputStream +PipedReader +PipedWriter +PixelGrabber +PixelInterleavedSampleModel +PlainDatagramSocketImpl +PlainDocument +PlainSocketImpl +PlainView +Plus +Point +Point2D +Policies +PoliciesComponent +Policy +PolicyError +PolicyErrorCodeHelper +PolicyErrorHelper +PolicyErrorHolder +PolicyFactory +PolicyFactoryOperations +PolicyFile +PolicyHelper +PolicyHolder +PolicyListHelper +PolicyListHolder +PolicyNode +PolicyOperations +PolicyParser +PolicyQualifierInfo +PolicyTypeHelper +Polygon +PooledConnection +Popup +PopupFactory +PopupMenu +PopupMenuEvent +PopupMenuListener +PopupMenuPeer +PopupMenuUI +PortUnreachableException +PortableRemoteObject +PortableRemoteObjectDelegate +Position +PredicatedNodeTest +PreferenceChangeEvent +PreferenceChangeListener +Preferences +PreferencesFactory +PrefixResolver +PrefixResolverDefault +PreparedStatement +PresentationDirection +Principal +PrincipalComparator +PrincipalHolder +PrincipalImpl +PrintEvent +PrintException +PrintGraphics +PrintJob +PrintJobAdapter +PrintJobAttribute +PrintJobAttributeEvent +PrintJobAttributeListener +PrintJobAttributeSet +PrintJobEvent +PrintJobListener +PrintQuality +PrintRequestAttribute +PrintRequestAttributeSet +PrintService +PrintServiceAttribute +PrintServiceAttributeEvent +PrintServiceAttributeListener +PrintServiceAttributeSet +PrintServiceLookup +PrintStream +PrintTraceListener +PrintWriter +Printable +PrinterAbortException +PrinterException +PrinterGraphics +PrinterIOException +PrinterInfo +PrinterIsAcceptingJobs +PrinterJob +PrinterLocation +PrinterMakeAndModel +PrinterMessageFromOperator +PrinterMoreInfo +PrinterMoreInfoManufacturer +PrinterName +PrinterResolution +PrinterState +PrinterStateReason +PrinterStateReasons +PrinterURI +PrivateCredentialPermission +PrivateKey +PrivilegedAction +PrivilegedActionException +PrivilegedExceptionAction +Process +ProcessMonitorThread +ProcessingInstruction +ProcessorAttributeSet +ProcessorCharacters +ProcessorDecimalFormat +ProcessorGlobalParamDecl +ProcessorGlobalVariableDecl +ProcessorImport +ProcessorInclude +ProcessorKey +ProcessorLRE +ProcessorNamespaceAlias +ProcessorOutputElem +ProcessorPreserveSpace +ProcessorStripSpace +ProcessorStylesheetDoc +ProcessorStylesheetElement +ProcessorTemplate +ProcessorTemplateElem +ProcessorText +ProcessorUnknown +ProfileAddr +ProfileDataException +ProfileIdHelper +ProgressBarUI +ProgressMonitor +ProgressMonitorInputStream +Properties +PropertyChangeEvent +PropertyChangeListener +PropertyChangeListenerProxy +PropertyChangeSupport +PropertyDescriptor +PropertyEditor +PropertyEditorManager +PropertyEditorSupport +PropertyPermission +PropertyResourceBundle +PropertyVetoException +ProtectionDomain +ProtocolException +Provider +ProviderException +Proxy +PsuedoNames +PublicKey +PushbackInputStream +PushbackReader +QName +QuadCurve2D +QuadIterator +QueryParameter +QueuedEvents +QueuedJobCount +Quo +RAFImageInputStreamSpi +RAFImageOutputStreamSpi +RBCollationTables +RBTableBuilder +REQUEST_PROCESSING_POLICY_ID +RGBColor +RGBImageFilter +RMIClassLoader +RMIClassLoaderSpi +RMIClientSocketFactory +RMIFailureHandler +RMISecurityException +RMISecurityManager +RMIServerSocketFactory +RMISocketFactory +RSAKey +RSAKeyGenParameterSpec +RSAMultiPrimePrivateCrtKey +RSAMultiPrimePrivateCrtKeySpec +RSAOtherPrimeInfo +RSAPrivateCrtKey +RSAPrivateCrtKeySpec +RSAPrivateKey +RSAPrivateKeySpec +RSAPublicKey +RSAPublicKeySpec +RTFAttribute +RTFAttributes +RTFEditorKit +RTFGenerator +RTFParser +RTFReader +Random +RandomAccess +RandomAccessFile +Raster +RasterFormatException +RasterOp +RawCharacterHandler +ReadOnlyBufferException +ReadableByteChannel +Reader +ReaderThread +Rect +RectIterator +Rectangle +Rectangle2D +RectangularShape +Redirect +Ref +RefAddr +Reference +ReferenceAddr +ReferenceQueue +ReferenceUriSchemesSupported +Referenceable +ReferralException +ReflectAccess +ReflectPermission +RefreshFailedException +Refreshable +RegisterableService +Registry +RegistryHandler +RemarshalException +Remote +RemoteCall +RemoteException +RemoteObject +RemoteRef +RemoteServer +RemoteStub +RenderContext +RenderableImage +RenderableImageOp +RenderableImageProducer +RenderedImage +RenderedImageFactory +Renderer +RenderingHints +RepIdDelegator +RepIdDelegator_1_3 +RepIdDelegator_1_3_1 +RepaintManager +ReplicateScaleFilter +ReplyMessage +ReplyMessage_1_0 +ReplyMessage_1_1 +ReplyMessage_1_2 +Repository +RepositoryHelper +RepositoryHolder +RepositoryId +RepositoryIdCache +RepositoryIdCache_1_3 +RepositoryIdCache_1_3_1 +RepositoryIdFactory +RepositoryIdHelper +RepositoryIdInterface +RepositoryIdStrings +RepositoryIdUtility +RepositoryId_1_3 +RepositoryId_1_3_1 +RepositoryImpl +RepositoryOperations +Request +RequestCanceledException +RequestHandler +RequestImpl +RequestInfo +RequestInfoExt +RequestInfoImpl +RequestInfoOperations +RequestMessage +RequestMessage_1_0 +RequestMessage_1_1 +RequestMessage_1_2 +RequestProcessingPolicy +RequestProcessingPolicyImpl +RequestProcessingPolicyOperations +RequestProcessingPolicyValue +RequestProcessor +RequestingUserName +RescaleOp +ResolutionSyntax +ResolveResult +Resolver +ResourceBundle +ResourceBundleEnumeration +ResourceLoader +ResourceManager +Response +ResponseHandler +RestorableInputStream +Result +ResultNameSpace +ResultSet +ResultSetMetaData +ResultTreeHandler +ReverseAxesWalker +Robot +RobotPeer +RootPaneContainer +RootPaneUI +RoundRectIterator +RoundRectangle2D +RowFilter +RowMapper +RowSet +RowSetEvent +RowSetInternal +RowSetListener +RowSetMetaData +RowSetReader +RowSetWriter +RuleBasedBreakIterator +RuleBasedCollator +RunTime +RunTimeOperations +Runnable +Runtime +RuntimeException +RuntimePermission +SAX2DTM +SAXException +SAXNotRecognizedException +SAXNotSupportedException +SAXParseException +SAXParser +SAXParserFactory +SAXParserFactoryImpl +SAXParserImpl +SAXResult +SAXSource +SAXSourceLocator +SAXTransformerFactory +SERVANT_RETENTION_POLICY_ID +SOFMarkerSegment +SOSMarkerSegment +SQLData +SQLDocument +SQLErrorDocument +SQLException +SQLInput +SQLOutput +SQLPermission +SQLWarning +SUCCESSFUL +SUNVMCID +SYNC_WITH_TRANSPORT +SYSTEM_EXCEPTION +SampleModel +Savepoint +ScatteringByteChannel +SchemaViolationException +ScrollBarUI +ScrollPane +ScrollPaneAdjustable +ScrollPaneConstants +ScrollPaneLayout +ScrollPanePeer +ScrollPaneUI +Scrollable +Scrollbar +ScrollbarPeer +SearchControls +SearchResult +SecureClassLoader +SecureRandom +SecureRandomSpi +Security +SecurityException +SecurityManager +SecurityPermission +Segment +SegmentCache +SelectableChannel +SelectionEvent +SelectionKey +Selector +SelectorProvider +SelfIteratorNoPredicate +SendingContextServiceContext +SentEvent +SentenceBreakData +SeparatorUI +SequenceInputStream +SequencedEvent +Serializable +SerializableLocatorImpl +SerializablePermission +SerializationTester +Serializer +SerializerFactory +SerializerSwitcher +SerializerToHTML +SerializerToText +SerializerToXML +Servant +ServantActivator +ServantActivatorHelper +ServantActivatorOperations +ServantActivatorPOA +ServantAlreadyActive +ServantAlreadyActiveHelper +ServantCachePOAClientSC +ServantCachingPolicy +ServantLocator +ServantLocatorHelper +ServantLocatorOperations +ServantLocatorPOA +ServantManager +ServantManagerImpl +ServantManagerOperations +ServantNotActive +ServantNotActiveHelper +ServantObject +ServantRetentionPolicy +ServantRetentionPolicyImpl +ServantRetentionPolicyOperations +ServantRetentionPolicyValue +Server +ServerAlreadyActive +ServerAlreadyActiveHelper +ServerAlreadyActiveHolder +ServerAlreadyInstalled +ServerAlreadyInstalledHelper +ServerAlreadyInstalledHolder +ServerAlreadyRegistered +ServerAlreadyRegisteredHelper +ServerAlreadyRegisteredHolder +ServerAlreadyUninstalled +ServerAlreadyUninstalledHelper +ServerAlreadyUninstalledHolder +ServerCloneException +ServerDef +ServerDefHelper +ServerDefHolder +ServerDelegate +ServerError +ServerException +ServerGIOP +ServerHeldDown +ServerHeldDownHelper +ServerHeldDownHolder +ServerHelper +ServerHolder +ServerIdHelper +ServerIdsHelper +ServerIdsHolder +ServerLocation +ServerLocationHelper +ServerLocationHolder +ServerLocationPerORB +ServerLocationPerORBHelper +ServerLocationPerORBHolder +ServerMain +ServerManager +ServerManagerHelper +ServerManagerHolder +ServerManagerImpl +ServerManagerOperations +ServerNotActive +ServerNotActiveException +ServerNotActiveHelper +ServerNotActiveHolder +ServerNotRegistered +ServerNotRegisteredHelper +ServerNotRegisteredHolder +ServerOperations +ServerRef +ServerRequest +ServerRequestImpl +ServerRequestInfo +ServerRequestInfoImpl +ServerRequestInfoOperations +ServerRequestInterceptor +ServerRequestInterceptorOperations +ServerResponse +ServerResponseImpl +ServerRuntimeException +ServerSocket +ServerSocketChannel +ServerSubcontract +ServerTableEntry +ServerTool +ServiceContext +ServiceContextData +ServiceContextHelper +ServiceContextHolder +ServiceContextListHelper +ServiceContextListHolder +ServiceContextRegistry +ServiceContexts +ServiceDetail +ServiceDetailHelper +ServiceIdHelper +ServiceInformation +ServiceInformationHelper +ServiceInformationHolder +ServicePermission +ServiceRegistry +ServiceUI +ServiceUIFactory +ServiceUnavailableException +Set +SetOfIntegerSyntax +SetOverrideType +SetOverrideTypeHelper +Severity +Shape +ShapeGraphicAttribute +SheetCollate +Short +ShortBuffer +ShortHolder +ShortLookupTable +ShortSeqHelper +ShortSeqHolder +Shutdown +ShutdownUtilDelegate +Sides +Signature +SignatureException +SignatureSpi +SignedMutableBigInteger +SignedObject +Signer +SimpleAttributeSet +SimpleBeanInfo +SimpleDateFormat +SimpleDoc +SimpleElementFactory +SimpleFormatter +SimpleHashtable +SimpleTextBoundary +SimpleTimeZone +SinglePixelPackedSampleModel +SingleSelectionModel +Size2DSyntax +SizeLimitExceededException +SizeRequirements +SizeSequence +Skeleton +SkeletonMismatchException +SkeletonNotFoundException +SliderUI +SlotTable +SlotTableStack +SmartGridLayout +Socket +SocketAddress +SocketChannel +SocketException +SocketHandler +SocketImpl +SocketImplFactory +SocketInputStream +SocketOptions +SocketOutputStream +SocketPermission +SocketSecurityException +SocketTimeoutException +SocksConsts +SocksSocketImpl +SocksSocketImplFactory +SoftBevelBorder +SoftReference +SolarisLoginModule +SolarisNumericGroupPrincipal +SolarisNumericUserPrincipal +SolarisPrincipal +SolarisSystem +SortedMap +SortedSet +SortingFocusTraversalPolicy +Source +SourceLocator +SourceTree +SourceTreeManager +SpecialMapping +SpecialMethod +SpinnerDateModel +SpinnerListModel +SpinnerModel +SpinnerNumberModel +SpinnerUI +SplitPaneUI +Spring +SpringLayout +Stack +StackGuard +StackOverflowError +StackTraceElement +StandardIIOPProfileTemplate +StandardMetadataFormat +StandardMetadataFormatResources +StartTlsRequest +StartTlsResponse +State +StateEdit +StateEditable +StateFactory +StateInvariantError +Statement +StepPattern +StopParseException +StreamCorruptedException +StreamHandler +StreamPrintService +StreamPrintServiceFactory +StreamResult +StreamSource +StreamTokenizer +Streamable +StreamableValue +StrictMath +String +StringBuffer +StringBufferInputStream +StringBufferPool +StringCharBuffer +StringCharacterIterator +StringCoding +StringContent +StringHolder +StringIndexOutOfBoundsException +StringNameHelper +StringReader +StringRefAddr +StringSelection +StringSeqHelper +StringSeqHolder +StringToIntTable +StringToStringTable +StringToStringTableVector +StringTokenizer +StringValueHelper +StringVector +StringWriter +Stroke +Struct +StructMember +StructMemberHelper +Stub +StubDelegate +StubDelegateImpl +StubNotFoundException +Style +StyleConstants +StyleContext +StyleSheet +StyleSheetList +StyledDocument +StyledEditorKit +StyledParagraph +Stylesheet +StylesheetComposed +StylesheetHandler +StylesheetPIHandler +StylesheetRoot +SubContextList +SubImageInputStream +SuballocatedByteVector +SuballocatedIntVector +SubcontractList +SubcontractRegistry +SubcontractResponseHandler +Subject +SubjectCodeSource +SubjectDomainCombiner +SupportedValuesAttribute +SwingConstants +SwingGraphics +SwingPropertyChangeSupport +SwingUtilities +SyncFailedException +SyncScopeHelper +SynthesisException +SyntheticImage +System +SystemColor +SystemEventQueueUtilities +SystemException +SystemFlavorMap +SystemIDResolver +TAG_ALTERNATE_IIOP_ADDRESS +TAG_CODE_SETS +TAG_INTERNET_IOP +TAG_JAVA_CODEBASE +TAG_MULTIPLE_COMPONENTS +TAG_ORB_TYPE +TAG_POLICIES +TCKind +TCPPortHelper +TCUtility +THREAD_POLICY_ID +TRANSACTION_REQUIRED +TRANSACTION_ROLLEDBACK +TRANSIENT +TRANSPORT_RETRY +TabExpander +TabSet +TabStop +TabableView +TabbedPaneUI +TableCellEditor +TableCellRenderer +TableColumn +TableColumnModel +TableColumnModelEvent +TableColumnModelListener +TableHeaderUI +TableModel +TableModelEvent +TableModelListener +TableUI +TableView +TagElement +TagStack +TaggedComponent +TaggedComponentBase +TaggedComponentFactories +TaggedComponentFactoryFinder +TaggedComponentHelper +TaggedComponentHolder +TaggedProfile +TaggedProfileFactoryFinder +TaggedProfileHelper +TaggedProfileHolder +TaggedProfileTemplate +TargetAddress +TargetAddressHelper +TemplateList +TemplateSubPatternAssociation +Templates +TemplatesHandler +Terminator +TestDTM +TestDTMNodes +TestDriver +Text +TextAction +TextArea +TextAreaDocument +TextAreaPeer +TextAttribute +TextBoundaryData +TextCallbackHandler +TextComponent +TextComponentPeer +TextEvent +TextField +TextFieldPeer +TextHitInfo +TextInputCallback +TextJustifier +TextLayout +TextLayoutStrategy +TextLine +TextListener +TextMeasurer +TextNode +TextOutputCallback +TextSyntax +TextUI +TexturePaint +TexturePaintContext +Thread +ThreadCurrentStack +ThreadDeath +ThreadGroup +ThreadLocal +ThreadPolicy +ThreadPolicyImpl +ThreadPolicyOperations +ThreadPolicyValue +ThreadPool +Throwable +Tie +TileObserver +Time +TimeLimitExceededException +TimeZone +Timer +TimerQueue +TimerTask +Timestamp +TitledBorder +TooManyListenersException +ToolBarUI +ToolTipManager +ToolTipUI +Toolkit +TrAXFilter +TraceListener +TraceListenerEx +TraceManager +TracerEvent +TransactionService +TransferHandler +Transferable +TransformAttribute +TransformSnapshot +TransformSnapshotImpl +TransformState +Transformer +TransformerClient +TransformerConfigurationException +TransformerException +TransformerFactory +TransformerFactoryConfigurationError +TransformerFactoryImpl +TransformerHandler +TransformerHandlerImpl +TransformerIdentityImpl +TransformerImpl +TransientBindingIterator +TransientNameServer +TransientNameService +TransientNamingContext +TransientObjectManager +Transparency +TreeCellEditor +TreeCellRenderer +TreeExpansionEvent +TreeExpansionListener +TreeMap +TreeModel +TreeModelEvent +TreeModelListener +TreeNode +TreePath +TreeSelectionEvent +TreeSelectionListener +TreeSelectionModel +TreeSet +TreeUI +TreeWalker +TreeWalker2Result +TreeWillExpandListener +Trie +TruncatedFileException +TrustAnchor +TypeCode +TypeCodeFactory +TypeCodeHolder +TypeCodeImpl +TypeCodeImplHelper +TypeMismatch +TypeMismatchException +TypeMismatchHelper +Types +UEInfoServiceContext +UID +UIDefaults +UIEvent +UIManager +UIResource +ULongLongSeqHelper +ULongLongSeqHolder +ULongSeqHelper +ULongSeqHolder +UNKNOWN +UNSUPPORTED_POLICY +UNSUPPORTED_POLICY_VALUE +URI +URIException +URIResolver +URISyntax +URISyntaxException +URL +URLClassLoader +URLConnection +URLDecoder +URLEncoder +URLStreamHandler +URLStreamHandlerFactory +URLStringHelper +USER_EXCEPTION +UShortSeqHelper +UShortSeqHolder +UTFDataFormatException +UnImplNode +UnaryOperation +UndeclaredThrowableException +UndoManager +UndoableEdit +UndoableEditEvent +UndoableEditListener +UndoableEditSupport +UnexpectedException +UnicastRemoteObject +UnicodeClassMapping +UnionMember +UnionMemberHelper +UnionPathIterator +UnionPattern +UnixLoginModule +UnixNumericGroupPrincipal +UnixNumericUserPrincipal +UnixPrincipal +UnixSystem +UnknownEncoding +UnknownEncodingHelper +UnknownError +UnknownException +UnknownGroupException +UnknownHostException +UnknownObjectException +UnknownServiceContext +UnknownServiceException +UnknownType +UnknownUserException +UnknownUserExceptionHelper +UnknownUserExceptionHolder +UnmappableCharacterException +UnmarshalException +UnmodifiableSetException +UnrecoverableKeyException +Unreferenced +UnresolvedAddressException +UnresolvedPermission +UnresolvedPermissionCollection +UnsatisfiedLinkError +UnsolicitedNotification +UnsolicitedNotificationEvent +UnsolicitedNotificationListener +UnsupportedAddressTypeException +UnsupportedCallbackException +UnsupportedCharsetException +UnsupportedClassVersionError +UnsupportedEncodingException +UnsupportedFlavorException +UnsupportedLookAndFeelException +UnsupportedOperationException +UserException +Util +UtilDelegate +Utilities +Utility +VMID +VM_ABSTRACT +VM_CUSTOM +VM_NONE +VM_TRUNCATABLE +ValidatingParser +ValueBase +ValueBaseHelper +ValueBaseHolder +ValueFactory +ValueHandler +ValueHandlerImpl +ValueHandlerImpl_1_3 +ValueHandlerImpl_1_3_1 +ValueMember +ValueMemberHelper +ValueUtility +Variable +VariableHeightLayoutCache +VariableStack +Vector +VerifyError +Version +VersionHelper +VersionHelper12 +VersionSpecHelper +VetoableChangeListener +VetoableChangeListenerProxy +VetoableChangeSupport +View +ViewCSS +ViewFactory +ViewportLayout +ViewportUI +VirtualMachineError +Visibility +VisibilityHelper +Void +VolatileImage +WCharSeqHelper +WCharSeqHolder +WStringSeqHelper +WStringSeqHolder +WStringValueHelper +WalkerFactory +WalkingIterator +WalkingIteratorSorted +WeakHashMap +WeakReference +WhiteSpaceInfo +WhitespaceStrippingElementMatcher +Win32FileSystem +Win32Process +WinNTFileSystem +Window +WindowAdapter +WindowConstants +WindowEvent +WindowFocusListener +WindowListener +WindowPeer +WindowStateListener +WindowsBorders +WindowsButtonListener +WindowsButtonUI +WindowsCheckBoxMenuItemUI +WindowsCheckBoxUI +WindowsComboBoxUI +WindowsDesktopIconUI +WindowsDesktopManager +WindowsDesktopPaneUI +WindowsEditorPaneUI +WindowsFileChooserUI +WindowsGraphicsUtils +WindowsIconFactory +WindowsInternalFrameTitlePane +WindowsInternalFrameUI +WindowsLabelUI +WindowsListUI +WindowsLookAndFeel +WindowsMenuBarUI +WindowsMenuItemUI +WindowsMenuUI +WindowsOptionPaneUI +WindowsPasswordFieldUI +WindowsPopupFactory +WindowsPopupMenuUI +WindowsPopupWindow +WindowsPreferences +WindowsPreferencesFactory +WindowsProgressBarUI +WindowsRadioButtonMenuItemUI +WindowsRadioButtonUI +WindowsRootPaneUI +WindowsScrollBarUI +WindowsScrollPaneUI +WindowsSeparatorUI +WindowsSliderUI +WindowsSpinnerUI +WindowsSplitPaneDivider +WindowsSplitPaneUI +WindowsTabbedPaneUI +WindowsTableHeaderUI +WindowsTableUI +WindowsTextAreaUI +WindowsTextFieldUI +WindowsTextPaneUI +WindowsTextUI +WindowsToggleButtonUI +WindowsToolBarUI +WindowsTreeUI +WindowsUtils +WireObjectKeyTemplate +WordBreakData +WordBreakTable +Work +WrappedPlainView +WrappedRuntimeException +WritableByteChannel +WritableRaster +WritableRenderedImage +WriteAbortedException +Writeable +Writer +WriterToASCI +WriterToUTF8 +WriterToUTF8Buffered +WrongAdapter +WrongAdapterHelper +WrongNumberArgsException +WrongParserException +WrongPolicy +WrongPolicyHelper +WrongTransaction +WrongTransactionHelper +WrongTransactionHolder +X500Principal +X500PrivateCredential +X509CRL +X509CRLEntry +X509CRLSelector +X509CertSelector +X509Certificate +X509EncodedKeySpec +X509Extension +XAConnection +XADataSource +XBoolean +XBooleanStatic +XConnection +XMLCharacterRecognizer +XMLDecoder +XMLEncoder +XMLFilter +XMLFilterImpl +XMLFormatter +XMLNSDecl +XMLReader +XMLReaderAdapter +XMLReaderFactory +XMLReaderImpl +XMLString +XMLStringFactory +XMLStringFactoryImpl +XNodeSet +XNodeSetForDOM +XNull +XNumber +XObject +XObjectFactory +XPATHErrorResourceBundle +XPATHErrorResources +XPATHErrorResources_de +XPATHErrorResources_en +XPATHErrorResources_es +XPATHErrorResources_fr +XPATHErrorResources_it +XPATHErrorResources_ja +XPATHErrorResources_ko +XPATHErrorResources_sv +XPATHErrorResources_zh_CN +XPATHErrorResources_zh_TW +XPath +XPathAPI +XPathContext +XPathDumper +XPathException +XPathFactory +XPathParser +XPathProcessorException +XRTreeFrag +XRTreeFragSelectWrapper +XResourceBundle +XResourceBundleBase +XResources_cy +XResources_de +XResources_el +XResources_en +XResources_es +XResources_fr +XResources_he +XResources_hy +XResources_it +XResources_ja_JP_A +XResources_ja_JP_HA +XResources_ja_JP_HI +XResources_ja_JP_I +XResources_ka +XResources_ko +XResources_sv +XResources_zh_CN +XResources_zh_TW +XSLInfiniteLoopException +XSLMessages +XSLProcessorContext +XSLProcessorVersion +XSLTAttributeDef +XSLTElementDef +XSLTElementProcessor +XSLTErrorResources +XSLTErrorResources_de +XSLTErrorResources_es +XSLTErrorResources_fr +XSLTErrorResources_it +XSLTErrorResources_ja +XSLTErrorResources_ko +XSLTErrorResources_sv +XSLTErrorResources_zh_CN +XSLTErrorResources_zh_TW +XSLTProcessorApplet +XSLTSchema +XString +XStringForChars +XStringForFSB +XUnresolvedVariable +XalanProperties +XmlChars +XmlDocument +XmlDocumentBuilder +XmlDocumentBuilderNS +XmlNames +XmlReader +XmlSupport +XmlWritable +XmlWriteContext +ZipConstants +ZipEntry +ZipException +ZipFile +ZipInputStream +ZipOutputStream +ZoneView diff --git a/PowerEditor/bin/plugins/APIs/javascript.api b/PowerEditor/bin/plugins/APIs/javascript.api new file mode 100644 index 00000000..80891bac --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/javascript.api @@ -0,0 +1,634 @@ +Anchor +Applet +Area +Array +Boolean +Button +Checkbox +Date +E +FileUpload +Form +Frame +Function +Hidden +History +Image +Infinity +JavaArray +JavaClass +JavaObject +JavaPackage +LN10 +LN2 +LOG10E +LOG2E +Layer +Link +Location +MAX_VALUE +MIN_VALUE +Math +MimeType +NEGATIVE_INFINITY +NaN +Number +Object +Option +PI +POSITIVE_INFINITY +Packages +Password +Plugin +Radio +RegExp +Reset +SQRT1_2 +SQRT2 +Select +String +Style +Submit +Text +Textarea +URL +URLUnencoded +UTC +XMLDocument +XSLDocument +_content +aLinkcolor +above +abs +acos +action +alert +align +all +anchor +anchors +appCodeName +appCore +appMinorVersion +appName +appVersion +applets +apply +arguments +arguments.callee +arguments.caller +arguments.length +arity +asin +atan +atan2 +atob +attachEvent +attributes +availHeight +availLeft +availTop +availWidth +back +background +backgroundColor +backgroundImage +below +bgColor +big +blink +blur +body +bold +boolean +border +borderBottomWidth +borderColor +borderLeftWidth +borderRightWidth +borderStyle +borderTopWidth +borderWidths +bottom +break +btoa +bufferDepth +byte +call +captureEvents +case +catch +ceil +char +charAt +charCodeAt +characterSet +checked +childNodes +class +className +classes +clear +clearInterval +clearTimeout +click +clientInformation +clip +clipboardData +close +closed +colorDepth +compile +complete +components +concat +confirm +const +constructor +contextual +continue +controllers +cookie +cookieEnabled +cos +cpuClass +createElement +createEventObject +createPopup +createStyleSheet +createTextNode +crypto +current +data +debugger +default +defaultCharset +defaultChecked +defaultStatus +defaultValue +defaultView +delete +description +detachEvent +dialogArguments +dialogHeight +dialogLeft +dialogTop +dialogWidth +dir +directories +disableExternalCapture +display +do +doctype +document +documentElement +domain +double +dump +elementFromPoint +elements +else +embeds +enableExternalCapture +enabledPlugin +encoding +enum +escape +eval +event +exec +execCommand +execScript +exp +expando +export +extends +external +false +fgColor +fileCreatedDate +fileModifiedDate +fileSize +fileUpdatedDate +filename +final +finally +find +firstChild +fixed +float +floor +focus +fontFamily +fontSize +fontWeight +fontcolor +fontsize +for +form +formName +forms +forward +frameElement +frames +fromCharCode +function +getAttention +getDate +getDay +getElementById +getElementsByName +getElementsByTagName +getFullYear +getHours +getMilliseconds +getMinutes +getMonth +getSeconds +getSelection +getTime +getTimezoneOffset +getUTCDate +getUTCDay +getUTCFullYear +getUTCHours +getUTCMilliseconds +getUTCMinutes +getUTCMonth +getUTCSeconds +getYear +global +go +goto +handleEvent +hasFocus +hash +height +history +home +host +hostname +href +hspace +ids +if +ignoreCase +images +implementation +implements +import +in +index +indexOf +innerHeight +innerWidth +input +instanceof +int +interface +isFinite +isNaN +italics +java +javaEnabled +join +language +lastChild +lastIndex +lastIndexOf +lastMatch +lastModified +lastParen +layerX +layers +left +leftContext +length +lineHeight +link +linkColor +links +listStyleType +load +localName +location +locationbar +log +long +lowsrc +marginBottom +marginLeft +marginRight +marginTop +margins +match +max +media +menubar +mergeAttributes +method +mimeTypes +min +moveAbove +moveBelow +moveBy +moveTo +moveToAbsolute +multiline +name +nameProp +namespaceURI +namespaces +native +navigate +navigator +netscape +new +next +nextSibling +nodeName +nodeType +nodeValue +null +offscreenBuffering +onAbort +onActivate +onAfterprint +onAfterupdate +onBeforeactivate +onBeforecut +onBeforedeactivate +onBeforeeditfocus +onBeforepaste +onBeforeprint +onBeforeunload +onBeforeupdate +onBlur +onCellchange +onChange +onClick +onClose +onContextmenu +onControlselect +onCut +onDataavailable +onDatasetchanged +onDatasetcomplete +onDblclick +onDeactivate +onDrag +onDragdrop +onDragend +onDragenter +onDragleave +onDragover +onDragstart +onDrop +onError +onErrorupdate +onFocus +onHelp +onKeydown +onKeypress +onKeyup +onLine +onLoad +onMousedown +onMousemove +onMouseout +onMouseover +onMouseup +onPaste +onPropertychange +onReadystatechange +onReset +onResize +onResizeend +onResizestart +onRowenter +onRowexit +onRowsdelete +onRowsinserted +onScroll +onSelect +onSelectionchange +onSelectstart +onStop +onSubmit +onUnload +open +opener +opsProfile +options +oscpu +outerHeight +outerWidth +ownerDocument +package +paddingBottom +paddingLeft +paddingRight +paddingTop +paddings +pageX +pageXOffset +pageY +pageYOffset +parent +parentLayer +parentNode +parentWindow +parse +parseFloat +parseInt +pathname +personalbar +pixelDepth +pkcs11 +platform +plugins +plugins.refresh +pop +port +pow +preference +prefix +previous +previousSibling +print +private +product +productSub +prompt +prompter +protected +protocol +prototype +public +push +queryCommandEnabled +queryCommandIndeterm +queryCommandState +queryCommandValue +random +readyState +recalc +referrer +releaseCapture +releaseEvents +reload +replace +reset +resizeBy +resizeTo +return +returnValue +reverse +right +rightContext +round +routeEvents +savePreferences +screen +screenLeft +screenTop +screenX +screenY +scripts +scroll +scrollBy +scrollByLines +scrollByPages +scrollTo +scrollX +scrollY +scrollbars +search +security +securityPolicy +select +selected +selectedIndex +selection +self +setActive +setCursor +setDate +setFullYear +setHotKeys +setHours +setInterval +setMilliseconds +setMinutes +setMonth +setResizable +setSeconds +setTime +setTimeout +setUTCDate +setUTCFullYear +setUTCHours +setUTCMilliseconds +setUTCMinutes +setUTCMonth +setUTCSeconds +setYear +setZOptions +shift +short +showHelp +showModalDialog +showModelessDialog +siblingAbove +siblingBelow +sidebar +signText +sin +sizeToContent +slice +small +sort +source +splice +split +sqrt +src +static +status +statusbar +stop +strike +styleSheets +sub +submit +substr +substring +suffixes +sun +sup +super +switch +synchronized +systemLanguage +tags +taint +taintEnabled +tan +target +test +text +textAlign +textDecoration +textIndent +textTransform +this +throw +throws +title +toGMTString +toLocaleString +toLowerCase +toSource +toString +toUTCString +toUpperCase +toolbar +top +transient +true +try +type +typeof +undefined +unescape +uniqueID +unshift +untaint +unwatch +updateCommands +updateInterval +userAgent +userLanguage +userProfile +vLinkcolor +value +valueOf +var +vendor +vendorSub +visibility +void +volatile +vspace +watch +while +whiteSpace +width +window +with +write +writeln +x +y +zIndex diff --git a/PowerEditor/bin/plugins/APIs/lisp.api b/PowerEditor/bin/plugins/APIs/lisp.api new file mode 100644 index 00000000..68914342 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/lisp.api @@ -0,0 +1,478 @@ +*error* +*vlisp-new-full-init* +abs +acad_colordlg +acad_helpdlg +acad_strlsort +acdimenableupdate +acet-layerp-mark +acet-layerp-mode +acet-laytrans +acet-ms-to-ps +acet-ps-to-ms +action_tile +add_list +ads +alert +align +alloc +and +angle +angtof +angtos +append +apply +arx +arxload +arxunload +ascii +assoc +atan +atof +atoi +atom +atoms-family +autoarxload +autoload +bhatch +bherrs +boole +boundp +bpoly +c:3dsin +c:3dsout +c:cal +c:fog +c:light +c:lsedit +c:lslib +c:lsnew +c:matlib +c:olprof +c:render +c:renderupdate +c:replay +c:rmat +c:rpref +c:saveimg +c:scene +c:setuv +c:showmat +c:stats +caaaar +caaadr +caaar +caadar +caaddr +caadr +caar +cadaar +cadadr +cadar +caddar +cadddr +caddr +cadr +car +cdaaar +cdaadr +cdaar +cdadar +cdaddr +cdadr +cdar +cddaar +cddadr +cddar +cdddar +cddddr +cdddr +cddr +cdr +chr +client_data_tile +close +command +cond +cons +cos +cvunit +defun +defun-q +defun-q-list-ref +defun-q-list-set +dictadd +dictnext +dictremove +dictrename +dictsearch +dimx_tile +dimy_tile +distance +distof +done_dialog +end_image +end_list +entdel +entget +entlast +entmake +entmakex +entmod +entnext +entsel +entupd +eq +equal +eval +exit +exp +expand +expt +fill_image +findfile +fix +float +fnsplitl +foreach +function +gc +gcd +get_attr +get_tile +getangle +getcfg +getcname +getcorner +getdist +getenv +getfiled +getint +getkword +getorient +getpoint +getreal +getstring +geturl +getvar +graphscr +grclear +grdraw +grread +grtext +grvecs +handent +help +if +initdia +initget +inters +ismnugrploaded +itoa +lambda +last +layoutlist +length +list +listp +load +load_dialog +log +logand +logior +lsh +mapcar +max +mem +member +menucmd +menugroup +min +minusp +mirror3d +mode_tile +mtedit +mtprop +namedobjdict +nentsel +nentselp +new_dialog +not +nth +null +numberp +open +or +osnap +pause +pi +polar +pragma +prin1 +princ +print +progn +prompt +quit +quote +read +read-char +read-line +redraw +regapp +rem +repeat +report +reverse +rotate3d +rtos +set +set_tile +setcfg +setenv +setfunhelp +setq +seturl +setvar +setview +sin +slide_image +snvalid +sqrt +ssadd +ssdel +ssget +ssgetfirst +sslength +ssmemb +ssname +ssnamex +sssetfirst +start_dialog +start_image +start_list +startapp +strcase +strcat +strlen +subst +substr +tablet +tblnext +tblobjname +tblsearch +term_dialog +terpri +textbox +textpage +textscr +trace +trans +type +unload_dialog +untrace +vector_image +ver +vl-acad-defun +vl-acad-undefun +vlarts-init +vl-arx-import +vlax-3D-point +vlax-add-cmd +vlax-create-object +vlax-curve-getArea +vlax-curve-getClosestPointTo +vlax-curve-getClosestPointToProjection +vlax-curve-getDistAtParam +vlax-curve-getDistAtPoint +vlax-curve-getEndParam +vlax-curve-getEndPoint +vlax-curve-getFirstDeriv +vlax-curve-getParamAtDist +vlax-curve-getParamAtPoint +vlax-curve-getPointAtDist +vlax-curve-getPointAtParam +vlax-curve-getSecondDeriv +vlax-curve-getStartParam +vlax-curve-getStartPoint +vlax-curve-isClosed +vlax-curve-isPeriodic +vlax-curve-isPlanar +vlax-dump-object +vlax-ename->vla-object +vlax-erased-p +vlax-for +vlax-get-acad-object +vlax-get-object +vlax-get-or-create-object +vlax-get-property +vlax-import-type-library +vlax-invoke-method +vlax-ldata-delete +vlax-ldata-get +vlax-ldata-list +vlax-ldata-put +vlax-ldata-test +vlax-make-safearray +vlax-make-variant +vlax-map-collection +vlax-method-applicable-p +vlax-object-released-p +vlax-product-key +vlax-property-available-p +vlax-put-property +vlax-read-enabled-p +vlax-release-object +vlax-remove-cmd +vlax-safearray->list +vlax-safearray-fill +vlax-safearray-get-dim +vlax-safearray-get-element +vlax-safearray-get-l-bound +vlax-safearray-get-u-bound +vlax-safearray-put-element +vlax-safearray-type +vlax-tmatrix +vlax-typeinfo-available-p +vlax-variant-change-type +vlax-variant-type +vlax-variant-value +vlax-vla-object->ename +vlax-write-enabled-p +vl-bb-ref +vl-bb-set +vl-bt +vl-bt-off +vl-bt-on +vl-catch-all-apply +vl-catch-all-error-message +vl-catch-all-error-p +vl-cmdf +vl-consp +vl-directory-files +vl-doc-export +vl-doc-import +vl-doc-ref +vl-doc-set +vl-every +vl-exit-with-error +vl-exit-with-value +vl-file-copy +vl-file-delete +vl-file-directory-p +vl-filename-base +vl-filename-directory +vl-filename-extension +vl-filename-mktemp +vl-file-rename +vl-file-size +vl-file-systime +vl-get-resource +vl-infp +vl-init +vlisp-compile +vlisp-dclres-list +vlisp-dclres-load-dialog +vlisp-export-symbol +vlisp-fasres-list +vlisp-fasres-load +vlisp-import-exsubrs +vlisp-import-symbol +vlisp-inires-list +vl-list* +vl-list->string +vl-list-exported-functions +vl-list-length +vl-list-loaded-vlx +vl-load-all +vl-load-com +vl-load-reactors +vl-member-if +vl-member-if-not +vl-mkdir +vl-nanp +vl-position +vl-prin1-to-string +vl-princ-to-string +vl-propagate +vlr-acdb-reactor +vlr-add +vlr-added-p +vlr-beep-reaction +vlr-command-reactor +vlr-current-reaction-name +vlr-data +vlr-data-set +vlr-deepclone-reactor +vlr-docmanager-reactor +vlr-dwg-reactor +vlr-dxf-reactor +vlr-editor-reactor +vl-registry-delete +vl-registry-descendents +vl-registry-read +vl-registry-write +vl-remove +vl-remove-if +vl-remove-if-not +vlr-insert-reactor +vlr-linker-reactor +vlr-lisp-reactor +vlr-miscellaneous-reactor +vlr-mouse-reactor +vlr-notification +vlr-object-reactor +vlr-owner-add +vlr-owner-remove +vlr-owners +vlr-pers +vlr-pers-list +vlr-pers-p +vlr-pers-release +vlr-reaction-name +vlr-reactions +vlr-reaction-set +vlr-reactors +vlr-remove +vlr-remove-all +vlr-set-notification +vlr-sysvar-reactor +vlr-toolbar-reactor +vlr-trace-reaction +vlr-type +vlr-types +vlr-undo-reactor +vlr-wblock-reactor +vlr-window-reactor +vlr-xref-reactor +vl-some +vl-sort +vl-sort-i +vl-string->list +vl-string-elt +vl-string-left-trim +vl-string-mismatch +vl-string-position +vl-string-right-trim +vl-string-search +vl-string-subst +vl-string-translate +vl-string-trim +vl-symbol-name +vl-symbolp +vl-symbol-value +vl-unload-vlx +vl-vbaload +vl-vbarun +vl-vlx-loaded-p +vlx-loaded-p +vmon +vports +wcmatch +while +write-char +write-line +xdroom +xdsize +xstrcase +zerop diff --git a/PowerEditor/bin/plugins/APIs/nsis.api b/PowerEditor/bin/plugins/APIs/nsis.api new file mode 100644 index 00000000..862bc165 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/nsis.api @@ -0,0 +1,219 @@ +!AddIncludeDir +!AddPluginDir +!appendfile +!cd +!define +!delfile +!echo +!else +!endif +!error +!execute +!ifdef +!ifmacrodef +!ifmacrondef +!ifndef +!include +!insertmacro +!macro +!macroend +!packhdr +!system +!tempfile +!undef +!verbose +!warning +Abort +AddBrandingImage +AddSize +AllowRootDirInstall +AllowSkipFiles +AutoCloseWindow +BGFont +BGGradient +BrandingText +BringToFront +Call +CallInstDLL +Caption +ChangeUI +CheckBitmap +ClearErrors +CompletedText +ComponentText +CopyFiles +CRCCheck +CreateDirectory +CreateFont +CreateShortCut +Delete +DeleteINISec +DeleteINIStr +DeleteRegKey +DeleteRegValue +DetailPrint +DetailsButtonText +DirText +DirVar +DirVerify +EnableWindow +EnumRegKey +EnumRegValue +Exch +Exec +ExecShell +ExecWait +ExpandEnvStrings +File +FileBufSize +FileClose +FileErrorText +FileOpen +FileRead +FileReadByte +FileSeek +FileWrite +FileWriteByte +FindClose +FindFirst +FindNext +FindWindow +FlushINI +Function +FunctionEnd +GetCurInstType +GetCurrentAddress +GetDlgItem +GetDLLVersion +GetDLLVersionLocal +GetErrorLevel +GetFileTime +GetFileTimeLocal +GetFullPathName +GetFunctionAddress +GetInstDirError +GetLabelAddress +GetTempFileName +Goto +HideWindow +Icon +IfAbort +IfErrors +IfFileExists +IfRebootFlag +IfSilent +InitPluginsDir +InstallButtonText +InstallColors +InstallDir +InstallDirRegKey +InstProgressFlags +InstType +InstTypeGetText +InstTypeSetText +IntCmp +IntCmpU +IntFmt +IntOp +IsWindow +LangString +LangStringUP +LicenseBkColor +LicenseData +LicenseForceSelection +LicenseLangString +LicenseText +LoadLanguageFile +LockWindow +LogSet +LogText +MessageBox +MiscButtonText +Name +Nop +OutFile +Page +PageEx +PageExEnd +Pop +Push +Quit +ReadEnvStr +ReadINIStr +ReadRegDWORD +ReadRegStr +Reboot +RegDLL +Rename +ReserveFile +Return +RMDir +SearchPath +Section +SectionEnd +SectionGetFlags +SectionGetInstTypes +SectionGetSize +SectionGetText +SectionGroup +SectionGroupEnd +SectionIn +SectionSetFlags +SectionSetInstTypes +SectionSetSize +SectionSetText +SendMessage +SetAutoClose +SetBrandingImage +SetCompress +SetCompressionLevel +SetCompressor +SetCompressorDictSize +SetCtlColors +SetCurInstType +SetDatablockOptimize +SetDateSave +SetDetailsPrint +SetDetailsView +SetErrorLevel +SetErrors +SetFileAttributes +SetFont +SetOutPath +SetOverwrite +SetPluginUnload +SetRebootFlag +SetShellVarContext +SetSilent +ShowInstDetails +ShowUninstDetails +ShowWindow +SilentInstall +SilentUnInstall +Sleep +SpaceTexts +StrCmp +StrCmpS +StrCpy +StrLen +SubCaption +SubSection +SubSectionEnd +UninstallButtonText +UninstallCaption +UninstallIcon +UninstallSubCaption +UninstallText +UninstPage +UnRegDLL +Var +VIAddVersionKey +VIProductVersion +WindowIcon +WriteINIStr +WriteRegBin +WriteRegDWORD +WriteRegExpandStr +WriteRegStr +WriteUninstaller +XPStyle \ No newline at end of file diff --git a/PowerEditor/bin/plugins/APIs/pascal.api b/PowerEditor/bin/plugins/APIs/pascal.api new file mode 100644 index 00000000..aeefabd7 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/pascal.api @@ -0,0 +1,18407 @@ +ABAccessibility +Abandon +AbandonSignalHandler +Abort +AbortDoc +Aborted +AbortPath +AbortPrinter +AbortProc +AbortRecord +AbortRecordVariants +AbortSystemShutdown +AbortSystemShutdownA +AbortSystemShutdownW +absolute +absoluteChildNumber +abstract +AccCtrl +accDoDefaultAction +Accept +AcceptChanges +AcceptEx +acceptNode +AcceptsClass +AccessCheck +AccessCheckAndAuditAlarm +AccessCheckAndAuditAlarmA +AccessCheckAndAuditAlarmW +AccessCheckByType +AccessCheckByTypeAndAuditAlarm +AccessCheckByTypeAndAuditAlarmA +AccessCheckByTypeAndAuditAlarmW +AccessCheckByTypeResultList +AccessCheckByTypeResultListAndAuditAlarm +AccessCheckByTypeResultListAndAuditAlarmA +AccessCheckByTypeResultListAndAuditAlarmW +AccessData +AccessError +AccessibleObjectFromID +AccessibleObjectFromWindow +accHitTest +accLocation +accNavigate +accSelect +acl_root +AclAPI +Acquire +AcquireExceptionObject +AcquireFocus +AcquireLayoutLock +ActionBarListClick +ActionBarListClickCheck +ActionChange +ActionIdleTimerProc +ActionsListClick +ActionsListData +ActionsListDrawItem +ActionsListMeasureItem +ActionsListStartDrag +Activate +ActivateBuffers +ActivateClassGroup +Activated +ActivateFilters +ActivateHint +ActivateHintData +ActivateInspector +ActivateKeyboardLayout +ActivateMe +ActivateTextFilter +ActiveBuffer +ActiveChange +ActiveChanged +ActiveClassGroup +ActiveConnection +ActiveX +ActivityId +ActnColorMaps +ActnCtrls +ActnList +ActnMan +ActnMenus +ActnPopup +ActnRes +actory +ActualSpacing +Add +AddAccessAllowedAce +AddAccessAllowedAceEx +AddAccessAllowedObjectAce +AddAccessDeniedAce +AddAccessDeniedAceEx +AddAccessDeniedObjectAce +AddAce +AddAction +AddActionClass +AddActionMenu +AddActions +AddAggregate +AddAlias +AddAllFields +AddAncestor +AddAppEvent +AddAtom +AddAtomA +AddAtomW +AddAttribute +AddAuditAccessAce +AddAuditAccessAceEx +AddAuditAccessObjectAce +AddBiDiModeExStyle +AddBitmap +AddButtonClick +AddCategory +AddChars +AddCheckButton +AddChild +AddChildElement +AddChildFirst +AddChildNode +AddChildObject +AddChildObjectFirst +AddClass +AddClick +AddClient +AddColumn +AddColumnDesc +AddComboBox +AddCommand +AddCompilerMessage +AddComplexType +AddConnection +AddConstraints +AddContainer +AddContextMenuItem +AddControl +AddControlItem +AddCurrency +AddCurrencySymbol +AddCustomMessage +AddCustomMessagePtr +AddDatabase +AddDataLink +AddDataModule +AddDataPacket +AddDataSetAttributes +AddDataSource +AddDesktopItem +AddDesktopItemWithUI +AddDispatch +AddDrive +AddDriver +Added +AddEdges +AddEditBox +AddEditFormat +AddEditOptions +AddedNode +AddEmpty +addEntRefSubtree +AddError +AddExistingProject +AddExitProc +AddExprFilter +AddExtends +AddExtraFieldProps +AddField +AddFieldButtonClick +AddFieldDef +AddFieldDefs +AddFieldDesc +AddFieldLinks +AddFieldProps +AddFields +AddFieldToList +AddFile +AddFileFilter +AddFileSystem +AddFileWithParent +AddFilter +AddFilterCallBack +AddFirst +AddFontMemResourceEx +AddFontResource +AddFontResourceA +AddFontResourceEx +AddFontResourceExA +AddFontResourceExW +AddFontResourceW +AddForm +AddFormA +AddFormW +AddFuncDesc +AddFuncFilter +AddGroup +AddHeader +AddHighlighter +AddHistoryItem +AddHostedNode +AddIcon +AddIconToImageList +AddImage +AddImageList +AddImages +AddImplType +AddIn +AddIndex +AddIndexDef +AddIndexDefs +Adding +AddInksetInterval +AddItem +AddItemClick +AddJob +AddJobA +AddJobW +AddKeyBinding +AddKeyboardBinding +AddKeyword +AddLine +AddLiterals +AddManager +AddMapping +AddMasked +AddMember +AddMenu +AddMenuCommand +AddMenuCreatorNotifier +AddMenuToList +AddMessage +AddMessageGroup +AddMinMax +AddModuleUnloadProc +AddMonitor +AddMonitorA +AddMonitorW +AddNamespace +AddNegCurrencySymbol +AddNew +AddNewLocation +AddNewProject +AddNewSection +AddNode +AddNodeClassInfo +AddNormalizedFractions +AddNotifier +AddNotifierEx +AddObject +AddObjectFactory +AddObjectFirst +AddOffset +AddOle2 +AddOptParameter +AddPages +AddPaletteDesignerState +AddPaletteState +AddParam +AddParameter +AddParamSQLForDetail +AddPassword +AddPenDataHRC +AddPenInputHRC +AddPlace +AddPluginInfo +AddPoint +AddPointsPenData +AddPopupForm +AddPort +AddPortA +AddPortW +AddPrinter +AddPrinterA +AddPrinterConnection +AddPrinterConnectionA +AddPrinterConnectionW +AddPrinterDriver +AddPrinterDriverA +AddPrinterDriverW +AddPrinterW +AddPrintProcessor +AddPrintProcessorA +AddPrintProcessorW +AddPrintProvidor +AddPrintProvidorA +AddPrintProvidorW +AddProcess +AddProductInfo +AddProject +AddPropertySheetPages +AddPushButton +AddRadioButtonList +AddRecord +AddRef +AddRefAccessor +AddReference +AddRefHfont +AddRefRows +AddRefTypeInfo +Address +AddressInProcess +AddressOfMember +AddRootNode +AddScript +AddSection +AddSeparator +AddSession +AddSink +AddSpeedSetting +AddSQLExprAttr +AddStandardAlias +AddStatement +AddStrings +AddSubtractNormalizedFractions +AddTableButtonClick +AddTemporaryLabel +AddTerminateProc +AddText +AddThread +AddTitleMessage +AddToBindList +AddToInterface +AddToList +AddToolbar +AddToolButton +AddToolMessage +AddType +AddTypeCount +AddUrl +AddVarDesc +AddWatch +AddWatchAtCursor +AddWhereClause +addWideChar +AddWideCompilerMessage +AddWideMessageGroup +addWideString +AddWideTitleMessage +AddWideToolMessage +AddWizard +AddWordsHWL +Adjust +AdjustBiDiBehavior +AdjustBounds +AdjustCaptionRect +AdjustCellRect +AdjustClientRect +AdjustColor +AdjustColors +AdjustColWidths +AdjustControl +AdjustControlRect +AdjustDate +AdjustDays +AdjustDecimalPosition +AdjustDockRect +AdjustDropDown +AdjustFirstRecord +AdjustHeight +AdjustHours +AdjustLineBreaks +Adjustment +AdjustMinutes +AdjustMonths +AdjustRect +AdjustRowCount +AdjustSeconds +AdjustSize +AdjustTokenGroups +AdjustTokenPrivileges +AdjustWindowRect +AdjustWindowRectEx +adler32 +ADOConAnyProblems +ADOConDragOver +ADOConDropOver +AdoConEd +ADOConFigureParent +ADOConst +ADODB +ADOInt +ADOReg +ADOTypeToFieldType +AdvancedDocumentProperties +AdvancedDocumentPropertiesA +AdvancedDocumentPropertiesW +AdvancedDrawItem +Advise +AdvStart +AdvStop +AfterCompile +AfterConstruction +AfterItemsModified +AfterRename +AfterSave +AggValueAsVariant +alias +AliasNameChange +AliasNameDropDown +Align +AlignControl +AlignControls +AlignForm +AlignForms +AlignWork +AListBoxClick +AListBoxKeyDown +AListBoxKeyPress +AllEqual +aller +AllNamed +Alloc +AllocateAndInitializeSid +AllocateException +AllocateHWnd +AllocateIndex +AllocateLineDC +AllocateLocallyUniqueId +AllocCachedUpdateBuffers +AllocConsole +AllocDispID +AllocFilterStr +AllocKeyBuffers +AllocMem +AllocRecordBuffer +AllocResource +AllocTlsBuffer +AllocTlsIndex +AllowCodeInsight +AllowConnect +AllowSave +AllowWildConnect +AllowXMLExecute +AlphaBlend +AlphaDIBBlend +AlphaSort +AlterColumn +AlterIndex +AlterTable +AMDeferUpdate +analyzeCM +analyzeIntDTDStr +ancestorChildNumber +AncestorIsValid +AncestorNameMatches +Anchored +and +AngleArc +Animate +Animate_Close +Animate_Create +Animate_Open +Animate_OpenEx +Animate_Play +Animate_Seek +Animate_Stop +AnimatePalette +AnimateWindow +Annuity2 +AnotherObject +AnsiAppend +AnsiAssign +AnsiCat +AnsiCompareFileName +AnsiCompareStr +AnsiCompareText +AnsiContainsStr +AnsiContainsText +AnsiCopy +AnsiDelete +AnsiDequotedStr +AnsiEndsStr +AnsiEndsText +AnsiExtractQuotedStr +AnsiFree +AnsiFromPWideChar +AnsiFromWide +AnsiIndexStr +AnsiIndexText +AnsiInsert +AnsiLastChar +AnsiLeftStr +AnsiLower +AnsiLowerBuff +AnsiLowerCase +AnsiLowerCaseFileName +AnsiMatchStr +AnsiMatchText +AnsiMidStr +AnsiNext +AnsiPos +AnsiPrev +AnsiQuotedStr +AnsiReplaceStr +AnsiReplaceText +AnsiResemblesText +AnsiReverseString +AnsiRightStr +AnsiSameCaption +AnsiSameStr +AnsiSameText +AnsiSetLength +AnsiStartsStr +AnsiStartsText +AnsiStrComp +AnsiStrIComp +AnsiStrLastChar +AnsiStrLComp +AnsiStrLIComp +AnsiStrLower +AnsiStrPos +AnsiStrRScan +AnsiStrScan +AnsiStrUpper +AnsiToNative +AnsiToNativeBuf +AnsiToOem +AnsiToOemBuff +AnsiToUtf8 +AnsiToUtf8Ex +AnsiUpper +AnsiUpperBuff +AnsiUpperCase +AnsiUpperCaseFileName +AnyOp +AnyPopup +AnyProblems +AnyToIntf +Append +appendChild +AppendChunk +AppendData +AppendItem +AppendMenu +AppendMenuA +AppendMenuW +appendNamedItem +AppendParameters +AppendRecord +AppendStr +AppendTo +AppendToLog +AppEvnts +ApplicationHandleException +Apply +ApplyActionExecute +ApplyActionUpdate +ApplyChanges +ApplyFilePath +ApplyNewLocations +ApplyProperties +ApplyRange +ApplyThemeChange +ApplyToAllActnUpdate +ApplyUpdates +ApplyViewState +ar +arameter +Arc +ArcCos +ArcCosh +ArcCot +ArcCotH +ArcCsc +ArcCscH +ArcSec +ArcSecH +ArcSin +ArcSinh +ArcTan +ArcTan2 +ArcTanh +ArcTo +AreAllAccessesGranted +AreAnyAccessesGranted +AreContextItemsStored +AreDependenciesStored +AreFileApisANSI +AreItemsStored +AreOSExceptionsBlocked +ArgError +Arith_RdSigned +Arith_RdUnsigned +Arrange +ArrangeButtons +ArrangeControl +ArrangeControlInCell +ArrangeControls +ArrangeIconicWindows +ArrangeIcons +array +ArrayContains +ArrowKeys +as +AS_ApplyUpdates +AS_DataRequest +AS_Execute +AS_GetParams +AS_GetProviderNames +AS_GetRecords +AS_RowRequest +asm +AspTlb +assembler +Assign +AssignClient +AssignCommandText +AssignCurValues +AssignError +AssignField +AssignFields +AssignFieldValue +AssignFileTypes +AssignGraphic +AssignHelpSelector +AssignLongStr +AssignNestedDataSet +AssignOptions +AssignParam +AssignParameter +AssignParseOptions +AssignPascalString +AssignPicture +AssignPrn +AssignProc +AssignStr +AssignTo +AssignToBitmap +AssignToMetafile +AssignToParam +AssignToPicture +AssignValue +AssignValues +AssignVariant +AssocCreate +AssociateAttributes +AssocQueryKey +AssocQueryKeyA +AssocQueryKeyW +AssocQueryString +AssocQueryStringA +AssocQueryStringByKey +AssocQueryStringByKeyA +AssocQueryStringByKeyW +AssocQueryStringW +AsWideString +AsyncInitSocket +AsyncInstallDistributionUnit +asyncLoadState +atabase +ataSet +ateIn +AtLeast +AttachNode +AttachProcess +AttachThreadInput +AttemptToUseSharedMemoryManager +AttributeClick +attributeDefinition +AttributeListNotify +AttributesChanged +AttributeSetStored +AutoAddColumn +AutoAddRow +AutoButtonSet +AutoComplete +AutoFill +AutoHideTimerExec +AutomationTerminateProc +AutoPopTimerExec +AutoScroll +AutoScrollEnabled +AutoScrollInView +AutoSizingChanged +auxGetDevCaps +auxGetDevCapsA +auxGetDevCapsW +auxGetNumDevs +auxGetVolume +auxOutMessage +auxSetVolume +aveInitProc +AvgCharWidth +AxCtrls +Back +BackClick +BackgroundClipped +BackgroundSize +Backslash +BackspaceDelete +BackupEventLog +BackupEventLogA +BackupEventLogW +BackupRead +BackupREGDB +BackupSeek +BackupVarBoolFromStr +BackupVarBStrFromBool +BackupVarBStrFromCy +BackupVarBStrFromDate +BackupVarCyFromStr +BackupVarDateFromStr +BackupVarI4FromStr +BackupVariantChangeTypeEx +BackupVarR4FromStr +BackupVarR8FromStr +BackupWrite +BadIndex +BandActn +BaseEditSQL +BatchMove +BcdAdd +BcdCompare +BcdCurrencyFormat +BcdDivide +BcdError +BcdErrorFmt +BcdFixedOrNumberFormat +BcdFromBytes +BcdGeneralFormat +BcdMultiply +BcdPrecision +BcdRangeError +BcdScale +BcdScientificFormat +BcdSubtract +BcdToBytes +BCDToCurr +BcdToDouble +BcdToInteger +BcdToStr +BcdToStrF +BCtrlGrid +BdeCallBack +bdeconst +bdemts +BDEReg +Beep +BeforeCompile +BeforeDestruction +BeforeItemsModified +BeforeProgramLaunch +BeforeRename +BeforeSave +begin +BeginAbort +BeginAbortVariants +BeginAnimation +BeginAutoDrag +BeginBlock +BeginColumnDrag +BeginCommit +BeginCommitVariants +BeginCreateFields +BeginDeferWindowPos +BeginDesign +BeginDispatch +BeginDoc +BeginDrag +BeginEditing +BeginGlobalLoading +BeginInsertAppend +BeginLayout +BeginPaint +BeginPath +BeginPrepare +BeginPrepareVariants +BeginRead +BeginReferences +BeginRowDrag +BeginThread +BeginTrans +BeginTransaction +BeginTransComplete +BeginUpdate +BeginUpdateFieldDefs +BeginUpdateResource +BeginUpdateResourceA +BeginUpdateResourceW +BeginWrite +BestClass +BestGroup +BetterSize +BevelLine +BevelRect +BEvent +BiDiDraw +BinaryOp +BinaryRead +BinaryWrite +Bind +BindBtnClick +BindFields +BindForwarder +BindIfRunning +BindImage +BindImageEx +BindingListClick +BindKeyboard +BindListClick +BindMoniker +BindParams +BindToHandler +BindToObject +BindToSource +BindToStorage +BindType +BInfo +BinToHex +BitBlt +BitBtn1Click +BitmapChanged +BiUnimplemented +bj +BlankArgument +BlankStr +blink +BlockOSExceptions +BlockReaders +BlockReadNext +BoldDays +BookmarkAvailable +BookmarkGoto +BookmarkRecord +BookmarkToggle +BookmarkValid +BOOL +Boolean +BoolToStr +BoolToWStrViaOS +BoundingRectFromPoints +Bounds +BoundsChanged +BoxRect +break +BreakpointAdded +BreakpointChanged +BreakpointDeleted +BreakpointIsValid +BringToFront +BringWindowToTop +Broadcast +BroadcastSystemMessage +BroadcastSystemMessageA +BroadcastSystemMessageW +BrowseCallbackProc +BrowseClick +BrowseObject +BrowseProperties +BrowseSymbolAtCursor +BrushChanged +BrushCopy +BstrFromVector +BtnClick +BtnMouseDown +BucketFor +BufConvert +BufferModified +BuffersEqual +BufferToByteArray +BufferToVar +Build +BuildAggMap +BuildClick +BuildCommDCB +BuildCommDCBA +BuildCommDCBAndTimeouts +BuildCommDCBAndTimeoutsA +BuildCommDCBAndTimeoutsW +BuildCommDCBW +BuildExplicitAccessWithName +BuildExplicitAccessWithNameA +BuildExplicitAccessWithNameW +BuildImage +BuildImpersonateExplicitAccessWithName +BuildImpersonateExplicitAccessWithNameA +BuildImpersonateExplicitAccessWithNameW +BuildImpersonateTrustee +BuildImpersonateTrusteeA +BuildImpersonateTrusteeW +BuildList +BuildLocalMenu +BuildProject +BuildSecurityDescriptor +BuildSecurityDescriptorA +BuildSecurityDescriptorW +BuildTrusteeWithName +BuildTrusteeWithNameA +BuildTrusteeWithNameW +BuildTrusteeWithSid +BuildTrusteeWithSidA +BuildTrusteeWithSidW +Button_GetIdealSize +Button_GetImageList +Button_GetNote +Button_GetNoteLength +Button_GetSplitInfo +Button_GetTextMargin +Button_SetDropDownState +Button_SetElevationRequiredState +Button_SetImageList +Button_SetNote +Button_SetSplitInfo +Button_SetTextMargin +ButtonClick +ButtonGroup +ButtonIndex +ButtonRect +Buttons +byte +ByteArrayToBuffer +BytesPerScanline +ByteSwapColors +ByteToCharIndex +ByteToCharLen +ByteType +C +Cache +CachedUpdateCallBack +CalcActualButtonsPerRow +CalcAmount +CalcAutoRange +CalcBounds +CalcBufferSizes +CalcButtonLayout +CalcButtonSize +CalcButtonsPerCol +CalcButtonsPerRow +CalcButtonWidth +CalcCategoryHeight +CalcCategoryHeights +CalcCategoryWidth +CalcCategoryWidths +CalcClientDelta +CalcConstraints +CalcCoordFromPoint +CalcDockedWidth +CalcDockSize +CalcDrawInfo +CalcDrawInfoXY +CalcFieldsCallBack +CalcFixedInfo +CalcHintRect +CalcHorzPos +CalcInsertPosition +CalcJmpOffset +CalcLayout +CalcLookupValue +CalcMaxTopLeft +CalcMinSize +CalcNumTabs +CalcPrecisionAndDigits +CalcRect +CalcRowsSeen +CalcShadowColor +CalcSize +CalcSizingState +CalcSplitSize +CalcSplitterPos +CalcTabPositions +CalcTitleRect +CalcTotalSize +CalculatedStored +CalculateFields +calculatePieceOffset +calculateReplacementText +CalcVertPos +CalcXY +CallbackProc +CallBDEInitProcs +CallComplete +CallCreateObject +CallDefWndProc +CallEventMethod +CallFreeObject +CallGetIDsOfNames +CallGetServerList +CallHtmlHelp +CallInvoke +CallKeyBindingProc +CallMsgFilter +CallMsgFilterA +CallMsgFilterW +CallNamedPipe +CallNamedPipeA +CallNamedPipeW +CallNextHookEx +CALLOC +CallOnTerminate +CallPaintEvent +CallSpecialWinHelp +CallTerminateProcs +CallWindowProc +CallWindowProcA +CallWindowProcW +CallWinHelp +CallWndHook +CanAdd +CanAutoSize +CanBePooled +CanBindProperty +CanBlockRead +Cancel +CancelBatch +CancelBtnClick +CancelDC +CancelDispatch +CancelDrag +CancelEdit +CancelHint +CancelIo +CancelLayout +CancelLink +CancelMenu +CancelMode +CancelNestedDataSets +CancelRange +CancelUpdate +CancelUpdates +CancelWaitableTimer +CanChange +CanClose +CanCollapse +CanConvert +CanCreateObject +CanDelete +CanEdit +CanEditAcceptKey +CanEditModify +CanEditShow +CanExpand +CanExportFile +CanFocus +CanGotoSource +CanGridAcceptKey +CanHandle +CanImportFile +CanInPlaceActivate +CanModify +CanMove +CanPaste +CanReloadSymbolTable +CanResize +CanScrollLeft +CanScrollRight +CanSetProperties +CanShow +CanShowALink +CanShowContext +CanShowTab +CanShowTableOfContents +CanShowTopic +CanUseShort +CanvasChanged +CanWindowlessActivate +Caption +CaptionedDockTree +CaptionFor +CaptionHeight +CaptionLength +CaptionOptionsComboChange +Capture +CaretPos +Cascade +CascadeWindows +case +Cast +CastTo +CastToOle +CategoryButtons +CatListClick +CatListStartDrag +CCheck +CDATA +CDataNormalization +cdecl +CDSEdit +cdwLocals +Ceil +CellClick +CellIndexToCell +CellRect +CellToCellIndex +CelsiusToFahrenheit +CelsiusToKelvin +CelsiusToRankine +CelsiusToReaumur +Center +CenterPoint +CenterWindow +ChainCall +Change +ChangeActivePage +ChangeAppWindow +ChangeBiDiPosition +ChangeBitmap +ChangeClipboardChain +Changed +ChangeDisplaySettings +ChangeDisplaySettingsA +ChangeDisplaySettingsEx +ChangeDisplaySettingsExA +ChangeDisplaySettingsExW +ChangeDisplaySettingsW +ChangeExpandedCount +ChangeFileExt +ChangeFilePath +ChangeGridOrientation +ChangeIconDialog +ChangeIfNot +ChangeKey +ChangeLevelBy +ChangeLink +ChangeMenu +ChangeMenuA +ChangeMenuW +ChangeName +ChangeNotification +ChangePage +ChangeScale +ChangeServiceConfig +ChangeServiceConfigA +ChangeServiceConfigW +ChangeSize +ChangeVisibility +ChangeWeakCount +Changing +char +CharacterSizeLocaleChar +CharacterSizeWideChar +CharacterToSymbol +CharFromWChar +CharHeight +CharKeys +CharLength +CharLower +CharLowerA +CharLowerBuff +CharLowerBuffA +CharLowerBuffW +CharLowerW +CharNext +CharNextA +CharNextEx +CharNextExA +CharNextW +CharNextW95 +CharPosToPos +CharPrev +CharPrevA +CharPrevEx +CharPrevExA +CharPrevW +charRef +CharToByteIndex +CharToByteLen +CharToOem +CharToOemA +CharToOemBuff +CharToOemBuffA +CharToOemBuffW +CharToOemW +CharToWideChar +CharUpper +CharUpperA +CharUpperBuff +CharUpperBuffA +CharUpperBuffW +CharUpperW +ChDir +Check +CheckAction +CheckActive +CheckAttribute +CheckAutoSave +CheckBiDirectional +CheckBool +CheckBreak +CheckBrowseMode +CheckCachedUpdateMode +CheckCanModify +CheckChainCall +CheckCircularLinks +CheckColorsInGamut +CheckColumnDrag +CheckCommandText +CheckCommonControl +CheckComponent +CheckConfigMode +CheckContent +CheckControl +CheckCursor +CheckDatabaseAlias +CheckDatabaseName +CheckDataSet +CheckDbClient +CheckDBSessionName +CheckDetailRecords +CheckDisconnect +CheckDispatching +CheckDlgButton +CheckDOM +CheckEdit +CheckEmptyDate +CheckEncoding +CheckEOF +CheckError +CheckFieldAdd +CheckFieldCompatibility +CheckFieldDelete +CheckFieldKind +CheckFieldName +CheckFieldNames +CheckFieldProps +CheckForAsyncExecute +CheckForDTD +CheckForFlyAway +CheckForPassthroughs +CheckForXMLSchema +CheckIfOpen +CheckIfParentScrolled +CheckImage +CheckImageList +CheckInactive +CheckIndexOpen +CheckIniChange +CheckIntegerValue +CheckInterceptor +CheckLongFieldNames +CheckLst +CheckMasterRange +CheckMenuDropdown +CheckMenuItem +CheckMenuRadioItem +CheckMetaData +CheckNamespaceAware +CheckNestedBrowseMode +CheckNotChanged +CheckNotCircular +CheckNotHosted +CheckNotLookup +CheckObject +CheckObjectList +CheckOpen +CheckOperation +CheckOption +CheckOverwrite +CheckParent +CheckParentState +CheckPosChanged +CheckPrinting +CheckProviderEOF +CheckPSAPILoaded +CheckRadioButton +CheckRange +CheckReadOnly +CheckRequiredFields +CheckResolver +CheckRowDrag +CheckSchemaVersion +CheckServerParams +CheckSessionName +CheckSetKeyMode +CheckSignature +CheckSnow +CheckSocketResult +CheckSqlTimeStamp +CheckSumMappedFile +CheckSynchronize +CheckTaskWindow +CheckTaskWindowAll +CheckTextNode +CheckThreadError +CheckToken +CheckTokenSymbol +CheckToolMenuDropdown +CheckType +CheckTypeSize +CheckUndock +CheckValidDate +CheckValue +CheckValues +CheckWordValue +child_fork +ChildDefUpdate +ChildElementsChanged +ChildListNotify +ChildNodeUpdated +childNumber +ChildWindowFromPoint +ChildWindowFromPointEx +ChooseColor +ChooseColorA +ChooseColorW +ChooseFont +ChooseFontA +ChooseFontW +ChoosePixelFormat +Chord +ChrCmpI +ChrCmpIA +ChrCmpIW +ChSyvToAnsi +ciId +cinfo_find +CINFO_HASH +cinfo_init +cinfo_lookup +cinfo_merge +cinfo_terminate +ClampInView +class +ClassComplete +Classes +ClassGroupOf +ClassIDToProgID +ClassIDToString +ClassInfo +ClassInheritsFrom +ClassName +ClassNameIs +ClassNameNoT +ClassNavigate +ClassParent +ClassType +Cleanup +CleanupException +CleanupFiles +CleanupInstance +CleanUpLists +CleanupStack +Clear +ClearActionBar +ClearActiveAggs +ClearActiveConnection +ClearAllClick +ClearAllMessages +clearAndFree +clearAttributes +ClearBitmap +ClearBlobCache +ClearBorderSpace +ClearBoundList +ClearBtnClick +ClearBuffers +ClearButtonClick +ClearCache +ClearCalcFields +ClearCatList +ClearClick +ClearClientData +ClearCommBreak +ClearCommError +ClearCompilerMessages +ClearConfigurationParameters +ClearCustData +ClearDocumentRef +clearElementTypes +clearEntities +clearErrorList +ClearEventLog +ClearEventLogA +ClearEventLogW +ClearExcepInfo +ClearExceptions +ClearFields +ClearHmenuProps +ClearHwndProps +clearInvalidNodeIterators +ClearItem +ClearItems +ClearMapping +ClearMatches +ClearMessageGroup +ClearModifications +ClearMonitors +clearNotations +clearParameterEntities +ClearProps +ClearRefs +ClearRootSprig +ClearRowPosition +ClearSavedPacket +ClearSearchMessages +ClearSelection +ClearSetup +ClearSprig +ClearStatements +ClearSubMenus +ClearTempMenu +ClearToolMessages +ClearTreeNode +ClearUndo +ClearUnneededSprigs +ClearVariantTypeList +Click +ClickButton +ClickCheck +ClickHandler +Client +ClientConnect +ClientDisconnect +ClientError +ClientErrorEvent +ClientEvent +ClientExecute +ClientFillBuffer +ClientGetSize +ClientNotify +ClientRead +ClientToScreen +ClientToWindow +ClientWndProc +ClientWrite +Clipboard +ClipboardComponents +Clipbrd +ClipCursor +Clone +CloneCursor +CloneNode +CloneNodeToDoc +Close +CloseAggs +CloseAll +CloseBlob +CloseBtnClick +CloseClipboard +CloseCursor +CloseCustomize +CloseDatabase +CloseDatabaseHandle +CloseDataSets +CloseDesktop +CloseDetailDatasets +CloseDialog +CloseDriver +CloseDropDown +CloseDW +CloseEditor +CloseEnhMetaFile +CloseEventLog +CloseFigure +CloseFile +CloseHandle +CloseIndexFile +CloseKey +CloseLink +CloseMenu +CloseMetaFile +CloseModal +CloseModule +CloseNode +ClosePage +ClosePrinter +CloseProject +CloseQuery +CloseRaw +CloseRegKey +CloseServiceHandle +closesocket +CloseUp +CloseView +CloseWindow +CloseWindowStation +ClrEol +ClrScr +CLSIDFromProgID +CLSIDFromString +CMActionExecute +CMActionUpdate +CMActivate +CmAdmCtl +CMAllChildrenFlipped +CMAppSysCommand +CMBiDiModeChanged +CMBorderChanged +CMButtonPressed +CMCancelMode +CMChanged +CMChildKey +CMColorChanged +CMControlChange +CMControlListChange +CMControlListChanging +CMCtl3DChanged +CMCursorChanged +CMDeactivate +CMDeferFree +CMDeferLayout +CMDesignHitTest +CMDialogChar +CMDialogKey +CMDockClient +CMDockNotification +CMDocWindowActivate +CMDrag +CMEnabledChanged +CMEnter +CMEnterMenuLoop +CMExit +CMFloat +CMFocusChanged +CMFontChange +CMFontChanged +CMGetDataLink +CMHintShow +CMHitTest +CMIconChanged +CMInvalidate +CMIsShortCut +CMIsToolControl +CMItemClicked +CMItemDropPoint +CMItemKeyed +CMItemSelected +CMLookupComplete +CMMenuChanged +CMMouseEnter +CMMouseLeave +CMParentBiDiModeChanged +CMParentColorChanged +CMParentCtl3DChanged +CMParentFontChanged +CMPopupHwndDestroy +CmpUnimplemented +CMRecreateWnd +CMRelease +CMResetBar +CMShowHintChanged +CMShowingChanged +CMSocketMessage +CMSysColorChange +CMSysFontChanged +CMTabFontChanged +CMTabStopChanged +CMTextChanged +CMTimeChange +CMUIActivate +CMUIDeactivate +CMUnDockClient +CMVisibleChanged +CMWantSpecialKey +CMWinINIChange +CMYK +CNBandChange +CNChar +CNCommand +CNCtlColorBtn +CNCtlColorScrollBar +CNCtlColorStatic +CNDrawItem +CNDropDownClosed +CNHScroll +CNKeyDown +CNKeyUp +CNMeasureItem +CNNotify +CNSysChar +CNSysKeyDown +CNVScroll +CoAddRefServerProcess +CoAllocCStr +CoBuildVersion +CoCAccPropServices +CoCOMAdminCatalog +CoCOMAdminCatalogCollection +CoCOMAdminCatalogObject +CoCommand +CoConnection +CoCopyProxy +CoCreateFreeThreadedMarshaler +CoCreateGuid +CoCreateInstance +CoCreateInstanceEx +CoCreateStandardMalloc +code +CodeCompletion +CodeTemplate +CodeTemplateAPI +CodeWndBtnClick +CoDisconnectObject +CoDOMDocument +CoDOMFreeThreadedDocument +CoDosDateTimeToFileTime +CoFileTimeNow +CoFileTimeToDosDateTime +CoFreeAllLibraries +CoFreeLibrary +CoFreeUnusedLibraries +CoGetCallContext +CoGetClassObject +CoGetClassObjectFromURL +CoGetCurrentProcess +CoGetInstanceFromFile +CoGetInstanceFromIStorage +CoGetInterfaceAndReleaseStream +CoGetMalloc +CoGetMarshalSizeMax +CoGetObject +CoGetPSClsid +CoGetStandardMarshal +CoGetTreatAsClass +CoHasStrongExternalConnections +CoImpersonateClient +CoInitialize +CoInitializeEx +CoInitializeSecurity +CoInternetCombineUrl +CoInternetCompareUrl +CoInternetCreateSecurityManager +CoInternetCreateZoneManager +CoInternetGetProtocolFlags +CoInternetGetSecurityUrl +CoInternetGetSession +CoInternetParseUrl +CoInternetQueryInfo +CoIsHandlerConnected +CoIsOle1Class +Col +ColClick +ColEnter +ColExit +Collapse +CollectionsEqual +ColnEdit +CoLoadLibrary +CoLockObjectExternal +ColorAdjustLuma +ColorCallBack +ColorChanged +ColorCorrectPalette +ColorHLSToRGB +ColorMatchToTarget +ColorProc +ColorRGBToHLS +ColorToBorderColor +ColorToPrettyName +ColorToRGB +ColorToWebColorName +ColorToWebColorStr +ColRightClick +ColumnAtDepth +ColumnClick +ColumnMoved +ColumnsShowing +ColWidthsChanged +COMAdmin +CoMarshalHResult +CoMarshalInterface +CoMarshalInterThreadInterfaceInStream +CombineRgn +CombineTransform +ComboBox_GetCueBannerText +ComboBox_GetMinVisible +ComboBox_SetCueBannerText +ComboBox_SetMinVisible +ComboClick +ComboExWndProc +ComboWndProc +ComClassManager +ComConst +ComCtrls +CommandClicked +CommandEnabled +CommandLineToArgvW +CommConfigDialog +CommConfigDialogA +CommConfigDialogW +CommCtrl +CommDlg +CommDlgExtendedError +comment +Commit +CommitRecord +CommitRecordVariants +Committed +CommitTrans +CommitTransComplete +CommitUpdates +CommitUrlCacheEntry +CommitUrlCacheEntryA +CommitUrlCacheEntryW +CommonPrefixWith +ComObj +Compare +CompareAction +CompareBookMarks +CompareCaption +CompareCount +CompareDate +CompareDateTime +CompareDigits +CompareExtents +CompareFileTime +CompareFront +CompareIDs +CompareItems +CompareMem +CompareNodes +CompareNormalizedFractions +CompareOp +CompareStr +CompareString +CompareStringA +CompareStrings +CompareStringW +CompareText +CompareTime +CompareToRead +CompareValue +CompareWith +CompatibleConversionType +CompatibleConversionTypes +CompileProject +ComponentLoading +ComponentRead +ComponentRenamed +ComposeHmenuIdentityString +ComposeHwndIdentityString +ComposeWith +Compound +CompressBuf +CompressPenData +CompToCurrency +CompToDouble +ComputeAldusChecksum +ComputeInfoCount +ComServ +ComStr +ComStrs +ComSvcs +ConcatField +conditionalSection +ConditionP +condvar_init +condvar_notify +condvar_terminate +condvar_wait +conf_getglobals +conf_init +conf_terminate +conf_vars2daemon +ConfigHREC +ConfigureForLookupOnly +ConfigurePort +ConfigurePortA +ConfigurePortW +Connect +ConnectComplete +ConnectEvent +ConnectionListColumnClick +ConnectionListCompare +ConnectionPoint +ConnectionStateChange +ConnectNamedPipe +ConnectTo +ConnectToPrinterDlg +const +ConstrainedResize +ConstraintCallBack +ConstraintsDisabled +ConstraintsStored +Construct +constructor +Consts +Contains +ContainsActiveControl +ContainsControl +ContainsPaletteState +ContainsStr +ContainsText +contentModelTest +contentModelTest2 +ContentRect +ContextActivated +ContextSensitiveHelp +Continue +ContinueDebugEvent +ContinuePrinting +Contnrs +ControlAtPos +ControlDestroyed +Controller +Controls +ControlsAligned +ControlsDisabled +ControlSelectNode +ControlService +ControlShiftSelectNode +ControlSize +ControlWndProc +ConvDateTimeToJulianDate +ConvDateTimeToModifiedJulianDate +Convert +CONVERT_TO_NATIVE_FS +CONVERT_TO_PRINTABLE_FORMAT +ConvertDefaultLocale +ConvertError +ConvertErrorFmt +ConvertFlags +ConvertFrom +ConvertKindOf +ConvertMask +ConvertName +ConvertObject +ConvertPos +convertReadBuffer +ConvertReadStream +ConvertStates +ConvertStreamFromAnsiToUTF8 +ConvertStreamFromUTF8ToAnsi +ConvertThreadToFiber +ConvertTo +ConvertToAutoInheritPrivateObjectSecurity +ConvertWinHelp +convertWriteBuffer +ConvertWriteStream +ConvFamilyToDescription +ConvJulianDateToDateTime +ConvModifiedJulianDateToDateTime +ConvTypeToDescription +ConvTypeToFamily +ConvUnitAdd +ConvUnitCompareValue +ConvUnitDec +ConvUnitDiff +ConvUnitInc +ConvUnitSameValue +ConvUnitToStr +ConvUnitWithinNext +ConvUnitWithinPrevious +ConvUtils +CoolBar +CoParameter +Copy +CopyAcceleratorTable +CopyAcceleratorTableA +CopyAcceleratorTableW +CopyArray +CopyAttrNodes +CopyBindInfo +CopyCallback +CopyChildNodes +CopyComplexType +CopyComponents +CopyData +CopyDataByRef +CopyEnhMetaFile +CopyEnhMetaFileA +CopyEnhMetaFileW +CopyFields +CopyFile +CopyFileA +CopyFileEx +CopyFileExA +CopyFileExW +CopyFileW +CopyFrom +CopyGlyph +CopyIcon +CopyImage +CopyImages +CopyItemClick +CopyKeys +CopyMemory +CopyMetaFile +CopyMetaFileA +CopyMetaFileW +CopyParams +CopyRect +Copyright +CopySelection +CopySid +CopySimpleType +CopyStgMedium +CopyStreamToClipboard +CopyTemplatePoliciesToZone +CopyTo +CopyToBest +CopyToClipboard +CopyValue +CopyValues +CoQueryAuthenticationServices +CoQueryClientBlanket +CoQueryProxyBlanket +CorbaVCL +CoRecordset +CoRegisterChannelHook +CoRegisterClassObject +CoRegisterMallocSpy +CoRegisterMessageFilter +CoRegisterPSClsid +CoReleaseMarshalData +CoReleaseServerProcess +CoResumeClassObjects +CoRevertToSelf +CoRevokeClassObject +CoRevokeMallocSpy +CorrectWriting +Cos +Cosecant +CoSetProxyBlanket +Cosh +CoSuspendClassObjects +CoSwitchCallContext +Cot +CoTan +CoTaskMemAlloc +CoTaskMemFree +CoTaskMemRealloc +CotH +CoTreatAsClass +CouldBeUnstableWindow +CoUninitialize +CoUnmarshalHResult +CoUnmarshalInterface +Count +CountAutoObject +CountClipboardFormats +CountElements +CountFactory +CountGenerations +CountItem +CountObject +CountRefs +CoWaitForMultipleHandles +CoXMLDocument +CoXMLDSOControl +CoXMLHTTPRequest +cp10000_MacRomanToUTF16Char +cp10000_MacRomanToUTF16Str +cp1250ToUTF16Char +cp1250ToUTF16Str +cp1251ToUTF16Char +cp1251ToUTF16Str +cp1252ToUTF16Char +cp1252ToUTF16Str +Cpl +CPlApplet +CRDMGetProviderNames +Create +Create_Parameter +CreateAcceleratorTable +CreateAcceleratorTableA +CreateAcceleratorTableW +CreateAccelTable +CreateAccessibleProxy +CreateAccessor +CreateAction +CreateActionBars +CreateADOObject +CreateAggregated +CreateAggsFromAggFields +CreateAntiMoniker +CreateAsyncBindCtx +CreateAsyncBindCtxEx +createAttribute +CreateAttributeList +CreateAttributeNode +createAttributeNS +CreateAutoDispatch +CreateBindCtx +CreateBitmap +CreateBitmapIndirect +CreateBlobStream +CreateBrush +CreateBrushIndirect +CreateBrushPattern +CreateButton +CreateButtonGlyph +CreateButtons +CreateCaret +createCDATASection +CreateChildList +CreateChildNode +CreateClass +CreateClassID +createCMAttribute +createCMAttributeDefinition +createCMAttributeList +createCMChoiceParticle +createCMComment +createCMElementParticle +createCMElementTypeDeclaration +createCMEntity +createCMEntityDeclaration +createCMExternalObject +createCMFragment +createCMInternalObject +createCMNameParticle +createCMNmtokenParticle +createCMNotation +createCMNotationDeclaration +createCMObject +createCMParameterEntity +createCMParameterEntityDeclaration +createCMParameterEntityReference +createCMPcdataChoiceParticle +createCMProcessingInstruction +createCMSequenceParticle +CreateCollection +CreateColorSpace +CreateColorSpaceA +CreateColorSpaceW +CreateColumns +CreateCommand +createComment +CreateComObject +CreateCompatibleBitmap +CreateCompatibleDC +CreateCompatibleHRC +CreateComponent +CreateConsoleScreenBuffer +CreateControl +CreateControls +CreateCppModule +CreateCurrentComponent +CreateCursor +CreateCursors +CreateDataAdviseHolder +CreateDataCache +CreateDataLink +CreateDataPacket +CreateDataSet +CreateDataSource +CreateDbClientObject +CreateDBInstance +CreateDBInstanceEx +CreateDC +CreateDCA +CreateDCW +CreateDdeConv +CreateDesignerForm +CreateDesktop +CreateDesktopA +CreateDesktopW +CreateDialog +CreateDialogA +CreateDialogIndirect +CreateDialogIndirectA +CreateDialogIndirectParam +CreateDialogIndirectParamA +CreateDialogIndirectParamW +CreateDialogIndirectW +CreateDialogParam +CreateDialogParamA +CreateDialogParamW +CreateDialogW +CreateDIBitmap +CreateDIBPatternBrush +CreateDIBPatternBrushPt +CreateDIBSection +CreateDir +CreateDirectory +CreateDirectoryA +CreateDirectoryEx +CreateDirectoryExA +CreateDirectoryExW +CreateDirectoryW +CreateDiscardableBitmap +CreateDispTypeInfo +CreateDockableForm +CreateDockManager +CreateDockPos +createDocument +createDocumentFragment +createDocumentNS +createDocumentType +CreateDOMDocument +CreateDOMNode +CreateDSBase +CreateDSCursor +CreateEdgeParts +CreateEditor +CreateElement +createElementNS +CreateEllipticRgn +CreateEllipticRgnIndirect +CreateEnhMetaFile +CreateEnhMetaFileA +CreateEnhMetaFileW +createEntity +createEntityReference +CreateEntry +CreateEnum +CreateEnumPropDescs +CreateErrorInfo +CreateEvent +CreateEventA +CreateEventW +CreateExprFilter +CreateFiber +CreateField +CreateFieldComponent +CreateFieldDefs +CreateFields +CreateFieldsEditor +CreateFile +CreateFileA +CreateFileDialog +CreateFileMapping +CreateFileMappingA +CreateFileMappingW +CreateFileMoniker +CreateFileW +CreateFmt +CreateFmtHelp +CreateFont +CreateFontA +CreateFontIndirect +CreateFontIndirectA +CreateFontIndirectEx +CreateFontIndirectExA +CreateFontIndirectExW +CreateFontIndirectW +CreateFontW +CreateForm +CreateFormatEnumerator +CreateFromDelta +CreateFromFactory +CreateFromID +createFromString +CreateFuncFilter +CreateGenericComposite +CreateGlyph +CreateGUID +CreateHalftonePalette +CreateHandle +CreateHardLink +CreateHardLinkA +CreateHardLinkW +CreateHatchBrush +CreateHelp +CreateHosted +CreateHResult +CreateHWL +CreateIC +CreateICA +CreateIcon +CreateIconFromResource +CreateIconFromResourceEx +CreateIconIndirect +CreateICW +CreateILockBytesOnHGlobal +CreateImageList +CreateIndex +CreateIndexes +CreateInfo +CreateInkset +CreateInksetHRCRESULT +CreateInstance +CreateInstanceLic +CreateInterface +CreateIoCompletionPort +CreateItem +CreateItemList +CreateItemMoniker +CreateKey +CreateLinked +CreateLinkToFile +CreateListItem +CreateListItems +CreateLookupFilter +CreateMailslot +CreateMailslotA +CreateMailslotW +CreateMappedBitmap +CreateMaskedBmp +CreateMDIWindow +CreateMDIWindowA +CreateMDIWindowW +CreateMenu +CreateMenuItem +CreateMessageDialog +CreateMetaFile +CreateMetaFileA +CreateMetaFileW +CreateMethod +CreateMethodPointer +CreateModule +CreateModuleEx +CreateMutex +CreateMutexA +CreateMutexW +CreateNamedPipe +CreateNamedPipeA +CreateNamedPipeW +CreateNestedDataSet +CreateNew +CreateNode +createNodeIterator +CreateNodes +createNotation +createNS +CreateObject +CreateObjectFromFile +CreateObjectFromInfo +CreateOleAdviseHolder +CreateOleObject +CreatePalette +CreatePanel +CreatePanelBitmap +CreatePanels +CreateParam +CreateParamDesc +CreateParameter +CreateParams +CreateParented +CreateParentedControl +CreatePatternBrush +CreatePen +CreatePenDataEx +CreatePenDataHRC +CreatePenDataRegion +CreatePenIndirect +CreatePipe +CreatePointerMoniker +CreatePolygonRgn +CreatePolyPolygonRgn +CreatePopup +CreatePopupMenu +CreatePrivateObjectSecurity +CreatePrivateObjectSecurityEx +CreateProcess +CreateProcessA +CreateProcessAsUser +CreateProcessAsUserA +CreateProcessAsUserW +createProcessingInstruction +CreateProcessW +CreateProperty +CreatePropertyByPosition +CreatePropertyGroup +CreatePropertySheetPage +CreatePropertySheetPageA +CreatePropertySheetPageW +CreateProxy +CreateRadioButton +CreateReader +CreateRecordBuffer +CreateRectRgn +CreateRectRgnIndirect +CreateRegKey +CreateRemote +CreateRemoteComObject +CreateRemoteThread +CreateRes +CreateResFmt +CreateResFmtHelp +CreateResHelp +CreateResolver +CreateResource +CreateResStream +CreateRoundRectRgn +CreateScalableFontResource +CreateScalableFontResourceA +CreateScalableFontResourceW +CreateScroller +CreateSection +CreateSections +CreateSelectionList +CreateSemaphore +CreateSemaphoreA +CreateSemaphoreW +CreateServerTransport +CreateService +CreateServiceA +CreateServiceW +CreateSession +CreateShadow +CreateSharedPropertyGroup +CreateSharedPropertyGroupManager +CreateSize +CreateSolidBrush +CreateStatusWindow +CreateStatusWindowA +CreateStatusWindowW +CreateStdAccessibleObject +CreateStdAccessibleProxy +CreateStdDispatch +CreateStorage +CreateStream +CreateStreamOnHGlobal +CreateStub +CreateSubClass +CreateSystemPalette +CreateTab +CreateTable +CreateTapePartition +createTextNode +CreateThread +CreateTitle +CreateToolBarEx +CreateToolhelp32Snapshot +CreateTransactionContext +CreateTransactionContextEx +CreateTransport +createTreeWalker +CreateTypeInfo +CreateTypeLib +CreateTypeLib2 +CreateUDLFile +CreateUndoableWriter +CreateUniqueName +CreateUpDownControl +CreateURLBinding +CreateUrlCacheEntry +CreateUrlCacheEntryA +CreateUrlCacheEntryW +CreateUrlCacheGroup +CreateURLMoniker +CreateValueBuffer +CreateVCLComObject +CreateView +CreateViewObject +CreateViewWindow +CreateViewWindow2 +CreateWaitableTimer +CreateWaitableTimerA +CreateWaitableTimerW +CreateWindow +CreateWindowA +CreateWindowEx +CreateWindowExA +CreateWindowExW +CreateWindowHandle +CreateWindowStation +CreateWindowStationA +CreateWindowStationW +CreateWindowW +CreateWith +CreateWithComment +CreateWnd +CreateWrapper +CreateWriter +CreateZoneEnumerator +CreatingProject +crit_enter +crit_exit +crit_init +crit_terminate +CrunchFieldName +Csc +CscH +ctime +ctionBar +CtlConsts +CtlPanel +Ctrl +CtrlIsDown +CurrCompare +currency +CurrencyToComp +CurrentModule +CurrentProcessChanged +CurrentRow +CurrentThreadChanged +CurrentYear +CurrOp +CurrText +CurrToBCD +CurrToBuffer +CurrToStr +CurrToStrF +CurrToWStrViaOS +CursorBig +CursorDec +CursorInc +CursorOff +CursorOn +CursorPosChanged +CursorToIdent +CustomAlignInsertBefore +CustomAlignPosition +CustomDelete +CustomDraw +CustomDrawButton +CustomDrawItem +CustomDrawSubItem +CustomizeDlg +CustomizeToolbar +CustomKeyDown +CustomSort +Cut +CutFirstDirectory +CutItemClick +CutSelection +CutToClipboard +CvtInt +CvtInt64W +CvtIntW +CycleToDeg +CycleToGrad +CycleToRad +D2InvokeEvent +DAdvise +daemon_atrestart +DatabaseError +DatabaseErrorFmt +DataBkr +DataChange +DataChanged +DataConvert +DataEvent +DataIn +DataLinkDir +DataLinkRecordChanged +DataOut +DataPacketSize +DataPacketToVariant +DataRequest +DataSetChanged +DatasetListChange +DataSetListDblClick +DatasetListDropDown +DataSetListKeyPress +DataSetScrolled +DataStored +DataToRawColumn +dataType +DataTypeToRegData +Date +DateCompare +DateOf +DateOp +DateTime +DateTime_GetMonthCal +DateTime_GetMonthCalColor +DateTime_GetMonthCalFont +DateTime_GetRange +DateTime_GetSystemTime +DateTime_SetFormat +DateTime_SetFormatA +DateTime_SetFormatW +DateTime_SetMonthCalColor +DateTime_SetMonthCalFont +DateTime_SetRange +DateTime_SetSystemTime +DateTimeToFileDate +DateTimeToJulianDate +DateTimeToModifiedJulianDate +DateTimeToNative +DateTimeToSQLTimeStamp +DateTimeToStr +DateTimeToString +DateTimeToSystemTime +DateTimeToTimeStamp +DateTimeToUnix +DateToStr +DateToWStrViaOS +DateUtils +DayOf +DayOfTheMonth +DayOfTheWeek +DayOfTheYear +DayOfWeek +DaysBetween +DaysInAMonth +DaysInAYear +DaysInMonth +DaysInYear +DaySpan +DB +DBActns +dbcgrids +DBClient +DBClientActnRes +DBClientActns +DBCommon +DBCommonTypes +DBConsts +DBCtrls +Dbedit +DbExcept +DBGrids +DbiError +dbinpreq +DblClick +DBLogDlg +DBLoginCallback +dblookup +DBNotification +DBOleCtl +DBOleEdt +DBPlatform +DBPWDlg +DBReg +DBTables +DBUseRightToLeftAlignment +dc +DCheck +DdeAbandonTransaction +DdeAccessData +DdeAddData +DDECheck +DdeClientTransaction +DdeCmpStringHandles +DdeConnect +DdeConnectList +DdeCreateDataHandle +DdeCreateStringHandle +DdeCreateStringHandleA +DdeCreateStringHandleW +DdeDisconnect +DdeDisconnectList +DdeEnableCallback +DdeFreeDataHandle +DdeFreeStringHandle +DdeGetData +DdeGetLastError +DdeInitialize +DdeInitializeA +DdeInitializeW +DdeKeepStringHandle +DdeMan +DdeMgrCallBack +DDEml +DdeNameService +DdePostAdvise +DdeQueryConvInfo +DdeQueryNextServer +DdeQueryString +DdeQueryStringA +DdeQueryStringW +DdeReconnect +DdeReg +DdeSetQualityOfService +DdeSetUserHandle +DdeUnaccessData +DdeUninitialize +ddr +Deactivate +DeactivateAndUndo +DeactivateFilters +DeallocateHWnd +Debug +debug_class_enabled +debug_continue +debug_init +debug_print +DebugActiveProcess +DebugBreak +DebuggerOptionsChanged +DebugServerQueryInterface +DebugServerRelease +DecIndices +DeclareNamespace +DecodeDate +DecodeDateDay +DecodeDateFully +DecodeDateMonthWeek +DecodeDateTime +DecodeDateWeek +DecodeDayOfWeekInMonth +DecodeIndexDesc +DecodeSoundexInt +DecodeSoundexWord +DecodeTime +DecomposeHmenuIdentityString +DecomposeHwndIdentityString +DecompressBuf +DecompressToUserBuf +DecPassCount +DecryptFile +DecryptFileA +DecryptFileW +Default +DefaultAlignment +DefaultAllocMem +DefaultCaption +DefaultColor +DefaultContextHelp +DefaultDrawColumnCell +DefaultDrawDataCell +DefaultFont +DefaultHandler +DefaultImeMode +DefaultImeName +DefaultListViewSort +DefaultNodeAction +DefaultPropertyDrawName +DefaultPropertyDrawValue +DefaultPropertyListDrawValue +DefaultReadOnly +DefaultRegisterAndUnregisterExpectedMemoryLeak +DefaultReqQuoteChar +DefaultsButtonClick +DefaultSession +DefaultSystemAnimation +DefaultTreeViewSort +DefaultTrigger +DefaultWidth +DefChanged +DefDlgProc +DefDlgProcA +DefDlgProcW +DefDriverProc +DeferFree +DeferLayout +DeferWindowPos +DefFrameProc +DefFrameProcA +DefFrameProcW +DefHookProc +DefineBinaryProperty +DefineDosDevice +DefineDosDeviceA +DefineDosDeviceW +DefineFieldMap +DefineFuncAsDllEntry +DefineHandleTable +DefineProperties +DefineProperty +deflate +deflateEnd +deflateInit_ +DefMDIChildProc +DefMDIChildProcA +DefMDIChildProcW +DefocusControl +DefSubclassProc +DefWindowProc +DefWindowProcA +DefWindowProcW +DegToCycle +DegToGrad +DegToRad +DeinitializeDesigner +delay +DelayLoadResourceModule +Delete +DeleteAce +DeleteActionItems +DeleteAlias +DeleteAtom +DeleteBtnClick +DeleteButtonClick +DeleteCategory +DeleteChildren +DeleteClick +DeleteColor +DeleteColorSpace +DeleteColumn +DeleteCommand +DeleteConfigPath +DeleteCriticalSection +DeleteCursor +deleteData +DeleteDC +DeleteDriver +DeleteEditOptions +DeleteEnhMetaFile +DeleteEntry +DeleteFiber +DeleteFile +DeleteFileA +DeleteFileW +DeleteForm +DeleteFormA +DeleteFormW +DeleteFuncDesc +DeleteFuncDescByMemId +DeleteImplType +DeleteIndex +DeleteItem +DeleteItemClick +DeleteKey +DeleteKeys +DeleteMember +DeleteMemberByDispID +DeleteMemberByName +DeleteMenu +DeleteMetaFile +DeleteMonitor +DeleteMonitorA +DeleteMonitorW +DeleteMultiple +DeleteNode +DeleteObject +DeletePort +DeletePortA +DeletePortW +DeletePrinter +DeletePrinterConnection +DeletePrinterConnectionA +DeletePrinterConnectionW +DeletePrinterData +DeletePrinterDataA +DeletePrinterDataW +DeletePrinterDriver +DeletePrinterDriverA +DeletePrinterDriverW +DeletePrintProcessor +DeletePrintProcessorA +DeletePrintProcessorW +DeletePrintProvidor +DeletePrintProvidorA +DeletePrintProvidorW +DeletePrompt +DeletePropertyNames +DeleteRange +DeleteRecord +DeleteRecords +DeleteRegKey +DeleteRegValue +DeleteRow +DeleteRows +DeleteSelected +DeleteSelectedText +DeleteSelection +DeleteService +DeleteString +DeleteStyle +DeleteTab +DeleteTable +DeleteTo +DeleteTypeInfo +DeleteUrlCacheEntry +DeleteUrlCacheGroup +DeleteValue +DeleteVarDesc +DeleteVarDescByMemId +Deleting +Delimit +DelLine +DelphiMM +DeploymentAPI +DepopulateTreeView +Depth +DeregisterEventSource +DescribePixelFormat +Description +DescriptionsAvailable +DescriptionToConvFamily +DescriptionToConvType +Deselect +DeselectHandles +DesignClass +DesignConst +DesignEditors +DesignerClosed +DesignerDataStored +DesignerOpened +DesignerTypes +DesignIntf +DesignMenus +DesignModified +DesigntimeChange +DesignWindows +DesignWndProc +DestRect +Destroy +DestroyAcceleratorTable +DestroyAccelTable +DestroyBitmaps +DestroyCaret +DestroyChildWindow +DestroyComponents +DestroyControl +DestroyCursor +DestroyCursors +DestroyDataSource +Destroyed +DestroyElement +DestroyEnumPropDescs +DestroyFields +DestroyHandle +DestroyHRC +DestroyHRCRESULT +DestroyHWL +DestroyIcon +Destroying +DestroyInkset +DestroyLocals +DestroyLookupCursor +DestroyMenu +DestroyMenuItem +DestroyMetaPict +DestroyObject +DestroyPanelBitmap +DestroyPenData +DestroyPopupWindow +DestroyPrivateObjectSecurity +DestroyPropertySheetPage +DestroyResource +DestroyResourceS +DestroyStorage +DestroyVerbs +DestroyViewWindow +DestroyWindow +DestroyWindowHandle +DestroyWnd +DestroyZoneEnumerator +Destruct +destructor +Detach +DetailsBtnClick +DetectCharEncoding +Detector +DetectUTF8Encoding +DetermineOccurence +DeviceCapabilities +DeviceCapabilitiesA +DeviceCapabilitiesW +DeviceIoControl +DialogBox +DialogBoxA +DialogBoxIndirect +DialogBoxIndirectA +DialogBoxIndirectParam +DialogBoxIndirectParamA +DialogBoxIndirectParamW +DialogBoxIndirectW +DialogBoxParam +DialogBoxParamA +DialogBoxParamW +DialogBoxW +DialogEnumerationTester +DialogHook +Dialogs +DIBIndex +DidAlloc +dir_close +dir_create +dir_create_all +dir_open +dir_read +dir_remove +directory +DirectoryExists +DirectVideo +DirLevel +DirListChange +DirStr +DisableAlign +DisableAutoRange +DisableCommit +DisableConstraints +DisableControls +DisabledImageListChange +DisableEditUpdate +DisableHiding +DisableNotify +DisableSocketTransport +DisableTaskWindows +DisableThreadLibraryCalls +DisableWebTransport +DiscardCache +DiscardUndoState +Disconnect +DisconnectActionUpdate +DisconnectNamedPipe +DisconnectObject +DiskFree +DiskSize +Dispatch +DispatchAction +DispatchCommand +DispatchInvoke +DispatchInvokeError +DispatchManyEvents +DispatchMessage +DispatchMessageA +DispatchMessageW +DispatchOneEvent +DispatchPopup +DispatchServiceMain +DispatchShortCut +DispCall +DispCallByID +DispCallError +DispCallFunc +DispGetIDsOfNames +DispGetParam +DispInvoke +DispInvokeError +DisplayCase +DisplayHelpByContext +DisplayRect +DisplayShadow +DisplayTextPopup +DisplayTopic +dispose +DisposeMem +DisposeStr +DistanceToTab +div +DivMod +dladdr +dlclose +dlerror +DlgDirList +DlgDirListA +DlgDirListComboBox +DlgDirListComboBoxA +DlgDirListComboBoxW +DlgDirListW +DlgDirSelectComboBoxEx +DlgDirSelectComboBoxExA +DlgDirSelectComboBoxExW +DlgDirSelectEx +DlgDirSelectExA +DlgDirSelectExW +Dlgs +DllCanUnloadNow +DLLDetachCallBack +DllGetClassObject +DllInstall +DllRegisterServer +DllUnregisterServer +dlopen +dlsym +do +DoAccept +DoActionChange +DoActionExecute +DoActionIdle +DoActionUpdate +DoActivate +DoAdd +DoAddDockClient +DoAddFields +DoAfterApplyUpdates +DoAfterCancel +DoAfterClose +DoAfterDelete +DoAfterEdit +DoAfterExecute +DoAfterGetParams +DoAfterGetRecords +DoAfterInsert +DoAfterOpen +DoAfterPost +DoAfterRefresh +DoAfterRowRequest +DoAfterScroll +DoAfterUpdateRecord +DoAggUpdates +DoAlign +DoAlignControl +DoAnimation +DoApplicationIdle +DoApply +DoApplyUpdates +DoArcCos +DoArcCosH +DoArcCot +DoArcCotH +DoArcCsc +DoArcCscH +DoArcSec +DoArcSecH +DoArcSin +DoArcSinH +DoArcTan +DoArcTanH +DoAutoSize +DoBandMove +DoBandPaint +DoBeforeApplyUpdates +DoBeforeCancel +DoBeforeClose +DoBeforeCommit +DoBeforeDelete +DoBeforeEdit +DoBeforeExecute +DoBeforeGetParams +DoBeforeGetRecords +DoBeforeInsert +DoBeforeOpen +DoBeforePost +DoBeforeRefresh +DoBeforeRowRequest +DoBeforeScroll +DoBeforeUpdateRecord +DoBeginBandMove +DoBeginDrag +DoBiDiModeChanged +DoBindFields +DoBufferedPaint +DoButtonClick +DoCalcConstraints +DoCallback +DoCancel +DoCanChange +DoCanClose +DoCanExpand +DoCanResize +DoChange +Dock +DockCaptionHitTest +DockCaptionMouseDown +DockCaptionMouseMove +DockCaptionMouseUp +DockControl +DockDrop +DockFormRefresh +DockFormUpdated +DockFormVisibleChanged +DockOver +DockReplaceDockClient +DockTabSet +DoClassComplete +DoClassNavigate +DoClick +DoClose +docMemoryToDom +DoColWidths +DoConnect +DoContinue +DoControlCreated +DoControlMsg +DoConjugate +DoCopyButton +DoCos +DoCosH +DoCot +DoCotH +DoCount +DoCreate +DoCreateField +DoCreateObject +DoCreateThread +DoCsc +DoCscH +docSourceCodeToDom +docStreamToDom +docStringToDom +doctype +DocumentProperties +DocumentPropertiesA +DocumentPropertiesW +DoCustomAction +DoCustomControl +DoCustomDelete +docWideStringToDom +DoDeactivate +DoDecode +DoDefaultPainting +DoDefaultPenInput +DoDelete +DoDestroy +DoDisableWindow +DoDisconnect +DoDivide +DoDock +DoDockOver +DoDragDrop +DoDragOver +DoDraw +DoDrawText +DoDrawThemeTextEx +DoDropActions +DoDropCategory +DoDropDownKeys +DoDropItem +DoEditButtonClick +DoEditControl +DoEncode +DoEndBandMove +DoEndDock +DoEndDrag +DoEnter +DoEnvironmentSubst +DoEnvironmentSubstA +DoEnvironmentSubstW +DoError +DoEvent +DoException +DoExecSQL +DoExecute +DoExit +DoExitProc +DoExp +DoExpand +DoFillRect +DoFindControlZone +DoFindData +DoFindDatabase +DoFindWindow +DoFindZone +DoFixupReferences +DoFlipChildren +DoFolderChange +DoForEach +DoFreeObject +DoFunction +DoGetAppServerList +DoGetButton +DoGetControlClass +DoGetData +DoGetDataObject +DoGetIDsOfNames +DoGetMenuString +DoGetNextLimit +DoGetPickListItems +DoGetPopupClass +DoGetProviderAttributes +DoGetRecords +DoGetServerList +DoGetTableName +DoGetValues +DoHandleException +DoHelp +DoHide +DoHideUnused +DoHint +DoHotButton +DoIdle +DoIncludeItem +DoInfoTip +DoInit +DoInputChar +DoInquire +DoInsert +DoInternalOpen +DoInterrogate +DoInvAdd +DoInvalidate +DoInvDivide +DoInverse +DoInvMultiply +DoInvoke +DoInvSubtract +DoItemClicked +DoItemKeyed +DoItemSelected +DoKey +DoKeyDown +DoKeyPress +DoKeyUp +DoListen +DoLn +DoLog10 +DoLog2 +DoLogN +DoLookup +DOMElement +DoMenuDelay +DoMessage +DoMessageDlgPosHelp +DOMImplementation +DoMinimize +DoModalBegin +DoModalEnd +DoModernPainting +DoMouseDown +DoMouseIdle +DoMouseWheel +DoMouseWheelDown +DoMouseWheelUp +DoMultiply +DOMVendorList +DOMVendorNotSupported +DOMVendorStored +Done +DoneApplication +DoneBitmaps +DoneControls +DoneCtl3D +DoneDesignNotification +DoNegate +DoneMaskStates +DoneMenuLoop +DoneServiceApplication +DoNestedActivation +DoneThreadSynchronization +DoNewField +DoNewInquire +DoNewLookupField +DoNodeChange +DoNormalizeTopMosts +DoNotify +DoObjectVerb +DoOnAnimate +DoOnButtonClicked +DoOnCalcFields +DoOnDialogContructed +DoOnDialogCreated +DoOnDialogDestroyed +DoOnExecute +DoOnExpandButtonClicked +DoOnFileOkClick +DoOnFolderChange +DoOnFolderChanging +DoOnGetData +DoOnHelp +DoOnHyperlinkClicked +DoOnNavigated +DoOnNewRecord +DoOnOverwrite +DoOnRadioButtonClicked +DoOnSelectionChange +DoOnShareViolation +DoOnThemeChange +DoOnTimer +DoOnTypeChange +DoOnUpdateData +DoOnValidate +DoOnVerificationClicked +DoOpen +DoOpenDatabase +DoPaddingChange +DoPaletteChange +DoPasteCheck +doPasteLink +DoPause +DoPopoutModernPainting +DoPopup +DoPosition +DoPostClick +DoPower +DoProcedure +DoPrune +DoQueryDelete +DoQueryInsert +DoRead +DoReconcileError +DoRecordsetDelete +DoRect +DoRemoveDockClient +DoReorderButton +DoReorderCategory +DoRestore +DoRightToLeftAlignment +DoRowHeights +DoRowRequest +DoSaveZone +DoScroll +DoScrollTimer +DosDateTimeToFileTime +DosDateTimeToVariantTime +DoSec +DoSecH +DoSectionDrag +DoSectionEndDrag +DoSelectAll +DoSelectedItemChanged +DoSelection +DoSelectionChange +DosError +DoSetAsyncStyles +DoSetControl +DoSetElevationRequired +DoSetEnabled +DoSetMaxLength +DoSetNewBounds +DoSetRange +DoSettingChange +DoSetup +DosExitCode +DoShortcut +DoShow +DoShowCaptions +DoShowHint +DoShowOwnedPopups +DoShutdown +DoSign +DoSin +DoSinH +DoSizeAdjust +DoSoftShutDown +DoSqr +DoSqrt +DoStart +DoStartDock +DoStartDrag +DoStartWParms +DoStop +DoStoreEndDate +DoStoreMaxDate +DoStoreMinDate +DoSubtract +DosVersion +DoTableOfContents +DoTan +DoTanH +DoTaskMessageDlgPosHelp +DoTerminate +DoTile +DoTimesImaginary +DoTimesReal +DoTypeChange +double +DoubleClicked +DoubleDecliningBalance +DoubleToBcd +DoubleToBytes +DoubleToComp +DoUnDock +DoUpdate +DoUpdates +DoValidate +DoVerb +DoWheelTimer +downto +DoWrite +DoWriteDesignSize +DoWriteHeight +DoWriteHorizontalOffset +DoWriteVerticalOffset +DoWriteWidth +DPtoLP +DPtoTP +DragAcceptFiles +DragAllowed +DragCanceled +DragClass +DragControl +DragDetect +DragDone +DragDrop +DragDropTo +DragEnter +DragFindTarget +DragFindWindow +DragFinish +DragInit +DragInitControl +DragLeave +DragLock +DragMessage +DragMove +DragObject +DragOver +DragOverTo +DragQueryFile +DragQueryFileA +DragQueryFileW +DragQueryPoint +DragTo +DragUnlock +Draw +DrawAnimatedRects +DrawAppIcon +DrawArrow +DrawArrows +DrawAutoButtons +DrawAxisLines +DrawBackground +DrawBtnFrame +DrawButton +DrawButtonFace +DrawButtonGlyph +DrawButtonText +DrawCaption +DrawCaretPosIndicator +DrawCategory +DrawCell +DrawCheck +DrawChevron +DrawCloseButton +DrawColumnCell +DrawDataCell +DrawDesignFocus +DrawDockCaption +DrawDragDockImage +DrawDragDropPoint +DrawDropDownButton +DrawEdge +DrawElement +DrawEscape +DrawFocusCell +DrawFocusRect +DrawFrame +DrawFrameControl +DrawGlyph +DrawGlyphFrame +DrawGrabber +DrawGrabberLine +DrawIcon +DrawIconEx +DrawImage +DrawInsert +DrawItem +DrawLargeGlyph +DrawLine +DrawLines +DrawMenuBar +DrawMenuItem +DrawMove +DrawOverlay +DrawPanel +DrawPanelBackground +DrawParentBackground +DrawPenDataEx +DrawPenDataFmt +DrawPictures +DrawPictureText +DrawPinButton +DrawPlusMinus +DrawPlusMinusPicture +DrawPlusMinusText +DrawPoly +DrawRect +DrawScrollArrow +DrawSection +DrawSelectedFrame +DrawSeparator +DrawShadowedText +DrawShadowText +DrawSizingLine +DrawSL +DrawSR +DrawState +DrawStateA +DrawStateW +DrawStatusText +DrawStatusTextA +DrawStatusTextW +DrawSubMenuGlyph +DrawTab +DrawText +DrawTextA +DrawTextEx +DrawTextExA +DrawTextExW +DrawTextW +DrawThemedGrabber +DrawThemeEdge +DrawTheText +DrawTheTree +DrawTitleCell +DrawTree +DrawTreePicture +DrawUL +DrawUnusedEdges +DrawUR +DrawWorkAreas +DRIVE_GetRoot +DriveChange +DriveListChange +DriverNameChange +DriverNameDropDown +Drop +DropAggregate +DropColumn +DropConnections +DropDown +DropDownClick +DropDownControl +DropFilter +DropIndex +DropOptParameter +DropRange +DropStream +DropTable +DrTable +DrvGetModuleHandle +drvr +DSAdd +DSAttrA +DSAttrS +DSDefine +DSDesign +DSIntf +DTDcomment +DTDprocessingInstruction +DTDSchema +DumbItDownFor95 +DumpBlocks +DUnadvise +dup +DupBits +DupeString +duplicateCMNode +DuplicateHandle +DuplicateIcon +duplicateNode +DuplicatePenData +DuplicateToken +DuplicateTokenEx +dwDiffAT +dwDurInterval +DwmApi +DWORD +DWordEnumToPascalEnumOrd +DynArrayBounds +DynArrayClear +DynArrayDim +DynArrayElTypeInfo +DynArrayFromVariant +DynArrayIndex +DynArraySetLength +DynArraySize +DynArrayToVariant +eader +eaderControl +eason +EDBClient +EDBEngineError +Edit +Edit_GetCueBannerText +Edit_GetHilite +Edit_HideBalloonTip +Edit_SetCueBannerText +Edit_SetHilite +Edit_ShowBalloonTip +Editable +EditAction +EditActionFor +EditButtonClick +EditCanModify +EditCaption +EditChange +EditClientDataSet +EditConnectionString +EditDatabase +EditDialog +EditFileName +EditIndexFiles +EditingChange +EditingChanged +EditIntf +EditKey +EditKeyDown +EditListGetItems +EditMasterFields +EditOptions +EditorTokenValidChars +EditorViewActivated +EditorViewModified +EditProperty +EditRangeEnd +EditRangeStart +EditSQL +EditSQLSchema +EditSQLText +EditText +EditWndProc +EDOMParseError +EDSWriter +EFileStreamError +Eject +elementDefined +elementTypeDeclaration +ElfHashLowercase +ElideNearestBlock +Ellipse +else +Empty +EmptyBcd +EmptyClipboard +EmptyCompare +EmptyDataSet +EmptyOp +EmptyTable +EmptyWorkingSet +Enable +EnableAlign +EnableAutoRange +EnableButtons +EnableCommit +EnableConstraints +EnableControls +EnableDemandLoadReport +EnableEditUpdate +EnableElisions +EnableEvents +EnableGestureSetHRC +EnableHiding +EnableMenuItem +EnableModeless +EnableModelessSB +EnableNotify +EnableOpenDropDown +EnablePreserveWhitespace +EnableScrollBar +EnableSocketTransport +EnableSystemDictionaryHRC +EnableTaskWindows +EnableWebTransport +EnableWindow +EncodeDate +EncodeDateDay +EncodeDateMonthWeek +EncodeDateTime +EncodeDateWeek +EncodeDayOfWeekInMonth +EncodeFieldDesc +EncodeFieldDescs +EncodeIndexDesc +EncodeTime +EncodingMatches +EncryptFile +EncryptFileA +EncryptFileW +end +End_ +EndAbort +EndAbortVariants +EndAnimation +endAttListDeclaration +EndBlock +EndCallStackAccess +EndColumnDrag +EndCommit +EndCommitVariants +EndConnect +EndCreateFields +EndDeferWindowPos +EndDesign +EndDialog +EndDispatch +EndDoc +EndDocPrinter +endDocument +EndDrag +endDtd +EndEdit +endElement +ender +EndGlobalLoading +EndInsertAppend +EndLayout +EndMenu +EndOfADay +EndOfAMonth +EndOfAWeek +EndOfAYear +EndOfList +EndOfLiteral +EndOfNestedRows +EndOfRecordset +EndOfTheDay +EndOfTheMonth +EndOfTheWeek +EndOfTheYear +EndPage +EndPagePrinter +EndPaint +EndPath +EndPenInputHRC +endPrefixMapping +EndPrepare +EndPrepareVariants +EndRead +EndReferences +EndRowDrag +EndsStr +EndsText +endsWith +EndThread +EndTransaction +EndUpdate +EndUpdateFieldDefs +EndUpdateResource +EndUpdateResourceA +EndUpdateResourceW +EndVisualGroup +EndWrite +EngineDefined +EnlargeImage +EnlistResource +enPacket +EnsureColRow +EnsureDataRow +EnsureHelpManager +EnsureRange +EnsureUpdate +Enter +EnterCriticalSection +entityDeclaration +entityRef +Enum +EnumActions +EnumAdvise +EnumCache +EnumCalendarInfo +EnumCalendarInfoA +EnumCalendarInfoW +EnumCategories +EnumChildWindows +EnumClassesOfCategories +EnumClipboardFormats +EnumConnectionPoints +EnumConnections +EnumDAdvise +EnumDateFormats +EnumDateFormatsA +EnumDateFormatsW +EnumDependentServices +EnumDependentServicesA +EnumDependentServicesW +EnumDesktops +EnumDesktopsA +EnumDesktopsW +EnumDesktopWindows +EnumDeviceDrivers +EnumDisplayDevices +EnumDisplayDevicesA +EnumDisplayDevicesW +EnumDisplaySettings +EnumDisplaySettingsA +EnumDisplaySettingsW +EnumElements +EnumEnhMetaFile +EnumerateLoadedModules +EnumerateRunningProcesses +EnumFontFamilies +EnumFontFamiliesA +EnumFontFamiliesEx +EnumFontFamiliesExA +EnumFontFamiliesExW +EnumFontFamiliesW +EnumFonts +EnumFontsA +EnumFontsProc +EnumFontsW +EnumFormatEtc +EnumForms +EnumFormsA +EnumFormsW +EnumICMProfiles +EnumICMProfilesA +EnumICMProfilesW +EnumImplCategoriesOfClass +EnumItems +EnumJobs +EnumJobsA +EnumJobsW +EnumMetaFile +EnumModules +EnumMonitors +EnumMonitorsA +EnumMonitorsProc +EnumMonitorsW +EnumNames +EnumObjectParam +EnumObjects +EnumPorts +EnumPortsA +EnumPortsW +EnumPrinterData +EnumPrinterDataA +EnumPrinterDataW +EnumPrinterDrivers +EnumPrinterDriversA +EnumPrinterDriversW +EnumPrinters +EnumPrintersA +EnumPrintersW +EnumPrintProcessorDatatypes +EnumPrintProcessorDatatypesA +EnumPrintProcessorDatatypesW +EnumPrintProcessors +EnumPrintProcessorsA +EnumPrintProcessorsW +EnumProcesses +EnumProcessModules +EnumProjectModules +EnumProjectUnits +EnumProps +EnumPropsA +EnumPropsEx +EnumPropsExA +EnumPropsExW +EnumPropsW +EnumRegisteredActions +EnumRegKey +EnumReqCategoriesOfClass +EnumResourceLanguages +EnumResourceLanguagesA +EnumResourceLanguagesW +EnumResourceModules +EnumResourceNames +EnumResourceNamesA +EnumResourceNamesW +EnumResourceTypes +EnumResourceTypesA +EnumResourceTypesW +EnumRunning +EnumSearches +EnumServicesStatus +EnumServicesStatusA +EnumServicesStatusW +EnumStringModules +EnumSystemCodePages +EnumSystemCodePagesA +EnumSystemCodePagesW +EnumSystemLocales +EnumSystemLocalesA +EnumSystemLocalesW +EnumTaskWindows +EnumThreadWindows +EnumTimeFormats +EnumTimeFormatsA +EnumTimeFormatsW +EnumVerbs +EnumViews +EnumWideStringModules +EnumWindows +EnumWindowStations +EnumWindowStationsA +EnumWindowStationsW +EnvCount +EnvStr +EOleException +EOleSysError +Equal +EqualPrefixSid +EqualRect +EqualRgn +Equals +EqualSid +EraseDragDockImage +EraseSection +EraseTape +EReconcileError +ereport_getfd +ereport_init +ereport_terminate +Error +ErrorAt +ErrorFmt +ErrorMsg +ErrorStr +ESafeArrayError +Escape +EscapeCommFunction +ession +est +EUpdateError +Evaluate +EvaluateExpression +EvaluateModify +Evaluation +EvaluteComplete +Event +EventConnect +EventNotification +EventRefFromWpLp +EventSinkChanged +except +ExceptAddr +ExceptionErrorMessage +ExceptObject +Exchange +ExchangeItems +ExcludeClipRect +ExcludeTrailingBackslash +ExcludeTrailingPathDelimiter +ExcludeUpdateRgn +Exec +ExecAction +ExecProc +ExecSQL +Execute +ExecuteAction +ExecuteComplete +ExecuteMacro +ExecuteMacroLines +ExecuteOptionsToOrd +ExecutePaletteItem +ExecuteSetting +ExecuteTarget +ExecuteVerb +Existing +Exists +Exit +ExitDll +ExitProcess +ExitThread +ExitWindows +ExitWindowsEx +Exp +Expand +ExpandClick +ExpandDir +expandEntRef +ExpandEnvironmentStrings +ExpandEnvironmentStringsA +ExpandEnvironmentStringsW +ExpandFileName +ExpandFileNameCase +ExpandItem +ExpandTilde +ExpandTimer +ExpandUNCFileName +ExplorerHook +export +ExportApplication +exports +ExptIntf +ExtActns +ExtCreatePen +ExtCreateRegion +ExtCtrls +ExtDlgs +extDtdMemoryToDom +extDtdSourceCodeToDom +extDtdStreamToDom +extDtdStringToDom +extDtdWideStringToDom +Extend +extended +ExtendPageDown +ExtendPageUp +ExtendReal +ExtendRelative +external +ExtEscape +ExtFloodFill +Extract +ExtractAssociatedIcon +ExtractAssociatedIconA +ExtractAssociatedIconW +ExtractAttrValue +ExtractCommandType +ExtractDtdParts +ExtractFieldName +ExtractFileDir +ExtractFileDrive +ExtractFileExt +ExtractFileName +ExtractFileNames +ExtractFilePath +ExtractFilePathEx +ExtractFilePathNoDrive +ExtractIcon +ExtractIconA +ExtractIconEx +ExtractIconExA +ExtractIconExW +ExtractIconW +ExtractKey +ExtractLiterals +ExtractLocalName +ExtractMoneySymbol +ExtractName +ExtractPenDataPoints +ExtractPenDataStrokes +ExtractPrefix +ExtractRelativePath +ExtractShortPathName +ExtractStrings +ExtractUserID +ExtractWrapper +ExtSelectClipRgn +ExtStr +ExtTextOut +ExtTextOutA +ExtTextOutW +FAbsTimeInInterval +FactoryFree +FactoryRegisterClassObject +FactoryUpdateRegistry +FahrenheitToCelsius +Failed +false +far +FatalAppExit +FatalAppExitA +FatalAppExitW +fatalError +FatalExit +fauxiliary +fcarry +fclose +FD_CLR +FD_ISSET +FD_SET +FD_ZERO +fdopen +FEQAbsTime +FetchAll +FetchBlobs +FetchComplete +FetchDetails +FetchItems +FetchMoreData +FetchParams +FetchProgress +FetchStr +FExpand +fflush +FieldAddress +FieldByName +FieldByNumber +FieldChangeComplete +FieldDefsStored +FieldDefUpdate +FieldFromNode +FieldIsMapped +FieldKindClick +FieldLinkActive +FieldListBoxDragDrop +FieldListBoxDragOver +FieldListBoxStartDrag +FieldListCheckSum +FieldNameEditChange +FieldNameLBClick +FieldsChanged +FieldsSelected +FieldTypeListChange +FieldTypeToADOType +FigureChildren +FigureParent +file +file_notfound +file_setinherit +file_unix2local +FileAge +filebuf_buf2sd +filebuf_close +filebuf_close_buffer +filebuf_create +filebuf_getc +filebuf_grab +filebuf_next +filebuf_open +filebuf_open_nostat +FileClose +FileCompareText +FileCreate +FileCtrl +FileDateToDateTime +FileExists +FileGetAttr +FileGetDate +FileHistoryAPI +FileIntf +FileIsReadOnly +FileLoad +FileName +FileNOPProc +FileNotification +FileOkClick +FileOpen +FileRead +FileRec +FileSave +FileSearch +FileSeek +FileSetAttr +FileSetDate +FileSetReadOnly +FileTimeToDosDateTime +FileTimeToLocalFileTime +FileTimeToSystemTime +fileToDom +FileWrite +FillAppend +FillAt +FillChar +FillConsoleOutputAttribute +FillConsoleOutputCharacter +FillConsoleOutputCharacterA +FillConsoleOutputCharacterW +FillDialog +FillDWord +FillGlassRect +FillMemory +FillPath +FillRect +FillRgn +Filter +FilterAction +FilterCallback +FilterCategory +FilterFunc +FilterOnBookmarks +FilterProperties +FilterSpecArray +FinalClientRetry +finalization +FinalizeArray +FinalizePackage +FinalizeUnits +finally +FinalServerRetry +Find +FindAccelItem +FindActionBar +FindActionBars +FindActionClient +FindAncestor +FindAncestorComponent +FindAppInfoClass +FindAtom +FindAtomA +FindAtomW +FindAttributeDefs +FindBand +FindBestFilter +FindBestRootSprigClass +FindBestSprigClass +FindBS +FindButton +FindButtonFromAccel +FindByID +FindByName +FindCaption +FindCategory +FindCell +FindChildControl +FindClass +FindClassHInstance +FindClient +FindClose +FindCloseChangeNotification +FindClosePrinterChangeNotification +FindCloseUrlCache +FindCmdLineSwitch +FindComponent +FindComponentByClass +FindComponentClass +FindConnectionPoint +FindControl +FindCustomVariantType +FindData +FindDatabase +FindDatabaseHandle +FindDebugInfoFile +FindDerivation +FindDockClientInfo +FindDragTarget +FindElementDefs +FindEngine +FindEntry +FindExecutable +FindExecutableA +FindExecutableImage +FindExecutableW +FindField +FindFieldClass +FindFieldInfo +FindFileSystem +FindFilter +FindFirst +FindFirstChangeNotification +FindFirstChangeNotificationA +FindFirstChangeNotificationW +findFirstChild +FindFirstFile +FindFirstFileA +FindFirstFileEx +FindFirstFileExA +FindFirstFileExW +FindFirstFileW +FindFirstFreeAce +FindFirstPrinterChangeNotification +FindFirstUrlCacheEntry +FindFirstUrlCacheEntryA +FindFirstUrlCacheEntryEx +FindFirstUrlCacheEntryExA +FindFirstUrlCacheEntryExW +FindFirstUrlCacheEntryW +FindFirstVisibleItem +FindFormAndComponent +FindFormModule +FindGlobalComponent +FindGroup +FindHandlerItem +FindHInstance +FindHostedNode +FindIdent +FindIdentToInt +FindIndexForFields +FindInstanceOf +FindIntToIdent +FindItem +FindItemAt +FindItemByAction +FindItemByCaption +FindItemByName +FindItemByPath +FindItemCaption +FindItemGroup +FindItemGroupByName +FindItemID +FindItemNS +FindItemProp +FindKey +FindLast +findLastChild +FindLastVisibleItem +FindLeastUsedItem +FindLegacyDerivation +FindLiteralChar +FindLocationHint +FindMatchingFile +FindMediaType +FindMediaTypeClass +FindMember +FindMenuItem +FindMethod +FindMethodInstance +FindMethodName +FindMimeFromData +FindModule +FindModuleInfo +FindMonitor +FindName +FindNameFromId +FindNamespaceDecl +FindNamespaceURI +FindNearest +FindNearestControl +FindNestedComponent +findNewReferenceNode +findNewReferenceNodes +FindNext +FindNextAttDef +FindNextChangeNotification +FindNextControl +FindNextFile +FindNextFileA +FindNextFileW +findNextNode +FindNextPage +FindNextPrinterChangeNotification +FindNextRow +findNextSibling +FindNextToSelect +FindNextUrlCacheEntry +FindNextUrlCacheEntryA +FindNextUrlCacheEntryEx +FindNextUrlCacheEntryExA +FindNextUrlCacheEntryExW +FindNextUrlCacheEntryW +FindNextVisibleItem +FindNextWordStart +FindNode +FindObjects +FindParam +findParentNode +FindPath +FindPoint +FindPopupControl +FindPos +FindPrevious +findPreviousNode +findPreviousSibling +FindPreviousVisibleItem +FindPrior +FindProc +FindPropInfo +FindRecord +FindReplaceDialogHook +FindReplaceWndProc +FindResource +FindResourceA +FindResourceEx +FindResourceExA +FindResourceExW +FindResourceHInstance +FindResourceW +FindRoot +FindRootAncestor +FindRootDesigner +FindRow +FindScanline +FindSchemaExporter +FindSchemaImporter +FindServer +FindSession +FindSibling +FindString +FindStringResource +FindSwitch +FindSymIndex +FindText +FindTextA +FindTextW +FindTimer +FindToolbar +FindTopMostWindow +FindTuple +FindVarData +FindVCLWindow +FindWideStringResource +FindWindow +FindWindowA +FindWindowEx +FindWindowExA +FindWindowExW +FindWindowW +FindWinHelp +Finished +FinishOperations +FinishSelection +FIntervalInInterval +FIntervalXInterval +First +FIRST_IPADDRESS +firstChild +FIsAnsi +FIsAnsiGesture +FIsGesture +FIsKanji +FIsSelectGesture +FIsShape +FIsSpecial +FIsStdGesture +FIsUniCode +FIsVKey +FixFileName +FixIncAmount +FixTabPos +FixupIdent +FixupReferences +FixupResourceHeader +FixupTabList +FlashWindow +FlashWindowEx +FlatSB +FlatSB_EnableScrollBar +FlatSB_GetScrollInfo +FlatSB_GetScrollPos +FlatSB_GetScrollProp +FlatSB_GetScrollRange +FlatSB_SetScrollInfo +FlatSB_SetScrollPos +FlatSB_SetScrollProp +FlatSB_SetScrollRange +FlatSB_ShowScrollBar +FlattenPath +FldCmp +FldLinks +FlipChildren +FloatToCurr +FloatToDateTime +FloatToDecimal +FloatToStr +FloatToStrF +FloatToText +FloatToTextFmt +FloodFill +Floor +FLTAbsTime +FLTEAbsTime +Flush +FlushBuffer +FlushBuffers +FlushConsoleInputBuffer +FlushFileBuffers +FlushInstructionCache +FlushSchemaCache +FlushSprigTypes +FlushViewOfFile +fmclosed +fminout +fminput +fmoutput +FMTBcd +FmtLoadStr +FmtStr +Focus +FocusCell +FocusControl +Focused +FocusItem +FocusKeyDown +FocusNode +FolderChange +FolderChanging +FoldString +FoldStringA +FoldStringW +FontChanged +FontColorProc +FontDialogHook +FontToOleFont +fopen +for +ForceDemandLoadState +ForceDirectories +ForceLog +ForceTransactionToAbort +ForceType +ForceUpdateCallback +ForEach +ForEachFactory +ForEachSelection +ForegroundTask +ForegroundTaskCheck +Forget +ForgetLogRecord +Form +FormActivated +Format +FormatBcd +FormatBuf +FormatCurr +formatDate +FormatDateTime +FormatFloat +formatIndex +FormatLine +FormatMaskText +FormatMessage +FormatMessageA +FormatMessageW +formatNumber +FormatOneBcd +formatTime +FormatXMLData +FormClose +FormCloseQuery +FormCreate +FormCreated +FormDestroy +FormKeyDown +FormKeyPress +FormModified +FormResize +Forms +FormSaving +FormShow +FormUpdateActionUpdate +forward +ForwardMovement +FOURTH_IPADDRESS +foverflow +fparity +FPenUpX +FPower10 +fprintf +Frac +Frame3D +FrameExtended +FrameRect +FrameRgn +FREE +freeAllCMNodes +freeAllNodes +FreeAndNil +FreeAndNilProperties +FreeBookmark +FreeBuffer +FreeBuffers +FreeChildren +freeCMExternalObject +freeCMInternalObject +freeCMObject +FreeConsole +FreeConversionType +freeConvertBuffer +FreeDataPacket +FreeDDElParam +FreeDeviceContext +FreeDeviceContexts +FreeDockPos +FreeDocument +freeDocumentType +FreeEditorGroup +FreeEnvironmentStrings +FreeEnvironmentStringsA +FreeEnvironmentStringsW +FreeException +FreeFieldBuffers +FreeFixups +FreeFonts +FreeHandle +FreeInfoRecords +FreeInstance +FreeIntConstList +FreeItem +FreeItemProps +FreeKeyBuffers +FreeLibrary +FreeLibraryAndExitThread +FreeList +FreeMemory +FreeModule +FreeNotification +FreeObjectInstance +FreeOnRelease +FreePascalString +FreePrinterNotifyInfo +FreePrinters +FreeProcInstance +FreeProjFileHooks +FreeRecordBuffer +FreeResolver +FreeResource +FreeSection +FreeSections +FreeSid +FreeStatement +FreeStatementLocale +FreeThemeLibrary +FreeTimer +FreeTLSBuffer +FreeTreeData +freeTreeWalker +FreeWinSock2 +Freeze +FreezeEvents +Frexp +FromCommon +FSearch +fsign +FSplit +FtpCommand +FtpCommandA +FtpCommandW +FtpCreateDirectory +FtpCreateDirectoryA +FtpCreateDirectoryW +FtpDeleteFile +FtpDeleteFileA +FtpDeleteFileW +FtpFindFirstFile +FtpFindFirstFileA +FtpFindFirstFileW +FtpGetCurrentDirectory +FtpGetCurrentDirectoryA +FtpGetCurrentDirectoryW +FtpGetFile +FtpGetFileA +FtpGetFileSize +FtpGetFileW +FtpOpenFile +FtpOpenFileA +FtpOpenFileW +FtpPutFile +FtpPutFileA +FtpPutFileW +FtpRemoveDirectory +FtpRemoveDirectoryA +FtpRemoveDirectoryW +FtpRenameFile +FtpRenameFileA +FtpRenameFileW +FtpSetCurrentDirectory +FtpSetCurrentDirectoryA +FtpSetCurrentDirectoryW +FullCollapse +FullExpand +FullWindowUpdate +func_exec +func_find +func_init +func_insert +function +FurtherAttrNormalization +FutureValue +fzero +GDAL +GDICheck +GdiComment +GDIError +GdiFlush +GdiGetBatchLimit +GdiSetBatchLimit +GenConflictSelectSQL +GenDeleteSQL +GenerateConsoleCtrlEvent +GenerateDesktopItemHtml +GenerateDragImage +GenerateName +GenerateParamSQL +GeneratePrefix +GenInsertSQL +GenSelectSQL +GenUpdateSQL +GenWhereSQL +Get +Get__NewEnum +Get_AbsolutePage +Get_AbsolutePosition +Get_accChild +Get_accChildCount +Get_accDefaultAction +Get_accDescription +Get_accFocus +Get_accHelp +Get_accHelpTopic +Get_accKeyboardShortcut +Get_accName +Get_accParent +Get_accRole +Get_accSelection +Get_accState +Get_accValue +Get_ActiveCommand +Get_ActiveConnection +Get_ActualSize +Get_AddEnabled +GET_APPCOMMAND_LPARAM +Get_Application_ +Get_async +Get_Attributes +Get_baseName +Get_Body +Get_BOF +get_Bold +Get_Bookmark +Get_Buffer +Get_ButtonCount +Get_CacheControl +Get_CacheSize +Get_CanEdit +Get_Caption +Get_Chapter +Get_CharSet +Get_Checked +Get_Child +Get_ChildCount +Get_childNodes +Get_children +Get_ClientCertificate +Get_CodePage +Get_Collect +Get_CommandText +Get_CommandTimeout +Get_CommandType +get_CommitBatchSize +Get_ConnectionString +Get_ConnectionTimeout +Get_Constraints +get_ConstructString +Get_Contents +Get_ContentType +Get_ContextIdent +get_ContextInfo +Get_ControlDefault +Get_Cookies +Get_Count +get_CurDC +Get_CursorLocation +Get_CursorType +Get_Data +Get_DataFormat +Get_DataMember +Get_DataSource +Get_DataStoreMajorVersion +Get_DataStoreMinorVersion +Get_dataType +Get_DefaultDatabase +Get_DefinedSize +Get_definition +Get_Description +get_DestPath +GET_DEVICE_LPARAM +Get_Direction +Get_DisplayName +Get_doctype +Get_documentElement +get_domImplementation +Get_DSO +Get_dtdURL +Get_EditCaption +Get_EditMode +Get_Enabled +get_Encoding +Get_entities +Get_EOF +Get_errorCode +Get_Errors +Get_EventID +Get_Expanded +Get_Expires +Get_ExpiresAbsolute +Get_Fields +Get_fileModifiedDate +Get_filepos +Get_fileSize +Get_fileUpdatedDate +Get_Filter +get_FireEvents +Get_firstChild +GET_FLAGS_LPARAM +Get_Focused +Get_Form +Get_Group +Get_GroupIndex +get_Handle +Get_HasKeys +get_Height +Get_HelpContext +Get_HelpFile +get_hFont +Get_Hint +get_hPal +Get_Ident +Get_ImageIndex +Get_implementation_ +Get_Index +Get_input +get_internalSubset +Get_InternetTimeout +Get_IsolationLevel +get_Italic +Get_Item +Get_ItemIndex +Get_JavaDSOCompatible +get_KeepOriginalFormat +Get_Key +GET_KEYSTATE_LPARAM +Get_lastChild +Get_LCID +Get_length +Get_line +Get_linepos +get_localName +Get_LockType +Get_MajorVersion +Get_MarshalOptions +Get_MaxRecords +Get_mimeType +Get_MinorVersion +Get_Mode +GET_MOUSEORKEY_LPARAM +Get_Name +Get_Names +Get_namespaceURI +Get_NativeError +Get_nextSibling +Get_nodeName +Get_NodePreservationMode +Get_nodeType +Get_nodeTypedValue +Get_nodeTypeString +Get_nodeValue +Get_notationName +Get_notations +Get_Number +Get_NumericScale +Get_OLEDBCommand +Get_OriginalValue +Get_output +Get_ownerDocument +get_ownerElement +get_PackageGuid +get_PackageName +Get_PageCount +Get_PageSize +Get_Parameters +Get_Parent +Get_parentNode +Get_parsed +Get_parseError +Get_Precision +Get_prefix +Get_Prepared +Get_preserveWhiteSpace +Get_previousSibling +Get_Properties +Get_PropertyByName +Get_PropertyByPosition +Get_Provider +Get_publicId +Get_QueryString +Get_RadioItem +Get_readyState +Get_reason +Get_RecordCount +Get_RemoveEnabled +Get_Request +Get_resolveExternals +Get_Response +Get_responseBody +Get_responseStream +Get_responseText +Get_responseXML +Get_root +Get_RootNodeCount +Get_RowPosition +Get_Rowset +Get_ScriptTimeout +get_Security +Get_Selected +Get_Server +Get_ServerVariables +Get_Session +Get_SessionID +Get_ShortCut +Get_Size +Get_Sort +Get_SortByIndex +Get_Source +get_SourcePath +Get_specified +Get_SQLState +Get_srcText +get_Standalone +Get_State +Get_StateIndex +Get_StaticObjects +Get_Status +Get_statusText +Get_StayInSync +get_Strikethrough +get_StructuredRecords +Get_StructureType +Get_stylesheet +Get_systemId +Get_tagName +Get_target +Get_text +Get_Timeout +Get_TotalBytes +get_TransactionState +get_TransactionUOW +get_Type +Get_Type_ +get_Underline +Get_UnderlyingValue +Get_url +Get_Valid +get_validate +Get_validateOnParse +Get_Value +Get_Version +Get_ViewOptions +Get_Visible +get_Weight +get_Width +Get_xml +Get_XMLDocument +Get8087CW +GetAbs +GetAbsoluteIndex +GetAbsSqr +GetAbstract +GetAcceptExSockaddrs +GetAccessToProperty +GetAccessType +GetAce +GetAclInformation +GetACP +GetAction +GetActionBar +GetActionBarItemClass +GetActionBars +GetActionBarsClass +GetActionClient +GetActionClientItemClass +GetActionClients +GetActionClientsClass +GetActionControl +GetActionCount +GetActionLinkClass +GetActionList +GetActionManager +GetActive +GetActiveAggs +GetActiveClassGroup +GetActiveConnection +GetActiveConnections +GetActiveDesignerType +GetActiveFormHandle +GetActiveItem +GetActiveListbox +GetActiveMDIChild +GetActiveName +GetActiveObject +GetActiveOleObject +GetActivePage +GetActivePageIndex +GetActiveProject +GetActiveRecBuf +GetActiveRecord +GetActiveThreads +GetActiveValue +GetActiveWindow +GetActivityId +GetActualResHandle +GetActualResId +GetAdditionalFileExt +GetAdditionalFileName +GetAdditionalFiles +GetAdditionalFilesCount +GetAdditionalModuleFileCount +GetAdditionalModuleFileEditor +GetAddRemoveItemClass +GetAddressBkpt +GetAddressBkptCount +GetAddType +GetADODataSet +GetAdvise +GetAge +GetAggFieldData +GetAggRecordCount +GetAggregateDesc +GetAggregateValue +GetAliasDriverName +GetAliasName +GetAliasNames +GetAliasParams +GetAlign +GetAlignDisabled +GetAlignment +GetAllCustData +GetAllFuncCustData +GetAllImplTypeCustData +GetAllocMemCount +GetAllocMemSize +GetAllowReorder +GetAllParamCustData +getAllResponseHeaders +GetAllVarCustData +GetAlphabetHRC +GetAlphabetPriorityHRC +GetAlternateWordsHRCRESULT +GetAltGRStatus +GetAltTabInfo +GetAltTabInfoA +GetAltTabInfoW +GetAncestor +GetAncestorDesigner +GetAncestorModule +GetAncestorName +GetAngle +GetAnimateInterval +GetAnimateParams +GetAnimation +GetAnnotation +GetAnnotations +GetAppData +GetAppEvents +GetAppInfo +GetAppInfoCollection +GetApplication +GetApplicationDataDirectory +GetApplicationMainFormOnTaskBar +GetApproximatePosition +GetApps +GetAppServer +GetArcDirection +GetArguments +GetArrangeMode +GetAsBCD +GetAsBoolean +GetAsByteArray +GetAsCurrency +GetAsDateTime +GetAsDouble +GetAsFloat +GetAsFMTBCD +GetAsGuid +GetAsHandle +GetAsInteger +GetAsLargeint +GetAsMemo +GetAspectRatioFilterEx +GetAsPolar +GetAssemblyReferences +GetAsSmallInt +GetAssociateAttributes +GetAsSQLTimeStamp +GetAsString +GetAsText +GetAsVariant +GetAsWideString +GetAsyncKeyState +GetAsyncLoadState +GetAt +GetAtomName +GetAtomNameA +GetAtomNameW +GetAttr +GetAttrCount +GetAttribute +GetAttributeAtPos +GetAttributeDef +GetAttributeDefList +GetAttributeDefs +GetAttributeFormDefault +GetAttributeGroups +getAttributeNode +getAttributeNodeNS +GetAttributeNodes +GetAttributeNS +GetAttributes +GetAttributesOf +getAttributeType +GetAuditedPermissionsFromAcl +GetAuditedPermissionsFromAclA +GetAuditedPermissionsFromAclW +GetAuthor +GetAutoCompleteKey +GetAutoEntry +GetAutoHotkeys +GetAutoIndent +GetAutoLineReduction +GetAutoObject +GetAutoScroll +GetAutoSizing +GetAutoTable +GetAuxEditorInterface +GetAvailableColumns +GetAveCharSize +GetBackground +GetBackspaceUnindents +GetBackupFileName +GetBackwardCount +GetBackwardItem +GetBalancedName +GetBalloonTimeout +GetBandInfo +GetBannerWidth +GetBarHeight +GetBars +GetBarWidth +GetBaseAddress +GetBaseGroup +GetBaseKey +GetBaseName +GetBaseRegistryKey +GetBaseRegKey +GetBaseType +GetBaseTypeIndicator +GetBaseTypeName +GetBcdDigit +GetBinaryType +GetBinaryTypeA +GetBinaryTypeW +GetBindInfo +GetBindings +GetBindingType +GetBinDirectory +GetBindOptions +GetBit +GetBitBtnGlyph +GetBitmap +GetBitmapBits +GetBitmapDimensionEx +GetBitmapHandle +GetBkColor +GetBkMode +GetBlob +GetBlobData +GetBlobFieldData +GetBlobLen +GetBlobSize +GetBlobType +GetBlock +GetBlockAfter +GetBlockEndCol +GetBlockEndLine +GetBlockIndent +GetBlockStart +GetBlockStartCol +GetBlockStartLine +GetBlockType +GetBlockVisible +GetBOF +GetBookmark +GetBookmarkData +GetBookmarkFlag +GetBookmarkPos +GetBookmarkStr +GetBoolParam +GetBorder +GetBorderDW +GetBorderIconStyles +GetBorderSize +GetBorderStyles +GetBorderWidth +GetBottomRow +GetBounded +GetBoundingRect +GetBoundSource +GetBoundsRect +GetBoxMappingHRCRESULT +GetBoxResultsHRC +getBracket +GetBrushOrgEx +GetBuffer +GetBufferCount +GetBufferOptions +GetBufStart +GetBuiltInTypes +GetButton +GetButtonAt +GetButtonCaption +GetButtonCategoriesClass +GetButtonCategoryClass +GetButtonClass +GetButtonColors +GetButtonCount +GetButtonEnabled +GetButtonEnableDropDown +GetButtonGroup +GetButtonHasDropDown +GetButtonHint +GetButtonImageIndex +GetButtonItemClass +GetButtonMenu +GetButtonRect +GetButtons +GetButtonsClass +GetButtonSeparator +GetButtonSize +GetButtonState +GetButtonText +GetButtonValue +GetButtonVisible +GetBValue +GetByteLength +GetByteProp +GetBytesReserved +GetCacheSize +GetCalcFields +GetCalculated +GetCalendarHandle +GetCallCount +GetCallEndPos +GetCallFactoryObject +GetCallHeader +GetCallPos +GetCallStartPos +GetCalStyles +GetCanClose +GetCanDelete +GetCanModify +GetCanonicalFormatEtc +GetCanPaste +GetCanPrint +GetCanUndo +GetCanvas +GetCanvasOrientation +GetCapacity +GetCaption +GetCaptionFont +GetCaptionFontHeight +GetCaptionRect +GetCaptionSize +GetCapture +GetCardinality +GetCaretBlinkTime +GetCaretPos +GetCaseSensitive +GetCategories +GetCategory +GetCategoryAt +GetCategoryBounds +GetCategoryDesc +GetCategoryRect +GetCatID +GetCBInfo +GetCBreak +GetCell +GetCellCount +GetCellRect +GetCells +GetCellSizes +GetChangeCount +GetChangeDelay +GetCharABCWidths +GetCharABCWidthsA +GetCharABCWidthsFloat +GetCharABCWidthsFloatA +GetCharABCWidthsFloatW +GetCharABCWidthsI +GetCharABCWidthsW +GetCharacter +GetCharacterData +GetCharacterPlacement +GetCharacterPlacementA +GetCharacterPlacementW +GetCharset +GetCharWidth +GetCharWidth32 +GetCharWidth32A +GetCharWidth32W +GetCharWidthA +GetCharWidthFloat +GetCharWidthFloatA +GetCharWidthFloatW +GetCharWidthI +GetCharWidthW +GetCheckButtonState +GetChecked +GetCheckSize +GetCheckWidth +GetChevronBounds +GetChild +GetChildCount +GetChildDefs +GetChildElementList +GetChildNodeClass +GetChildNodeClasses +GetChildNodes +GetChildOwner +GetChildParent +GetChildren +GetChildRowset +GetChildValue +GetChunk +GetClass +GetClassDesc +GetClasses +GetClassFile +GetClassFileOrMime +GetClassForHandler +GetClassID +GetClassInfo +GetClassInfoA +GetClassInfoEx +GetClassInfoExA +GetClassInfoExW +GetClassInfoW +GetClassLong +GetClassLongA +GetClassLongW +GetClassName +GetClassNameA +GetClassNameW +GetClassParent +GetClassType +GetClassURL +GetClassWord +GetClerks +GetClientOrigin +GetClientRect +GetClientSite +GetClientSize +GetClientSocket +GetClientThread +GetClientType +GetCliItemByCtrl +GetCliItemByName +GetClipboardData +GetClipboardFormatName +GetClipboardFormatNameA +GetClipboardFormatNameW +GetClipboardOwner +GetClipboardSequenceNumber +GetClipboardStream +GetClipboardViewer +GetClipboardWindow +GetClipBox +GetClipCursor +GetClipRect +GetClipRgn +GetCloseRect +GetCLSIDData +GetCmdShow +getCMExternalObjects +getCMInternalObjects +getCMNodeType +getCMObject +getCMObjects +GetCoClasses +GetCode +getCodeAsString +getCodeAsWideString +GetCodeInsightType +GetCodeObjectCount +GetCodeObjects +GetCodePreviewInfo +GetColCount +GetColField +GetCollection +GetCollectionByQuery +GetColOptions +GetColor +GetColorAdjustment +GetColorMap +GetColorMapClass +GetColorName +GetColorProp +GetColorSchemes +GetColorSet +GetColorSpace +GetCols +GetColumn +GetColumnCount +GetColumnDescs +GetColumnFromIndex +GetColumnFromTag +GetColumnHeaders +GetColumnInfo +GetColumnNumber +GetColumnSpanIndex +GetColumnsRowset +GetColumnVariants +GetColWidths +GetComboBoxInfo +GetComboItem +GetComboText +GetComCtlVersion +GetCommand +GetCommandCount +GetCommandLine +GetCommandLineA +GetCommandLineW +GetCommandString +GetCommandText +GetCommandTimeOut +GetCommandType +GetCommaText +GetCommConfig +GetComment +GetCommMask +GetCommModemStatus +GetCommProperties +GetCommState +GetCommTimeouts +GetComObject +GetComplexTypes +GetComponent +GetComponentCount +GetComponentEditor +GetComponentFromHandle +GetComponentHandle +GetComponentIndex +GetComponentName +GetComponentNames +GetComponentProperties +GetComponentReference +GetComponentType +GetComponentValue +GetCompositorNode +GetCompositors +GetCompositorType +GetCompProp +GetCompressedFileSize +GetCompressedFileSizeA +GetCompressedFileSizeW +GetCompressionRate +GetCompUnit +GetCompUnitCount +GetCompUnitFileCount +GetCompUnitFileName +GetComputerForGUID +GetComputerForProgID +GetComputerName +GetComputerNameA +GetComputerNameW +GetConfigMode +GetConfigParams +GetConnected +GetConnection +GetConnectionInterface +GetConnectionPointContainer +GetConnections +GetConnectionString +GetConnectionTimeout +GetConsistentAttributes +GetConsoleCP +GetConsoleCursorInfo +GetConsoleMode +GetConsoleOutputCP +GetConsoleScreenBufferInfo +GetConsoleTitle +GetConsoleTitleA +GetConsoleTitleW +GetContainer +GetContainingTypeLib +GetContent +GetContentAge +GetContentExtent +GetContentModel +GetContentNode +getContentspec +getContentspecType +GetContext +GetContextId +GetContextItems +GetContextMenuItem +GetControl +GetControlAtPos +GetControlBound +GetControlBounds +GetControlClass +GetControlCount +GetControlExtents +GetControlIndex +GetControlInfo +GetControlItem +GetControlItemState +GetController +GetControlPadding +GetControlsAlignment +GetControlState +GetControlWindow +GetConvertInfo +GetConvertStg +GetConvFamilies +GetConvFamilyInfo +GetConvInfo +GetConvTypes +getCorrespondingCMEntity +GetCount +GetCPInfo +GetCPUType +GetCreateBackupFile +GetCreateParent +GetCreationProperties +GetCreatorType +getCssText +GetCtl3D +GetCurFile +GetCurFolder +GetCurPassCount +GetCurrencyFormat +GetCurrencyFormatA +GetCurrencyFormatW +GetCurrencyProp +GetCurrent +GetCurrentBookMark +GetCurrentCommand +GetCurrentDate +GetCurrentDir +GetCurrentDirectory +GetCurrentDirectoryA +GetCurrentDirectoryW +GetCurrentEditor +GetCurrentFile +GetCurrentFolderPath +GetCurrentHelpFile +GetCurrentHwProfile +GetCurrentHwProfileA +GetCurrentHwProfileW +GetCurrentInfo +GetCurrentInstructionLine +GetCurrentLine +getCurrentNode +GetCurrentObject +GetCurrentPlayback +GetCurrentPos +GetCurrentPositionEx +GetCurrentProcess +GetCurrentProcessId +GetCurrentRecord +GetCurrentRowSelected +GetCurrentSelection +GetCurrentSession +GetCurrentSubItem +GetCurrentThread +GetCurrentThreadID +GetCurrentTime +GetCurrentTrustee +GetCursor +GetCursorHeightMargin +GetCursorInfo +GetCursorLocation +GetCursorPos +GetCursorProps +GetCursors +GetCursorThroughTabs +GetCursorType +GetCurValue +GetCustData +GetCustomColors +GetCustomColorsArray +GetCustomForm +GetCustomFormCount +GetCustomFormGlassFrame +GetCustomForms +GetCustomId +GetCut +GetCValue +GetData +GetDatabase +GetDatabaseCount +GetDatabaseNames +GetDataBrokerList +GetDataExpr +GetDataField +GetDataHere +GetDataInfo +GetDataItem +GetDataLinkFiles +GetDataModule +GetDataModuleCount +GetDataObject +GetDataPacket +GetDataSet +GetDataSetCount +GetDataSetFromDelta +GetDataSize +GetDataSource +GetDataSourcePropName +getDataString +GetDataType +GetDataTypeName +GetDate +GetDateFormat +GetDateFormatA +GetDateFormatW +GetDBHandle +GetDBLocale +GetDBSession +GetDC +GetDCBrushColor +GetDCEx +GetDCOrgEx +GetDCPenColor +GetDeactivateOnReturn +GetDefault +GetDefaultColorMapClass +GetDefaultColumn +GetDefaultColumnState +GetDefaultCommConfig +GetDefaultCommConfigA +GetDefaultCommConfigW +GetDefaultDatabase +getDefaultDeclaration +GetDefaultDispatch +GetDefaultExpression +GetDefaultFields +GetDefaultFilter +GetDefaultFolder +GetDefaultHelpFile +GetDefaultHighlighterPreview +GetDefaultIME +GetDefaultInterface +GetDefaults +GetDefaultSearchGUID +GetDefaultSounds +GetDefaultState +GetDefaultWidth +GetDelimitedText +GetDelimiter +GetDelta +GetDerivationMethod +GetDesc +GetDescription +GetDesignClass +GetDesigner +GetDesignerExtension +GetDesignerGuideOffset +GetDesignerGuideType +GetDesignerState +GetDesignMode +GetDesignObject +GetDesktopHeight +GetDesktopItem +GetDesktopItemByID +GetDesktopItemBySource +GetDesktopItemCount +GetDesktopItemOptions +GetDesktopLeft +GetDesktopRect +GetDesktopTop +GetDesktopWidth +GetDesktopWindow +GetDestCtx +GetDetail +GetDetailCount +GetDetailDataSet +GetDetailDataSets +GetDetailLinkFields +GetDetailsEx +GetDetailsOf +GetDeviceCaps +GetDeviceContext +GetDeviceDriverBaseName +GetDeviceDriverBaseNameA +GetDeviceDriverBaseNameW +GetDeviceDriverFileName +GetDeviceDriverFileNameA +GetDeviceDriverFileNameW +GetDeviceGammaRamp +GetDialog +GetDialogBaseUnits +GetDialogCaption +GetDialogClass +GetDialogHandle +GetDIB +GetDIBColorTable +GetDIBits +GetDIBSizes +GetDInColors +GetDirectCallerName +GetDirectCallerSID +GetDirectCreatorName +GetDirectCreatorSID +GetDirection +GetDirectory +getDisabled +GetDisabledBreakpointLine +GetDisabledColor +GetDisableGroup +GetDiskFreeSpace +GetDiskFreeSpaceA +GetDiskFreeSpaceEx +GetDiskFreeSpaceExA +GetDiskFreeSpaceExW +GetDiskFreeSpaceW +GetDispatchPropValue +GetDispID +GetDispIDOfName +GetDisplayLabel +GetDisplayName +GetDisplayNameOf +GetDisplayNameStr +GetDisplayNameWStr +GetDisplayRect +GetDisplaySize +GetDisplayString +GetDisplayText +GetDisplayValue +GetDisplayWidth +GetDlgCtrlID +GetDlgItem +GetDlgItemInt +GetDlgItemRect +GetDlgItemText +GetDlgItemTextA +GetDlgItemTextW +GetDllEntry +GetDoBreak +GetDocBinding +GetDocElementDef +GetDockAlign +GetDockCaptionDrawer +GetDockClientCount +GetDockClientFromMousePos +GetDockClients +GetDocMiscStatus +getDoctype +GetDocument +GetDocumentation +GetDocumentation2 +GetDocumentationCollection +getDocumentClass +GetDocumentElement +GetDocumentNode +GetDocumentObject +getDocuments +GetDocumentType +getDocumentTypes +GetDoHandleExceptions +GetDoIgnoreExceptions +GetDOM +GetDomainAddresses +GetDOMDocument +GetDOMImpl +GetDOMNode +GetDOMNodeEx +GetDOMParseOptions +GetDOMPersist +GetDOMVendor +GetDoubleClickTime +GetDoubleProp +GetDragAcceptors +GetDragCursor +GetDragImages +GetDrive +GetDriverModuleHandle +GetDriverName +GetDriverNames +GetDriverParams +GetDriverTypeName +GetDriveType +GetDriveTypeA +GetDriveTypeW +GetDropCtl +GetDropDownCount +GetDroppedDown +GetDropTarget +GetDSDesignerClass +getDutchErrorStr +GetDynArrayProp +GetEditable +GetEditBlock +GetEditBoxText +GetEditBuffer +GetEditBufferIterator +GetEditLimit +GetEditLineTracker +GetEditMask +GetEditMode +GetEditOptions +GetEditOptionsCount +GetEditOptionsForFile +GetEditOptionsIDString +GetEditOptionsIndex +GetEditorClass +GetEditorControl +GetEditorInterface +GetEditorOpts +GetEditorServices +GetEditPosition +GetEditState +GetEditStateFor +GetEditStyle +GetEditText +GetEditValue +GetEditView +GetEditViewCount +GetEditWindow +GetEffectiveClientRect +GetEffectiveRightsFromAcl +GetEffectiveRightsFromAclA +GetEffectiveRightsFromAclW +GetElement +getElementById +GetElementCompositors +GetElementDef +GetElementDefList +GetElementDefs +GetElementDetails +GetElementFormDefault +GetElementGroups +getElementsByTagName +getElementsByTagNameNS +GetElidableBlockDescription +GetElidableBlockEndCol +GetElidableBlockEndLine +GetElidableBlockStartCol +GetElidableBlockStartLine +GetElidedBlockDescription +GetElidedBlockEndCol +GetElidedBlockEndLine +GetElidedBlockStartCol +GetElidedBlockStartLine +GetEmbeddedDS +GetEmpty +GetEmptyProjectDependenciesList +GetEnabled +GetEnableGroup +GetEncoding +getEncodingType +GetEndingColumn +GetEndingRow +getEnglishErrorStr +GetEnhMetaFile +GetEnhMetaFileA +GetEnhMetaFileBits +GetEnhMetaFileDescription +GetEnhMetaFileDescriptionA +GetEnhMetaFileDescriptionW +GetEnhMetaFileHeader +GetEnhMetaFilePaletteEntries +GetEnhMetaFilePixelFormat +GetEnhMetaFileW +getEntities +GetEntity +GetEntry +GetEntryCount +GetEntryFromHandle +GetEntryHandle +GetEntryPoint +GetEnum +GetEnumAllWindowsOnActivateHint +GetEnumerations +GetEnumerator +GetEnumFlagsForItem +GetEnumName +GetEnumNameValue +GetEnumProp +GetEnumPropDesc +GetEnumValue +getenv +GetEnvironmentOptions +GetEnvironmentStrings +GetEnvironmentStringsA +GetEnvironmentStringsW +GetEnvironmentVariable +GetEnvironmentVariableA +GetEnvironmentVariableW +GetEOF +GetEraseWhenMoving +GetError +GetErrorCode +GetErrorCount +GetErrorDescription +GetErrorDS +GetErrorInfo +GetErrorLine +GetErrorMessage +GetErrors +getErrorStr +GetErrorString +GetEvalExpression +GetEventClassesForIID +GetEventDispatcher +GetEventMethod +GetExceptionInfo +GetExceptionMask +GetExecuteOptions +GetExecution +GetExeName +GetExisting +GetExists +GetExitCodeProcess +GetExitCodeThread +GetExpandable +GetExpandAll +GetExpandBtnClass +GetExpanded +GetExpandedItems +GetExpandedName +GetExpandedNameA +GetExpandedNameW +GetExpandedNodeCount +GetExplicitEntriesFromAcl +GetExplicitEntriesFromAclA +GetExplicitEntriesFromAclW +GetExportTranslator +GetExprData +GetExpression +GetExt +GetExtendedControl +GetExtensibilityObject +GetExtension +GetExtensions +GetExtensionVersion +GetExtent +GetFacetParentNode +GetFactoryFromClass +GetFactoryFromClassID +GetFAttr +GetField +GetFieldByName +GetFieldClass +GetFieldConstraint +GetFieldCount +GetFieldData +GetFieldDef +GetFieldDefCount +GetFieldDescs +GetFieldFullName +GetFieldIdx +GetFieldInfo +GetFieldList +GetFieldName +GetFieldNames +GetFieldNamesForIndex +GetFieldNo +GetFieldProperty +GetFields +GetFieldSource +GetFieldState +GetFieldText +GetFieldValue +GetFileAttributes +GetFileAttributesA +GetFileAttributesEx +GetFileAttributesExA +GetFileAttributesExEmulated +GetFileAttributesExPreload +GetFileAttributesExW +GetFileAttributesW +GetFileCount +GetFileFilter +GetFileFilterCount +GetFileHelpTrait +GetFileHistory +GetFileHistoryProvider +GetFileInformationByHandle +GetFileMaskWStr +GetFileName +GetFileNames +GetFilePath +GetFilePos +GetFiles +GetFileSecurity +GetFileSecurityA +GetFileSecurityW +GetFileSize +GetFileStream +GetFileSystem +GetFileTime +GetFileTitle +GetFileTitleA +GetFileTitleW +GetFileType +GetFileTypeIndex +GetFileVersion +GetFileVersionInfo +GetFileVersionInfoA +GetFileVersionInfoSize +GetFileVersionInfoSizeA +GetFileVersionInfoSizeW +GetFileVersionInfoW +GetFilter +GetFilterBindings +GetFilterData +GetFilterGroup +GetFilterHandler +GetFilterIndex +GetFilterName +GetFilterStr +GetFinal +GetFindDialog +GetFindText +getFirstChild +getFirstChildElement +getFirstChildElementNS +GetFirstCodeBase +GetFirstEditChar +GetFirstIndent +GetFirstNode +GetFirstSelected +GetFixed +GetFixedTheta +GetFixupInstanceNames +GetFixupReferenceNames +GetFlags +GetFloating +GetFloatingDockSiteClass +GetFloatProp +GetFloatReturn +GetFloatValue +GetFloatValueAt +GetFMTBcd +GetFocus +GetFocused +GetFolder +GetFont +GetFontData +GetFontLanguageInfo +GetFontName +GetFonts +GetFontSize +GetFontUnicodeRanges +GetForceCutCopyEnabled +GetForegroundWindow +GetForm +GetFormA +GetFormat +GetFormatCount +GetFormatRec +GetFormats +GetFormatSettings +GetFormBounds +GetFormChoice +GetFormComponent +GetFormCount +GetFormDesigner +GetFormImage +GetFormInterface +GetFormMethodName +GetFormModuleInterface +GetFormName +GetFormResource +GetFormText +GetFormW +GetForwardCount +GetForwardItem +GetFound +GetFractionalDigits +GetFrameInfo +GetFrameWidth +GetFreeSpace +getFrenchErrorStr +getFrequency +GetFromCursor +GetFromDataFactory +GetFromProperty +GetFTime +GetFullName +GetFullNameStr +GetFullPath +GetFullPathName +GetFullPathNameA +GetFullPathNameW +GetFuncCustData +GetFuncDesc +GetFuncIndexOfMemId +GetFuncResultInfo +GetGalleryCategory +getGermanErrorStr +GetGetSocketEvent +GetGetThreadEvent +GetGlassFrame +GetGlyph +GetGlyphIndices +GetGlyphIndicesA +GetGlyphIndicesW +GetGlyphOutline +GetGlyphOutlineA +GetGlyphOutlineW +GetGOT +GetGraphicsMode +GetGrid +GetGridHeight +GetGridPanel +GetGridWidth +GetGroup +GetGroupIndex +GetGroupName +GetGroupRef +GetGroupState +GetGroupUndo +GetGUID +GetGuideHRC +GetGuiResources +GetGUIThreadInfo +GetGValue +GetHandle +GetHandleInformation +GetHasAppServer +GetHasAssemblyReferences +GetHasChildNodes +GetHasConstraints +GetHasErrors +GetHashCode +GetHasItems +GetHasSymbols +GetHeader +GetHeaderValue +GetHeapBlocks +GetHeapStatus +GetHeight +GetHelpContext +GetHelpFile +GetHelpFileName +GetHelpInfo +GetHelpName +GetHelpPath +GetHelpStrings +GetHelpSystem +GetHelpUrl +GetHGlobalFromILockBytes +GetHGlobalFromStream +GetHiddenCount +GetHighLightColor +GetHighlightCurrentLine +GetHighlighter +GetHighlighterCount +GetHint +GetHintControl +GetHints +GetHintShortCuts +GetHintText +GetHistoryStyle +GetHitTestInfoAt +gethostbyaddr +gethostbyname +GetHostedNodes +gethostname +GetHostNode +GetHotKey +GetHotSpot +GetHotspotsHRCRESULT +GetHoverTime +GetHRECFromHRC +getHref +GetICMProfile +GetICMProfileA +GetICMProfileW +GetIComponent +GetIcon +GetIconHandle +GetIconic +GetIconInfo +GetIconLocation +GetIconMetaPict +GetIconOf +GetID +GetIdent +GetIdentityString +GetIDEOptions +GetIDispatchProp +GetIdleThreads +GetIDList +GetIDsOfNames +GetIDString +GetIdx +GetIgnoreException +GetImageBitmap +GetImageConfigInformation +GetImageHandle +GetImageIndex +GetImageList +GetImages +GetImageSize +GetImageUnusedHeaderBytes +GetImeMode +GetImeName +GetImes +GetImplFileName +GetImplTypeCustData +GetImplTypeFlags +GetImportedNamespaces +GetImportTranslator +GetInch +GetIndent +GetIndex +GetIndexBased +GetIndexDef +GetIndexDefs +GetIndexDescs +GetIndexField +GetIndexFieldCount +GetIndexFieldNames +GetIndexForFields +GetIndexForOrderBy +GetIndexForPage +GetIndexInfo +GetIndexName +GetIndexNames +GetIndexOfFirstCategory +GetIndexParams +GetInfoFlags +GetInfoTip +GetInitialDate +GetInitializationString +GetInksetInterval +GetInksetIntervalCount +GetInPlaceSite +GetInputState +GetInsertMode +GetInstance +GetInstRes +GetInt64Prop +GetInt64Value +GetInt64ValueAt +GetIntegerProp +GetInterceptGUID +GetInterceptorList +GetInterface +GetInterfaceEntry +GetInterfaceFromGlobal +GetInterfaceProp +GetInterfaceSafetyOptions +GetInterfaceTable +GetInterfaceTypeInfo +getInternalSubset +GetInternationalHRC +GetInterpreter +GetIntfEntry +GetIntfFileName +GetIntfName +GetIntfValue +GetIntfValueAt +GetIntProp +GetInTransaction +GetIntVec +GetInvalidBreakpointLine +GetInvalidCharacterException +GetInvokeKind +GetIPersistent +GetIsBlank +GetIsClone +GetIsComponent +GetIsControl +GetIsDefault +GetIsDirty +GetIsDormant +GetIsIndexField +getIsInternalEntity +GetIsModified +GetIsNested +GetIsNull +GetIsolationLevel +GetIsPanning +GetIsPaused +GetIsPlaying +GetIsReadOnly +GetIsRecording +GetIsSpecialCharacter +GetIsTextElement +GetIStream +GetIStreamAdapter +getIsUnusable +GetIsValid +GetIsWhitespace +getIsWhitespaceInElementContent +GetIsWordCharacter +getItalianErrorStr +GetItem +GetItemAt +GetItemAttr +GetItemByDispID +GetItemCaption +GetItemClass +GetItemCount +GetItemData +GetItemEnabled +GetItemHeight +GetItemHt +GetItemIndex +GetItemName +GetItemNames +GetItemObject +GetItemPath +GetItemProp +GetItems +GetItemsClass +GetItemType +GetIUnknownProp +GetJob +GetJobA +GetJobW +GetKBCodePage +GetKeepTrailingBlanks +GetKernelObjectSecurity +GetKerningPairs +GetKey +GetKeyBindingRec +GetKeyboardLayout +GetKeyboardLayoutList +GetKeyboardLayoutName +GetKeyboardLayoutNameA +GetKeyboardLayoutNameW +GetKeyboardServices +GetKeyboardState +GetKeyboardType +GetKeyBuffer +GetKeyData +GetKeyExclusive +GetKeyFieldCount +GetKeyFieldName +GetKeyFields +GetKeyIndex +GetKeyInfo +GetKeyNames +GetKeyNameText +GetKeyNameTextA +GetKeyNameTextW +GetKeysProcessed +GetKeyState +GetKeyTracing +GetKeywords +GetKeywordsCount +GetKind +GetKValue +GetLabelCount +GetLabels +GetLabelText +GetLanguage +GetLanguageCode +GetLanguageDriverName +GetLargeButtons +GetLargestConsoleWindowSize +GetLastActivePopup +GetLastChild +getLastChildElement +getLastChildElementNS +GetLastChildZone +GetLastEditChar +GetLastEditColumn +GetLastEditRow +GetLastError +GetLastIndex +GetLastInputInfo +GetLastRow +GetLastUpdate +GetLastVisibleData +GetLCID +GetLeft +GetLeftColumn +GetLeftGutterWidth +GetLeftIndent +GetLength +GetLengthSid +GetLevel +GetLibAttr +GetLibStatistics +GetLicenseString +GetLicInfo +GetLine +GetLineBreak +GetLineNum +GetLineNumber +GetLineOffset +GetLinePos +GetLines +GetLinesControl +GetLinesInBuffer +GetLineSize +GetLineText +GetLinked +GetLinkedActionLists +GetLinkSource +GetLinkUpdateOptions +GetList +GetListBoxInfo +GetListItem +GetListSource +GetListView +GetLiteralInfo +getLiteralValue +GetLoadFromFileName +GetLocalAddress +GetLocalApplicationDataDirectory +GetLocaleChar +GetLocaleFormatSettings +GetLocaleID +GetLocaleInfo +GetLocaleInfoA +GetLocaleInfoW +GetLocaleStr +GetLocalHost +GetLocalName +GetLocalPort +GetLocalTime +GetLocationString +GetLockType +GetLogChanges +GetLogColorSpace +GetLogColorSpaceA +GetLogColorSpaceW +GetLogFileName +GetLogicalDrives +GetLogicalDriveStrings +GetLogicalDriveStringsA +GetLogicalDriveStringsW +GetLogMessage +GetLogRecord +GetLogRecordVariants +GetLogResult +GetLongestItem +GetLongName +GetLongStrProp +GetLookup +GetLookupCursor +GetLookupDataset +GetLookupDisplay +GetLookupField +GetLookupFields +GetLookupInfo +GetLookupKeyFields +GetLookupList +GetLookupResultField +GetLookupSource +GetMailslotInfo +GetMainForm +GetMainFormHandle +GetMainFormOnTaskBar +GetMainMenu +GetMainProjectGroup +GetManualCompleteKey +GetMapMode +GetMappedFileName +GetMappedFileNameA +GetMappedFileNameW +GetMappedIndex +GetMappingNames +GetMarkedBlocks +GetMarshalOptions +GetMarshalSizeMax +GetMask +GetMaskBitmap +GetMasked +GetMasterFields +GetMax +GetMaxChars +GetMaxDisplayWidth +GetMaxExclusive +GetMaxInclusive +GetMaxLength +GetMaxOccurs +GetMaxRecords +GetMaxResultsHRC +GetMDIChildCount +GetMDIChildren +getMedia +GetMemberName +GetMemberProperties +GetMembers +GetMemberships +GetMemberTypes +GetMemory +GetMemoryManager +GetMemoryManagerState +GetMemoryMap +GetMemoryStream +GetMenu +GetMenuActive +GetMenuBarInfo +GetMenuCheckMarkDimensions +GetMenuContextHelpId +GetMenuDefaultItem +GetMenuIndex +GetMenuInfo +GetMenuItem +GetMenuItemCount +GetMenuItemID +GetMenuItemInfo +GetMenuItemInfoA +GetMenuItemInfoW +GetMenuItemRect +GetMenuItems +GetMenuSize +GetMenuState +GetMenuString +GetMenuStringA +GetMenuStringW +GetMenuText +GetMessage +GetMessageA +GetMessageExtraInfo +GetMessageGroup +GetMessageGroupCount +GetMessageGroupName +GetMessagePos +GetMessageTime +GetMessageW +GetMetaData +GetMetaFile +GetMetaFileA +GetMetaFileBitsEx +GetMetaFileW +GetMetaRgn +GetMethodInfo +GetMethodKind +GetMethodName +GetMethodProp +GetMethods +GetMethodValue +GetMethodValueAt +GetMetricSettings +GetMIDASAppServerList +GetMin +GetMinExclusive +GetMinHeight +GetMinimumBlockAlignment +GetMinInclusive +GetMinLength +GetMinOccurs +GetMiscStatus +GetMiterLimit +GetMixed +GetMMHeight +GetMMWidth +GetMode +GetModified +GetModifiedState +GetModifyTime +GetModule +GetModuleBaseName +GetModuleBaseNameA +GetModuleBaseNameW +GetModuleCount +GetModuleEntryPoint +GetModuleEntryPointAddress +GetModuleEntryPointCount +GetModuleFileCount +GetModuleFileEditor +GetModuleFileName +GetModuleFileNameA +GetModuleFileNameEx +GetModuleFileNameExA +GetModuleFileNameExW +GetModuleFileNameW +GetModuleHandle +GetModuleHandleA +GetModuleHandleW +GetModuleInformation +GetModuleInterface +GetModuleName +GetModules +GetModuleType +GetMoniker +GetMonitor +GetMonitorCount +GetMonitors +GetMops +GetMouseHoverItem +GetMouseMovePoints +GetMSAttribute +GetMSCharacterData +GetMSDocument +GetMSDocumentType +GetMSElement +GetMSEntity +GetMSNode +GetMSNotation +GetMSProcessingInstruction +GetMultiLine +GetMultipleComponentsInfo +GetMultipleTrustee +GetMultipleTrusteeA +GetMultipleTrusteeOperation +GetMultipleTrusteeOperationA +GetMultipleTrusteeOperationW +GetMultipleTrusteeW +GetMultiSelect +GetMValue +GetMyTransactionVote +GetName +getNamedIndex +getNamedItem +getNamedItemNS +GetNamedPipeHandleState +GetNamedPipeHandleStateA +GetNamedPipeHandleStateW +GetNamedPipeInfo +GetNamedSecurityInfo +GetNamedSecurityInfoA +GetNamedSecurityInfoW +GetNameFromLCID +GetNameFromLocaleID +getNameOfFirstTag +GetNamePath +GetNames +getNamespaceAware +GetNamespaceCount +GetNameSpaceParent +GetNamespaceURI +GetNameValueSeparator +GetNameW +GetNearestColor +GetNearestItem +GetNearestPaletteIndex +GetNestedDataSet +GetNestedDataSets +GetNetFileDir +GetNewModuleAndClassName +GetNewModuleName +GetNewValue +GetNext +GetNextBindingRec +GetNextButton +GetNextButtonInGroup +GetNextByte +GetNextChild +GetNextCodeBase +GetNextComputer +GetNextDispID +GetNextDlgGroupItem +GetNextDlgTabItem +GetNextEditChar +GetNextItem +GetNextLink +GetNextName +GetNextPacket +GetNextRecord +GetNextRecords +GetNextRows +GetNextSelected +getNextSibling +getNextSiblingElement +getNextSiblingElementNS +GetNextVisible +getNextWideChar +getNextWideChar2 +GetNextWindow +GetNode +GetNodeAt +GetNodeAtIndex +GetNodeDisplayWidth +GetNodeFromIndex +GetNodeFromItem +GetNodeIndentStr +GetNodeName +GetNodeObject +GetNodeType +GetNodeValue +GetNonToolWindowPopupParent +getNormalizedValue +GetNotation +GetNotationDefs +getNotationName +getNotations +GetNotifier +GetNotifierCount +GetNotifyTarget +GetNTControlsAccepted +GetNTDependencies +GetNTErrorSeverity +GetNTServiceType +GetNTStartType +GetNumberFormat +GetNumberFormatA +GetNumberFormatW +GetNumbering +GetNumberOfConsoleInputEvents +GetNumberOfConsoleMouseButtons +GetNumberOfEventLogRecords +GetNumCopies +GetNumeric +GetNumericScale +GetNumGlyphs +GetObject +GetObjectA +GetObjectAccessRights +GetObjectContext +GetObjectDataSize +GetObjectDescriptor +GetObjectDispatch +GetObjectInfo +GetObjectName +GetObjectNames +GetObjectOwner +GetObjectParam +GetObjectProp +GetObjectPropClass +GetObjectProperty +GetObjects +GetObjectStorage +GetObjectType +GetObjectTypeNames +GetObjectTypes +GetObjectVerbs +GetObjectW +GetOEMCP +GetOffset +GetOldestEventLogRecord +GetOldRecord +GetOldValue +GetOle2AcceleratorTable +GetOleBoolProp +GetOleClassName +GetOleDateProp +GetOleEnumProp +GetOleObject +GetOleObjectClassRec +GetOleThreadWindow +GetOleVariantProp +GetOnClick +GetOnClientError +GetOnClientEvent +GetOnDrawPanel +GetOnDrawSection +GetOnSectionClick +GetOnSectionResize +GetOnSectionTrack +GetOnStringsChange +GetOnStringsChanging +GetOnThreadEnd +GetOnThreadStart +GetOpenClipboardWindow +GetOpenFileName +GetOpenFileNameA +GetOpenFileNameW +GetOptionalParam +GetOptionFileName +GetOptionName +GetOptionNames +GetOptions +GetOptionsIDString +GetOptionsIndex +GetOptionsName +GetOptionsObject +GetOptionValue +GetOptParameter +GetOrdered +GetOrdProp +GetOrdValue +GetOrdValueAt +GetOrientation +GetOriginalBuffer +GetOriginalCallerName +GetOriginalCallerSID +GetOriginalCreatorName +GetOriginalCreatorSID +GetOriginalData +GetOSProcessId +GetOSThreadID +GetOTAThreadContext +GetOTAXMMRegisters +GetOutlineTextMetrics +GetOutlineTextMetricsA +GetOutlineTextMetricsW +GetOverlappedResult +GetOverlayIconIndex +GetOverlayIndex +GetOverlayInfo +GetOverwriteBlocks +GetOverwriteFileName +GetOverwriteFileNameCount +GetOwner +GetOwnerCount +GetOwnerDocument +getOwnerElement +GetOwnerModule +GetOwnerModuleCount +getOwnerNode +GetOwnerWindow +GetOwningCollection +GetOwningProcess +GetOXNode +GetPackageCount +GetPackageDescription +GetPackageInfo +GetPackageModuleHandle +GetPackageName +GetPacketInterceptorList +GetPage +GetPageContainer +GetPageCount +GetPageFromDockClient +GetPageHeight +GetPageIndex +GetPageInfo +GetPages +GetPageWidth +GetPalette +GetPaletteEntries +GetPaletteItem +GetPaletteState +GetPanelBounds +GetPanelClass +GetPanInterval +GetPanOptions +GetParam +GetParamCheck +GetParamCollection +GetParamCount +GetParamCustData +GetParamData +GetParamDataSize +GetParamDelimiter +GetParameter +GetParameterDirection +GetParameterInfo +GetParameterList +GetParameterQuery +GetParameters +GetParamFlags +GetParamList +GetParamName +GetParams +GetParamsCount +GetParamStr +GetParamType +GetParamValue +GetParent +GetParentBackground +GetParentColumn +GetParentComponent +GetParentDef +getParentElement +getParentElementNS +GetParentForm +GetParentFormState +GetParentHandle +GetParentItem +GetParentMenu +GetParentNode +GetParentNodeAtLevel +getParentStyleSheet +GetParmCount +GetParmHint +GetParmName +GetParmPos +GetParseOptions +GetPassCount +GetPassword +GetPasteLinkInfo +GetPath +GetPathAndBaseExeName +GetPattern +GetPChar +getpeername +getPEFromCurrentCMObject +GetPenAppFlags +GetPenAsyncState +GetPenDataAttributes +GetPenDataInfo +GetPendingRows +GetPenInput +GetPenMiscInfo +GetPenPos +GetPermissions +GetPersistent +GetPersistentBlocks +GetPersonality +GetPersonalityHelpTrait +GetPickList +GetPicture +getPieceAtPos +GetPinnedWindow +GetPinRect +GetPitch +GetPixel +GetPixelFormat +GetPixelsPerInch +GetPlainText +GetPoints +GetPointsCount +GetPointsFromPenData +GetPolicy +getPolishErrorStr +GetPolyFillMode +GetPopupChildren +GetPopupClass +GetPopupMenu +GetPopupMenuClass +GetPopupOwnerWindows +GetPortForComputer +GetPos +GetPosition +GetPrecision +GetPrecisionMode +GetPredefinedStrings +GetPredefinedValue +GetPrefix +GetPrefixedName +GetPrepared +GetPreserveLineEnds +GetPrev +GetPrevChild +getPreviousSibling +getPreviousSiblingElement +getPreviousSiblingElementNS +getPrevSibling +GetPrevVisible +GetPrimary +GetPrimaryMonitor +GetPrimaryVerb +GetPrinter +GetPrinterA +GetPrinterData +GetPrinterDataA +GetPrinterDataW +GetPrinterDriver +GetPrinterDriverA +GetPrinterDriverDirectory +GetPrinterDriverDirectoryA +GetPrinterDriverDirectoryW +GetPrinterDriverW +GetPrinterIndex +GetPrinters +GetPrinterW +GetPrintProcessorDirectory +GetPrintProcessorDirectoryA +GetPrintProcessorDirectoryW +GetPriorEditChar +GetPriorItem +GetPriority +GetPriorityClass +GetPriorityClipboardFormat +GetPriorRecord +GetPriorRecords +GetPrivateDir +GetPrivateDirectory +GetPrivateObjectSecurity +GetPrivateProfileInt +GetPrivateProfileIntA +GetPrivateProfileIntW +GetPrivateProfileSection +GetPrivateProfileSectionA +GetPrivateProfileSectionNames +GetPrivateProfileSectionNamesA +GetPrivateProfileSectionNamesW +GetPrivateProfileSectionW +GetPrivateProfileString +GetPrivateProfileStringA +GetPrivateProfileStringW +GetPrivateProfileStruct +GetPrivateProfileStructA +GetPrivateProfileStructW +GetProcAddress +GetProcDispatchFlags +GetProcedureCount +GetProcedureNames +GetProcedureParamsText +GetProcess +GetProcessAffinityMask +GetProcessCount +GetProcessHeap +GetProcessHeaps +GetProcessID +GetProcessingInstruction +GetProcessMemoryInfo +GetProcessModule +GetProcessModuleCount +GetProcessPriorityBoost +GetProcessShutdownParameters +GetProcessState +GetProcessTimes +GetProcessVersion +GetProcessWindowStation +GetProcessWorkingSetSize +GetProductIdentifier +GetProductKey +GetProfileInt +GetProfileIntA +GetProfileIntW +GetProfileSection +GetProfileSectionA +GetProfileSectionW +GetProfileString +GetProfileStringA +GetProfileStringW +GetProgID +GetProject +GetProjectBuilder +GetProjectCount +GetProjectDependencies +GetProjectGUID +GetProjectModules +GetProjectName +GetProjectOptions +GetProjectPersonality +GetProjectResource +GetProjectStorageNode +GetPrologNode +GetPrologValue +GetPromptOnReplace +GetProp +GetPropA +GetPropCount +GetPropDisplayString +GetPropDisplayStrings +GetProperties +GetProperty +GetPropertyDescriptionList +GetPropertyInfo +GetPropertyStore +GetPropInfo +GetPropInfos +GetPropList +GetPropName +GetProps +GetPropType +GetPropTypeByName +GetPropValue +GetPropValueByName +GetPropW +GetProtected +getprotobyname +getprotobynumber +GetProvider +GetProviderCount +GetProviderEOF +GetProviderNames +GetPublicID +GetPushed +GetPWChar +getQualifiedItem +GetQuery +GetQueryCursor +GetQueryParamCount +GetQueryParamHasDefaultVal +GetQueryParamInvokeTypeText +GetQueryParamSymText +GetQueryParamTypeText +GetQueryRetVal +GetQueuedCompletionStatus +GetQueueStatus +GetQuoteChar +GetQuotedTableName +GetRadioItem +GetRadius +GetRangeRowset +GetRasterizerCaps +GetReadOnly +GetRealParentForm +GetRealScrollPosition +GetReason +GetRecNo +GetRecord +GetRecordAttribute +GetRecordBlock +GetRecordCount +GetRecordForKey +GetRecordNumber +GetRecords +GetRecordset +GetRecordsetState +GetRecordSize +GetRecordStatus +GetRecreateChildren +GetRect +GetRef +GetReference +GetReferencedRowset +GetReferences +GetReferencesCount +GetReferent +getRefersToPredefinedEntity +GetRefItem +GetRefName +GetRefTypeInfo +GetRefTypeOfImplType +GetRegionData +GetRegions +GetRegKey +GetRegStringValue +GetRegularExpression +GetRemoteAddr +GetRemoteAddress +GetRemoteHost +GetRemotePort +GetRemoteServer +GetReplaceAll +GetReplaceDialog +GetReplaceOptions +GetReplaceText +GetRequest +GetRequired +getResolvedValue +GetResource +GetResourceCache +GetResourceName +GetResourceType +GetResponse +getResponseHeader +GetRestrictionNode +GetResult +GetResults +GetResultsHRC +GetResultType +GetRGBColor +GetRgnBox +GetRight +GetRightColumn +GetRightIndent +GetRightMargin +GetRightSide +GetRoot +GetRootClassName +GetRootComponent +GetRootDirectory +getRootName +GetRootSprig +GetRootStructureNode +GetROP2 +GetRoundMode +GetRow +GetRowCount +GetRowHeight +GetRowHeights +GetRowOfNode +GetRowPosition +GetRowRequestPacket +GetRows +GetRowsAffected +GetRowsAt +GetRowsAtRatio +GetRowsByBookmark +GetRowset +GetRowSpanIndex +GetRowStatus +GetRunningClass +GetRunningObjectTable +GetRuntimeClassID +GetRuntimeMiscStatusFlags +GetRuntimeText +GetRValue +GetSafeCallExceptionAddr +GetSafeCallExceptionMsg +GetSampleSearchText +GetSampleText +GetSaveDialog +GetSaveFileName +GetSaveFileNameA +GetSaveFileNameW +GetSavePoint +GetScaled +GetSchemaDef +GetSchemaDoc +GetSchemaDocRef +GetSchemaImports +GetSchemaIncludes +GetSchemaItem +GetSchemaLocation +GetSchemaRef +GetScopeKind +GetScript +GetScriptCount +GetScriptingContext +GetScriptLanguage +GetScripts +GetScrollBarInfo +GetScrollBtnClass +GetScrollBuffer +GetScrollInfo +GetScrollOffset +GetScrollPos +GetScrollRange +GetScrollRanges +GetScrollWidth +GetSearchErrorString +GetSearchOptions +GetSearchString +GetSearchText +GetSecondaryShortCuts +GetSecurityCallContext +GetSecurityDescriptorControl +GetSecurityDescriptorDacl +GetSecurityDescriptorGroup +GetSecurityDescriptorLength +GetSecurityDescriptorOwner +GetSecurityDescriptorSacl +GetSecurityId +GetSecurityInfo +GetSecuritySite +GetSel +GetSelComponent +GetSelCount +GetSelected +GetSelectedControlItem +GetSelectedCount +GetSelectedField +GetSelectedIndex +GetSelectedItem +GetSelectedItems +GetSelectedSocket +GetSelectedTool +GetSelectedType +GetSelection +GetSelectionCount +GetSelectionEditors +GetSelections +GetSelLength +GetSelStart +GetSelText +GetSelTextBuf +GetSeparator +GetSequenceNumber +getservbyname +getservbyport +GetServer +GetServerCLSID +GetServerConv +GetServerData +GetServerFileName +GetServerGUID +GetServerKey +GetServerList +GetServerName +GetServerThread +GetServerType +GetServiceController +GetServiceCount +GetServiceDisplayName +GetServiceDisplayNameA +GetServiceDisplayNameW +GetServiceKeyName +GetServiceKeyNameA +GetServiceKeyNameW +GetSession +GetSessionByName +GetSessionNames +GetSetElementName +GetSetElementValue +GetSetProp +GetShadow +GetShadowColor +GetShellModule +GetShiftState +GetShortCut +GetShortCuts +GetShortIntProp +GetShortName +GetShortNameStr +GetShortPathName +GetShortPathNameA +GetShortPathNameW +GetShortStrProp +GetShortStrPropAsLongStr +GetShouldBuild +GetShowCaption +GetShowCmd +GetShowDescriptionPane +GetShowForm +GetShowHotCommands +GetShowing +GetShowLineBreaks +GetShowShortCut +GetShowSource +GetShowSpace +GetShowTab +GetSidIdentifierAuthority +GetSidLengthRequired +GetSidSubAuthority +GetSidSubAuthorityCount +GetSignature +GetSimpleCallHeader +GetSimpleTypeNode +GetSimpleTypes +GetSingleProp +GetSite +GetSiteInfo +GetSize +GetSizeMax +GetSizeStyleString +GetSmallintProp +GetSmartTab +getsockname +getsockopt +GetSoftwareUpdateInfo +GetSort +GetSortOrder +GetSortType +GetSource +GetSourceBkpt +GetSourceBkptCount +GetSourceDisplayName +GetSourceDoc +GetSourceIsDebuggable +GetSourceLines +GetSourceMoniker +GetSourcesRowset +getSpanishErrorStr +GetSpecialName +GetSpecification +getSpecified +GetSpeedSetting +GetSpeedSettingCount +GetSprig +GetSprigDesigner +GetSQL +GetSQLIndex +GetSQLInfo +GetSQLMemoControl +GetSQLMemoLinesText +GetSQLText +GetSQLTimeStampFromStringVariant +GetSQLToken +GetSrcText +GetSrvrConv +GetSrvrItem +GetStackFramesToLog +GetStackStatus +GetStandAlone +GetStart +GetStartingColumn +GetStartingRow +GetStartSuspended +GetStartupInfo +GetStartupInfoA +GetStartupInfoW +GetState +GetStateFieldValue +GetStateIndex +GetStatementHandle +GetStatementLocale +GetStates +GetStateString +GetStaticRect +GetStatus +GetStatusBar +GetStatusString +GetStatusText +GetStdHandle +GetStmtInfo +GetStockObject +GetStoredProcNames +GetStream +getStreamAsWideString +GetStreamMetaData +GetStretchBltMode +GetStrictDelimiter +GetStrictFormat +GetString +getStringLength +getStringPosition +GetStringProp +GetStringProperty +GetStringResult +GetStrings +GetStringTypeA +GetStringTypeEx +GetStringTypeExA +GetStringTypeExW +GetStringTypeW +GetStrokeAttributes +GetStrokeTableAttributes +GetStrProp +GetStructureContext +GetStructureControl +GetStructureType +GetStrValue +GetStrValueAt +GetStyle +GetStyleName +getStyleSheets +getStyleSheetType +GetSubCode +GetSubGroupState +GetSubItem +GetSubItemCount +GetSubItemImage +GetSubMenu +GetSubMenuControlClass +GetSubViewCount +GetSubViewIdentifier +GetSubViewIndex +GetSymbolClassText +GetSymbolCountHRCRESULT +GetSymbolDocumentation +GetSymbolFileName +GetSymbolIsAbstract +GetSymbolIsReadWrite +GetSymbolList +GetSymbolsHRCRESULT +GetSymbolText +GetSymbolTypeText +GetSyncMode +GetSyntaxHighlight +GetSyntaxHighlighter +GetSyntaxHighlightTypes +GetSysColor +GetSysColorBrush +GetSystemDefaultLangID +GetSystemDefaultLCID +GetSystemDirectory +GetSystemDirectoryA +GetSystemDirectoryW +GetSystemID +GetSystemInfo +GetSystemMenu +GetSystemMetrics +GetSystemPaletteEntries +GetSystemPaletteUse +GetSystemPowerStatus +GetSystemTime +GetSystemTimeAdjustment +GetSystemTimeAsFileTime +GetTab +GetTabbedTextExtent +GetTabbedTextExtentA +GetTabbedTextExtentW +GetTabCount +GetTabIndex +GetTableConstraint +GetTableDesc +GetTableDirect +GetTableLevel +GetTableNameFromQuery +GetTableNameFromSQL +GetTableNames +GetTableType +GetTableTypeName +GetTabName +GetTabOrder +GetTabOrderList +GetTabs +GetTabStops +GetTag +getTagName +GetTapeParameters +GetTapePosition +GetTapeStatus +getTarget +GetTargetAt +GetTargetName +GetTargetNamespace +GetTargetNSPrefix +GetTColorProp +GetTDateTimeProp +GetTempFileName +GetTempFileNameA +GetTempFileNameW +GetTemplate +GetTemplateCharSet +GetTemplateDirectory +GetTemplateFormat +GetTemplateType +GetTempPath +GetTempPathA +GetTempPathW +GetTerminated +GetText +GetTextAlign +GetTextBaseline +GetTextBuf +GetTextCharacterExtra +GetTextCharset +GetTextCharsetInfo +GetTextColor +getTextContent +GetTextExtentExPoint +GetTextExtentExPointA +GetTextExtentExPointI +GetTextExtentExPointW +GetTextExtentPoint +GetTextExtentPoint32 +GetTextExtentPoint32A +GetTextExtentPoint32W +GetTextExtentPointA +GetTextExtentPointI +GetTextExtentPointW +GetTextFace +GetTextFaceA +GetTextFaceW +GetTextHeight +GetTextItem +GetTextLen +GetTextMargins +GetTextMetrics +GetTextMetricsA +GetTextMetricsW +GetTextStart +GetTextStr +GetTextWStr +GetTFontProp +GetTheme +GetThemesEnabled +GetTheta +GetThisModuleHandle +GetThread +GetThreadAffinity +GetThreadCacheSize +GetThreadContext +GetThreadCount +GetThreadDesktop +GetThreadLocale +GetThreadPriority +GetThreadPriorityBoost +GetThreadSelectorEntry +GetThreadTimes +GetThumbLength +GetTickCount +GetTime +GetTimeFormat +GetTimeFormatA +GetTimeFormatW +GetTimeOfLastChange +GetTimer +GetTimerCount +GetTimestampForLoadedLibrary +GetTimeZoneInformation +GetTipUrl +GetTitle +GetTitleBarInfo +GetTokenInformation +GetTOleEnumProp +GetToolBar +GetToolTip +GetTop +GetTopBuffer +GetTopIndex +GetTopItem +GetTopMostWindows +GetTopParentHandle +GetTopPos +GetTopRow +GetTopView +GetTopWindow +GetTotalDigits +GetTPictureProp +GetTraceFlags +GetTrackLength +GetTrackPosition +GetTracks +GetTransaction +GetTransactionId +GetTransactionInfo +GetTransactionObject +GetTranslatorDescription +GetTransparent +GetTree +GetTreeView +GetTrimmedEventName +GetTrusteeForm +GetTrusteeFormA +GetTrusteeFormW +GetTrusteeName +GetTrusteeNameA +GetTrusteeNameW +GetTrusteeType +GetTrusteeTypeA +GetTrusteeTypeW +GetTStringsProperty +GetType +GetTypeAttr +GetTypeComp +GetTypeData +GetTypeFlags +GetTypeInfo +GetTypeInfoCount +GetTypeInfoOfGuid +GetTypeInfoType +GetTypeKind +GetTypeLib +GetTypeLibEditor +GetTypeLibName +GetTypeLibrary +GetTypeName +GetTypeSize +GetUIObjectOf +GetUltimateOwner +GetUndoAfterSave +GetUndoLimit +GetUnitCount +GetUnitName +GetUniversalName +GetUnmarshalClass +GetUnnamed +GetUnusedColor +GetUnwinder +GetUpdateCount +GetUpdated +GetUpdateOptions +GetUpdateRecordSet +GetUpdateRect +GetUpdateRgn +GetUpdatesPending +GetURL +GetUrlCacheEntryInfo +GetUrlCacheEntryInfoA +GetUrlCacheEntryInfoEx +GetUrlCacheEntryInfoExA +GetUrlCacheEntryInfoExW +GetUrlCacheEntryInfoW +GetUrlPolicyPermissions +GetUsage +GetUse +GetUseBriefCursorShapes +GetUseBriefRegularExpressions +GetUseDefaultTopic +GetUserClassID +GetUserDefaultLangID +GetUserDefaultLCID +GetUserName +GetUserNameA +GetUserNameW +GetUserObjectInformation +GetUserObjectInformationA +GetUserObjectInformationW +GetUserObjectSecurity +GetUserType +GetUseTabCharacter +GetUtilInterface +GetValidBreakpointLine +GetValidProjectDependencies +GetValue +GetValueAndMultiplyOrder +GetValueFromIndex +GetValueList +GetValueNames +GetValues +GetValueString +GetValueW +GetVarCustData +GetVarDataArrayInfo +GetVarDesc +GetVariantManager +GetVariantPointer +GetVariantProp +GetVariantStr +GetVariantType +GetVarIndexOfMemId +GetVarValue +GetVarValueAt +GetVCLFrameForm +GetVcsCount +GetVcsList +GetVcsName +GetVendors +GetVerb +GetVerbCount +GetVerify +GetVersion +GetVersionEx +GetVersionExA +GetVersionExW +GetVersionPenWin +GetView +GetViewCount +GetViewerName +GetViewerSymbolFlags +GetViewerVisibilityFlags +GetViewInfo +GetViewOrigin +GetViewportExtEx +GetViewportOrgEx +GetViewSize +GetViewStateStream +GetVisible +GetVisibleColCount +GetVisibleData +GetVisibleDockClientCount +GetVisibleNode +GetVisibleParent +GetVisibleRowCount +GetVisualValue +GetVolumeInformation +GetVolumeInformationA +GetVolumeInformationW +GetWaitEvent +GetWallpaper +GetWallpaperOptions +GetWasImported +GetWEventRef +GetWhitespace +GetWholeFile +GetWideActiveName +GetWideActiveValue +getWideChars +GetWideGroup +GetWideHint +GetWideItem +GetWideStringProp +GetWideStrProp +GetWideStrPropAsLongStr +GetWideStrValue +GetWideStrValueAt +GetWideText +GetWidth +GetWindow +GetWindowContext +GetWindowContextHelpId +GetWindowDC +GetWindowExtEx +GetWindowHandle +GetWindowInfo +GetWindowLong +GetWindowLongA +GetWindowLongW +GetWindowModuleFileName +GetWindowModuleFileNameA +GetWindowModuleFileNameW +GetWindowOrgEx +GetWindowPlacement +GetWindowRect +GetWindowRgn +GetWindowsDirectory +GetWindowsDirectoryA +GetWindowsDirectoryW +GetWindowState +GetWindowSubclass +GetWindowTask +GetWindowText +GetWindowTextA +GetWindowTextLength +GetWindowTextLengthA +GetWindowTextLengthW +GetWindowTextW +GetWindowThreadProcessId +GetWindowWord +GetWinMetaFileBits +GetWordBoolProp +GetWordBoundary +GetWordlistCoercionHRC +GetWordlistHRC +GetWordProp +GetWorkAreaHeight +GetWorkAreaLeft +GetWorkAreaRect +GetWorkAreaTop +GetWorkAreaWidth +GetWorkingDirectory +GetWorldTransform +GetWrapper +GetXML +GetXMLData +GetXMLDOMNode +getXmlHandler +GetXMLMode +GetXMLSchema +GetYValue +GetZoneActionPolicy +GetZoneActionPolicyEx +GetZoneAt +GetZoneAttributes +GetZoneCustomPolicy +GetZoneMappings +gg +Ghosted +GiveFeedback +glAccum +glAlphaFunc +glBegin +glBitmap +glBlendFunc +glCallList +glCallLists +glClear +glClearAccum +glClearColor +glClearDepth +glClearIndex +glClearStencil +glClipPlane +glColor +glColor3 +glColor3b +glColor3bv +glColor3d +glColor3dv +glColor3f +glColor3fv +glColor3i +glColor3iv +glColor3s +glColor3sv +glColor3ub +glColor3ubv +glColor3ui +glColor3uiv +glColor3us +glColor3usv +glColor4 +glColor4b +glColor4bv +glColor4d +glColor4dv +glColor4f +glColor4fv +glColor4i +glColor4iv +glColor4s +glColor4sv +glColor4ub +glColor4ubv +glColor4ui +glColor4uiv +glColor4us +glColor4usv +glColorMask +glColorMaterial +glCopyPixels +glCullFace +glDeleteLists +glDepthFunc +glDepthMask +glDepthRange +glDisable +glDrawBuffer +glDrawPixels +glEdgeFlag +glEdgeFlagv +glEnable +glEnd +glEndList +glEvalCoord +glEvalCoord1 +glEvalCoord1d +glEvalCoord1dv +glEvalCoord1f +glEvalCoord1fv +glEvalCoord2 +glEvalCoord2d +glEvalCoord2dv +glEvalCoord2f +glEvalCoord2fv +glEvalMesh +glEvalMesh1 +glEvalMesh2 +glEvalPoint +glEvalPoint1 +glEvalPoint2 +glFeedbackBuffer +glFinish +glFlush +glFog +glFogf +glFogfv +glFogi +glFogiv +glFrontFace +glFrustum +glGenLists +glGetBooleanv +glGetClipPlane +glGetDoublev +glGetError +glGetFloatv +glGetIntegerv +glGetLight +glGetLightfv +glGetLightiv +glGetMap +glGetMapdv +glGetMapfv +glGetMapiv +glGetMaterial +glGetMaterialfv +glGetMaterialiv +glGetPixelMap +glGetPixelMapfv +glGetPixelMapuiv +glGetPixelMapusv +glGetPolygonStipple +glGetString +glGetTexEnv +glGetTexEnvfv +glGetTexEnviv +glGetTexGen +glGetTexGendv +glGetTexGenfv +glGetTexGeniv +glGetTexImage +glGetTexLevelParameter +glGetTexLevelParameterfv +glGetTexLevelParameteriv +glGetTexParameter +glGetTexParameterfv +glGetTexParameteriv +glHint +glIndex +glIndexd +glIndexdv +glIndexf +glIndexfv +glIndexi +glIndexiv +glIndexMask +glIndexs +glIndexsv +glInitNames +glIsEnabled +glIsList +glLight +glLightf +glLightfv +glLighti +glLightiv +glLightModel +glLightModelf +glLightModelfv +glLightModeli +glLightModeliv +glLineStipple +glLineWidth +glListBase +glLoadIdentity +glLoadMatrix +glLoadMatrixd +glLoadMatrixf +glLoadName +glLogicOp +glMap +glMap1d +glMap1f +glMap2d +glMap2f +glMapGrid +glMapGrid1d +glMapGrid1f +glMapGrid2d +glMapGrid2f +glMaterial +glMaterialf +glMaterialfv +glMateriali +glMaterialiv +glMatrixMode +glMultMatrix +glMultMatrixd +glMultMatrixf +glNewList +glNormal +glNormal3 +glNormal3b +glNormal3bv +glNormal3d +glNormal3dv +glNormal3f +glNormal3fv +glNormal3i +glNormal3iv +glNormal3s +glNormal3sv +GlobalAddAtom +GlobalAddAtomA +GlobalAddAtomW +GlobalAlloc +GlobalAllocPtr +GlobalCollection +GlobalCompact +GlobalDeleteAtom +GlobalDiscard +GlobalFindAtom +GlobalFindAtomA +GlobalFindAtomW +GlobalFix +GlobalFixupReferences +GlobalFlags +GlobalFree +GlobalFreePtr +GlobalGetAtomName +GlobalGetAtomNameA +GlobalGetAtomNameW +GlobalHandle +GlobalLock +GlobalLRUNewest +GlobalLRUOldest +GlobalMemoryStatus +GlobalReAlloc +GlobalReAllocPtr +GlobalSize +GlobalUnfix +GlobalUnlock +GlobalUnWire +GlobalWire +glOrtho +glPassThrough +glPixelMap +glPixelMapfv +glPixelMapuiv +glPixelMapusv +glPixelStore +glPixelStoref +glPixelStorei +glPixelTransfer +glPixelTransferf +glPixelTransferi +glPixelZoom +glPointSize +glPolygonMode +glPolygonStipple +glPopAttrib +glPopMatrix +glPopName +glPushAttrib +glPushMatrix +glPushName +glRasterPos +glRasterPos2 +glRasterPos2d +glRasterPos2dv +glRasterPos2f +glRasterPos2fv +glRasterPos2i +glRasterPos2iv +glRasterPos2s +glRasterPos2sv +glRasterPos3 +glRasterPos3d +glRasterPos3dv +glRasterPos3f +glRasterPos3fv +glRasterPos3i +glRasterPos3iv +glRasterPos3s +glRasterPos3sv +glRasterPos4 +glRasterPos4d +glRasterPos4dv +glRasterPos4f +glRasterPos4fv +glRasterPos4i +glRasterPos4iv +glRasterPos4s +glRasterPos4sv +glReadBuffer +glReadPixels +glRect +glRectd +glRectdv +glRectf +glRectfv +glRecti +glRectiv +glRects +glRectsv +glRenderMode +glRotate +glRotated +glRotatef +glScale +glScaled +glScalef +glScissor +glSelectBuffer +glShadeModel +glStencilFunc +glStencilMask +glStencilOp +glTexCoord +glTexCoord1 +glTexCoord1d +glTexCoord1dv +glTexCoord1f +glTexCoord1fv +glTexCoord1i +glTexCoord1iv +glTexCoord1s +glTexCoord1sv +glTexCoord2 +glTexCoord2d +glTexCoord2dv +glTexCoord2f +glTexCoord2fv +glTexCoord2i +glTexCoord2iv +glTexCoord2s +glTexCoord2sv +glTexCoord3 +glTexCoord3d +glTexCoord3dv +glTexCoord3f +glTexCoord3fv +glTexCoord3i +glTexCoord3iv +glTexCoord3s +glTexCoord3sv +glTexCoord4 +glTexCoord4d +glTexCoord4dv +glTexCoord4f +glTexCoord4fv +glTexCoord4i +glTexCoord4iv +glTexCoord4s +glTexCoord4sv +glTexEnv +glTexEnvf +glTexEnvfv +glTexEnvi +glTexEnviv +glTexGen +glTexGend +glTexGendv +glTexGenf +glTexGenfv +glTexGeni +glTexGeniv +glTexImage1D +glTexImage2D +glTexParameter +glTexParameterf +glTexParameterfv +glTexParameteri +glTexParameteriv +glTranslate +glTranslated +glTranslatef +gluBeginCurve +gluBeginSurface +gluBeginTrim +gluBuild1DMipmaps +gluBuild2DMipmaps +gluCylinder +gluDeleteNurbsRenderer +gluDeleteQuadric +gluDeleteTess +gluDisk +gluEndCurve +gluEndSurface +gluEndTrim +gluErrorString +gluErrorUnicodeStringEXT +gluGetNurbsProperty +gluGetString +gluLoadSamplingMatrices +gluLookAt +gluNewNurbsRenderer +gluNewQuadric +gluNewTess +gluNurbsCallback +gluNurbsCurve +gluNurbsProperty +gluNurbsSurface +gluOrtho2D +gluPartialDisk +gluPerspective +gluPickMatrix +gluProject +gluPwlCurve +gluQuadricCallback +gluQuadricDrawStyle +gluQuadricNormals +gluQuadricOrientation +gluQuadricTexture +gluScaleImage +gluSphere +gluTessBeginContour +gluTessBeginPolygon +gluTessCallback +gluTessEndContour +gluTessEndPolygon +gluTessNormal +gluTessProperty +gluTessVertex +gluUnProject +glVertex +glVertex2 +glVertex2d +glVertex2dv +glVertex2f +glVertex2fv +glVertex2i +glVertex2iv +glVertex2s +glVertex2sv +glVertex3 +glVertex3d +glVertex3dv +glVertex3f +glVertex3fv +glVertex3i +glVertex3iv +glVertex3s +glVertex3sv +glVertex4 +glVertex4d +glVertex4dv +glVertex4f +glVertex4fv +glVertex4i +glVertex4iv +glVertex4s +glVertex4sv +glViewport +GlyphChanged +gnoring +GopherCreateLocator +GopherCreateLocatorA +GopherCreateLocatorW +GopherFindFirstFile +GopherFindFirstFileA +GopherFindFirstFileW +GopherGetAttribute +GopherGetAttributeA +GopherGetAttributeW +GopherGetLocatorType +GopherGetLocatorTypeA +GopherGetLocatorTypeW +GopherOpenFile +GopherOpenFileA +GopherOpenFileW +goto +GotoBookmark +GotoCurrent +GotoDefinition +GotoKey +GotoLine +GotoNearest +GotoSource +GotoXY +GPLInfected +GradientDrawButton +GradientDrawToolBar +GradientFill +GradientFillCanvas +GradToCycle +GradToDeg +GradToRad +Graphics +GraphUtil +GrayString +GrayStringA +GrayStringW +GridClick +GridRect +GridRectToScreenRect +Grids +Group +GroupDescendentsWith +GroupedWith +GroupWith +Grow +GuidelinesFor +GUIDToString +HandleActivation +HandleAddType +HandleAllocated +HandleConversionException +HandleCopy +HandleCreateException +HandleCut +HandleDelete +HandleError +HandleEvent +HandleException +HandleFreeNotify +HandleInComingCall +HandleMenuMsg +HandleMenuMsg2 +HandleMessage +HandleNeeded +HandlePaste +HandleRename +handles +HandleSafeCallException +HandleSelectAll +HandlesFile +HandleShortCut +HandlesStream +HandlesTarget +HandleUndo +HandleUpdateError +HandsOffStorage +has +HasAggs +HasAnnotation +HasAPicture +HasAppInfo +HasAsParent +HasAttribute +hasAttributeNS +HasBackground +HasChildDefs +HasChildNode +hasChildNodes +HasChildren +HasCoClasses +HasConstraints +HasCurValues +HasDocumentation +HasDropDownButton +hasEntRef +HasExtendCharacter +hasFeature +HasFocusIO +HasFormat +HasGlyph +Hash +HashData +HashIndex +HashOf +HasInstance +HasItems +HasLinkedActionLists +HasMachineLicense +HasMergeConflicts +HasObjects +HasParent +HasPickList +HasPopup +HasSelectedText +HasSubKeys +HasTransparentParts +HasUTF8BOM +HasVisibleItems +HasVisibleParent +HaveGraphic +HaveWrapper +Head +Header_ClearAllFilters +Header_ClearFilter +Header_CreateDragImage +Header_DeleteItem +Header_EditFilter +Header_GetBitmapMargin +Header_GetFocusedItem +Header_GetImageList +Header_GetItem +Header_GetItemA +Header_GetItemCount +Header_GetItemDropDownRect +Header_GetItemRect +Header_GetItemW +Header_GetOrderArray +Header_GetOverflowRect +Header_GetUnicodeFormat +Header_InsertItem +Header_InsertItemA +Header_InsertItemW +Header_Layout +Header_OrderToIndex +Header_SetBitmapMargin +Header_SetFilterChangeTimeout +Header_SetFocusedItem +Header_SetHotDivider +Header_SetImageList +Header_SetItem +Header_SetItemA +Header_SetItemW +Header_SetOrderArray +Header_SetUnicodeFormat +HeaderWndProc +HeapAddRef +HeapAlloc +HeapCompact +HeapCreate +HeapDestroy +HeapFree +HeapLock +HeapMinimize +HeapReAlloc +HeapRelease +HeapSize +HeapUnlock +HeapValidate +HeapWalk +Help +HelpBtnClick +HelpButtonClick +HelpClick +HelpCommand +HelpContext +HelpFile +HelpIntfs +HelpJump +HelpKeyword +HelpShowTableOfContents +HeuristicDecision +HexByte +HexChar +HexToBin +HexToBinary +HiByte +Hidden +Hide +HideCaret +HideCurrentDockClient +HideDragImage +HideEdit +HideEditor +HideHint +HideItem +HideShadow +HideUnusedItems +HideWindow +HideZone +HighlightCell +HighVideo +HiliteMenuItem +HIMAGELIST_QueryInterface +HimetricToPixels +Hint +HintGetMsgHook +HintMouseMessage +HintMouseThread +HintsChanged +HintShow +HintTimerExpired +HintTimerProc +HitTest +HitTest2 +HitTestPenData +HiWord +HlinkGoBack +HlinkGoForward +HlinkNavigateMoniker +HlinkNavigateString +HlinkSimpleNavigateToMoniker +HlinkSimpleNavigateToString +HoldClerk +HomeEndKeys +Hook +HookControlWndProc +HookExceptions +HookHintHooks +HookMainWindow +HookOSExceptions +HookSignal +HookSynchronizeWakeup +HotImageListChange +HotKeyToShortCut +HourOf +HourOfTheDay +HourOfTheMonth +HourOfTheWeek +HourOfTheYear +HoursBetween +HourSpan +HpcmFromWpLp +hreadFunc +HResult +HResultCode +HResultFacility +HResultFromNT +HResultFromWin32 +HResultSeverity +HSE_REQ_TRANSMIT_FILE +hSession +HTMLEncode +HtmlHelp +HtmlHelpA +HTMLHelpViewer +HtmlHelpW +htonl +htons +HtrgFromHwnd +http_dump822 +http_find_request +http_finish_request +http_handle_session +http_hdrs2env +http_parse_request +http_scan_headers +http_set_finfo +http_set_keepalive_timeout +http_start_response +http_status +http_uri2url +http_uri2url_dynamic +HttpAddRequestHeaders +HttpAddRequestHeadersA +HttpAddRequestHeadersW +HttpEndRequest +HttpEndRequestA +HttpEndRequestW +HttpExtensionProc +HTTPIntr +HttpOpenRequest +HttpOpenRequestA +HttpOpenRequestW +HttpQueryInfo +HttpQueryInfoA +HttpQueryInfoW +HttpSendRequest +HttpSendRequestA +HttpSendRequestEx +HttpSendRequestExA +HttpSendRequestExW +HttpSendRequestW +HueToRGB +HwndFromHtrg +HwndMSWheel +Hypot +iClientData +ICOMAdminCatalog_Connect +IComponentGuidelines +IconChanged +IconFontChanged +iconv +iconv_close +iconv_open +IdentToCursor +IdentToInt +idl +Idle +IdleTimerProc +idlParent +IE4Installed +ield +if +IfHotkeyAvailable +IfThen +IgnoreStream +IIDFromString +IInterface +IInterfaceComponentReference +ImageAddCertificate +ImageDirectoryEntryToData +ImageEnumerateCertificates +ImageGetCertificateData +ImageGetCertificateHeader +ImageGetDigestStream +ImageHlp +ImagehlpApiVersion +ImagehlpApiVersionEx +ImageList_Add +ImageList_AddIcon +ImageList_AddMasked +ImageList_BeginDrag +ImageList_Copy +ImageList_Create +ImageList_Destroy +ImageList_DragEnter +ImageList_DragLeave +ImageList_DragMove +ImageList_DragShowNolock +ImageList_Draw +ImageList_DrawEx +ImageList_DrawIndirect +ImageList_Duplicate +ImageList_EndDrag +ImageList_ExtractIcon +ImageList_GetBkColor +ImageList_GetDragImage +ImageList_GetIcon +ImageList_GetIconSize +ImageList_GetImageCount +ImageList_GetImageInfo +ImageList_LoadBitmap +ImageList_LoadBitmapA +ImageList_LoadBitmapW +ImageList_LoadImage +ImageList_LoadImageA +ImageList_LoadImageW +ImageList_Merge +ImageList_Read +ImageList_ReadEx +ImageList_Remove +ImageList_RemoveAll +ImageList_Replace +ImageList_ReplaceIcon +ImageList_SetBkColor +ImageList_SetDragCursorImage +ImageList_SetIconSize +ImageList_SetImageCount +ImageList_SetOverlayImage +ImageList_Write +ImageList_WriteEx +ImageListChange +ImageLoad +ImageNtHeader +ImagePaintBoxPaint +ImageRemoveCertificate +ImageRvaToSection +ImageRvaToVa +ImageUnload +Imc +ImgList +iml +Imm +Imm32GetCompositionString +Imm32GetContext +Imm32GetConversionStatus +Imm32IsIME +Imm32NotifyIME +Imm32ReleaseContext +Imm32SetCompositionFont +Imm32SetCompositionWindow +Imm32SetConversionStatus +Imm32SetOpenStatus +ImmAssociateContext +ImmConfigureIME +ImmConfigureIMEA +ImmConfigureIMEW +ImmCreateContext +ImmDestroyContext +ImmEnumRegisterWord +ImmEnumRegisterWordA +ImmEnumRegisterWordW +ImmEscape +ImmEscapeA +ImmEscapeW +ImmGetCandidateList +ImmGetCandidateListA +ImmGetCandidateListCount +ImmGetCandidateListCountA +ImmGetCandidateListCountW +ImmGetCandidateListW +ImmGetCandidateWindow +ImmGetCompositionFont +ImmGetCompositionFontA +ImmGetCompositionFontW +ImmGetCompositionString +ImmGetCompositionStringA +ImmGetCompositionStringW +ImmGetCompositionWindow +ImmGetContext +ImmGetConversionList +ImmGetConversionListA +ImmGetConversionListW +ImmGetConversionStatus +ImmGetDefaultIMEWnd +ImmGetDescription +ImmGetDescriptionA +ImmGetDescriptionW +ImmGetGuideLine +ImmGetGuideLineA +ImmGetGuideLineW +ImmGetIMEFileName +ImmGetIMEFileNameA +ImmGetIMEFileNameW +ImmGetOpenStatus +ImmGetProperty +ImmGetRegisterWordStyle +ImmGetRegisterWordStyleA +ImmGetRegisterWordStyleW +ImmGetStatusWindowPos +ImmGetVirtualKey +ImmInstallIME +ImmInstallIMEA +ImmInstallIMEW +ImmIsIME +ImmIsUIMessage +ImmIsUIMessageA +ImmIsUIMessageW +ImmNotifyIME +ImmRegisterWord +ImmRegisterWordA +ImmRegisterWordW +ImmReleaseContext +ImmSetCandidateWindow +ImmSetCompositionFont +ImmSetCompositionFontA +ImmSetCompositionFontW +ImmSetCompositionString +ImmSetCompositionStringA +ImmSetCompositionStringW +ImmSetCompositionWindow +ImmSetConversionStatus +ImmSetOpenStatus +ImmSetStatusWindowPos +ImmSimulateHotKey +ImmUnregisterWord +ImmUnregisterWordA +ImmUnregisterWordW +imouse +ImpersonateDdeClientWindow +ImpersonateLoggedOnUser +ImpersonateNamedPipeClient +ImpersonateSelf +implementation +ImportComponent +importNode +in +IncAMonth +IncBufSize +IncDay +IncHour +includeAsPE +IncludeIndexInCaption +includeInLiteral +IncludeItem +IncludeObject +Includes +IncludeTrailingBackslash +IncludeTrailingPathDelimiter +IncMilliSecond +IncMinute +IncMonth +IncrementalSearch +IncSecond +IncStrProp +IncWeek +IncYear +Indent +Index +IndexDefsStored +IndexFieldOfs +IndexListChange +IndexOf +IndexOfButtonAt +IndexOfData +IndexOfDockClient +IndexOfItem +IndexOfLine +IndexOfName +IndexOfObject +IndexOfProcessModule +IndexOfShortCut +IndexOfTabAt +IndexStr +IndexText +IndexToAction +IndexToOverlayMask +IndexToStateImageMask +Indoubt +indow +inet_addr +inet_ntoa +inflate +inflate_blocks +inflate_blocks_free +inflate_blocks_new +inflate_blocks_reset +inflate_codes +inflate_codes_free +inflate_codes_new +inflate_fast +inflate_flush +inflate_set_dictionary +inflate_trees_bits +inflate_trees_dynamic +inflate_trees_fixed +inflate_trees_free +inflateEnd +inflateInit_ +InflateRect +inflateReset +InfoMessage +InGroup +inherited +InheritsFrom +IniFiles +Init +Init_Sequential +InitAlphaBlending +InitAltRecBuffers +InitAnApi +InitApplication +InitAtomTable +InitAutomation +InitBinding +InitBitmap +InitBitmaps +InitBlockMarking +InitBufferPointers +InitButtons +InitCache +InitCharNextWFunc +InitComCtl +InitCommonControl +InitCommonControls +InitCommonControlsEx +InitComObj +InitComponentRes +InitComServer +InitConnection +InitControlData +InitControlInterface +InitControls +InitCtl3D +InitCursor +InitData +InitDBTables +InitDefaults +InitDelta +InitDesignNotification +initDoc +initDocNS +InitErrorPacket +InitFieldDefs +InitFieldDefsFromFields +InitFieldDescriptors +InitFieldProc +InitFields +InitFlatSB +InitFormat +InitFromData +InitFromResources +InitGlobals +InitHints +initialization +Initialize +InitializeAcl +InitializeBDE +InitializeBitmapInfoHeader +InitializeConflictBuffer +InitializeConnection +InitializeCriticalSection +InitializeCriticalSectionAndSpinCount +InitializeFlatSB +InitializeFromBitmap +InitializeFromWindow +InitializeMasterFields +InitializeMenu +InitializePackage +InitializeProcessForWsWatch +InitializeRecordset +InitializeSecurityDescriptor +InitializeSid +InitializeVarUtils +InitiateAction +InitiateActions +InitiateSystemShutdown +InitiateSystemShutdownA +InitiateSystemShutdownW +InitIMM32 +InitIndexDescriptors +InitInfoStruct +InitInheritedComponent +InitInstance +InitKeyBuffer +InitKeyFields +InitLibrary +InitMapi +InitMaskStates +InitMemoryManager +InitMenu +InitMenuItems +InitMenuLoop +InitMMHandle +InitMultiMonStubs +InitNew +InitObject +InitOleDBAccess +InitPara +InitParameters +InitParserAgent +InitParserLanguage +InitPopupMenu +InitProc +InitProcs +InitPutProcs +InitRecord +InitServerData +InitShlObj +InitSocket +InitStdConvs +InitTableSettings +InitThemeLibrary +InitThreadSynchronization +InitTreeData +InitUnits +InitUnwinder +InitURLMon +InitValChecks +inline +InMTSTransaction +inOpArray +inOpSet +InOutError +InPlaceDeactivate +InputBox +InputChar +InputOptionsClick +InputQuery +InputReqCallBack +InputRequest +InputString +InquireSignal +InRange +InSelection +InSendMessage +InSendMessageEx +Insert +InsertBefore +InsertBlock +InsertButton +InsertCharacter +insertChildrenContent +InsertCode +InsertCodeByShortcut +InsertCompilerOptions +InsertComponent +InsertControl +InsertCursor +insertData +InsertFile +InsertHotkeyFarEastFormat +InsertIcon +InsertImage +InsertInCollection +InsertItem +InsertLine +InsertMasked +InsertMenu +InsertMenuA +InsertMenuItem +InsertMenuItemA +InsertMenuItemW +InsertMenus +InsertMenusSB +InsertMenuW +insertMixedContent +InsertNewGUID +InsertNewLine +InsertNewLineAfter +InsertNewLineBefore +InsertNode +insertNotationOrEnumerationContent +InsertObject +InsertObjectDialog +InsertOK +InsertPage +InsertPenData +InsertPenDataPoints +InsertPenDataStroke +InsertRecord +InsertRow +InsertServerConv +InsertTab +InsertText +InsertWideCharacter +InsLine +InspectAtCursor +inst +InstallApplication +InstallComponent +InstallEventClass +Installing +InstallMultipleComponents +InstallMultipleEventClasses +InstallRecognizer +InstallService +Instance +InstanceSize +InstanceToVariant +Int +Int16ToBytes +Int32ToBytes +Int64Compare +Int64Op +Int64ToBytes +IntCompare +intDtdMemoryToDom +intDtdSourceCodeToDom +intDtdStreamToDom +intDtdStringToDom +intDtdWideStringToDom +Integer +IntegerExit +IntegerToBcd +InterceptIncoming +InterceptOutgoing +InterestPayment +InterestRate +interface +InterfaceConnect +InterfaceDerivesFrom +InterfaceDisconnect +InterfaceInheritsFrom +InterfaceSupportsErrorInfo +InterlockedCompareExchange +InterlockedDecrement +InterlockedExchange +InterlockedExchangeAdd +InterlockedIncrement +InternalAdd +InternalAddAlias +InternalAddChild +InternalAddRecord +InternalAnsiStrLComp +InternalApplyUpdates +InternalBeforeResolve +InternalButtonCount +InternalCancel +InternalCaptionHitTest +InternalClose +InternalCoWaitForMultipleHandles +InternalCreate +InternalCreateObject +InternalDecodeDate +InternalDelete +InternalDeleteAlias +InternalDoUpdate +InternalEdit +InternalExecute +InternalFetch +InternalFirst +InternalGetDesignerGuideOffset +InternalGetDIB +InternalGetDIBSizes +InternalGetGroupState +InternalGetInstRes +InternalGetItemData +InternalGetOptionalParam +InternalGetParams +InternalGetRecord +InternalGetRecords +InternalGotoBookmark +InternalHandleException +InternalInitFieldDefs +InternalInitRecord +InternalInsert +InternalLast +InternalLayout +InternalMove +InternalOpen +InternalPost +InternalRateOfReturn +InternalRefresh +InternalRemove +InternalRequery +InternalRestore +InternalRethinkHotkeys +InternalRethinkLines +InternalRowRequest +InternalSetItemData +InternalSetLocation +InternalSetMultiLine +InternalSetOptionalParam +InternalSetPrologValue +InternalSetSort +InternalSetToRecord +InternalShutDown +InternalUniqueString +InternalUpdateRecord +InternetAttemptConnect +InternetAuthNotifyCallback +InternetAutodial +InternetAutodialHangup +InternetCanonicalizeUrl +InternetCanonicalizeUrlA +InternetCanonicalizeUrlW +InternetCheckConnection +InternetCheckConnectionA +InternetCheckConnectionW +InternetCloseHandle +InternetCombineUrl +InternetCombineUrlA +InternetCombineUrlW +InternetConfirmZoneCrossing +InternetConnect +InternetConnectA +InternetConnectW +InternetCrackUrl +InternetCrackUrlA +InternetCrackUrlW +InternetCreateUrl +InternetCreateUrlA +InternetCreateUrlW +InternetDial +InternetErrorDlg +InternetFindNextFile +InternetFindNextFileA +InternetFindNextFileW +InternetGetConnectedState +InternetGetCookie +InternetGetCookieA +InternetGetCookieW +InternetGetLastResponseInfo +InternetGetLastResponseInfoA +InternetGetLastResponseInfoW +InternetGoOnline +InternetHangUp +InternetLockRequestFile +InternetOpen +InternetOpenA +InternetOpenUrl +InternetOpenUrlA +InternetOpenUrlW +InternetOpenW +InternetQueryDataAvailable +InternetQueryOption +InternetQueryOptionA +InternetQueryOptionW +InternetReadFile +InternetReadFileEx +InternetReadFileExA +InternetReadFileExW +InternetSetCookie +InternetSetCookieA +InternetSetCookieW +InternetSetDialState +InternetSetFilePointer +InternetSetOption +InternetSetOptionA +InternetSetOptionEx +InternetSetOptionExA +InternetSetOptionExW +InternetSetOptionW +InternetSetStatusCallback +InternetTimeFromSystemTime +InternetUnlockRequestFile +InternetWriteFile +InterpretData +InterpreterAction +Intersect +IntersectClipRect +IntersectRect +IntersectsControl +IntfGetComponent +IntlStrEqN +IntlStrEqNA +IntlStrEqNW +IntlStrEqWorker +IntlStrEqWorkerA +IntlStrEqWorkerW +IntOp +IntPower +Intr +IntToHex +IntToIdent +IntToStr +Invalidate +InvalidateCell +InvalidateCheck +InvalidateCol +InvalidateControlsUnderneath +InvalidateDockHostSite +InvalidateDockSite +InvalidateEditor +InvalidateFrame +InvalidateGrid +InvalidateModuleCache +InvalidateRect +InvalidateRgn +InvalidateRow +InvalidateSelectionsRects +InvalidateTitles +InvalidBcdString +InvalidBitmap +InvalidDateDayError +InvalidDateMonthWeekError +InvalidDateTimeError +InvalidDateWeekError +InvalidDayOfWeekInMonthError +InvalidGraphic +InvalidGUID +InvalidIcon +InvalidMask +InvalidMetafile +InvalidOp +InvalidOperation +InvalidPoint +Inverse +InvertRect +InvertRgn +Invoke +InvokeCodeCompletion +InvokeCommand +InvokeEvent +InvokeEx +InvokeHelp +InvokeLocalMenu +InvokeMethod +InvokeParameterCodeInsight +involves +ioctlsocket +IOleControlSite +IOleInPlaceFrame +IOleInPlaceSite +IOResult +IProviderSupport +IProviderSupport2 +is +IS_GOPHER_ASK +IS_GOPHER_BACKUP_SERVER +IS_GOPHER_DIRECTORY +IS_GOPHER_ERROR +IS_GOPHER_FILE +IS_GOPHER_INDEX_SERVER +IS_GOPHER_PHONE_SERVER +IS_GOPHER_PLUS +IS_GOPHER_TELNET_SESSION +IS_GOPHER_TN3270_SESSION +IS_GOPHER_TYPE_KNOWN +IsAbortResult +IsAccel +IsAccelChar +IsAccelerator +IsActionBarsStored +IsActionVisible +IsActiveControl +IsActiveLinked +IsAddressStored +IsAggRow +IsAlcBitAnsi +IsAlias +IsAlignmentStored +IsAltGRPressed +IsAnAllResult +isAncestor +IsAnonymous +Isapi +Isapi2 +IsAssembly +IsAsyncMoniker +IsAutoCheckLinked +IsAutoScrollStored +IsAutoSized +IsBackgroundDirty +IsBackgroundStored +IsBadCodePtr +IsBadHugeReadPtr +IsBadHugeWritePtr +IsBadReadPtr +IsBadStringPtr +IsBadStringPtrA +IsBadStringPtrW +IsBadWritePtr +IsBcdNegative +IsBcdZero +IsBiDiModeStored +IsBitmapStored +IsBlankSysTime +IsBlob +IsBuiltInType +IsBuiltInTypeName +IsBusyWindow +IsCallerInRole +IsCaptionLinked +IsCaptionStored +IsCategoryStored +IsCharAlpha +IsCharAlphaA +IsCharAlphaNumeric +IsCharAlphaNumericA +IsCharAlphaNumericW +IsCharAlphaW +IsCharLower +IsCharLowerA +IsCharLowerW +IsCharUpper +IsCharUpperA +IsCharUpperW +IsChecked +IsCheckedLinked +IsCheckedStored +IsChild +IsChildItem +IsClass +IsClassOfCategories +IsClassPooled +IsClear +IsClientConnected +IsClientSizeStored +IsClipboardFormatAvailable +IsCollectionItem +IsColorStored +IsColumnEmpty +IsComplex +IsComplexType +IsComPlusApp +IsComPlusPlatform +IsComponentHidden +IsComponentLinkable +IsComputerNameStored +IsConnected +IsContextChanging +IsControlActivateMsg +IsControlMouseMsg +IsCtl3DStored +IsCurItem +IsCursorOpen +IsCustom +IsCustomCaption +IsCustomDrawn +IsCustomProperty +IsDatabaseOpen +IsDBaseTable +IsDBCSLeadByte +IsDBCSLeadByteEx +IsDefaultDatabaseStored +IsDefaultInterfaceProp +IsDefaultMethodProp +IsDefaultPropertyValue +IsDefaultValue +IsDefaultVariantProp +IsDelimiter +IsDelphiHandle +IsDesignMsg +IsDialogMessage +IsDialogMessageA +IsDialogMessageW +IsDirectory +IsDirty +IsDisplayLabelStored +IsDisplayWidthStored +IsDlgButtonChecked +IsDlgMsg +IsDropdownMenuLinked +IsDupShortCut +IsDynArrayRectangular +IsEditing +IsEmpty +IsEmptyDoc +IsEmptyRow +IsEnabled +IsEnabledLinked +IsEnableDropdownLinked +IsEnabledStored +IsEncodingStored +IsEqual +IsEqualCLSID +IsEqualGUID +IsEqualIID +IsError +IsExpandable +IsFileBased +IsFileOpen +IsFilterStored +IsFirstNode +IsFontStored +IsForm +IsFormMDIChild +IsFormSizeStored +IsGlobal +IsGradientEndColorStored +IsGrouped +IsGroupIndexLinked +IsHashValCompatible +IsHelpContextLinked +IsHelpContextStored +IsHelpLinked +IsHintLinked +IsHintMsg +IsHintStored +IsHosted +IsHostStored +isHTTP +IsIconic +IsIconStored +IsIIDSupported +IsImageIndexLinked +IsImageIndexStored +IsImagesLinked +IsImeModeStored +IsImeNameStored +IsImplementorOf +IsIncrementStored +IsInfinite +IsInInlined +IsInitialChar +IsInLeapYear +IsInTransaction +IsItemsExStored +IsItemsStored +IsKatakana +IsKeyMsg +IsLeapYear +IsLine +IsLinkedActionListsStored +IsLinkedTo +IsLiteral +IsLiteralChar +IsLoggingEnabled +IsLoggingEnabledA +IsLoggingEnabledW +IsMaskStored +IsMDIMsg +IsMember +IsMemberOf +IsMemoryManagerSet +IsMenu +IsMenuKey +IsMouseButtonPressed +IsMultiTableQuery +IsName +IsNan +IsNegativeResult +IsNewQuery +IsNodeVisible +IsNumeric +Iso8859_10ToUTF16Char +Iso8859_10ToUTF16Str +Iso8859_13ToUTF16Char +Iso8859_13ToUTF16Str +Iso8859_14ToUTF16Char +Iso8859_14ToUTF16Str +Iso8859_15ToUTF16Char +Iso8859_15ToUTF16Str +Iso8859_1ToUTF16Char +Iso8859_1ToUTF16Str +Iso8859_2ToUTF16Char +Iso8859_2ToUTF16Str +Iso8859_3ToUTF16Char +Iso8859_3ToUTF16Str +Iso8859_4ToUTF16Char +Iso8859_4ToUTF16Str +Iso8859_5ToUTF16Char +Iso8859_5ToUTF16Str +Iso8859_6ToUTF16Char +Iso8859_6ToUTF16Str +Iso8859_7ToUTF16Char +Iso8859_7ToUTF16Str +Iso8859_8ToUTF16Char +Iso8859_8ToUTF16Str +Iso8859_9ToUTF16Char +Iso8859_9ToUTF16Str +IsObjectAccessAllowed +IsOnClickStored +IsOnExecuteLinked +IsOrientationSet +IsOurName +IsOwnedBy +IsOwnerDraw +IsPageDirty +IsParamStored +IsPathDelimiter +IsPenEvent +IsPM +IsPopupMenuLinked +IsPositiveResult +IsPrefixed +IsPreProcessMessage +IsPriorityScheduleStored +IsProcessorFeaturePresent +IsProductionIndex +IsProjectModule +IsPropertyInCategory +IsPropertyReadOnly +IsPropertyWriteOnly +IsPropPageProperty +IsProviderStored +IsPublishedProp +IsQualifyingSite +IsRangeStored +IsReadonly +IsReadOnlyStored +IsRectEmpty +IsRelative +IsRepeating +IsRightToLeft +IsRowEmpty +IsRowInChapter +IsRunning +IsSameDay +IsSchemaNamespace +IsScrollBarVisible +IsSecondaryShortCutsStored +IsSecurityEnabled +IsSelectionMessage +IsSequenced +IsServersStored +IsShortCut +IsShortCutLinked +IsShortCutStored +IsSiteChildOfClient +IsSourceReadOnly +IsSpacer +IsSQLTimeStampBlank +IsSqlTimeStampValid +IsStandardType +IsStoredProp +IsSystemMoniker +ist +IsTControl +IsTemporal +IsTextUnicode +IsToday +IsToolControl +IStreams +IsUnique +IsUniqueGlobalComponentName +IsUnwinderSet +IsUpToDate +IsURLStored +IsUserInRole +IsUTF16HighSurrogate +IsUTF16LowSurrogate +IsUTF8LeadByte +IsUTF8String +IsUTF8TrailByte +IsValid +IsValidAcl +IsValidChar +IsValidCodePage +IsValidDate +IsValidDateDay +IsValidDateMonthWeek +IsValidDateTime +IsValidDateWeek +isValidENTITY +IsValidIdent +isValidIDREF +IsValidLocale +IsValidSecurityDescriptor +IsValidSid +IsValidTime +IsValidURL +IsVariantManagerSet +IsViewerBrowsable +IsVisible +IsVisibleLinked +IsVisibleStored +IsWidthStored +IsWindow +IsWindowEnabled +IsWindowUnicode +IsWindowVisible +IsXBaseTable +IsXmlAttValue +IsXmlBaseChar +IsXmlCData +IsXmlChar +IsXmlCharData +IsXmlCharRef +IsXmlChars +IsXmlCombiningChar +IsXmlComment +IsXmlDefaultAttName +IsXmlDigit +IsXmlEncName +IsXmlEntityRef +IsXmlEntityValue +IsXmlExtender +IsXmlIdeographic +IsXmlLetter +IsXmlLocalPart +IsXmlName +IsXmlNameChar +IsXmlNames +IsXmlNCName +IsXmlNCNameChar +IsXmlNmtoken +IsXmlNmtokens +IsXmlNSAttName +IsXmlPEReference +IsXmlPITarget +IsXmlPrefix +IsXmlPrefixedAttName +IsXmlPubidChar +IsXmlPubidLiteral +IsXmlQName +IsXmlReference +IsXmlS +IsXMLStored +IsXmlStringType +IsXmlSystemLiteral +IsXmlTokenizedType +IsXmlVersionNum +IsXmlWhiteSpace +IsZero +IsZoomed +Item +ItemAdded +ItemAtPos +ItemChanged +ItemClass +ItemCount +ItemDeleted +ItemIndex +ItemInserted +ItemLocalName +ItemRect +ItemRemoved +Items +ItemsChange +ItemsEqual +ItemsModified +ItemWidth +Iterate +IterateClients +IterateMenus +ITransport +IUnknown +IWideProperty +IWideProperty10 +Ixedit +IXMLDOMDocument +ize +Join +JoinTransaction +joyGetDevCaps +joyGetDevCapsA +joyGetDevCapsW +joyGetNumDevs +joyGetPos +joyGetPosEx +joyGetThreshold +joyReleaseCapture +joySetCapture +joySetThreshold +JulianDateToDateTime +Keep +KelvinToCelsius +keybd_event +KeyboardStateToShiftState +KeyDataToShiftState +KeyDown +Keyed +KeyExists +KeyFieldsListDropDown +KeyIsValid +KeyPress +KeyPressed +KeysToShiftState +KeyUp +KeyValueChanged +KillMessage +KillTimer +KKConvert +Kl +KOI8_RToUTF16Char +KOI8_RToUTF16Str +label +Languages +LanguageToOptionID +LargeIconsActnExecute +LargeIconsActnUpdate +Last +lastChild +LastDelimiter +LastMode +LastReleased +LayOut +LayoutChanged +LBGetText +LBGetTextLen +LBItemFromPt +LCMapString +LCMapStringA +LCMapStringW +Ldexp +Leave +LeaveCriticalSection +leContainer +LeftBStr +LeftPromotion +LeftSide +LeftStr +LeftTrim +LHashValOfName +LHashValOfNameSys +LHashValOfNameSysA +library +LicenseCheck +LimitEmsPages +LineChanged +LineDDA +LinesInBuffer +LineStart +LineTo +LinkActive +LinkCursors +LinkError +LinkException +ListActns +ListAdd +ListBox1Click +ListBoxClick +ListBoxDblClick +ListChanging +ListClick +ListComboSelect +ListDrawValue +ListedCategory +Listen +ListItemsCompare +ListLinkDataChanged +ListMeasureHeight +ListMeasureWidth +ListMouseUp +ListRemove +ListView_ApproximateViewRect +ListView_Arrange +ListView_CancelEditLabel +ListView_CreateDragImage +ListView_DeleteAllItems +ListView_DeleteColumn +ListView_DeleteItem +ListView_EditLabel +ListView_EditLabelA +ListView_EditLabelW +ListView_EnableGroupView +ListView_EnsureVisible +ListView_FindItem +ListView_FindItemA +ListView_FindItemW +ListView_GetBkColor +ListView_GetBkImage +ListView_GetBkImageA +ListView_GetBkImageW +ListView_GetCallbackMask +ListView_GetCheckState +ListView_GetColumn +ListView_GetColumnA +ListView_GetColumnOrderArray +ListView_GetColumnW +ListView_GetColumnWidth +ListView_GetCountPerPage +ListView_GetEditControl +ListView_GetEmptyText +ListView_GetExtendedListViewStyle +ListView_GetFocusedGroup +ListView_GetFooterInfo +ListView_GetFooterItem +ListView_GetFooterItemRect +ListView_GetFooterRect +ListView_GetGroupCount +ListView_GetGroupHeaderImageList +ListView_GetGroupInfo +ListView_GetGroupInfoByIndex +ListView_GetGroupMetrics +ListView_GetGroupRect +ListView_GetGroupState +ListView_GetHeader +ListView_GetHotCursor +ListView_GetHotItem +ListView_GetHoverTime +ListView_GetImageList +ListView_GetInsertMark +ListView_GetInsertMarkColor +ListView_GetInsertMarkRect +ListView_GetISearchString +ListView_GetISearchStringA +ListView_GetISearchStringW +ListView_GetItem +ListView_GetItemA +ListView_GetItemCount +ListView_GetItemIndexRect +ListView_GetItemPosition +ListView_GetItemRect +ListView_GetItemSpacing +ListView_GetItemState +ListView_GetItemText +ListView_GetItemTextA +ListView_GetItemTextW +ListView_GetItemW +ListView_GetNextItem +ListView_GetNextItemIndex +ListView_GetNumberOfWorkAreas +ListView_GetOrigin +ListView_GetOutlineColor +ListView_GetSelectedColumn +ListView_GetSelectedCount +ListView_GetSelectionMark +ListView_GetStringWidth +ListView_GetStringWidthA +ListView_GetStringWidthW +ListView_GetSubItemRect +ListView_GetTextBkColor +ListView_GetTextColor +ListView_GetTileInfo +ListView_GetTileViewInfo +ListView_GetToolTips +ListView_GetTopIndex +ListView_GetUnicodeFormat +ListView_GetView +ListView_GetViewRect +ListView_GetWorkAreas +ListView_HasGroup +ListView_HitTest +ListView_InsertColumn +ListView_InsertColumnA +ListView_InsertColumnW +ListView_InsertGroup +ListView_InsertGroupSorted +ListView_InsertItem +ListView_InsertItemA +ListView_InsertItemW +ListView_InsertMarkHitTest +ListView_IsGroupViewEnabled +ListView_IsItemVisible +ListView_MapIDToIndex +ListView_MapIndexToID +ListView_MoveGroup +ListView_MoveItemToGroup +ListView_RedrawItems +ListView_RemoveAllGroups +ListView_RemoveGroup +ListView_Scroll +ListView_SetBkColor +ListView_SetBkImage +ListView_SetBkImageA +ListView_SetBkImageW +ListView_SetCallbackMask +ListView_SetCheckState +ListView_SetColumn +ListView_SetColumnA +ListView_SetColumnOrderArray +ListView_SetColumnW +ListView_SetColumnWidth +ListView_SetExtendedListViewStyle +ListView_SetGroupHeaderImageList +ListView_SetGroupInfo +ListView_SetGroupMetrics +ListView_SetGroupState +ListView_SetHotCursor +ListView_SetHotItem +ListView_SetHoverTime +ListView_SetIconSpacing +ListView_SetImageList +ListView_SetInfoTip +ListView_SetInsertMark +ListView_SetInsertMarkColor +ListView_SetItem +ListView_SetItemA +ListView_SetItemCount +ListView_SetItemCountEx +ListView_SetItemIndexState +ListView_SetItemPosition +ListView_SetItemPosition32 +ListView_SetItemState +ListView_SetItemText +ListView_SetItemTextA +ListView_SetItemTextW +ListView_SetItemW +ListView_SetOutlineColor +ListView_SetSelectedColumn +ListView_SetSelectionMark +ListView_SetTextBkColor +ListView_SetTextColor +ListView_SetTileInfo +ListView_SetTileViewInfo +ListView_SetToolTips +ListView_SetUnicodeFormat +ListView_SetView +ListView_SetWorkAreas +ListView_SortGroups +ListView_SortItems +ListView_SubItemHitTest +ListView_Update +ListView1Change +ListView1Click +ListView1DragDrop +ListView1DragOver +ListView1KeyDown +ListView1KeyPress +ListWndProc +Ln +LnXP1 +Load +LoadAccelerators +LoadAcceleratorsA +LoadAcceleratorsW +LoadBitmap +LoadBitmapA +LoadBitmaps +LoadBitmapW +LoadClick +LoadComExProcs +LoadCommand +LoadCursor +LoadCursorA +LoadCursorFromFile +LoadCursorFromFileA +LoadCursorFromFileW +LoadCursorResData +LoadCursors +LoadCursorW +LoadData +Loaded +LoadFile +LoadFromBlob +LoadFromClipboardFormat +LoadFromFile +LoadFromStream +LoadFromStreamPersist +LoadFromStrings +LoadFromURL +LoadFromXML +LoadFromXMLString +LoadHiddenCategories +LoadIcon +LoadIconA +LoadIconMetric +LoadIconW +LoadIconWithScaleDown +LoadImage +LoadImageA +LoadImages +LoadImageW +LoadKey +LoadKeyboardLayout +LoadKeyboardLayoutA +LoadKeyboardLayoutW +LoadLibrary +LoadLibraryA +LoadLibraryEx +LoadLibraryExA +LoadLibraryExW +LoadLibraryW +LoadLocale +LoadMemo +LoadMenu +LoadMenuA +LoadMenuIndirect +LoadMenuIndirectA +LoadMenuIndirectW +LoadMenuW +LoadModule +LoadMtsProcs +LoadPackage +LoadPicture +LoadRecreateItems +LoadRegTypeLib +LoadResource +LoadResourceModule +LoadResString +LoadResWideString +LoadSchemaRef +LoadSMClient +LoadStr +LoadString +LoadStringA +LoadStringFromStorage +LoadStringW +LoadTemplates +LoadTextValues +LoadTreeFromStream +LoadTypeLib +LoadTypeLibEx +LoadTypeLibrary +LoadValues +LoadWideStr +LoadWindowState +LoadWinSock2 +loadXML +LoadXMLData +LoadXMLDocument +LoadXMLLibrary +LoadXMLSchema +LoadXMLSchemaStr +LocalAlloc +LocalCompact +LocalDiscard +LocaleConversionError +LocalesCallback +LocalFileTimeToFileTime +LocalFlags +LocalFree +LocalLock +LocalMenuPopup +LocalReAlloc +LocalShrink +LocalSize +LocalUnlock +Locate +LocateAppInfo +LocateKey +LocateRecord +LocateWithFilter +Lock +LockContainer +LockFile +LockFileEx +LockInPlaceActive +LockList +LockObject +LockRegion +LockResource +LockRunning +LockSegment +LockSelect +LockSelection +LockServer +LockServiceDatabase +LockSession +LockState +LockTable +LockWindowUpdate +LockWorkStation +Log10 +Log2 +LogAction +Login +LoginDialog +LoginDialogEx +LogMessage +LogN +LogonUser +LogonUserA +LogonUserW +LogString +LogUpdateError +LogUpdateRecord +LongInt +LongMulDiv +Lookup +LookupAccountName +LookupAccountNameA +LookupAccountNameW +LookupAccountSid +LookupAccountSidA +LookupAccountSidW +LookupALink +LookupIconIdFromDirectory +LookupIconIdFromDirectoryEx +LookupKeyBinding +LookupKeysListDropDown +LookupName +LookupPrivilegeDisplayName +LookupPrivilegeDisplayNameA +LookupPrivilegeDisplayNameW +LookupPrivilegeName +LookupPrivilegeNameA +LookupPrivilegeNameW +LookupPrivilegeValue +LookupPrivilegeValueA +LookupPrivilegeValueW +LookupProc +LookupSecurityDescriptorParts +LookupSecurityDescriptorPartsA +LookupSecurityDescriptorPartsW +LookupService +LookupStored +LostPrecision +LowerCase +LowVideo +LPtoDP +LresultFromObject +lstrcat +lstrcatA +lstrcatW +lstrcmp +lstrcmpA +lstrcmpi +lstrcmpiA +lstrcmpiW +lstrcmpW +lstrcpy +lstrcpyA +lstrcpyn +lstrcpynA +lstrcpynW +lstrcpyW +lstrlen +lstrlenA +lstrlenW +lUIParam +LZClose +LZCopy +LZExpand +LZInit +LZOpenFile +LZOpenFileA +LZOpenFileW +LZRead +LZSeek +m +magnus_atrestart +MAGNUS_VERSION_STRING +Main +MainWndHook +MainWndProc +MakeAbsoluteSD +MakeAbsTime +makeChildrenReadonly +MakeComponentLinkable +MakeCurrent +MAKEDLLVERULL +MakeDragList +MakeEmbedded +MakeErrorMessage +MakeExpanded +MakeFullyVisible +MakeImageRegion +MAKEIPADDRESS +MAKEIPRANGE +MakeLong +MakeLParam +MakeLResult +MakeNamedNodeMap +MakeNode +MakeNodeList +MakeNodeName +MakeObjectInstance +MakeProcInstance +MakeProminent +MakeResult +MakeROP4 +MakeSec +MakeSelfRelativeSD +MakeSureDirectoryPathExists +MakeTypeName +MakeVisible +MakeWinHelpHappy +MakeWord +MakeWParam +MALLOC +MapAndLoad +MapColumnIDs +MapDebugInformation +MapDialogRect +MapFileAndCheckSum +MapFileAndCheckSumA +MapFileAndCheckSumW +MapGenericMask +Mapi +MapiAddress +MapiDeleteMail +MapiDetails +MapiFindNext +MapiFreeBuffer +MapiLogOff +MapiLogOn +MapiReadMail +MapiResolveName +MapiSaveMail +MapiSendDocuments +MapiSendMail +MapNameToSCID +MapOleCustomProperty +MapParameterNames +MapPath +MapPropertyToPage +MapSignal +MapsToIndex +MapToRunError +MapUrlToZone +MapViewOfFile +MapViewOfFileEx +MapVirtualKey +MapVirtualKeyA +MapVirtualKeyEx +MapVirtualKeyExA +MapVirtualKeyExW +MapVirtualKeyW +MapWindowPoints +Mark +MarkBlocks +MarkElapsedTime +MarkModified +MarshalInterface +Mask +MaskBlt +MaskDoFormatText +MaskGetCharType +MaskGetCurrentDirectives +MaskGetFldSeparator +MaskGetMaskBlank +MaskGetMaskSave +MaskIntlLiteralToChar +MaskOffsetToOffset +MaskOffsetToString +MaskOffsetToWideOffset +Masks +MaskUtils +master_error_log +MasterChanged +MasterDisabled +MasterFieldsChanged +Match +MatchCache +MatchClass +Matches +MatchesMask +MatchesMaskStates +MatchingItem +MatchName +MatchStr +MatchTemplates +MatchText +MatchType +Math +Max +MaxIntValue +MaxValue +mblen +mci_HMS_Hour +mci_HMS_Minute +mci_HMS_Second +mci_Make_HMS +mci_Make_MSF +mci_Make_TMSF +mci_MSF_Frame +mci_MSF_Minute +mci_MSF_Second +mci_TMSF_Frame +mci_TMSF_Minute +mci_TMSF_Second +mci_TMSF_Track +mciExecute +mciGetCreatorTask +mciGetDeviceID +mciGetDeviceIDA +mciGetDeviceIDFromElementID +mciGetDeviceIDFromElementIDA +mciGetDeviceIDFromElementIDW +mciGetDeviceIDW +mciGetErrorString +mciGetErrorStringA +mciGetErrorStringW +mciGetYieldProc +mciSendCommand +mciSendCommandA +mciSendCommandW +mciSendString +mciSendStringA +mciSendStringW +mciSetYieldProc +MConnect +MDIChildMaximized +MDIChildRestored +Mean +MeanAndStdDev +MeasureItem +MeasureTab +MeasureTitleHeights +memcpy +Memo1KeyDown +memoryToDom +memset +MenuAnimationStylesChange +MenuBeginUpdate +MenuChanged +MenuEndUpdate +MenuHelp +MenuIndex +MenuItemFromPoint +Menus +Merge +MergeChangeLog +MergeMenu +MergeWith +MessageBeep +MessageBox +MessageBoxA +MessageBoxEx +MessageBoxExA +MessageBoxExW +MessageBoxIndirect +MessageBoxIndirectA +MessageBoxIndirectW +MessageBoxW +MessageDlg +MessageDlgPos +MessageDlgPosHelp +MessageGroupAdded +MessageGroupDeleted +MessageHook +MessagePending +Messages +MessageViewMenuShown +MetaInfoSQLSplitterCanResize +MetaInfoSQLSplitterMoved +MethodAddress +MethodExists +MethodFromAncestor +MethodName +MethodNavigate +MetricScalePenData +miAddClick +miCloseClick +Midas +MidasCon +MidBStr +MidConst +midiConnect +midiDisconnect +midiInAddBuffer +midiInClose +midiInGetDevCaps +midiInGetDevCapsA +midiInGetDevCapsW +midiInGetErrorText +midiInGetErrorTextA +midiInGetErrorTextW +midiInGetID +midiInGetNumDevs +midiInMessage +midiInOpen +midiInPrepareHeader +midiInReset +midiInStart +midiInStop +midiInUnprepareHeader +midiOutCacheDrumPatches +midiOutCachePatches +midiOutClose +midiOutGetDevCaps +midiOutGetDevCapsA +midiOutGetDevCapsW +midiOutGetErrorText +midiOutGetErrorTextA +midiOutGetErrorTextW +midiOutGetID +midiOutGetNumDevs +midiOutGetVolume +midiOutLongMsg +midiOutMessage +midiOutOpen +midiOutPrepareHeader +midiOutReset +midiOutSetVolume +midiOutShortMsg +midiOutUnprepareHeader +miDisconnectClick +midiStreamClose +midiStreamOpen +midiStreamOut +midiStreamPause +midiStreamPosition +midiStreamProperty +midiStreamRestart +midiStreamStop +MidReg +MidStr +miExitClick +MilliSecondOf +MilliSecondOfTheDay +MilliSecondOfTheHour +MilliSecondOfTheMinute +MilliSecondOfTheMonth +MilliSecondOfTheSecond +MilliSecondOfTheWeek +MilliSecondOfTheYear +MilliSecondsBetween +MilliSecondSpan +Min +MinClientRect +Minimize +MinimizeName +MinIntValue +MinuteOf +MinuteOfTheDay +MinuteOfTheHour +MinuteOfTheMonth +MinuteOfTheWeek +MinuteOfTheYear +MinutesBetween +MinuteSpan +MinValue +MinVar +miPropertiesClick +MiscCategory +mixerClose +mixerGetControlDetails +mixerGetControlDetailsA +mixerGetControlDetailsW +mixerGetDevCaps +mixerGetDevCapsA +mixerGetDevCapsW +mixerGetID +mixerGetLineControls +mixerGetLineControlsA +mixerGetLineControlsW +mixerGetLineInfo +mixerGetLineInfoA +mixerGetLineInfoW +mixerGetNumDevs +mixerMessage +mixerOpen +mixerSetControlDetails +MkDir +mkFunction +MkParseDisplayName +MkParseDisplayNameEx +mmap +mmioAdvance +mmioAscend +mmioClose +mmioCreateChunk +mmioDescend +mmioFlush +mmioGetInfo +mmioInstallIOProc +mmioInstallIOProcA +mmioInstallIOProcW +mmioOpen +mmioOpenA +mmioOpenW +mmioRead +mmioRename +mmioRenameA +mmioRenameW +mmioSeek +mmioSendMessage +mmioSetBuffer +mmioSetInfo +mmioStringToFOURCC +mmioStringToFOURCCA +mmioStringToFOURCCW +mmioWrite +MMNotify +MMSystem +mmsystemGetVersion +mod +ModalDialogBox +ModalEdit +ModalFinished +ModalStarted +Modified +ModifiedJulianDateToDateTime +Modify +ModifyAlias +ModifyComplete +ModifyConfigParams +ModifyDataSource +ModifyDesktopItem +ModifyDriver +ModifyExtents +ModifyMenu +ModifyMenuA +ModifyMenuW +ModifyRecord +ModifyScrollBar +ModifySystemMenu +ModifyWorldTransform +ModuleAdded +ModuleCacheID +ModuleCreate +ModuleCreateEx +ModuleFileNames +ModuleRemoved +ModuleRenamed +ModuleUnload +MomentSkewKurtosis +MonikerCommonPrefixWith +MonikerRelativePathTo +Monitor +MonitorFromPoint +MonitorFromRect +MonitorFromWindow +mono +MonthCal_GetColor +MonthCal_GetCurSel +MonthCal_GetFirstDayOfWeek +MonthCal_GetMaxSelCount +MonthCal_GetMaxTodayWidth +MonthCal_GetMinReqRect +MonthCal_GetMonthDelta +MonthCal_GetMonthRange +MonthCal_GetRange +MonthCal_GetSelRange +MonthCal_GetToday +MonthCal_GetUnicodeFormat +MonthCal_HitTest +MonthCal_SetColor +MonthCal_SetCurSel +MonthCal_SetDayState +MonthCal_SetFirstDayOfWeek +MonthCal_SetMaxSelCount +MonthCal_SetMonthDelta +Monthcal_SetRange +MonthCal_SetSelRange +MonthCal_SetToday +MonthCal_SetUnicodeFormat +MonthOf +MonthOfTheYear +MonthsBetween +MonthSpan +mouse_event +MouseActivate +MouseCoord +MouseDown +MouseDragToGrid +MouseMove +MouseOverDropDown +MouseToCell +MouseUp +MouseWheelHandler +Move +MoveAdjust +MoveAnchor +MoveAndScroll +MoveBOL +MoveBuffer +MoveBy +MoveBytesToRight +MoveCol +MoveColData +MoveColRow +MoveColumn +MoveComplete +MoveCurrent +MoveCursor +MoveCursorToView +MoveDown +MoveDownClick +MoveElementTo +MoveEOF +MoveEOL +MoveExtent +MoveFields +MoveFile +MoveFileA +MoveFileEx +MoveFileExA +MoveFileExW +MoveFileW +MoveFileWithProgress +MoveFileWithProgressA +MoveFileWithProgressW +MoveFirst +MoveKey +MoveLast +MoveMemory +MoveMessages +MoveNext +MoveNode +MovePrevious +MoveReal +MoveRelative +MoveRow +MoveSideways +MoveTab +MoveTo +MoveToBOF +MoveToBookMark +MoveToEOF +MoveToEx +MoveToKey +MoveToNextSubGroup +MoveTopLeft +MoveToSeqNo +MoveUp +MoveUpClick +MoveValue +MoveViewToCursor +MoveWindow +MoveWindowOrg +MpAlcB +MpIbf +MPlayer +MSDos +MSecsToTimeStamp +MsgSetCalColors +MsgSetDateTime +MsgSetRange +MsgWaitForMultipleObjects +MsgWaitForMultipleObjectsEx +msxml +msxmldom +Mtsobj +MtsRdm +Mtx +MulDiv +MultiByteToWideChar +MultiLineWidth +MultiMon +MultinetGetConnectionPerformance +MultinetGetConnectionPerformanceA +MultinetGetConnectionPerformanceW +munmap +Mxconsts +n +Name +NameDelimiter +NameLengthError +NameStr +NameToId +NativeCompareStr +NativeCompareStrBuf +NativeCompareText +NativeCompareTextBuf +NativeTableName +NativeToAnsi +NativeToAnsiBuf +NativeToDateTime +Navigate +NavigateFrom +NavigateFromTo +Nb30 +NCPaint +nd +ndex +near +NeedsBackslashing +NeedsDBAlias +NeedsScrollBarVisible +NeedsUpdate +NegateAny +NegateAsDouble +NegateByte +NegateCustom +NegateLongWord +NegateVariant +NegateViaOS +NegateWord +Nestable +NestingLevel +net_accept +net_bind +net_close +net_connect +net_create_listener +net_getpeername +net_getsockopt +net_ioctl +net_ip2host +net_isalive +net_listen +net_read +net_select +net_setsockopt +net_socket +net_write +Netbios +netbuf_buf2sd +netbuf_close +netbuf_getc +netbuf_grab +netbuf_next +netbuf_open +NetClick +NetPresentValue +NetworkVolume +new +NewAdditionalFileSource +NewAddressBreakpoint +NewBottomLine +NewCompareNode +NewDefaultModule +NewDefaultProjectModule +NewEditorGroup +NewFormFile +NewImage +NewImplSource +NewInstance +NewIntfSource +NewItem +NewItemClick +NewLayout +NewLine +NewMenu +NewModule +NewModuleBreakpoint +NewModuleSource +NewNode +NewOptionSource +NewPage +NewPascalString +NewPopup +NewPopupMenu +NewProjectGroupSource +NewProjectResource +NewProjectSource +NewRecordObject +NewSection +NewSourceBreakpoint +NewStr +NewSubMenu +NewToolbar +NewTopLine +NewXMLDocument +NewXMLSchema +Next +NextBufferView +NextCharIndex +NextClick +NextDigit +NextError +NextErrorMessage +NextItem +NextMessage +nextNode +NextPage +NextRecordset +NextRow +NextSibling +NextSQLToken +NextToken +NextTokenIs +NextTokenIsLParen +NextValue +NextVisibleZone +NextWord +nfo +nil +nitProc +nl_langinfo +NodeDeselect +NodeEdited +NodeFocused +nodeFromID +NodeIndentStored +NodeInList +NodeMatches +NodeSelect +NodeSelected +NonEditMouseDown +Norm +NormalColor +NormalDraw +Normalize +NormalizeAllTopMosts +NormalizeBcd +NormalizeTopMosts +NormVideo +NoSelection +NoSound +not +NotAny +NotAsOrdinal +NotAsString +notationDeclaration +NotCustom +NotebookHandlesNeeded +NoteChangeTime +Notification +Notify +NotifyBootConfigStatus +NotifyCallback +NotifyChangeEventLog +NotifyControls +NotifyDataLinks +NotifyDesigner +NotifyDetails +NotifyForms +NotifyGlobalLoading +NotifyGroupChange +NotifyID +NotifyLinkTypes +NotifyModuleUnload +NotifyWinEvent +NotRightToLeft +NotVariant +NotViaOS +Now +Ns30Fix +Ns35Fix +Ns36Fix +Nsapi +NSstr2String +nt +NthDayOfWeek +NthParentOf +ntohl +ntohs +ntpblock_pblock2str +ntpblock_str2pblock +Null +NullCompare +NullOp +NumberOfPeriods +OaBuildVersion +ObjAddRef +ObjAuto +ObjBrkr +ObjComAuto +object +object_add_directive +object_create +object_execute +object_free +ObjectBinaryToText +ObjectCloseAuditAlarm +ObjectCloseAuditAlarmA +ObjectCloseAuditAlarmW +ObjectDeleteAuditAlarm +ObjectDeleteAuditAlarmA +ObjectDeleteAuditAlarmW +ObjectFromLresult +ObjectInvoke +ObjectMoved +ObjectOpenAuditAlarm +ObjectOpenAuditAlarmA +ObjectOpenAuditAlarmW +ObjectPrivilegeAuditAlarm +ObjectPrivilegeAuditAlarmA +ObjectPrivilegeAuditAlarmW +ObjectPropertiesDialog +ObjectResourceToText +ObjectsSelected +ObjectTextToBinary +ObjectTextToResource +ObjQueryInterface +ObjRelease +objset_add_init +objset_add_object +objset_copydirs +objset_create +objset_findbyname +objset_findbyppath +objset_free +objset_free_setonly +objset_new_object +objset_scan_buffer +objset_scan_registry +ObtainUserAgentString +OCXReg +oduleName +OemKeyScan +OemToAnsi +OemToAnsiBuff +OemToChar +OemToCharA +OemToCharBuff +OemToCharBuffA +OemToCharBuffW +OemToCharW +of +OffsetClipRgn +OffsetPenData +OffsetRect +OffsetRgn +OffsetToMaskOffset +OffsetViewportOrgEx +OffsetWindowOrgEx +OInetCombineUrl +OInetCompareUrl +OInetGetProtocolFlags +OInetGetSecurityUrl +OInetGetSession +OInetParseUrl +OInetQueryInfo +OKBtnClick +OKButtonClick +OKClick +OkToChangeFieldAlignment +OldBCDToCurr +OldCurrToBCD +Ole2 +oleacc +OleAuto +OleBuildVersion +OleCheck +OleConst +OleControlSite_TranslateAccelerator +OleConvertIStorageToOLESTREAM +OleConvertIStorageToOLESTREAMEx +OleConvertOLESTREAMToIStorage +OleConvertOLESTREAMToIStorageEx +OleCreate +OleCreateDefaultHandler +OleCreateEmbeddingHelper +OleCreateEx +OleCreateFontIndirect +OleCreateFromData +OleCreateFromDataEx +OleCreateFromFile +OleCreateFromFileEx +OleCreateLink +OleCreateLinkEx +OleCreateLinkFromData +OleCreateLinkFromDataEx +OleCreateLinkToFile +OleCreateLinkToFileEx +OleCreateMenuDescriptor +OleCreatePictureIndirect +OleCreatePropertyFrame +OleCreatePropertyFrameIndirect +OleCreateStaticFromData +OleCtl +OleCtnrs +OleCtrls +OleDB +OleDestroyMenuDescriptor +OleDialogHook +OleDlg +OleDoAutoConvert +OleDraw +OleDuplicateData +OleEnumToOrd +OleError +OleFlushClipboard +OleFontToFont +OleGetAutoConvert +OleGetClipboard +OleGetIconOfClass +OleGetIconOfFile +OleIconToCursor +OleInitialize +OleInPlaceFrame_GetWindow +OleInPlaceFrame_TranslateAccelerator +OleInPlaceSite_GetWindow +OleIsCurrentClipboard +OleIsRunning +OleLoad +OleLoadFromStream +OleLoadPicture +OleLoadPictureFile +OleLoadPicturePath +OleLockRunning +OleMetafilePictFromIconAndLabel +OleNoteObjectVisible +OlePromotion +OleQueryCreateFromData +OleQueryLinkFromData +OleRegEnumFormatEtc +OleRegEnumVerbs +OleRegGetMiscStatus +OleRegGetUserType +OleRun +OleSave +OleSavePictureFile +OleSaveToStream +OleServer +OleSetAutoConvert +OleSetClipboard +OleSetContainedObject +OleSetMenuDescriptor +OleStdGetFirstMoniker +OleStdGetLenFilePrefixOfMoniker +OleStrToString +OleStrToStrVar +OleTranslateAccelerator +OleTranslateColor +OleUIAddVerbMenu +OleUIBusy +OleUICanConvertOrActivateAs +OleUIChangeIcon +OleUIConvert +OleUIEditLinks +OleUIInsertObject +OleUIObjectProperties +OleUIPasteSpecial +OleUninitialize +OleVarFromAny +OleVarFromVarArrayProc +ommand +omponent +on +OnActivate +OnActivityCreate +OnActivityDestroy +OnActivityEnter +OnActivityLeave +OnActivityLeaveSame +OnActivityReenter +OnActivityTimeout +OnAdvise +OnAmbientPropertyChange +OnAppActivation +OnAppForceShutdown +OnAppShutdown +OnAttach +OnAuthenticate +OnAuthenticateFail +OnButtonClicked +OnChange +OnChanged +OnChangeTimer +OnCheckButtonToggled +OnClose +OnControlActivating +OnControlInfoChanged +OnCRMAbort +OnCRMAnalyze +OnCRMBegin +OnCRMCheckpoint +OnCRMCommit +OnCRMDeliver +OnCRMDone +OnCRMForce +OnCRMForget +OnCRMIndoubt +OnCRMPrepare +OnCRMRecoveryDone +OnCRMRecoveryStart +OnCRMRelease +OnCRMWrite +OnDataAvailable +OnDataChange +OnDeactivate +OnDefaultCommand +OnDefWindowMessage +OnDelay +OnDestroy +OnDetach +OnDisableCommit +OnDocWindowActivate +OnEditorKey +OnEnableCommit +OnEndPage +OnException +OnExceptionHandler +OnExceptionUser +OnExecuteEvent +OnFileOk +OnFileOkEvent +OnFocus +OnFocusChangeIS +OnFolderChange +OnFolderChangeEvent +OnFolderChanging +OnFrameWindowActivate +OnIISRequestInfo +OnInPlaceActivate +OnInPlaceActivateEx +OnInPlaceDeactivate +OnInPlaceDeActivateEx +OnItemSelected +OnLastTab +OnLinkSrcChange +OnLowResource +OnMethodCall +OnMethodException +OnMethodReturn +OnMnemonic +onnection +OnObjectActivate +OnObjectAvailable +OnObjectConstruct +OnObjectCreate +OnObjectDeactivate +OnObjectDestroy +OnObjPoolCreateDecision +OnObjPoolCreateObject +OnObjPoolCreatePool +OnObjPoolDestroyObject +OnObjPoolGetFromTx +OnObjPoolGetObject +OnObjPoolPutObject +OnObjPoolRecycleToTx +OnObjPoolTimeout +OnOverwrite +OnPoint +OnPosRectChange +OnProgress +OnQCMoveToDeadQueue +OnQCMoveToReTryQueue +OnQCPlayback +OnQCQueueOpen +OnQCReceive +OnQCReceiveFail +OnQCRecord +onreadystatechange +OnRename +OnRequestEdit +OnResize +OnResourceAllocate +OnResourceCreate +OnResourceDestroy +OnResourceRecycle +OnResourceTrack +OnRowPositionChange +OnRun +OnSave +OnSelectionChange +OnSelectionChangeEvent +OnSetAbort +OnSetComplete +OnSetItem +OnShareViolation +OnShowWindow +onst +OnStartBinding +OnStartPage +OnStateChange +OnStatusChange +OnStop +OnStopBinding +OnSyncEdit +ontext +OnThreadAssignApartment +OnThreadBindToApartment +OnThreadStart +OnThreadTerminate +OnThreadUnassignApartment +OnThreadUnBind +OnThreadWorkEnque +OnThreadWorkPrivate +OnThreadWorkPublic +OnThreadWorkRedirect +OnThreadWorkReject +OnTransactionAbort +OnTransactionCommit +OnTransactionPrepare +OnTransactionStart +ontrol +OnTypeChange +OnTypeChangeEvent +OnUIActivate +OnUIDeactivate +OnUserEvent +OnViewChange +OnViewWindowActive +OnWindowMessage +OnXMLDeclaration +oolIn +Open +OpenBackupEventLog +OpenBackupEventLogA +OpenBackupEventLogW +OpenBit +OpenClipboard +OpenCloseDetails +OpenConnection +OpenCurrent +OpenCursor +OpenCursorComplete +OpenDatabase +OpenDesktop +OpenDesktopA +OpenDesktopW +OpenDriver +OpenEdition +OpenEvent +OpenEventA +OpenEventLog +OpenEventLogA +OpenEventLogW +OpenEventW +OpenFile +OpenFileAtCursor +OpenFileMapping +OpenFileMappingA +OpenFileMappingW +OpenFromExistingDB +OpenGL +OpenIcon +OpenIndexFile +OpenInputDesktop +OpenKey +OpenKeyReadOnly +OpenLink +OpenLinkSource +OpenModule +OpenMutex +OpenMutexA +OpenMutexW +OpenParentDataSet +OpenPrinter +OpenPrinterA +OpenPrinterW +OpenProcess +OpenProcessToken +OpenProject +OpenProjectInfo +OpenRaw +OpenRawA +OpenRawW +OpenRegKey +OpenRowset +OpenSchema +OpenSCManager +OpenSCManagerA +OpenSCManagerW +OpenSemaphore +OpenSemaphoreA +OpenSemaphoreW +OpenService +OpenServiceA +OpenServiceW +OpenSession +OpenStorage +OpenStream +OpenThemeDataEx +OpenThreadToken +OpenViewChapter +OpenViewRowset +OpenWaitableTimer +OpenWaitableTimerA +OpenWaitableTimerW +OpenWindowStation +OpenWindowStationA +OpenWindowStationW +operate +operator +or +OrderFieldList +OrdToExecuteOptions +OurProc +Outline +OutOfMemoryError +OutOfResources +OutputDebugString +OutputDebugStringA +OutputDebugStringW +OverButton +OverflowError +Overlay +overload +override +Overwrite +OwnedBy +Owner +OwnerDataFetch +OwnerDataFind +OwnerDataHint +OwnerDataStateChange +oxmldom +Pack +PackageParams +PackDDElParam +packed +PackTime +PadInputLiterals +PadInputString +PadSubField +PageDown +PageIndexFromTabIndex +PagePaint +Pager_ForwardMouse +Pager_GetBkColor +Pager_GetBorder +Pager_GetButtonSize +Pager_GetButtonState +Pager_GetDropTarget +Pager_GetPos +Pager_RecalcSize +Pager_SetBkColor +Pager_SetBorder +Pager_SetButtonSize +Pager_SetChild +Pager_SetPos +PageSetupDlg +PageSetupDlgA +PageSetupDlgW +PageUp +Paint +PaintBorder +PaintColorBox +PaintControlFrame +PaintControls +PaintDesktop +PaintDockCaption +PaintDockFrame +PaintEdge +PaintGrid +PaintHandler +PaintListBox +PaintMenu +PaintPanel +PaintRgn +PaintSite +PaintTo +PaintWindow +PaletteAPI +PaletteChanged +PaletteCreated +PaletteFromDIBColorTable +PaletteIndex +PaletteOver +PaletteOverTo +PaletteRGB +PaletteToDIBColorTable +param_create +param_free +ParamByName +ParamCount +ParameterCodeInsightAnchorPos +ParameterCodeInsightParamIndex +parameterEntityDeclaration +parameterEntityRef +ParameterMismatch +ParamRef +ParamsChanging +ParamStr +Parent +ParentBiDiModeChanged +ParentBitmapChanged +ParentColorChanged +ParentEvent +parentNode +ParentNotLast +ParentProperty +ParentRepeats +Parents +Parse +ParseAttributeDefinition +ParseAttributeDefinitions +ParseChildElements +ParseDisplayName +parseDtd +ParseElementDefinition +ParseElementDefinitions +ParseError +ParseErrorEOS +ParseErrorHandler +ParseExpr +ParseExpr2 +ParseExpr3 +ParseExpr4 +ParseExpr5 +ParseExpr6 +ParseExpr7 +ParseGroup +parseloop +ParseNumber +ParseParam +parserErrorFactory +ParseSQL +ParseTokens +ParseWhiteSpace +pascal +PasswordDialog +Paste +PasteComponents +PasteFromClipboard +PasteItemClick +PasteLink +PasteSelection +PasteSpecialDialog +PatBlt +Path +PathAddBackslash +PathAddBackslashA +PathAddBackslashW +PathAddExtension +PathAddExtensionA +PathAddExtensionW +PathAppend +PathAppendA +PathAppendW +PathBuildRoot +PathBuildRootA +PathBuildRootW +PathCanonicalize +PathCanonicalizeA +PathCanonicalizeW +PathCombine +PathCombineA +PathCombineW +PathCommonPrefix +PathCommonPrefixA +PathCommonPrefixW +PathCompactPath +PathCompactPathA +PathCompactPathEx +PathCompactPathExA +PathCompactPathExW +PathCompactPathW +PathCreateFromUrl +PathCreateFromUrlA +PathCreateFromUrlW +PathFileExists +PathFileExistsA +PathFileExistsW +PathFindExtension +PathFindExtensionA +PathFindExtensionW +PathFindFileName +PathFindFileNameA +PathFindFileNameW +PathFindNextComponent +PathFindNextComponentA +PathFindNextComponentW +PathFindOnPath +PathFindOnPathA +PathFindOnPathW +PathFindSuffixArray +PathFindSuffixArrayA +PathFindSuffixArrayW +PathGetArgs +PathGetArgsA +PathGetArgsW +PathGetCharType +PathGetCharTypeA +PathGetCharTypeW +PathGetDriveNumber +PathGetDriveNumberA +PathGetDriveNumberW +PathIsContentType +PathIsContentTypeA +PathIsContentTypeW +PathIsDirectory +PathIsDirectoryA +PathIsDirectoryEmpty +PathIsDirectoryEmptyA +PathIsDirectoryEmptyW +PathIsDirectoryW +PathIsFileSpec +PathIsFileSpecA +PathIsFileSpecW +PathIsHTMLFile +PathIsHTMLFileA +PathIsHTMLFileW +PathIsLFNFileSpec +PathIsLFNFileSpecA +PathIsLFNFileSpecW +PathIsNetworkPath +PathIsNetworkPathA +PathIsNetworkPathW +PathIsPrefix +PathIsPrefixA +PathIsPrefixW +PathIsRelative +PathIsRelativeA +PathIsRelativeW +PathIsRoot +PathIsRootA +PathIsRootW +PathIsSameRoot +PathIsSameRootA +PathIsSameRootW +PathIsSystemFolder +PathIsSystemFolderA +PathIsSystemFolderW +PathIsUNC +PathIsUNCA +PathIsUNCServer +PathIsUNCServerA +PathIsUNCServerShare +PathIsUNCServerShareA +PathIsUNCServerShareW +PathIsUNCServerW +PathIsUNCW +PathIsURL +PathIsURLA +PathIsURLW +PathMakePretty +PathMakePrettyA +PathMakePrettyW +PathMakeSystemFolder +PathMakeSystemFolderA +PathMakeSystemFolderW +PathMatchSpec +PathMatchSpecA +PathMatchSpecW +PathParseIconLocation +PathParseIconLocationA +PathParseIconLocationW +PathQuoteSpaces +PathQuoteSpacesA +PathQuoteSpacesW +PathRelativePathTo +PathRelativePathToA +PathRelativePathToW +PathRemoveArgs +PathRemoveArgsA +PathRemoveArgsW +PathRemoveBackslash +PathRemoveBackslashA +PathRemoveBackslashW +PathRemoveBlanks +PathRemoveBlanksA +PathRemoveBlanksW +PathRemoveExtension +PathRemoveExtensionA +PathRemoveExtensionW +PathRemoveFileSpec +PathRemoveFileSpecA +PathRemoveFileSpecW +PathRenameExtension +PathRenameExtensionA +PathRenameExtensionW +PathSearchAndQualify +PathSearchAndQualifyA +PathSearchAndQualifyW +PathSetDlgItemPath +PathSetDlgItemPathA +PathSetDlgItemPathW +PathSkipRoot +PathSkipRootA +PathSkipRootW +PathStr +PathStripPath +PathStripPathA +PathStripPathW +PathStripToRoot +PathStripToRootA +PathStripToRootW +PathToRegion +PathUndecorate +PathUndecorateA +PathUndecorateW +PathUnExpandEnvStrings +PathUnExpandEnvStringsA +PathUnExpandEnvStringsW +PathUnmakeSystemFolder +PathUnmakeSystemFolderA +PathUnmakeSystemFolderW +PathUnquoteSpaces +PathUnquoteSpacesA +PathUnquoteSpacesW +Pause +PauseOnly +PausePlayback +PauseRecord +PauseTimer +Payment +PaymentParts +pblock_copy +pblock_create +pblock_dup +pblock_find +pblock_findval +pblock_free +pblock_nninsert +pblock_nvinsert +pblock_pb2env +pblock_pblock2str +pblock_pinsert +pblock_remove +pblock_str2pblock +PCDATA +Peek +PeekConsoleInput +PeekConsoleInputA +PeekConsoleInputW +PeekItem +PeekMessage +PeekMessageA +PeekMessageW +PeekNamedPipe +PeekPenInput +PenChanged +PenDataFromBuffer +PenDataToBuffer +PenWin +peration +PeriodPayment +PERM_CALLOC +PERM_FREE +PERM_MALLOC +PERM_REALLOC +PERM_STRDUP +PersistentToDesignObject +PersonalityServices +pFileName +PicEdit +PICEmptyString +PickCustomColor +PickListChange +Pics +PictureChanged +Pie +pieceEnd +pieceStart +PinHitTest +pipebuf_buf2sd +pipebuf_close +pipebuf_getc +pipebuf_grab +pipebuf_netbuf2sd +pipebuf_next +pipebuf_open +PixelsToHimetric +PlaceInCell +Play +PlayEnhMetaFile +PlayEnhMetaFileRecord +PlayMetaFile +PlayMetaFileRecord +PlaySound +PlaySoundA +PlaySoundW +PlgBlt +pmmioinfo +Point +PointerInModule +PointInGridRect +PointInPanel +PointsEqual +PointToLParam +PointToRow +PointToSmallPoint +PokeData +PokeDataLines +Poly +PolyBezier +PolyBezierTo +PolyDraw +Polygon +Polyline +PolyLineTo +PolyPolygon +PolyPolyline +PolyTextOut +PolyTextOutA +PolyTextOutW +PolyX +pool_calloc +pool_create +pool_destroy +pool_enabled +pool_free +pool_life +pool_malloc +pool_max +pool_maxthreads +pool_min +pool_minthreads +pool_realloc +pool_strdup +Pop +PopItem +PopKeyboard +PopnStdDev +PopnVariance +popstack +Populate +PopulateByKey +PopulateByQuery +PopulateFieldList +PopulateList +PopulateMenu +PopulateOle2Menu +PopulateTableList +Popup +PopupComponent +PopupControlProc +PopupVerbMenuClick +PopValue +PortListClick +Pos +PosEqual +PosEx +Position +PositionChanged +PositionDockRect +PositionPopup +PossibleStream +Post +PostAlloc +PostAppMessage +PostAppMessageA +PostAppMessageW +PostClick +PostCopyItem +PostDataChange +PostDeleteItem +PostDidAlloc +PostEvent +PostFree +PostGetSize +PostHeapMinimize +PostKeyBuffer +PostMessage +PostMessageA +PostMessageFilter +PostMessageW +PostMoveItem +PostNewItem +PosToCharPos +PostQueuedCompletionStatus +PostQuitMessage +PostRealloc +PostRefreshTreeView +PostRenameItem +PostThreadMessage +PostThreadMessageA +PostThreadMessageW +Power +prcScreenCoords +pReading +PreAlloc +PrecedingWindow +PreCopyItem +PreDeleteItem +PreDidAlloc +PrefixedTypeName +PreFree +PreGetSize +PreHeapMinimize +PreMessageFilter +PreMoveItem +PreNewItem +Prepare +prepareCM +PrepareCursor +PrepareItem +PrepareMenu +PrepareNewSchema +PrepareProc +PrepareRecord +PrepareRecordVariants +PrepareSQL +PrepareTape +PreparseAttributeDefinitions +PreParseChildElements +PreProcessMessage +PreRealloc +PreRefreshTreeView +PreRenameItem +PresentValue +PreserveNodeStates +PreValidateCodeInsight +PreviewClick +PreviewKeyPress +Previous +PreviousBufferView +previousNode +PreviousSibling +Print +PrintDlg +PrintDlgA +PrintDlgW +Printer +PrinterMessageBox +PrinterMessageBoxA +PrinterMessageBoxW +PrinterProperties +Printers +printf +PrintTo +Prior +PriorError +PrioritySort +PriorPage +PriorRow +private +PrivilegeCheck +PrivilegedServiceAuditAlarm +PrivilegedServiceAuditAlarmA +PrivilegedServiceAuditAlarmW +PrnClose +PrnIgnore +PrnInput +PrnOpen +PrnOutput +PrnOutStr +PrnString +procedure +Process +ProcessAccelItems +ProcessAccels +ProcessAttributes +ProcessCategory +ProcessChildNodes +ProcessClient +ProcessCreated +ProcessDestroyed +ProcessDirective +ProcessExecute +processFile +ProcessFunction +ProcessHorz +ProcessHRC +processingInstruction +processMemory +ProcessMemoryChanged +ProcessMenuChar +ProcessMenuLoop +ProcessMessage +ProcessMessages +ProcessModuleCreated +ProcessModuleDestroyed +ProcessMouseMsg +ProcessObject +ProcessPath +ProcessRequests +ProcessSearchKey +ProcessShutdown +ProcessSoftDist +processSourceCode +ProcessStateChanged +processStream +processString +ProcessTypeInfo +ProcessUpdate +ProcessUpdates +ProcessUrlAction +ProcessUrlActionEx +ProcessVert +processWideString +ProcessWMEnableMessages +ProgIdCompensator +ProgIDFromCLSID +ProgIDToClassID +program +ProgramReset +Progress +ProjectChanged +ProjectClosing +ProjectCreate +ProjectCreateEx +ProjectLoaded +ProjectSaving +PromptAction +PromptDataLinkFile +PromptDataSource +PromptFileName +PromptForFileName +PropDrawName +PropDrawNameRect +PropDrawValue +PropDrawValueRect +property +PropertyCategories +PropertyCategoryList +PropertyChanged +PropertyError +PropertyExists +PropertyNotFound +PropertySheet +PropertySheetA +PropertySheetW +PropInspAPI +PropIsType +PropNameLBDblClick +PROPSETHDR_OSVER_KIND +PROPSETHDR_OSVER_MAJOR +PROPSETHDR_OSVER_MINOR +PropType +ProtectChange +protected +protocol_find_request +protocol_finish_request +protocol_handle_session +protocol_parse_request +protocol_scan_headers +protocol_set_finfo +protocol_set_keepalive_timeout +protocol_start_response +protocol_status +protocol_uri2url +protocol_uri2url_dynamic +Prototype +Prototypes +Provider +ProvidersUpdated +PsAPI +PSEndTransaction +PSExecute +PSExecuteStatement +PSGetAttributes +PSGetCommandText +PSGetCommandTextW +PSGetCommandType +PSGetDefaultOrder +PSGetIndexDefs +PSGetKeyFields +PSGetKeyFieldsW +PSGetParams +PSGetQuoteChar +PSGetQuoteCharW +PSGetTableName +PSGetTableNameW +PSGetUpdateException +PSInTransaction +PSIsSQLBased +PSIsSQLSupported +PSP +PSReset +PSSetCommandText +PSSetParams +PSStartTransaction +PSUpdateRecord +pszShortName +pthread_key_create +pthread_key_delete +pthread_once +pThreadParameter +PtInExpandButton +PtInGripRect +PtInRect +PtInRegion +PtVisible +public +published +PUCS4Chars +PulseEvent +PurgeComm +Push +PushAppData +PushItem +PushKeyboard +Put +put_Bold +put_Charset +put_CommitBatchSize +put_DestPath +put_Italic +put_KeepOriginalFormat +put_Name +put_Size +put_SourcePath +put_Strikethrough +put_Underline +put_Weight +PutADTField +PutArrayField +PutBlank +PutBlob +PutBlobField +PutCalcField +PutConstant +PutConstBCD +PutConstBool +PutConstDate +PutConstDateTime +PutConstFloat +PutConstFMTBCD +PutConstInt +PutConstInt64 +PutConstNode +PutConstSQLTimeStamp +PutConstStr +PutConstTime +PutCurrencyDigit +PutData +PutDataSetField +PutExprNode +PutField +PutFieldNode +PutItemProp +PutNode +PutObject +PutObjectField +PutRecord +PutString +PutStringField +PutTwoBcdDigits +PutVarBytesField +PutWideStringField +pvoid +QualifyTableName +QueryActiveShellView +QueryApplicationFile +QueryChanged +QueryContextMenu +QueryContinueDrag +QueryCustomPolicy +QueryDosDevice +QueryDosDeviceA +QueryDosDeviceW +QueryGetData +QueryInterface +QueryPathOfRegTypeLib +QueryPerformanceCounter +QueryPerformanceFrequency +QueryPersistenceInterface +QueryRecoveryAgents +QueryRecoveryAgentsA +QueryRecoveryAgentsW +QueryRegKey +QueryService +QueryServiceConfig +QueryServiceConfigA +QueryServiceConfigW +QueryServiceLockStatus +QueryServiceLockStatusA +QueryServiceLockStatusW +QueryServiceObjectSecurity +QueryServiceStatus +QueryStatus +QueryTextMetrics +QueryWorkingSet +Queue +QueueUserAPC +QuickActivate +QuickSort +QuotedStr +QuoteFullName +RadToCycle +RadToDeg +RadToGrad +raise +RaiseCastError +RaiseConversionError +RaiseConversionRegError +RaiseDispError +RaiseError +RaiseException +RaiseGridError +RaiseInvalidOp +RaiseLastOSError +RaiseLastWin32Error +RaiseList +RaiseListError +RaiseNameException +RaiseOverflowError +RandG +Random +RandomFrom +Randomize +RandomRange +RangedCharValue +RangedValue +RangeError +RankineToCelsius +RateResource +RawToDataColumn +RCS +ReActivate +ReactivateAndUndo +Read +ReadArray +ReadAt +ReadAtPos +ReadAttributeSet +ReadBands +ReadBinaryData +ReadBinaryStream +ReadBitmaps +ReadBlobData +ReadBool +ReadBoolean +ReadBuffer +ReadCalculated +ReadChar +ReadClassStg +ReadClassStm +ReadCollection +ReadCols +ReadColumns +ReadColWidths +ReadComponent +ReadComponentRes +ReadComponentResEx +ReadComponentResFile +ReadComponents +ReadConsole +ReadConsoleA +ReadConsoleInput +ReadConsoleInputA +ReadConsoleInputW +ReadConsoleOutput +ReadConsoleOutputA +ReadConsoleOutputAttribute +ReadConsoleOutputCharacter +ReadConsoleOutputCharacterA +ReadConsoleOutputCharacterW +ReadConsoleOutputW +ReadConsoleW +ReadControlName +ReadCurrency +ReadD2Stream +ReadD3Stream +ReadData +ReadDataInner +ReadDataPacket +ReadDate +ReadDateTime +ReadDesignerData +ReadDesignSize +ReadDirectoryChanges +ReadDirectoryChangesW +ReadDirectoryNames +ReadDOMVendor +ReadDouble +ReadEMFStream +ReadError +ReaderSetName +ReadEventLog +ReadEventLogA +ReadEventLogW +ReadExpandedState +ReadFacet +ReadFile +ReadFileEditStyle +ReadFileEx +ReadFileNames +ReadFloat +ReadFmtUserTypeStg +ReadFromStream +ReadGlassFrameBottom +ReadGlassFrameEnabled +ReadGlassFrameLeft +ReadGlassFrameRight +ReadGlassFrameSheetOfGlass +ReadGlassFrameTop +ReadHeight +ReadHorizontalOffset +ReadHWL +ReadIcon +ReadIdent +ReadIgnoreFontProperty +ReadInt64 +ReadInteger +ReadItemData +ReadKey +ReadKeys +ReadLeft +ReadLinkInfo +ReadListBegin +ReadListEnd +ReadLookup +ReadMultiple +ReadName +ReadNodeData +readonly +ReadOnlyField +ReadParamData +ReadPrefix +ReadPrinter +ReadProcessMemory +ReadProperty +ReadPropertyNames +ReadPropValue +ReadRaw +ReadRequired +ReadResHeader +ReadRootComponent +ReadRowHeights +ReadSection +ReadSections +ReadSectionValues +ReadSet +ReadSettings +ReadShortCutText +ReadSignature +ReadSingle +ReadState +ReadStr +ReadString +ReadStyleProp +ReadTextHeight +ReadTime +ReadToolbar +ReadTop +ReadUnNamed +ReadUrlCacheEntryStream +ReadValue +ReadVariant +ReadVerticalOffset +ReadWideChar +ReadWideString +ReadWidth +ReadWMFStream +real +RealChildWindowFromPoint +RealCompare +RealGetWindowClass +RealGetWindowClassA +RealGetWindowClassW +Realign +RealizePalette +REALLOC +ReAllocBuffers +ReallocMemory +RealOp +ReaumurToCelsius +ReBaseImage +RebuildColumns +RebuildHandle +RecalcCellDimensions +Receive +ReceiveBuf +ReceiveComponentNames +ReceiveLength +ReceiveText +RecentlyUsedActnExecute +RecentlyUsedActnUpdate +RecodeDate +RecodeDateTime +RecodeDay +RecodeHour +RecodeMilliSecond +RecodeMinute +RecodeMonth +RecodeSecond +RecodeTime +RecodeYear +Reconcile +Reconcile_MD +ReconcileCallback +record +RecordChangeComplete +RecordChanged +RecordFilter +RecordsetChangeComplete +RecreateAsPopup +RecreateButtons +RecreateButtonsFromToolbar +RecreateControls +RecreateWnd +Rect +Rectangle +RectInRegion +RectVisible +RectWidth +RecurseNode +recv +recvfrom +Recycle +Redirect +RedirectFixupReferences +RedisplayPenData +Redo +RedrawWindow +Reduce +Reference +ReferenceInterface +ReferenceName +ReferencePascalString +ReferenceStrings +refersToExternalEntity +refersToUnparsedEntity +refersToUnusableEntity +refersToXyz +ReformatText +Refresh +RefreshBuffers +RefreshButton +RefreshComponents +RefreshControl +RefreshData +RefreshDefaultFont +RefreshFromADO +RefreshFromOleDB +RefreshIndexFields +RefreshInfo +RefreshInfos +RefreshInternalCalcFields +RefreshItem +RefreshLookupList +RefreshMDIMenu +RefreshParams +RefreshPutProcs +RefreshRecord +RefreshRecords +RefreshRouter +RefreshTreeView +RefreshVisibleData +RegActions +RegCloseKey +RegConnectRegistry +RegConnectRegistryA +RegConnectRegistryW +RegCreateKey +RegCreateKeyA +RegCreateKeyEx +RegCreateKeyExA +RegCreateKeyExW +RegCreateKeyW +RegDataToDataType +RegDeleteKey +RegDeleteKeyA +RegDeleteKeyW +RegDeleteValue +RegDeleteValueA +RegDeleteValueW +RegDisablePredefinedCache +RegEnumKey +RegEnumKeyA +RegEnumKeyEx +RegEnumKeyExA +RegEnumKeyExW +RegEnumKeyW +RegEnumValue +RegEnumValueA +RegEnumValueW +RegFields +RegFlushKey +RegGetKeySecurity +Register +RegisterActions +RegisterActiveObject +RegisterActnBarStyle +RegisterAppInfo +RegisterAsService +RegisterBDEInitProc +RegisterBindStatusCallback +RegisterCallback +RegisterCallbacks +RegisterCategories +RegisterChanges +RegisterChildNode +RegisterChildNodes +RegisterClass +RegisterClassA +RegisterClassAlias +RegisterClasses +RegisterClassEx +RegisterClassExA +RegisterClassExW +RegisterClassImplCategories +RegisterClassObject +RegisterClassReqCategories +RegisterClassW +RegisterClient +RegisterClipboardFormat +RegisterClipboardFormatA +RegisterClipboardFormatW +RegisterColorScheme +RegisterCompensator +RegisterComponentEditor +RegisterComponentGuidelines +RegisterComponents +RegisterComServer +RegisterConversionFamily +RegisterConversionFormat +RegisterConversionType +RegisterCustomModule +RegisterDesignDragObject +RegisterDesignNotification +RegisterDeviceNotification +RegisterDeviceNotificationA +RegisterDeviceNotificationW +RegisterDispenser +RegisterDocBinding +RegisterDockSite +registerDocumentFormat +RegisterDOMVendor +RegisterDragAcceptor +RegisterDragDrop +RegisterDragTarget +Registered +RegisteredActionExecute +RegisterEventSource +RegisterEventSourceA +RegisterEventSourceW +RegisterExpectedMemoryLeak +RegisterExtension +RegisterFields +RegisterFileFormat +RegisterFileFormatRes +RegisterFileSystem +RegisterFindGlobalComponentProc +RegisterFormatEnumerator +RegisterHistoryProvider +RegisterHotKey +RegisterIDropTarget +RegisterIntegerConsts +RegisterInterfaceInGlobal +RegisterLanguage +RegisterLibraryExpert +RegisterMediaTypeClass +RegisterMediaTypes +RegisterMidasLib +RegisterModule +RegisterNoIcon +RegisterNonActiveX +RegisterObjectBound +RegisterObjectParam +RegisterOleObjectEditor +RegisterPackageWizard +RegisterPooled +RegisterPropertiesInCategory +RegisterPropertyEditor +RegisterPropertyInCategory +RegisterPropertyMapper +RegisterProvider +RegisterReader +RegisterRootSprigType +Registers +RegisterSchemaTranslator +RegisterScriptEngine +RegisterSelectionEditor +RegisterServiceCtrlHandler +RegisterServiceCtrlHandlerA +RegisterServiceCtrlHandlerW +RegisterServices +RegisterSprigType +RegisterStandardMenus +RegisterToolbarNotifier +RegisterTypeLib +RegisterTypeLibrary +RegisterViewer +RegisterWindowMessage +RegisterWindowMessageA +RegisterWindowMessageW +RegisterWriter +Registry +RegistryConnect +RegLoadKey +RegLoadKeyA +RegLoadKeyW +RegNotifyChangeKeyValue +RegOpenCurrentUser +RegOpenKey +RegOpenKeyA +RegOpenKeyEx +RegOpenKeyExA +RegOpenKeyExW +RegOpenKeyW +RegOpenUserClassesRoot +RegOverridePredefKey +RegQueryInfoKey +RegQueryInfoKeyA +RegQueryInfoKeyW +RegQueryMultipleValues +RegQueryMultipleValuesA +RegQueryMultipleValuesW +RegQueryValue +RegQueryValueA +RegQueryValueEx +RegQueryValueExA +RegQueryValueExW +RegQueryValueW +RegReplaceKey +RegReplaceKeyA +RegReplaceKeyW +RegRestoreKey +RegRestoreKeyA +RegRestoreKeyW +RegSaveKey +RegSaveKeyA +RegSaveKeyW +RegSetKeySecurity +RegSetValue +RegSetValueA +RegSetValueEx +RegSetValueExA +RegSetValueExW +RegSetValueW +RegStr +RegUnLoadKey +RegUnLoadKeyA +RegUnLoadKeyW +ReIndex +RelativePathTo +Release +ReleaseAccessor +ReleaseBindInfo +ReleaseBitmap +ReleaseBlobs +ReleaseBoundObjects +ReleaseCapture +ReleaseConnection +ReleaseData +ReleaseDC +ReleaseDelphiException +ReleaseDoc +ReleaseErrors +ReleaseException +ReleaseExceptionObject +ReleaseFuncDesc +ReleaseHandle +ReleaseHfont +ReleaseKeepAlive +ReleaseLineDC +ReleaseLock +ReleaseMarshalData +ReleaseMethodPointer +ReleaseMutex +ReleaseObject +ReleaseRows +ReleaseSemaphore +ReleaseSID +ReleaseStgMedium +ReleaseStrings +ReleaseTLibAttr +ReleaseTypeAttr +ReleaseVarDesc +ReloadDockedControl +ReloadFile +ReloadSymbolTable +ReloadTemplate +ReloadTemplates +RelSmall +RemoteLoginDialog +Remove +RemoveAction +RemoveAll +RemoveAllButtonClick +RemoveAllControlItems +RemoveAllPasswords +RemoveAnnotation +removeAttribute +removeAttributeNode +removeAttributeNS +RemoveButton +RemoveButtonClick +removeChild +RemoveChildNode +RemoveClient +RemoveComponent +RemoveContainer +removeContentModel +RemoveContextMenuItem +RemoveControl +RemoveControlItem +RemoveDatabase +RemoveDataLink +RemoveDataModule +RemoveDataSource +RemoveDeclNode +RemoveDesktopItem +RemoveDir +RemoveDirectory +RemoveDirectoryA +RemoveDirectoryW +RemoveDispatch +RemoveEditFormat +RemoveEmpty +RemoveEmptyAutoAddColumns +RemoveEmptyAutoAddRows +removeEntRefSubtree +removeExternalCM +RemoveFields +RemoveFile +RemoveFileFilter +RemoveFileSystem +RemoveFixupReferences +RemoveFixups +RemoveFocus +RemoveFontMemResourceEx +RemoveFontResource +RemoveFontResourceA +RemoveFontResourceEx +RemoveFontResourceExA +RemoveFontResourceExW +RemoveFontResourceW +RemoveForm +RemoveFreeNotification +RemoveHighlighter +RemoveHistoryItem +RemoveHostedNode +RemoveIndex +RemoveInsertionPoints +removeInternalCM +RemoveInvalidSprigs +RemoveItem +RemoveKeyboardBinding +removeLastItem +RemoveManager +RemoveMenu +RemoveMenuCreatorNotifier +RemoveMenuFromList +RemoveMenus +RemoveMenusSB +RemoveMessageGroup +RemoveModuleUnloadProc +removeNamedItem +removeNamedItemNS +RemoveNotification +RemoveNotifier +RemoveObjectFactory +RemoveOffset +RemovePage +RemovePaletteState +RemoveParam +RemovePassword +RemovePenDataStrokes +RemovePluginInfo +RemovePoint +RemovePopupForm +RemovePortActionExecute +RemovePortActionUpdate +RemovePrivateCvSymbolic +RemoveProcess +RemoveProductInfo +RemoveProject +RemoveProp +RemovePropA +RemovePropW +removeQualifiedItem +RemoveQueuedEvents +RemoveRelocations +RemoveRootNode +removes +RemoveServerConv +RemoveSink +RemoveSpeedSetting +RemoveSuffix +RemoveTemplate +RemoveThread +RemoveToolbar +RemoveTypeInfo +RemoveWindowProps +RemoveWindowSubclass +RemoveWizard +Rename +RenameComponent +RenameElement +RenameFields +RenameFile +RenameMethod +RenameTable +RenameValue +Render +ReorderButton +Repaint +Reparent +ReparentChildren +repeat +RepeatLastSearchOrReplace +Replace +ReplaceAgain +ReplaceBest +replaceChild +replaceData +ReplaceDate +ReplaceIcon +ReplaceKey +ReplaceMasked +ReplaceNode +ReplacePage +ReplaceStr +ReplaceText +ReplaceTextA +ReplaceTextW +ReplaceTime +ReplyMessage +Repopulate +ReportEvent +ReportEventA +ReportEventW +ReportStatus +RepositionButton +RepositionButtons +Requery +request_create +request_free +request_handle +request_header +request_loadheaders +request_restart_internal +request_stat_path +request_translate_uri +RequestAlign +RequestBorderSpace +RequestBorderSpaceDW +RequestData +RequestDestroyResource +RequestEdit +RequestLicKey +RequestNewObjectLayout +RequestSize +RequestUIActivate +RequiredState +RequiresUnits +ResemblesText +Reserved1 +Reserved2 +Reserved3 +ReserveZeroPage +Reset +reset2 +ResetActionBar +ResetActnExecute +ResetActnUpdate +ResetAgg +ResetAggField +ResetAlcBitAnsi +ResetAllAggs +ResetAppName +ResetBounds +ResetClientUsageData +ResetColumnFieldBindings +ResetContent +ResetCursorRange +ResetDC +ResetDCA +ResetDCW +ResetDiskAge +ResetDockItems +ResetEvent +ResetExStyles +ResetFonts +ResetGrouping +ResetIme +ResetImeComposition +ResetItemHeight +ResetMaxLength +ResetPassCount +ResetPrinter +ResetPrinterA +ResetPrinterW +ResetResource +ResetSelectedItem +ResetSyncEvent +ResetTimer +ResetToolbar +ResetUsageData +ResetUsageDataActnExecute +ResInstLoad +Resize +ResizeBorder +ResizeBorderDW +ResizeButtons +ResizeCol +ResizeGrid +ResizePalette +ResizePenData +ResizeRow +Resizing +Resolve +resolveAfterAddition +resolveAfterRemoval +ResolveCharRefs +ResolveCharRefsAndPERefs +resolveEntityReferences +ResourceLoad +RestartKeyboardServices +RestartPosition +RestartWinHelp +Restore +RestoreChecks +RestoreContents +RestoreCurrentRow +RestoreDC +RestoreDefaults +RestoreExpandState +RestoreFocusState +RestoreInplaceEditor +RestoreKey +RestoreLocale +RestoreNodeState +RestoreREGDB +RestoreSelection +RestoreState +RestoreTopMosts +result +ResultCode +ResultFacility +ResultFieldListDropDown +ResultSeverity +Resume +ResumePlayback +ResumeRecord +ResumeThread +ResumeTimer +Resurrect +Resync +ResynchRows +ResyncWithMaster +RethinkHotkeys +RethinkLines +RetrieveAttributes +RetrieveUrlCacheEntryFile +RetrieveUrlCacheEntryFileA +RetrieveUrlCacheEntryFileW +RetrieveUrlCacheEntryStream +RetrieveUrlCacheEntryStreamA +RetrieveUrlCacheEntryStreamW +RetryRejectedCall +return +ReturnAddr +ReturnList +returns +ReuseDDElParam +ReverseCalcNumTabs +ReverseNegative +ReverseString +Revert +RevertRecord +RevertTemporaryLabel +RevertToSelf +Revoke +RevokeActiveObject +RevokeBindStatusCallback +RevokeDragDrop +RevokeFormatEnumerator +RevokeInterfaceFromGlobal +RevokeObjectBound +RevokeObjectParam +Rewind +RGB +RGBToWebColorName +RGBToWebColorStr +RGBTripleToQuad +RichEdit +RightBStr +RightPromotion +RightSide +RightStr +RipText +riter +RmDir +rocessorAgent +RollBack +RollbackTrans +RollbackTransComplete +root_object +RootSprig +RootSprigAssigned +RootSprigList +ropInfo +RoundAt +RoundChar +RoundColor +RoundRect +RoundTo +roup1_ID +RowCount +RowHeightsChanged +RowIsMultiSelected +RowMoved +RowRequest +RPR +RTLConsts +RtlUnwind +Run +RunErrorAt +RunProgram +RuntimeChange +RunToCursor +SafeArrayAccessData +SafeArrayAllocData +SafeArrayAllocDescriptor +SafeArrayAllocMem +SafeArrayCalculateElementAddress +SafeArrayCheck +SafeArrayClearDataSpace +SafeArrayCopy +SafeArrayCopyData +SafeArrayCopyDataSpace +SafeArrayCreate +SafeArrayCreateError +SafeArrayCreateEx +SafeArrayCreateVector +SafeArrayCreateVectorEx +SafeArrayDestroy +SafeArrayDestroyData +SafeArrayDestroyDescriptor +SafeArrayElementStyle +SafeArrayElementTotal +SafeArrayError +SafeArrayFreeMem +SafeArrayGetDim +SafeArrayGetElement +SafeArrayGetElemSize +SafeArrayGetLBound +SafeArrayGetUBound +SafeArrayLock +SafeArrayPtrOfIndex +SafeArrayPutElement +SafeArrayReallocMem +SafeArrayRedim +SafeArrayUnaccessData +SafeArrayUnlock +SafeArrayValidate +SafeArrayValidateAndCalculateAddress +SafeCallError +SafeCallException +SafeLoadLibrary +SafeRef +SameAs +SameContext +SameDate +SameDateTime +SameFileName +SameNamespace +SameStr +SameSymbol +SameText +SameTime +SameValue +SameView +Save +SaveAll +SaveAllChanges +SaveAs +SaveAsDocument +SaveAsFile +SaveAttributes +SaveAttributesAs +SaveAttributesAsDlg +SaveButtons +SaveChanges +SaveChecks +SaveClick +SaveClipboard +SaveCommand +SaveCompleted +SaveConfigFile +SaveCustomColors +SaveDataPacket +SaveDC +SaveFile +SaveFocusState +SaveHiddenCategories +SaveKey +SaveObject +SaveProject +SaveRecreateItems +saveregisters +SaveRuntimeState +SaveSelection +SaveTemplate +SaveTemplates +SaveToClipboardFormat +SaveToFile +SaveToStream +SaveToStreamPersist +SaveToStrings +SaveToUTF8String +SaveToXML +SaveToXMLStrings +SaveTreeToStream +SaveViewState +SaveWindowState +Saving +ScaleBy +ScaleControls +ScaleImage +ScaleScrollBars +ScaleViewportExtEx +ScaleWindowExtEx +ScanSet +ScheduleJob +SchemaObject +SchemaParseError +SchemaValidationError +ScktCnst +ScktComp +ScktMain +SConnect +Score +ScreenHeight +ScreenToClient +ScreenWidth +Scroll +ScrollBarVisible +ScrollBtnClick +ScrollBy +ScrollClick +ScrollConsoleScreenBuffer +ScrollConsoleScreenBufferA +ScrollConsoleScreenBufferW +ScrollData +ScrollDataInfo +ScrollDC +ScrollerShown +ScrollerSize +ScrollIntoView +ScrollInView +ScrollMessage +ScrollPosChanged +ScrollRect +ScrollRectIntoView +ScrollTabs +ScrollWindow +ScrollWindowEx +Search +SearchAgain +SearchBuf +SearchEdit +SearchFileNameFromIndex +SearchLinkedSchemas +SearchPath +SearchPathA +SearchPathW +SearchRec +SearchSiblingSchemas +SearchTreeForFile +Sec +Secant +SecH +SECOND_IPADDRESS +SecondOf +SecondOfTheDay +SecondOfTheHour +SecondOfTheMinute +SecondOfTheMonth +SecondOfTheWeek +SecondOfTheYear +SecondsBetween +SecondSpan +SectionClick +SectionDrag +SectionEndDrag +SectionExists +SectionResize +SectionTrack +Seek +SeekParent +segment +Select +SelectAll +SelectAll1Click +SelectAllCommandUpdate +SelectAllItemClick +SelectAndPositionItem +SelectCategory +SelectCell +SelectClipPath +SelectClipRgn +SelectComponent +SelectContext +SelectCurrent +SelectDirCB +SelectDirectory +SelectedSprig +SelectedToolChanged +SelectFirst +Selection +SelectionChange +SelectionChanged +SelectionMessageListOf +SelectionMoved +SelectionSurvey +SelectionUpdate +SelectItem +SelectItemAt +SelectItemName +SelectItems +SelectKeyValue +SelectKeyword +SelectLocked +SelectNext +SelectNextPage +SelectNextTab +SelectNode +selectNodes +SelectNone +SelectObject +SelectObjects +SelectPalette +SelectPicture +selectSingleNode +SelectTable +self +sem_grab +sem_init +sem_release +sem_terminate +sem_tgrab +Send +SendBuf +SendCancelMode +SendConnectEvent +SendControlMsg +SendDlgItemMessage +SendDlgItemMessageA +SendDlgItemMessageW +SendDriverMessage +sender +sendErrorNotification +SendFocusMessage +SendInput +SendMessage +SendMessageA +SendMessageCallback +SendMessageCallbackA +SendMessageCallbackW +SendMessageTimeout +SendMessageTimeoutA +SendMessageTimeoutW +SendMessageW +SendNotifyMessage +SendNotifyMessageA +SendNotifyMessageW +SendOnClose +SendOnDataChange +SendOnRename +SendOnSave +SendReceive +SendStream +SendStreamPiece +SendStreamThenDrop +SendText +sendto +SendToParent +separate +SeparatorBtnStartDrag +server_enterprise +server_fasttrack +server_hostname +server_id +server_root +ServerCallback +ServerFillBuffer +ServerGetSize +ServerNotify +ServiceCheck +ServiceController +ServiceMain +session_create +session_dns +session_dns_lookup +session_free +session_maxdns +SessionNameStored +set +Set_AbsolutePage +Set_AbsolutePosition +Set_accName +Set_accValue +Set_ActiveConnection +Set_async +Set_Attributes +Set_Bookmark +Set_Buffer +Set_CacheControl +Set_CacheSize +Set_Chapter +Set_CharSet +Set_CodePage +Set_Collect +Set_CommandText +Set_CommandTimeout +Set_CommandType +Set_ConnectionString +Set_ConnectionTimeout +Set_Constraints +Set_ContentType +Set_ControlDefault +Set_CursorLocation +Set_CursorType +Set_Data +Set_DataFormat +Set_DataMember +Set_DataSource +Set_dataType +Set_DefaultDatabase +Set_DefinedSize +Set_Direction +Set_documentElement +Set_Domain +set_Encoding +Set_Expanded +Set_Expires +Set_ExpiresAbsolute +Set_Filter +Set_Focused +set_hPal +Set_Index +Set_input +Set_InternetTimeout +Set_IsolationLevel +Set_Item +Set_JavaDSOCompatible +Set_LCID +Set_length +Set_LockType +Set_MarshalOptions +Set_MaxRecords +Set_Mode +Set_Name +Set_nodeTypedValue +Set_nodeValue +Set_NumericScale +Set_OLEDBCommand +set_OnAsyncLoad +Set_ondataavailable +Set_onreadystatechange +Set_ontransformnode +Set_output +Set_PageSize +Set_Path +Set_Precision +Set_Prepared +Set_preserveWhiteSpace +Set_Provider +Set_resolveExternals +Set_RowPosition +Set_Rowset +Set_ScriptTimeout +Set_Secure +Set_Selected +Set_Size +Set_Sort +Set_Source +set_Standalone +Set_Status +Set_StayInSync +Set_tagName +Set_text +Set_Timeout +Set_Type_ +Set_url +set_validate +Set_validateOnParse +Set_Value +set_Version +Set_XMLDocument +Set8087CW +SetAbort +SetAbortProc +SetAbstract +SetAclInformation +SetAction +SetActionBar +SetActionBars +SetActionClient +SetActionComponent +SetActionList +SetActionManager +SetActive +SetActiveActionList +SetActiveControl +SetActiveItem +SetActiveMenu +SetActiveObject +SetActiveOleControl +SetActivePage +SetActivePageIndex +SetActiveProject +SetActiveRecord +SetActiveUpdateException +SetActiveWindow +SetAddress +SetAdvise +SetAggregates +SetAggsActive +SetAlcBitAnsi +SetAliasName +SetAlign +SetAlignButton +SetAlignment +SetAllColors +SetAllocBy +SetAllowAllUp +SetAllowCreate +SetAllowTextButtons +SetAlphabetHRC +SetAlphabetPriorityHRC +SetAlphaBlend +SetAlphaBlendValue +SetAlternateDockHost +SetAltRecBuffers +SetAncestor +SetAnimate +SetAnimateDuration +SetAnimateInterval +SetAnimateParams +SetAnimation +SetAppletIcon +SetApplicationMainFormOnTaskBar +SetAppName +SetAppServer +SetArcDirection +SetArguments +SetArrangement +SetArrangeMode +SetArrowKeys +SetArrowSize +SetArrowType +SetAsBCD +SetAsBlob +SetAsBoolean +SetAsByteArray +SetAsCurrency +SetAsDate +SetAsDateTime +SetAsDouble +SetAsFloat +SetAsFMTBCD +SetAsGuid +SetAsHandle +SetAsInteger +SetAsLargeint +SetAsMemo +SetAsPolar +SetAsSmallInt +SetAssociate +SetAsSQLTimeStamp +SetAsString +SetAsText +SetAsTime +SetAsVariant +SetAsWideString +SetAsWord +SetAsyncStyles +SetAttribute +SetAttributeformDefault +setAttributeNode +setAttributeNodeNS +SetAttributeNodes +SetAttributeNS +SetAttributes +SetAuthor +SetAutoArrange +SetAutoCheck +SetAutoCompleteKey +SetAutoCompleteOptions +SetAutoDisplay +SetAutoEnable +SetAutoExpand +SetAutoGenerateValue +SetAutoHotKeys +SetAutoIndent +SetAutoLineReduction +SetAutoMerge +SetAutoRefresh +SetAutoScroll +SetAutoSessionName +SetAutoSize +SetAutoSizing +SetAutoSubClass +SetAutoWrap +SetAxBorderStyle +SetBackGradientDirection +SetBackground +SetBackgroundColor +SetBackgroundGradientColor +SetBackgroundLayout +SetBackspaceUnindents +SetBalloonHint +SetBalloonTimeout +SetBalloonTitle +SetBandBorderStyle +SetBandMaximize +SetBands +SetBaseName +SetBaseTypeName +SetBevel +SetBevelCut +SetBeveled +SetBevelEdges +SetBevelInner +SetBevelKind +SetBevelOuter +SetBevelWidth +SetBiDiMode +SetBiDiModeFromPopupControl +SetBindOptions +SetBit +SetBitmap +SetBitmapBits +SetBitmapDimensionEx +SetBkColor +SetBkMode +SetBlobData +SetBlobType +SetBlockAfter +SetBlockIndent +SetBlockReadSize +SetBlockStart +SetBlockType +SetBlockVisible +SetBookmarkData +SetBookmarkFlag +SetBookmarkStr +SetBoolProp +SetBorderIcons +SetBorderSpace +SetBorderSpaceDW +SetBorderStyle +SetBorderWidth +SetBounded +SetBounds +SetBoundsRect +SetBoxAlphabetHRC +SetBreak +SetBrokerName +SetBrowseDlg +SetBrowseOptions +SetBrush +SetBrushOrgEx +SetBucketCount +SetBuffer +SetBufferCount +SetBufListSize +SetButtonCategories +SetButtonCount +SetButtonFlow +SetButtonHeight +SetButtons +SetButtonSize +SetButtonState +SetButtonStyle +SetButtonWidth +SetByteProp +SetCachedUpdates +SetCacheSize +SetCalAlignment +SetCalColors +SetCalculated +SetCanClose +SetCapacity +SetCaption +SetCaptionOptions +SetCapture +SetCardinality +SetCaretBlinkTime +SetCaretPos +SetCaseInsFields +SetCaseSensitive +SetCatButtonOptions +SetCategory +SetCBInfo +SetCBreak +SetCell +SetCells +SetCenter +SetChangeDelay +SetChangesAllowed +SetCharCase +SetCharset +SetCheckboxes +SetCheckButtonState +SetChecked +SetChildDefs +SetChildNodes +SetChildOrder +SetChildren +SetChildValue +SetClass +SetClassLong +SetClassLongA +SetClassLongW +SetClassName +SetClassWord +SetClearVarToEmptyParam +SetClientGuid +SetClientHeight +SetClientSite +SetClientType +SetClientWidth +SetClipboard +SetClipboardData +SetClipboardViewer +SetCode +SetCol +SetColCount +SetCollapsed +SetCollectedProperties +SetCollection +SetCollectionPropertyName +SetColOptions +SetColor +SetColorAdjustment +SetColored +SetColorMap +SetColorProp +SetColorScheme +SetColorSpace +SetCols +SetColumn +SetColumnAttributes +SetColumnClick +SetColumnCollection +SetColumnHeaders +SetColumns +SetColumnSpan +SetColumnTitles +SetColumnWidth +SetColWidths +SetComandType +SetComboText +SetComCtlStyle +SetCommandText +SetCommandTimeOut +SetCommandType +SetCommaText +SetCommBreak +SetCommConfig +SetCommMask +SetCommonAVI +SetCommState +SetCommTimeouts +SetComplete +SetComponent +SetComponentIndex +SetComponentName +SetCompProp +SetComputerName +SetComputerNameA +SetComputerNameW +SetConfigMode +SetConfigParams +SetConnected +SetConnection +SetConnectionBroker +SetConnectionFlag +SetConnectionObject +SetConnectionString +SetConnectionTimeout +SetConnectMode +SetConnectOptions +SetConnectStatus +SetConnectType +SetConsoleActiveScreenBuffer +SetConsoleCP +SetConsoleCtrlHandler +SetConsoleCursorInfo +SetConsoleCursorPosition +SetConsoleMode +SetConsoleOutputCP +SetConsoleScreenBufferSize +SetConsoleTextAttribute +SetConsoleTitle +SetConsoleTitleA +SetConsoleTitleW +SetConsoleWindowInfo +SetConstraints +SetContainedObject +SetContent +SetContentExtent +SetContentModel +SetContext +SetContextItems +SetControl +SetControlBounds +SetControlCollection +SetControlIndex +SetControlItemState +SetControlItemText +SetControlLabel +SetControlState +setConvertBufSize +SetConvertStg +SetCornerEdge +SetCount +SetCreateBackupFile +SetCriticalSectionSpinCount +setCssText +SetCtl3D +SetCtl3DButton +SetCurItem +SetCurrency +SetCurrencyProp +SetCurrentDir +SetCurrentDirectory +SetCurrentDirectoryA +SetCurrentDirectoryW +SetCurrentKey +setCurrentNode +SetCurrentProcess +SetCurrentRecord +SetCurrentRowSelected +SetCurrentSession +SetCurrentSubItem +SetCurrentThread +SetCursor +SetCursorLocation +SetCursorPos +SetCursorRange +SetCursors +SetCursorThroughTabs +SetCursorType +SetCustData +SetCustomColors +SetCustomColorsArray +SetCustomConstraint +SetCustomFooterIcon +SetCustomForm +SetCustomFormGlassFrame +SetCustomizable +SetCustomMainIcon +SetCut +SetData +SetDatabaseFlags +SetDatabaseName +SetDatabaseType +SetDataField +SetDataFieldName +SetDataSet +SetDataSetField +SetDataSize +SetDataSource +SetDataType +SetDataTypeName +SetDate +SetDateFormat +SetDateMode +SetDateTime +SetDay +SetDBFlag +SetDCBrushColor +SetDCPenColor +SetDdeClientConv +SetDdeClientItem +SetDdeService +SetDdeTopic +SetDeactivateOnReturn +SetDebugErrorLevel +SetDefAttributes +SetDefault +SetDefaultButton +SetDefaultColorColor +SetDefaultColWidth +SetDefaultCommConfig +SetDefaultCommConfigA +SetDefaultCommConfigW +SetDefaultDatabase +SetDefaultExtension +SetDefaultFields +SetDefaultFilter +SetDefaultFolder +SetDefaultIcon +SetDefaultKeyProc +SetDefaultRowHeight +SetDelimitedText +SetDelimiter +SetDependencies +SetDerivationMeth +SetDerivationMethod +SetDescFields +SetDescription +SetDesigner +SetDesignerModified +SetDesigning +SetDesignInstance +SetDesignMode +SetDesignVisible +SetDesktopItemOptions +SetDestDockSite +SetDestination +SetDetailFilter +SetDeviceGammaRamp +SetDeviceType +SetDialogHandle +SetDIBColorTable +SetDIBits +SetDIBitsToDevice +SetDir +SetDirection +SetDirectory +SetDirLabel +SetDirLabelCaption +SetDirListBox +setDisabled +SetDisabledImageList +SetDisabledImages +SetDisableGroup +SetDisableStringTrim +SetDispatchPropValue +SetDispID +SetDisplay +SetDisplayErrorDlg +SetDisplayFormat +SetDisplayLabel +SetDisplayName +SetDisplayOptions +SetDisplayRect +SetDisplayValue +SetDisplayValues +SetDisplayWidth +SetDitherBackground +SetDlgItemInt +SetDlgItemText +SetDlgItemTextA +SetDlgItemTextW +SetDoBreak +SetDocElementDef +SetDockSite +SetDocString +SetDocumentElement +SetDoHandleExceptions +SetDoIgnoreExceptions +SetDOMDocument +setDomImpl +SetDOMImplementation +SetDOMVendor +SetDoubleClickTime +SetDoubleProp +SetDown +SetDragButton +SetDragCursor +SetDragImage +SetDragIndex +SetDragMode +SetDragReorder +SetDragScroll +SetDrawAspect +SetDrawingStyle +SetDrive +SetDriverName +SetDropDownCount +SetDropdownMenu +SetDropDownRows +SetDroppedDown +SetDropPoint +SetDropTarget +SetDSWriter +SetDynArrayProp +SetEdgeBorders +SetEdgeInner +SetEdgeOuter +SetEdges +SetEditable +SetEditBoxText +SetEditFormat +SetEditing +SetEditMask +SetEditMode +SetEditorMode +SetEditorOpts +SetEditReadOnly +SetEditRect +SetEditStyle +SetEditText +SetElementformDefault +SetElementTimes +SetElevationRequired +SetEllipsisPosition +SetEnabled +SetEnabledButtons +SetEnableDropdown +SetEnableGroup +SetEncoding +SetEncodingLevel +SetEncodings +SetEndDate +SetEndMargin +SetEndOfFile +SetEnhMetaFileBits +SetEntriesInAcl +SetEntriesInAclA +SetEntriesInAclW +SetEnumAllWindowsOnActivateHint +SetEnumProp +SetEnvironmentVariable +SetEnvironmentVariableA +SetEnvironmentVariableW +SetErrorInfo +SetErrorMessage +SetErrorMode +SetErrorProc +SetEvalExpression +SetEvent +SetExceptionHandler +SetExceptionMask +SetExceptionMessage +SetExclusive +SetExecuteOptions +SetExecution +SetExpanded +SetExpandedItems +SetExpandedState +SetExpandedText +SetExpression +SetExprParams +SetExtendedFrame +SetExtendedSelect +SetExtensions +SetExtent +setExternalCM +SetFAttr +SetFavoriteLinks +SetField +SetFieldCalculation +SetFieldClass +SetFieldData +SetFieldDef +SetFieldDefs +SetFieldIndex +SetFieldKind +SetFieldName +SetFieldNames +SetFields +SetFieldType +SetFieldValue +SetFileApisToANSI +SetFileApisToOEM +SetFileAttributes +SetFileAttributesA +SetFileAttributesW +SetFileEdit +SetFileListBox +SetFileName +SetFileNameLabel +SetFilePointer +SetFileSecurity +SetFileSecurityA +SetFileSecurityW +SetFileSystem +SetFileTime +SetFileType +SetFileTypeIndex +SetFileTypes +SetFillSize +SetFilter +SetFilterData +SetFiltered +SetFilterGroup +SetFilterHandle +SetFilterOptions +SetFilterText +SetFinal +SetFindText +SetFirstDayOfWeek +SetFirstIndent +SetFirstIndex +SetFixed +SetFixedBackground +SetFixedColor +SetFixedCols +SetFixedOrder +SetFixedRows +SetFixedSize +SetFlags +SetFlat +SetFlatScrollBars +SetFloatProp +SetFloatValue +SetFlowStyle +SetFMTBcd +SetFocus +SetFocusControl +SetFocused +SetFocusedControl +SetFocusedItem +SetFolder +SetFont +SetFontColor +SetFontName +SetFontOrientation +SetFontSize +SetFontStyle +SetFooterIcon +SetFooterText +SetForceCutCopyEnabled +SetForegroundWindow +SetForm +SetFormA +SetFormat +SetFormatChars +SetFormChoice +SetFormDefaults +SetFormStyle +SetFormW +SetFound +SetFractionalDigits +SetFractions +SetFrequency +SetFrom +SetFromCursor +SetFTime +SetFullDrag +SetFuncAndParamNames +SetFuncCustData +SetFuncDocString +SetFuncHelpContext +SetFuncHelpStringContext +SetGetSocketEvent +SetGetThreadEvent +SetGlassFrame +SetGlyph +SetGlyphLayout +SetGoodIndex +SetGradientColor +SetGradientDirection +SetGradientDrawingOptions +SetGradientEndColor +SetGradientStartColor +SetGraphic +SetGraphicsMode +SetGrid +SetGridLines +SetGridLineWidth +SetGrouped +SetGroupIndex +SetGroupingLevel +SetGroupName +SetGroupUndo +SeTGrpButtonItems +SetGrpButtonOptions +SetGUID +SetGuideHRC +SetHandle +SetHandleCount +SetHandleInformation +SetHeader +SetHeaderBackgroundColor +SetHeaderColor +SetHeaderValue +SetHeight +SetHelp +SetHelpContext +SetHelpFile +SetHelpFileName +SetHelpKeyword +SetHelpName +SetHelpStringContext +SetHelpStringDll +SetHelpType +SetHiddenFields +SetHideClippedButtons +SetHideScrollBars +SetHideSelection +SetHideUnused +SetHighlightCurrentLine +SetHighlighted +SetHint +SetHintColor +SetHintFont +SetHints +SetHintShortCuts +SetHintText +SetHistoryList +SetHmenuProp +SetHmenuPropServer +SetHmenuPropStr +SetHorizontalOnly +SetHorzMargin +SetHorzScrollBar +SetHorzSeparator +SetHost +SetHostNames +SetHotButtonColor +SetHotImageList +SetHotImages +SetHotKey +SetHotTrack +SetHotTrackStyles +SetHour +SetHoverTime +SetHwndProp +SetHwndPropServer +SetHwndPropStr +SetICMMode +SetICMProfile +SetICMProfileA +SetICMProfileW +SetIcon +SetIconFont +SetIconic +SetIconIndex +SetIconList +SetIconLocation +SetIconOptions +SetID +SetIDispatchProp +SetIDList +SetIgnoreException +SetImage +SetImageConfigInformation +SetImageIndex +SetImageList +SetImages +SetImaginary +SetIme +SetImeCompositionWindow +SetImeMode +SetImeName +SetImplTypeCustData +SetImplTypeFlags +SetImportedConstraint +SetImportedNamespaces +SetInActive +SetInch +SetIncludeObjectField +SetIncrement +SetIndent +SetIndeterminate +SetIndex +SetIndexDef +SetIndexDefs +SetIndexField +SetIndexFieldNames +SetIndexFiles +SetIndexName +SetIndexOf +SetInitialDir +SetInitialPageNum +SetInitialState +SetInline +SetInOutRes +SetInPlaceSite +SetInsertionButton +SetInsertionPoints +SetInsertMode +SetInt64Prop +SetInt64Value +SetIntegerProp +SetIntegralHeight +SetInteractive +SetInterceptGUID +SetInterceptName +SetInterfaceProp +SetInterfaceSafetyOptions +setInternalCM +SetInternationalHRC +SetInterval +SetIntfValue +SetIntVec +SetInvalidCharacterException +SetInvalidKeys +SetInvokeKind +SetIsControl +SetIsDefault +SetIsDirty +SetIsolationLevel +SetIsReadOnly +setIsUnusable +SetItem +SetItemData +SetItemEnabled +SetItemHeight +SetItemIndex +SetItemName +SetItems +SetItemSelection +SetItemsEx +SetItemType +SetItemValue +SetIUnknownProp +SetJob +SetJobA +SetJobW +SetKeepConnection +SetKeepTrailingBlanks +SetKernelObjectSecurity +SetKey +SetKeyboardState +SetKeyBuffer +SetKeyDesc +SetKeyExclusive +SetKeyFieldCount +SetKeyFieldName +SetKeyFields +SetKeyOptions +SetKeyTracing +SetKeyValue +SetKeywords +SetKind +SetLabelPosition +SetLabelSpacing +SetLanguage +SetLargeButtons +SetLargeImages +SetLastError +SetLastErrorEx +SetLastSession +SetLayeredAttribs +SetLayeredWindowAttributes +SetLayout +SetLcid +SetLeft +SetLeftCol +SetLeftGutterWidth +SetLeftIndent +SetLength +SetLevel +SetLibFlags +SetLineBreak +SetLineBreakStyle +SetLineNum +SetLineNumber +SetLines +SetLineSize +SetLineStyle +SetLink +SetLinkedActionLists +SetLinkRanges +SetLinkSource +SetLinkUpdateOptions +SetList +SetListColumns +SetListControl +SetListFieldName +SetListItem +SetListitems +SetListSource +SetLocale +SetLocaleInfo +SetLocaleInfoA +SetLocaleInfoW +SetLocalTime +SetLocation +SetLockType +SetLogChanges +SetLogControl +SetLogControlVariants +SetLogFileName +SetLogMessage +SetLogResult +SetLongStrProp +SetLookup +SetLookupCache +SetLookupDataSet +SetLookupDisplay +SetLookupField +SetLookupKeyFields +SetLookupMode +SetLookupResultField +SetLookupSource +SetMailslotInfo +SetMainFormOnTaskBar +SetMainIcon +SetManualCompleteKey +SetMapMode +SetMapperFlags +SetMappings +SetMargin +SetMargins +SetMarked +SetMarqueeSpeed +SetMarshalOptions +SetMask +SetMaskColor +SetMasterFields +SetMax +SetMaxDate +SetMaxExclusive +SetMaxInclusive +SetMaxLength +SetMaxOccurs +SetMaxRecords +SetMaxResultsHRC +SetMaxSelectRange +SetMaxValue +SetMaxWidth +SetMemberTypes +SetMemoryManager +SetMenu +SetMenuContextHelpId +SetMenuDefaultItem +SetMenuFont +SetMenuIndex +SetMenuInfo +SetMenuItem +SetMenuItemBitmaps +SetMenuItemInfo +SetMenuItemInfoA +SetMenuItemInfoW +SetMenuSB +SetMergeIndex +SetMessageExtraInfo +SetMessageQueue +SetMetafile +SetMetaFileBitsEx +SetMetaRgn +SetMethodProp +SetMethodValue +SetMin +SetMinDate +SetMinExclusive +SetMinHeight +SetMinimumBlockAlignment +SetMinInclusive +SetMinLength +SetMinOccurs +SetMinute +SetMinValue +SetMinWidth +SetMiterLimit +SetMixed +SetMMHeight +SetMMWidth +SetMode +SetModified +SetModifiedState +SetModifiers +SetModifyTime +SetModule +SetModuleCount +SetModules +SetMoniker +SetMonth +SetMonthDelta +SetMops +SetMouseControl +SetMultiByteConversionCodePage +SetMultiLine +SetMultiSelect +SetMultiSelectStyle +SetMyTransactionVote +SetName +setNamedItem +setNamedItemNS +SetNamedPipeHandleState +SetNamedSecurityInfo +SetNamedSecurityInfoA +SetNamedSecurityInfoW +SetNameOf +setNamespaceAware +SetNameValueSeparator +SetNetFileDir +SetNewDimensions +SetNewValue +setNextHandlers +SetNodeIndentStr +SetNodeOp +SetNodeValue +SetNoneColorColor +SetNotify +SetNotifyCallBack +SetNumbering +SetNumCopies +SetNumeric +SetNumericScale +SetNumGlyphs +SetObjectAccessRights +SetObjectBroker +SetObjectMenuItem +SetObjectOwner +SetObjectProp +SetObjectRects +SetObjects +SetObjectView +SetOEMConvert +SetOffset +SetOkButtonLabel +SetOle2MenuHandle +SetOleBoolProp +SetOleDateProp +SetOleEnumProp +SetOleVariantProp +SetOnAsyncLoad +SetOnClick +SetOnClientError +SetOnClientEvent +SetOnContinue +SetOnDrawButton +SetOnDrawIcon +SetOnDrawPanel +SetOnDrawSection +SetOnEditButtonClick +SetOnExecute +SetOnFilterRecord +SetOnPause +SetOnSectionClick +SetOnSectionResize +SetOnSectionTrack +SetOnStop +SetOnStringsChange +SetOnStringsChanging +SetOnThreadEnd +SetOnThreadStart +SetOnTimer +SetOnUpdateError +SetOpen +SetOptionalParam +SetOptions +SetOptionsName +SetOptionValue +SetOrdered +SetOrdProp +SetOrdValue +SetOrientation +SetOrigDisplay +SetOTAXMMRegisters +SetOutlineOptions +SetOutlineStyle +SetOverlayImageIndex +SetOverlayIndex +SetOverLoad +SetOverwriteBlocks +SetOwner +SetOwnerData +SetOwnerDraw +SetPackageName +SetPadding +SetPageControl +SetPageIndex +SetPages +SetPageSite +SetPageSize +SetPalette +SetPaletteEntries +SetPanCursor +SetPanelBorder +SetPanelHeight +SetPanelIndex +SetPanels +SetPanelWidth +SetPanInterval +SetParamCheck +SetParamCustData +setParameter +SetParameterDirection +SetParameterInfo +SetParameters +SetParams +SetParamsFromCursor +SetParamsList +SetParamType +SetParamValue +SetParent +SetParentBackground +SetParentBiDiMode +SetParentBitmap +SetParentColor +SetParentComponent +SetParentConnection +SetParentControl +SetParentCtl3D +SetParentField +SetParentMenu +SetParentNode +SetParentWindow +SetParseInput +SetParseOptions +SetPassCount +SetPassword +SetPasswordChar +SetPath +SetPattern +SetPen +SetPenAppFlags +SetPendingClearSelection +SetPenMiscInfo +SetPenPos +SetPersistentBlocks +SetPersistentHotKeys +SetPickList +SetPicture +SetPinnedWindow +SetPitch +SetPixel +SetPixelFormat +SetPixelsPerInch +SetPixelV +SetPlainText +SetPlaybackObject +SetPointer +SetPolicy +SetPolyFillMode +SetPopupMenu +SetPopupMode +SetPopupParent +SetPopupPoint +SetPort +SetPortA +SetPortW +SetPos +SetPosition +SetPositionToolTip +SetPrecision +SetPrecisionMode +setPredefinedEntities +setPrefix +SetPrepare +SetPrepared +SetPreserveLineEnds +SetPrinter +SetPrinterA +SetPrinterCapabilities +SetPrinterData +SetPrinterDataA +SetPrinterDataW +SetPrinterIndex +SetPrinterW +SetPriority +SetPriorityClass +SetPrioritySchedule +SetPrivateDir +SetPrivateObjectSecurity +SetPrivateObjectSecurityEx +SetProcessAffinityMask +SetProcessPriorityBoost +SetProcessShutdownParameters +SetProcessState +SetProcessWindowStation +SetProcessWorkingSetSize +SetProcName +SetProductIcon +SetProjectDependencies +SetPrologValue +SetPromptOnReplace +SetProp +SetPropA +SetPropByName +SetPropDisplayString +SetPropEntry +SetProperties +SetProperty +SetPropertyEditorGroup +SetProportional +SetPropServer +SetPropValue +SetPropW +SetProtected +SetProvider +SetProviderEOF +SetProviderName +SetPSResult +SetPublicID +SetPushRate +SetQuery +SetQueryParams +SetQuoteChar +SetRadioButtons +SetRadioItem +SetRaggedRight +SetRaiseList +SetRange +SetRangeEnd +SetRangeStart +SetRatio +SetRDSConnection +SetReadOnly +SetReal +SetRecNo +SetRecordObject +SetRecordset +SetRect +SetRectComplex +SetRectEmpty +SetRectRgn +SetRef +SetReference +setReferenceNode +SetReferences +SetReferent +SetRefItem +SetRefName +SetRegularButtonColor +SetRegularExpression +SetRelativePath +SetRemoteServer +SetRepetitions +SetReplaceAll +SetReplaceText +SetReplacingControl +setRequestHeader +SetRequired +SetResHandle +SetResId +SetResidIcon +SetResidInfo +SetResidName +SetResName +SetResolveToDataSet +SetResultsHookHREC +SetRichEditStrings +SetRightIndent +SetRightMargin +SetRoot +SetRootKey +SetRootSprig +SetRootStyle +SetROP2 +SetRoundMode +SetRow +SetRowCollection +SetRowCount +SetRowFromNode +SetRowHeight +SetRowHeights +SetRowPosition +SetRows +SetRowSelect +SetRowSize +SetRowSnap +SetRowSpan +SetSafeCallExceptionAddr +SetSafeCallExceptionMsg +SetSaveAsItem +SetSaveFileName +SetSavePoint +SetScaled +SetSchema +SetSchemaDef +SetSchemaLocation +SetScript +SetScriptLanguage +SetScrollBars +SetScrollInfo +SetScrollOpposite +SetScrollOrientation +SetScrollPos +SetScrollRange +SetScrollWidth +SetSearchText +SetSecond +SetSecondaryShortCuts +SetSections +SetSecurityDescriptorControl +SetSecurityDescriptorDacl +SetSecurityDescriptorGroup +SetSecurityDescriptorOwner +SetSecurityDescriptorSacl +SetSecurityInfo +SetSecuritySite +SetSel +SetSelAttributes +SetSelected +SetSelectedBit +SetSelectedButtonColor +SetSelectedColor +SetSelectedControlItem +SetSelectedField +SetSelectedImageIndex +SetSelectedIndex +SetSelectedItem +SetSelectedRange +SetSelectedTool +SetSelection +SetSelections +SetSelEnd +SetSelLength +SetSelStart +SetSelText +SetSelTextBuf +SetServerConv +SetServerData +SetServerGUID +SetServerName +SetServerParams +SetServers +SetServerType +SetService +SetServiceObjectSecurity +SetServiceStartName +SetServiceStatus +SetSessionName +SetSessionNames +SetSetProp +SetShadow +SetShadows +SetShape +SetSheetOfGlass +SetShortCut +SetShortIntProp +SetShortStrProp +SetShortStrPropAsLongStr +SetShowAccelChar +SetShowCaption +SetShowCaptions +SetShowCheckbox +SetShowCmd +SetShowGlyph +SetShowGlyphs +SetShowHint +SetShowHints +SetShowLineBreaks +SetShowSelRange +SetShowShortCut +SetShowSpace +SetShowTab +SetShowText +SetShowToday +SetShowTodayCircle +SetShowWorkAreas +SetShrinkToFit +SetSignature +SetSimplePanel +SetSimpleText +SetSingleProp +SetSite +SetSize +SetSize64 +SetSizeGrip +SetSizeMode +SetSizeStyle +SetSliderVisible +SetSmallIcon +SetSmallIcons +SetSmallImages +SetSmallintProp +SetSmartTab +SetSmooth +setsockopt +SetSoftTop +SetSoftwareUpdateAdvertisementState +SetSort +SetSorted +SetSortOrder +SetSortType +SetSource +SetSourceDisplayName +SetSourceMoniker +SetSpacing +SetSparseArrays +SetSpeedSetting +SetSprigDesigner +SetSQL +SetSQLIndex +SetSQLText +SetStackFramesToLog +SetStandAlone +SetStartFrame +SetStartMargin +SetState +SetStateBits +SetStateFieldValue +SetStateImages +SetStateIndex +SetStatus +SetStatusFilter +SetStatusText +SetStatusTextSB +SetStayOnTop +SetStdHandle +SetStep +SetStopFrame +SetStreamMetaData +SetStretch +SetStretchBltMode +SetStrictDelimiter +SetStrictFormat +SetString +setStringLength +setStringPosition +SetStringProp +SetStrings +SetStringsAdapter +SetStrokeAttributes +SetStrokeTableAttributes +SetStrProp +SetStructureContext +SetStructureNodeMenuItem +SetStrValue +SetStyle +SetStyleEx +SetSubComponent +SetSubItemImage +SetSubItems +SetSubMenuImages +SetSupportCallbacks +SetSuspended +SetSwapAreaSize +SetSyntaxHighlight +SetSyntaxHighlighter +SetSyntaxHighlightTypes +SetSysColors +SetSystemCursor +SetSystemID +SetSystemPaletteUse +SetSystemPowerState +SetSystemTime +SetSystemTimeAdjustment +SetTab +SetTabCount +SetTabFont +SetTabHeight +SetTabIndex +SetTableDirect +SetTableFilter +SetTableLock +SetTableName +SetTableType +SetTabList +SetTabOrder +SetTabPosition +SetTabs +SetTabShowing +SetTabsPerRow +SetTabStop +SetTabStops +SetTabStyle +SetTabVisible +SetTabWidth +SetTag +SetTapeParameters +SetTapePosition +SetTargetNamespace +SetTColorProp +SetTDateTimeProp +SetTemplate +SetTemplateFormat +SetTemplateType +SetTempLocale +SetTempMsg +SetTempState +SetText +SetTextAlign +SetTextBkColor +SetTextBuf +SetTextCase +SetTextCharacterExtra +SetTextColor +SetTextJustification +SetTextStr +SetTFontProp +SetThousands +SetThreadAffinityMask +SetThreadCacheSize +SetThreadContext +SetThreadDesktop +SetThreadIdealProcessor +SetThreadLocale +SetThreadPriority +SetThreadPriorityBoost +SetThreadToken +SetThumbLength +SetThumbSize +SetTick +SetTickMarks +SetTickStyle +SetTime +SetTimeFormat +SetTimer +SetTimers +SetTimes +SetTimeZoneInformation +SettingChange +SetTitle +SetTitleCaptions +SetTitleFont +SetTo +SetToDefaultPrinter +SetTokenInformation +SetTOleEnumProp +SetToolBar +SetToolbarItems +SetToolTip +SetToolTips +SetTop +SetTopic +SetTopIndex +SetTopItem +SetTopLeft +SetTopPos +SetTopRow +SetToString +SetTotalDigits +SetTPictureProp +SetTraceFlags +SetTransparent +SetTransparentColor +SetTransparentColorValue +SetTreeNodes +SetType +SetTypeDescAlias +SetTypeFlags +SetTypeIdldesc +SetUIActive +SetUndoAfterSave +SetUndoLimit +SetUnhandledExceptionFilter +SetUniDirectional +SetUnitName +SetUnNamed +SetUnselectedColor +SetUnwinder +SetupActionBars +SetupAutoRefresh +SetupBindings +SetupBrowseDialog +SetupCallBack +SetupComm +SetupConstraints +SetUpdateMode +SetUpdateObject +SetUpdateOptions +SetUpdateRecordSet +SetUpdateState +SetupDefaultColorMap +SetupDialog +SetupDlg +SetupDropDownBtn +SetupExpandBtn +SetupInternalCalcFields +SetupInternalLabel +SetupListCombo +SetUpLists +SetupPopupSource +SetupPopupWindow +SetupTabPositions +SetupWindowMenu +SetURL +SetUrlCacheEntryGroup +SetUrlCacheEntryInfo +SetUrlCacheEntryInfoA +SetUrlCacheEntryInfoW +SetUrlPolicyPermissions +SetUsageCount +SetUse +SetUseBriefCursorShapes +SetUseBriefRegularExpressions +SetUseBroker +SetUseDefaultTopic +SetUseDockManager +SetUserObjectInformation +SetUserObjectInformationA +SetUserObjectInformationW +SetUserObjectSecurity +SetUseSystemFont +SetUseTabCharacter +SetValue +SetValueCheck +SetValueFromIndex +SetValues +SetValueToComplexInfinity +SetValueUncheck +SetVarAsError +SetVarCustData +SetVarDocString +SetVarHelpContext +SetVarHelpStringContext +SetVariantManager +SetVariantProp +SetVarName +SetVarValue +SetVerify +SetVersion +SetVertical +SetVerticalAlignment +SetVertMargin +SetVertScrollBar +SetVertSeparator +SetViewAdviseSink +SetViewInfo +SetViewportExtEx +SetViewportOrgEx +SetViewStyle +SetVisible +SetVolumeLabel +SetVolumeLabelA +SetVolumeLabelW +SetWait +SetWaitableTimer +SetWallpaper +SetWallpaperOptions +SetWeekNumbers +SetWhitespace +SetWholeFile +setWideChars +SetWideItem +SetWideStringProp +SetWideStrProp +SetWideStrPropAsLongStr +SetWideStrValue +SetWideText +SetWidth +SetWindowContextHelpId +SetWindowExtEx +SetWindowFocus +SetWindowHandle +SetWindowLong +SetWindowLongA +SetWindowLongW +SetWindowMenu +SetWindowOrgEx +SetWindowPlacement +SetWindowPos +SetWindowRgn +SetWindowsHook +SetWindowsHookA +SetWindowsHookEx +SetWindowsHookExA +SetWindowsHookExW +SetWindowsHookW +SetWindowState +SetWindowSubclass +SetWindowText +SetWindowTextA +SetWindowTextW +SetWindowToMonitor +SetWindowWord +SetWinEventHook +SetWinMetaFileBits +SetWordBoolProp +SetWordBoundary +SetWordlistCoercionHRC +SetWordlistHRC +SetWordProp +SetWordWrap +SetWorkingDirectory +SetWorldTransform +SetWrap +SetWrapable +SetWrapText +SetWritingCurValues +SetXML +SetXMLData +setXmlHandler +SetXMLMode +SetXMLStrings +SetYear +SetZoneActionPolicy +SetZoneActionPolicyEx +SetZoneAttributes +SetZoneCustomPolicy +SetZoneMapping +SetZOrder +SetZOrderPosition +SHAddToRecentDocs +ShadeRect +ShadowWnd +SHAppBarMessage +sharemem +ShareMemoryManager +ShareViolation +SHAutoComplete +SHBrowseForFolder +SHBrowseForFolderA +SHBrowseForFolderW +SHChangeNotify +SHCopyKey +SHCopyKeyA +SHCopyKeyW +SHCreateItemFromIDList +SHCreateItemFromParsingName +SHCreateItemFromRelativeName +SHCreateItemInKnownFolder +SHCreateItemWithParent +SHCreateShellPalette +SHCreateStreamOnFile +SHCreateStreamOnFileA +SHCreateStreamOnFileW +SHCreateThread +SHDeleteEmptyKey +SHDeleteEmptyKeyA +SHDeleteEmptyKeyW +SHDeleteKey +SHDeleteKeyA +SHDeleteKeyW +SHDeleteValue +SHDeleteValueA +SHDeleteValueW +Shell_NotifyIcon +Shell_NotifyIconA +Shell_NotifyIconW +ShellAbout +ShellAboutA +ShellAboutW +ShellAnimations +ShellAPI +ShellExecute +ShellExecuteA +ShellExecuteEx +ShellExecuteExA +ShellExecuteExW +ShellExecuteW +SHEnumKeyEx +SHEnumKeyExA +SHEnumKeyExW +SHEnumValue +SHEnumValueA +SHEnumValueW +shexp_casecmp +shexp_cmp +shexp_match +shexp_valid +SHFileOperation +SHFileOperationA +SHFileOperationW +SHFolder +SHFreeNameMappings +SHGetDataFromIDList +SHGetDataFromIDListA +SHGetDataFromIDListW +SHGetDesktopFolder +SHGetFileInfo +SHGetFileInfoA +SHGetFileInfoW +SHGetFolderPath +SHGetFolderPathA +SHGetFolderPathW +SHGetIDListFromObject +SHGetInstanceExplorer +SHGetMalloc +SHGetNameFromIDList +SHGetPathFromIDList +SHGetPathFromIDListA +SHGetPathFromIDListW +SHGetPropertyStoreFromIDList +SHGetPropertyStoreFromParsingName +SHGetSettings +SHGetSpecialFolderLocation +SHGetSpecialFolderPath +SHGetSpecialFolderPathA +SHGetSpecialFolderPathW +SHGetThreadRef +SHGetValue +SHGetValueA +SHGetValueW +ShiftSelectNode +ShiftState +shl +SHLoadInProc +ShlObj +ShLwApi +shmem_alloc +shmem_free +SHOpenRegStream +SHOpenRegStream2 +SHOpenRegStream2A +SHOpenRegStream2W +SHOpenRegStreamA +SHOpenRegStreamW +ShortCut +ShortCutFromMessage +ShortCutToHotKey +ShortCutToKey +ShortCutToText +ShortToLongFileName +ShouldAutoHide +ShouldContinue +ShouldHideHint +ShouldRedo +ShouldScrollDown +ShouldScrollUp +Show +ShowAboutBox +ShowBalloonHint +ShowCaret +ShowCollectionEditor +ShowCollectionEditorClass +ShowContextHelp +ShowControl +ShowCursor +ShowDockableFormFrame +ShowDockClient +ShowDockClientInfo +ShowDragImage +ShowDW +ShowEditor +ShowEditorChar +ShowEntryPoint +ShowError +ShowException +ShowFieldsEditor +ShowFilename +ShowForm +ShowHelp +ShowHelpException +ShowHideMenuCtl +ShowHintsActnExecute +ShowHintsActnUpdate +ShowHostActionExecute +ShowInitialize +ShowKeywordHelp +ShowMDIClientEdge +ShowMemoryLocation +ShowMessage +ShowMessageFmt +ShowMessagePos +ShowMessageView +ShowMethod +ShowModal +ShowNonSourceLocation +ShowObject +ShowOwnedPopups +ShowPopupEditor +ShowProductSplash +ShowPropertyFrame +ShowReferenceProperty +ShowRegisteredMenus +ShowScrollBar +ShowShortCutsInTipsActnExecute +ShowSource +ShowTableOfContents +ShowToolbar +ShowTopicHelp +ShowWindow +ShowWindowAsync +ShowWinNoAnimate +ShowZone +SHQueryInfoKey +SHQueryInfoKeyA +SHQueryInfoKeyW +SHQueryValueEx +SHQueryValueExA +SHQueryValueExW +shr +SHRegCloseUSKey +SHRegCreateUSKey +SHRegCreateUSKeyA +SHRegCreateUSKeyW +SHRegDeleteEmptyUSKey +SHRegDeleteEmptyUSKeyA +SHRegDeleteEmptyUSKeyW +SHRegDeleteUSValue +SHRegDeleteUSValueA +SHRegDeleteUSValueW +SHRegEnumUSKey +SHRegEnumUSKeyA +SHRegEnumUSKeyW +SHRegEnumUSValue +SHRegEnumUSValueA +SHRegEnumUSValueW +SHRegGetBoolUSValue +SHRegGetBoolUSValueA +SHRegGetBoolUSValueW +SHRegGetIntW +SHRegGetPath +SHRegGetPathA +SHRegGetPathW +SHRegGetUSValue +SHRegGetUSValueA +SHRegGetUSValueW +SHRegOpenUSKey +SHRegOpenUSKeyA +SHRegOpenUSKeyW +SHRegQueryInfoUSKey +SHRegQueryInfoUSKeyA +SHRegQueryInfoUSKeyW +SHRegQueryUSValue +SHRegQueryUSValueA +SHRegQueryUSValueW +SHRegSetPath +SHRegSetPathA +SHRegSetPathW +SHRegSetUSValue +SHRegSetUSValueA +SHRegSetUSValueW +SHRegWriteUSValue +SHRegWriteUSValueA +SHRegWriteUSValueW +ShrinkImage +SHSetThreadRef +SHSetValue +SHSetValueA +SHSetValueW +SHSkipJunction +SHStrDup +SHStrDupA +SHStrDupW +ShutDown +ShutdownApplication +SiblingNotInList +Sign +SignalConverter +SignalObjectAndWait +SignalSyncEvent +SignificantIntDigits +SimpleRoundTo +SimpleShareMem +SimpleVarOp +SimplisticClear +SimplisticCopy +Sin +SinCos +Sinh +SizeChanged +Sized +SizeOf +SizeofResource +Sizing +Skip +SkipBlanks +SkipBytes +SkipComponent +skippedEntity +SkipProperty +SkipSetBody +skipTextDecl +SkipValue +SlashSep +Sleep +SleepEx +SLNDepreciation +SmallCheveron +SmallPoint +SmallPointToPoint +SMClientSignal +SMINTF +sndPlaySound +sndPlaySoundA +sndPlaySoundW +socket +SoftShutDown +SoftwareUpdateMessageBox +Sort +SortByIndex +SortBySprigItemIndex +SortColorArray +SortEntryPoints +SortItems +SortOnFields +SortPropList +sound +Soundex +SoundexCompare +SoundexInt +SoundexProc +SoundexSimilar +SoundexWord +Source +SourceButtonClick +sourceCodeToDom +SourceLocationFromAddress +SourcePos +SpanOfNowAndThen +Split +SplitComponentName +SplitString +SplitSymbols +Splitter1CanResize +Splitter1Moved +SplitterMouseDown +SplitterMouseMove +splitText +Sprig +SprigADOImpliedConnectionName +SprigBDEImpliedDatabaseName +SprigBDEImpliedSessionName +SprigBDESessionName +SQLChanged +SQLDayOfWeek +SqlEdit +SQLMemoEnter +SQLMemoExit +SQLRequiresParams +SQLTimeStampToDateTime +SQLTimeStampToStr +SqlTimSt +SqlTraceCallback +Sqrt +SrvrDisconnect +StackAlloc +StackFree +StackWalk +StandardEvent +Start +StartAdvise +StartApplication +startAttListDeclaration +StartCallStackAccess +StartClassGroup +StartConnect +StartDoc +StartDocA +StartDocPrinter +StartDocPrinterA +StartDocPrinterW +startDocument +StartDocW +startDtd +startElement +StartGroup +StartHintTimer +StartInking +StartOfADay +StartOfAMonth +StartOfAWeek +StartOfAYear +StartOfTheDay +StartOfTheMonth +StartOfTheWeek +StartOfTheYear +StartOperations +StartPage +StartPagePrinter +StartPan +StartPanning +StartPenInput +startPrefixMapping +StartRecording +StartRouter +StartService +StartServiceA +StartServiceCtrlDispatcher +StartServiceCtrlDispatcherA +StartServiceCtrlDispatcherW +StartServiceW +StartSession +StartsStr +StartsText +startsWith +StartTimer +StartToken +StartTransaction +Startup +StartVisualGroup +Stat +StaticQueue +StaticSynchronize +StatusMessage +std_os +StdActnMenus +StdActns +stdcall +StdConvs +StdCtrls +StdDev +StdStyleActnCtrls +StdVCL +StdWndProc +Step +StepBy +StepIt +StepOver +StFilSys +StgCreateDocfile +StgCreateDocfileOnILockBytes +StgGetIFillLockBytesOnFile +StgGetIFillLockBytesOnILockBytes +StgIsStorageFile +StgIsStorageILockBytes +StgOpenAsyncDocfileOnIFillLockBytes +StgOpenLayoutDocfile +StgOpenStorage +StgOpenStorageOnILockBytes +StgSetTimes +StickControls +Stop +StopAdvise +StopHintTimer +StopInking +StopPan +StopPanning +StopPenInput +StopRouter +StopSizing +StopTimer +StopTracking +Store +StoreBitmap +StoreColumns +StoreData +StoreExpandState +StoreItem +StoreObject +StoreTreeState +StrAlloc +StrBufLimit +StrBufSize +StrByteType +strcasecmp +StrCat +StrCatA +StrCatBuff +StrCatBuffA +StrCatBuffW +StrCatN +StrCatNA +StrCatNW +StrCatW +StrCharLength +StrChr +StrChrA +StrChrI +StrChrIA +StrChrIW +StrChrW +StrCmp +StrCmpA +StrCmpI +StrCmpIA +StrCmpIW +StrCmpN +StrCmpNA +StrCmpNI +StrCmpNIA +StrCmpNIW +StrCmpNW +StrCmpW +StrComp +StrCopy +StrCpy +StrCpyA +StrCpyN +StrCpyNA +StrCpyNW +StrCpyNX +StrCpyNXA +StrCpyNXW +StrCpyW +StrCSpn +StrCSpnA +StrCSpnI +StrCSpnIA +StrCSpnIW +StrCSpnW +StrDispose +STRDUP +StrDupA +StrDupW +StreamDS +StreamIn +StreamOut +StreamsEqual +streamToDom +StrECopy +StrEdit +StrEnd +StretchBlt +StretchDIBits +StretchDraw +StrFmt +StrFormatByteSize +StrFormatByteSizeA +StrFormatByteSizeW +StrFormatKBSize +StrFormatKBSizeA +StrFormatKBSizeW +StrFromTimeInterval +StrFromTimeIntervalA +StrFromTimeIntervalW +StrHlpr +StrIComp +string +StringCompare +StringFromCLSID +StringFromGUID2 +StringFromIID +StringListCompareStrings +StringListToParams +StringMultiplyByByte +StringOfChar +StringReplace +StringsChanged +StringsChanging +StringsEdit +StringToBytes +StringToClassID +stringToDom +StringToGUID +StringToIOTAFile +StringToLPOLESTR +StringToOleStr +StringToSet +StringToValue +StringToVarArray +StringToVariantArray +StringToVarOleStr +StringToWideChar +StringWidth +StrIntlEqN +StrIntlEqNA +StrIntlEqNI +StrIntlEqNIA +StrIntlEqNIW +StrIntlEqNW +StripAllFromResult +StripChar +StripDetail +StripFieldName +StripHotkey +StripLiterals +StripMaster +StrIsIntlEqual +StrIsIntlEqualA +StrIsIntlEqualW +StrLCat +StrLComp +StrLCopy +StrLen +StrLenLimit +StrLFmt +StrLIComp +StrLower +StrMove +strncasecmp +StrNCat +StrNCatA +StrNCatW +StrNCmp +StrNCmpA +StrNCmpI +StrNCmpIA +StrNCmpIW +StrNCmpW +StrNCpy +StrNCpyA +StrNCpyW +StrNew +StrNextChar +StrokeAndFillPath +StrokePath +StrPas +StrPBrk +StrPBrkA +StrPBrkW +StrPCopy +StrPLCopy +StrPos +StrRChr +StrRChrA +StrRChrI +StrRChrIA +StrRChrIW +StrRChrW +StrRetToBuf +StrRetToBufA +StrRetToBufW +StrRetToStr +StrRetToStrA +StrRetToStrW +StrRScan +StrRStrI +StrRStrIA +StrRStrIW +StrScan +StrSpn +StrSpnA +StrSpnW +StrStr +StrStrA +StrStrI +StrStrIA +StrStrIW +StrStrW +StrToBcd +StrToBool +StrToBoolDef +StrToConvUnit +StrToCurr +StrToCurrDef +StrToDate +StrToDateDef +StrToDateTime +StrToDateTimeDef +StrToFloat +StrToFloatDef +StrToInt +StrToInt64 +StrToInt64Def +StrToIntA +StrToIntDef +StrToIntEx +StrToIntExA +StrToIntExW +StrToIntW +strtok +StrToLong +StrToLongA +StrToLongW +StrToOem +StrToSQLTimeStamp +StrToTime +StrToTimeDef +StrTrim +StrTrimA +StrTrimW +StructureChanged +StructureContextFor +StructureNodeFor +StructureViewAPI +StrUpper +StrUtils +StuffString +Style +StyleChanged +StyleNameStored +Subclass3DDlg +Subclass3DWnd +SubItemChanged +SubPenMsgFromWpLp +Subselect +SubstituteEntities +substringData +SubtractChars +SubtractNormalizedFractions +SubtractRect +SubtractStrings +Succeeded +SUM +SumInt +SumOfSquares +SumsAndSquares +supplied +Supports +SupportsAggregates +SupportsClipboardFormat +supportsDocumentFormat +SupportsInternalCalc +SupportsStreamPersist +SuppressException +Suspend +SuspendThread +SvcMgr +Swap +SwapBuffers +SwapCPPHeader +SwapMouseButton +SwapSourceFormView +SwapVectors +SwitchDesktop +SwitchDetails +SwitchToFiber +SwitchToFile +SwitchToIndex +SwitchToThread +SwitchToView +SYDDepreciation +SymbolToCharacter +SymCleanup +SymEnumerateModules +SymEnumerateSymbols +SymFunctionTableAccess +SymGetModuleBase +SymGetModuleInfo +SymGetOptions +SymGetSearchPath +SymGetSymFromAddr +SymGetSymFromName +SymGetSymNext +SymGetSymPrev +SymInitialize +SymLoadModule +SymRegisterCallback +SymSetOptions +SymSetSearchPath +SymUnDName +SymUnloadModule +SyncCursors +SyncEditBlock +Synchronize +SynchronizeException +SynchTopic +SyncObjs +SyncToSystemFont +SysAddressIsInPCMap +SysAllocMem +SysAllocString +SysAllocStringByteLen +SysAllocStringLen +SysClosestDelphiHandler +SysConst +SysErrorMessage +sysfile +SysFreeMem +SysFreeString +SysGetMem +SysInit +SysReallocMem +SysReAllocString +SysReAllocStringLen +SysRegisterExpectedMemoryLeak +SysRegisterIPLookup +SysStringByteLen +SysStringLen +System +system_calloc +system_calloc_perm +system_chdir +system_errmsg +system_errmsg_fn +system_fclose +system_flock +system_fopenRO +system_fopenRW +system_fopenWA +system_fopenWT +system_fread +system_free +system_free_perm +system_fwrite +system_fwrite_atomic +system_initlock +system_lseek +system_malloc +system_malloc_perm +system_nocoredumps +system_pread +system_realloc +system_realloc_perm +system_rename +system_stat +system_strdup +system_strdup_perm +system_ulock +system_unlink +system_version +system_version_set +system_winerr +system_winsockerr +SystemPaletteOverride +SystemParametersInfo +SystemParametersInfoA +SystemParametersInfoW +SystemTimeToDateTime +SystemTimeToFileTime +SystemTimeToTzSpecificLocalTime +SystemTimeToVariantTime +systhread_attach +systhread_current +systhread_getdata +systhread_init +systhread_newkey +systhread_setdata +systhread_sleep +systhread_start +systhread_terminate +systhread_timerset +systhread_yield +SysUnregisterExpectedMemoryLeak +SysUnregisterIPLookup +SysUtils +SyvCharacterToSymbol +SyvKanjiToSymbol +szPath +szThemeFileName +szThemeName +Tab +TabbedTextOut +TabbedTextOutA +TabbedTextOutW +TabControlError +TabCtrl_AdjustRect +TabCtrl_DeselectAll +TabCtrl_GetCurFocus +TabCtrl_GetExtendedStyle +TabCtrl_GetItemRect +TabCtrl_GetRowCount +TabCtrl_GetToolTips +TabCtrl_GetUnicodeFormat +TabCtrl_HighlightItem +TabCtrl_HitTest +TabCtrl_RemoveImage +TabCtrl_SetCurFocus +TabCtrl_SetExtendedStyle +TabCtrl_SetItemExtra +TabCtrl_SetItemSize +TabCtrl_SetMinTabWidth +TabCtrl_SetPadding +TabCtrl_SetToolTips +TabCtrl_SetUnicodeFormat +TabFontChanged +table +TableFieldsSplitterCanResize +TableListClick +TableOfContents +TabNotBk +TabPosCompare +TabRect +Tabs +TabsChanged +TAbstractCollectionSprig +TAbstractSocket +TAbstractSprig +TAction +TActionBarAccessibility +TActionBarItem +TActionBars +TActionClient +TActionClientItem +TActionClientLink +TActionClients +TActionClientsCollection +TActionDragObject +TActionItemDragObject +TActionLink +TActionListCollection +TActionListEnumerator +TActionListItem +TActionMenuBarAccessibility +TActionSeparatorDragObject +TActiveTStringsProperty +TActiveXControl +TAddFields +TADOBlobStream +TADOCommand +TADOCommandEditor +TADOCommandSprig +TADOConnection +TADOConnectionEditor +TADOConnectionSprig +TADODataSet +TADODataSetEditor +TADODataSetFieldLinkProperty +TADODataSetSprig +TADOImpliedConnectionSprig +TADOIndexNameProperty +TADOQuery +TADOQuerySprig +TADOStoredProc +TADOStoredProcSprig +TADOTable +TADOTableFieldLinkProperty +TADOTableSprig +TADTField +TAggregate +TAggregatedObject +TAggregateField +TAggregates +Tail +TAliasNameProperty +Tan +Tanh +TAnimate +TApartmentThread +TAppletApplication +TAppletModule +TApplication +TApplicationHelper +TargetDown +TargetIndexAt +TargetPoints +TargetUp +TArrayField +tartAddr +TaskDialog +TaskDialogCallbackProc +TaskDialogIndirect +TaskDlgCallback +TaskMessageDlg +TaskMessageDlgPos +TaskMessageDlgPosHelp +TaskModalDialog +TASPMTSObject +TASPObject +TAssociateAttributes +tatusBar +TAutoDispatch +TAutoIncField +TAutoIntfObject +TAutomation +TAutoObject +TAutoObjectFactory +TBaseButtonItem +TBaseComponentEditor +TBaseComponentGuidelines +TBaseCustomModule +TBasePropertyEditor +TBaseProvider +TBaseSelectionEditor +TBasicAction +TBasicActionLink +TBatchMove +TBatchMoveEditor +TBatchMoveSprig +TBCDField +TBDECallback +TBDEDataSet +TBDEDataSetSprig +TBDEDesigner +TBevel +TBinaryField +TBitBtn +TBitBtnActionLink +TBits +TBlobField +TBlobStream +TBookmarkList +TBooleanField +TBoundLabel +TBrowseForFolder +TBrowseURL +TBrushStyleProperty +TBucketList +TButton +TButtonActionLink +TButtonCategories +TButtonCategory +TButtonCollection +TButtonControl +TButtonGlyph +TButtonGroup +TButtonItem +TButtonItemActionLink +TBytesField +TCanvas +TCaptionedDockTree +TCaptionedTabDockTree +TCaptionProperty +TCategoryButtons +TCategoryDragObject +TCellCollection +TCellItem +TChangeLink +TCheckConstraint +TCheckConstraints +TCheckListBox +TCheckListBoxDataWrapper +TChildNameProperty +TClassFactory +TClassList +TClassProperty +TClassWrapper +TCliConvEdit +TClientBlobStream +TClientDataForm +TClientDataSetApply +TClientDataSetRevert +TClientDataSetUndo +TClientSocket +TClientWinSocket +TClipboard +TCMAdjustRect +TCollectionEditor +TCollectionItemSprig +TCollectionProperty +TCollectionSprig +TColorDialog +TColorProperty +TColorSelect +TColumn +TColumnCollection +TColumnTitle +TCOMAdminCatalog +TCOMAdminCatalogCollection +TCOMAdminCatalogObject +TComboBoxExActionLink +TComboBoxExEnumerator +TComboBoxExStrings +TComboBoxStrings +TComboButton +TComboExItem +TComboExItems +TComClassManager +TCOMConnection +TCommandTextProperty +TComMethodHandler +TCommonCalendar +TCommonDialog +TCommonDialogAction +TComObject +TComObjectFactory +TComplexData +TComplexVariantType +TComponent +TComponentEditor +TComponentEnumerator +TComponentFactory +TComponentGuidelines +TComponentList +TComponentListNexus +TComponentProperty +TComponentPropertyFilter +TComponentSprig +TCompressionStream +TComputerNameProperty +TComServer +TConnect +TConnectionBroker +TConnectionPoints +TConnectionStringProperty +TConnEditForm +TContainedAction +TControl +TControlActionLink +TControlCanvas +TControlCollection +TControlGuidelines +TControlItem +TControlScrollBar +TControlSprig +TConversionStream +TConvertVariantType +TConvFamilyInfo +TConvTypeFactor +TConvTypeInfo +TConvTypeProcs +TCoolBar +TCorbaVclComponentAdapter +TCorbaVclComponentFactory +TCRemoteDataModule +TCriticalSection +TCurrencyField +TCursorProperty +TCustomAction +TCustomActionBar +TCustomActionBarColorMap +TCustomActionCombo +TCustomActionControl +TCustomActionDockBar +TCustomActionList +TCustomActionManager +TCustomActionMenuBar +TCustomActionPopupMenuEx +TCustomActionToolBar +TCustomADODataSet +TCustomADODataSetSprig +TCustomApplicationEvents +TCustomBucketList +TCustomButtonControl +TCustomCheckBox +TCustomClientDataSet +TCustomColorBox +TCustomColorListBox +TCustomCombo +TCustomComboBox +TCustomComboBoxEx +TCustomComboBoxStrings +TCustomComboControl +TCustomConnection +TCustomControl +TCustomControlAction +TCustomControlBar +TCustomDBGrid +TCustomDockForm +TCustomDropDownButton +TCustomEdit +TCustomFileDialog +TCustomFileOpenDialog +TCustomFileRun +TCustomFileSaveDialog +TCustomFlowPanel +TCustomForm +TCustomFormGuidelines +TCustomFormHelper +TCustomFormRootSprig +TCustomGrid +TCustomGridPanel +TCustomGroupBox +TCustomHeaderControl +TCustomHotKey +TCustomImageList +TCustomIniFile +TCustomizeActionBars +TCustomizeDlg +TCustomizeFrm +TCustomLabel +TCustomLabeledEdit +TCustomListAction +TCustomListBox +TCustomListControl +TCustomListView +TCustomMaskEdit +TCustomMemo +TCustomModule +TCustomOutline +TCustomPacketWriter +TCustomPanel +TCustomProvider +TCustomRadioGroup +TCustomRemoteServer +TCustomResolver +TCustomServerSocket +TCustomSocket +TCustomStaticListAction +TCustomStaticText +TCustomStatusBar +TCustomTabControl +TCustomTaskDialog +TCustomToolScrollBtn +TCustomTransparentControl +TCustomTrayIcon +TCustomTreeView +TCustomUpDown +TCustomUtilityButton +TCustomVariantType +TCustomVirtualListAction +TCustomWinSocket +TCustomZLibStream +TDatabase +TDatabaseEditor +TDatabaseNameProperty +TDatabaseSprig +TDataBindEditor +TDataBindForm +TDataBindings +TDataBindItem +TDataBindProperty +TDataBlock +TDataBlockInterpreter +TDataDispatch +TDataFieldAggProperty +TDataFieldProperty +TDataLink +TDataModule +TDataModuleRootSprig +TDataObject +TDataPacketWriter +TDataSet +TDataSetAction +TDataSetCancel +TDataSetDelete +TDataSetDesigner +TDataSetEdit +TDataSetEditor +TDataSetField +TDataSetFirst +TDataSetInsert +TDataSetLast +TDataSetNext +TDataSetPost +TDataSetPrior +TDataSetProperty +TDataSetProvider +TDataSetRefresh +TDataSetResolver +TDataSource +TDataSourceLink +TDataSourceProperty +TDateField +TDateProperty +TDateTime +TDateTimeField +TDateTimePicker +TDateTimeProperty +TDBCheckBox +TDBComboBox +TDBCtrlGrid +TDBCtrlGridLink +TDBCtrlPanel +TDBDataSet +TDBDataSetEditor +TDBDataSetSprig +TDBEdit +TDBEditForm +TDbEngineErrorDlg +TDBError +TDBGridColumns +TDBGridInplaceEdit +TDBImage +TDBListBox +TDBLookupCombo +TDBLookupComboBox +TDBLookupControl +TDBLookupList +TDBLookupListBox +TDBMemo +TDBNavigator +TDBOleControl +TDBRadioGroup +TDBRichEdit +TDBStringProperty +TDBText +TDBWideStringProperty +TDCOMConnection +TDdeClientConv +TDdeClientItem +TDdeClientItemProperty +TDdeCliItem +TDdeLinkDlg +TDdeLinkInfoProperty +TDdeMgr +TDDEModuleNotifier +TDDEProjectNotifier +TDdeServerConv +TDdeServerItem +TDdeSrvrConv +TDdeSrvrItem +TDecompressionStream +TDefaultDBScreenApplication +TDefaultEditor +TDefaultSessionSprig +TDefCollection +TDefineField +TDependencies +TDependency +TDesignerOleDropTarget +TDesignerSelections +TDesignNotificationHandler +TDesignObject +TDesignWindow +TDetailDataLink +TDirectoryListBox +TDispatchAppServer +TDispatchConnection +TDispatchSilencer +TDockCaptionDrawer +TDockClientInfo +TDockTabSet +TDockTree +TDockZone +TdomAttr +TdomCharacterData +TdomCustomContentHandler +TdomCustomDTDHandler +TdomCustomErrorHandler +TdomCustomStr +TdomCustomXMLReader +TdomElementsNodeList +TdomElementsNodeListNS +TdomEntitiesNamedNodeMap +TdomImplementation +TDOMIStreamAdapter +TdomNamedNodeMap +TdomNameValueList +TdomNode +TdomNodeIterator +TdomNodeList +TdomSpecialNodeList +TdomStandardContentModelReader +TdomStandardDocXMLReader +TdomStandardExtSubsetXMLReader +TdomTreeWalker +TDOMVendorList +TdomWideStringStream +TDownLoadURL +TDragFields +TDragImageList +TDragSprigs +TDragTarget +TDRAttrDescList +TDriveComboBox +TDriverNameProperty +TDRList +TDRObjectDescList +TDRObjectList +TDRRelationshipDescList +TDRRelationshipList +TDSDesigner +TDTDBaseTranslator +TDTDImportTranslator +TEditAction +TEditActionSelectionEditor +TEditCopy +TEditCut +TEditDelete +TEditPaste +TEditSelectAll +TEditUndo +tem +TempBuffer +TEnumFormatEtc +TEnumPropDesc +Terminate +TerminateExtension +TerminatePopulateThread +TerminateProcess +TerminateThread +TerminationFromWpLp +TestChar +TestEMF +testForCircularReference +TestStreamFormat +TEvent +TEventDispatch +TEventInfo +TEventLogger +TExpertInitProc +TExprParser +TextAttr +TextBackground +TextChar +TextClose +TextColor +textDeclaration +TextExtent +TextExtentW +textfile +TextHeight +TextLabelsCmdExecute +TextLabelsCmdUpdate +TextMode +TextOpen +TextOpenCleanup +TextOut +TextOutA +TextOutW +TextRec +TextRect +TextRectW +TextStart +TextToFloat +TextToShortCut +TextWidth +TextWidthW +TFavoriteLinkItem +TFavoriteLinkItems +TFavoriteLinkItemsEnumerator +TField +TFieldDataLink +TFieldDef +TFieldDefList +TFieldDefs +TFieldLinkProperty +TFieldList +TFields +TFieldsEditor +TFieldsEnumerator +TFieldsGetFieldError +TFieldsTarget +TFileAction +TFileDialogEvents +TFileDialogWrapper +TFileExit +TFileListBox +TFileOpen +TFileOpenDialogWrapper +TFileOpenWith +TFilePageSetup +TFilePrintSetup +TFileSaveAs +TFileSaveDialogWrapper +TFileTypeItem +TFileTypeItems +TFilterComboBox +TFilterExpr +TFindDialog +TFlatList +TFloatField +TFMTBcdData +TFMTBCDField +TFMTBcdVariantType +TFontCharsetProperty +TFontDialog +TFontEdit +TFontNameProperty +TFontProperty +TForm +TFrameSprig +TGarbageCollector +TGlassFrame +TGlyphCache +TGlyphList +TGraphic +TGraphicControl +TGraphicEditor +TGraphicField +TGraphicProperty +TGridDataLink +TGroupButton +TGrpButtonItem +TGrpButtonItems +TGUID +TGuidField +THandle +THandleObject +THashedStringList +that +THeader +THeaderControl +THeaderSection +THeaderSections +THeaderStrings +THelpAction +THelpContents +THelpContextAction +THelpManager +THelpOnHelp +THelpTopicSearch +THelpViewerNode +Theme +ThemeControl +Themes +ThemeServices +then +THintAction +THintWindow +THIRD_IPADDRESS +ThreadCreated +ThreadDestroyed +ThreadEnd +ThreadException +ThreadListChanged +ThreadNotify +ThreadProc +ThreadReceivedStream +ThreadStart +ThreadWrapper +THtmlHelpVIewer +THTTPServer +TIconOptions +TIDispatchField +TIFileStream +Tile +TileWindows +TImage +Time +timeBeginPeriod +TimedScroll +timeEndPeriod +timeGetDevCaps +timeGetSystemTime +timeGetTime +timeKillEvent +TIMemoryStream +TImeNameProperty +TimeOf +Timer +TimerCallBack +TimerExpired +TimerID +TimerScroll +timeSetEvent +TimeStampToBytes +TimeStampToDateTime +TimeStampToMSecs +TimeToStr +TImpliedDatabaseSprig +TImpliedSessionSprig +TIndexDef +TIndexDefs +TIndexFieldNamesProperty +TIndexFiles +TIndexFilesProperty +TIndexNameProperty +TInformant +TIniFile +TInplaceEdit +TInplaceEditList +TInputReqClass +TInputReqDialog +TIntegerBucketList +TIntegerField +TInterceptorNameProperty +TInterface +TInterfacedObject +TInterfacedPersistent +TInterfaceField +TInterfaceList +TInterfaceListEnumerator +TInterfaceProperty +TInternalDragSprigs +TInternalMDIAction +TInvokeableVariantType +TIStreamAdapter +TItemProp +TitleCaptionsStored +TitleClick +TitleFontChanged +TLargeintField +TlHelp32 +TLinkFields +TList +TListActionLink +TListBoxStrings +TListColumn +TListColumns +TListControlAction +TListControlClearSelection +TListControlCopySelection +TListControlDeleteSelection +TListControlItem +TListControlItems +TListControlMoveSelection +TListControlSelectAll +TListFieldProperty +TListItem +TListItems +TListItemsEnumerator +TListSourceLink +TListViewActionLink +TLiteralInfo +TLocalAppServer +TLocalConnection +TLoginDialog +TLookupDestProperty +TLookupFieldProperty +TLookupIndexProperty +TLookupList +TLookupSourceProperty +TlsAlloc +TlsFree +TlsGetValue +TlsSetValue +TMainMenu +TMargins +TMask +TMasterDataLink +TMediaPlayer +TMemberID +TMemIniFile +TMemoField +TMemoStrings +TMenu +TMenuActionLink +TMenuItem +TMenuItemEnumerator +TMenuItemStack +TMenuList +TMenuStack +TMessageForm +TMethodProperty +TMIDASConnection +TModalResultProperty +TModuleNotifierObject +TMonitor +TMonthCalColors +TMonthCalendar +TMouse +TMPFilenameProperty +TMSDOMAttr +TMSDOMCharacterData +TMSDOMDocument +TMSDOMDocumentType +TMSDOMElement +TMSDOMEntity +TMSDOMEventHandler +TMSDOMImplementation +TMSDOMImplementationFactory +TMSDOMInterface +TMSDOMNamedNodeMap +TMSDOMNode +TMSDOMNodeList +TMSDOMNotation +TMSDOMProcessingInstruction +TMSDOMText +TMtsAutoObject +TMtsDataModule +TMultiCaster +TMutex +TNamedItem +TNavButton +TNavDataLink +TNestedDataSetProperty +TNestedTable +TNestedTableSprig +TNewLocations +TNextTab +TNotebook +TNotifierObject +TNumericField +to +ToAscii +ToAsciiEx +TObject +TObjectBucketList +TObjectDispatch +TObjectField +TObjectList +TObjectManager +TObjectQueue +TObjectStack +ToCommon +Today +Toggle +ToggleAll +ToggleCase +ToggleClickCheck +ToggleFormUnit +ToggleSmallIcons +TokenComponentIdent +TokenFloat +TokenInt +Tokenize +TokenizeLineClass +TokenName +TokenString +TokenSymbolIs +TokenSymbolIsFunc +TokenWideString +TOleContainer +TOleControl +TOleControlEditor +TOleCustomProperty +TOleEnumProperty +TOleFontEditor +TOleLinkStub +TOLEnterpriseConnection +TOleObjectEditor +TOleObjectProperty +TOlePropPageProperty +TOleServer +TOleUILinkInfo +ToLongPath +Tomorrow +ToolbarCmdExecute +ToolbarCmdUpdate +ToolbarLoaded +ToolbarModified +ToolButtonVisible +ToolDockImage +ToolIntf +ToolsAPI +ToolWin +ToolWnds +TOpenDialog +TOpenPicture +TOpenPictureDialog +TOpenTextFileDialog +TopLeftChanged +TopLeftMoved +TOrderedList +TOTAFile +TOTAFormNotifier +TotalVariance +TOTAModuleNotifier +TOTANotifier +TOTAStringsAdapter +TouchFileTimes +ToUnicode +ToUnicodeEx +TOutlineNode +TOutlineStrings +TOXDOMAttr +TOXDOMCharacterData +TOXDOMDocument +TOXDOMDocumentType +TOXDOMDocumentTypeChildren +TOXDOMElement +TOXDOMEntity +TOXDOMImplementation +TOXDOMImplementationFactory +TOXDOMInterface +TOXDOMNamedNodeMap +TOXDOMNode +TOXDOMNodeList +TOXDOMNotation +TOXDOMProcessingInstruction +TOXDOMText +TPacketDataSet +TPacketInterceptFactory +TPadding +TPage +TPageAccess +TPageControl +TPageScroller +TPageSetupDialog +TPaintBox +TPaintControl +TPanningWindow +TParam +TParameter +TParameters +TParametersProperty +TParamList +TParams +TPasswordDialog +TPathLabel +TPenStyleProperty +TPersistent +TPictureEditor +TPictureEditorDlg +TPictureProperty +TPlatformBytes +TPlatformField +TPlatformPSResult +TPlatformRecordBuffer +TPlatformValueBuffer +TPooledDataInterpreter +TPopulateThread +TPopupActionBar +TPopupDataList +TPopupGrid +TPopupList +TPopupListBox +TPopupMenu +TPreviousTab +TPrintDialog +TPrintDlg +TPrinter +TPrinterCanvas +TPrinterDevice +TPrinterSetupDialog +TProcedureNameProperty +TPropertyCategory +TPropertyCategoryList +TPropertyEditor +TPropertyFilter +TPropertySprig +TPropInfoList +TProviderNameProperty +TProviderProperty +TPtoDP +TPublishableVariantType +TQuery +TQueryDataLink +TQueryDescription +TQueryEditor +TQueryParamsProperty +TQuerySprig +TQueue +TraceInto +TraceToSource +TrackButton +TrackMenu +TrackMouseEvent +TrackPopupMenu +TrackPopupMenuEx +TrackResource +TrackResourceS +TrackSource +TRadioButton +TrainHREC +TransactionUOW +TransactNamedPipe +transform +TransformCoords +TransformNode +transformNodeToObject +Transient +Translate +TranslateAccelerator +TranslateAcceleratorA +TranslateAcceleratorIO +TranslateAcceleratorSB +TranslateAcceleratorW +TranslateCharsetInfo +TranslateMDISysAccel +TranslateMessage +TranslateResult +TransmitCommChar +TransmitFile +TransparentBlt +TransparentDIBits +TransparentStretchBlt +Transport_GetConnected +Transport_SetConnected +TransportTerminated +TraverseClients +TraverseControls +TRDSConnection +tream +TReconcileActionLink +TRedirectorWindow +TreeIntf +TreeNodeFor +TreeView +TreeView_CreateDragImage +TreeView_DeleteAllItems +TreeView_DeleteItem +TreeView_EditLabel +TreeView_EditLabelA +TreeView_EditLabelW +TreeView_EndEditLabelNow +TreeView_EnsureVisible +TreeView_Expand +TreeView_GetBkColor +TreeView_GetCheckState +TreeView_GetChild +TreeView_GetCount +TreeView_GetDropHilite +TreeView_GetEditControl +TreeView_GetExtendedStyle +TreeView_GetFirstVisible +TreeView_GetImageList +TreeView_GetIndent +TreeView_GetInsertMarkColor +TreeView_GetISearchString +TreeView_GetISearchStringA +TreeView_GetISearchStringW +TreeView_GetItem +TreeView_GetItemA +TreeView_GetItemHeight +TreeView_GetItemPartRect +TreeView_GetItemRect +TreeView_GetItemState +TreeView_GetItemW +TreeView_GetLastVisible +TreeView_GetLineColor +TreeView_GetNextItem +TreeView_GetNextSelected +TreeView_GetNextSibling +TreeView_GetNextVisible +TreeView_GetParent +TreeView_GetPrevSibling +TreeView_GetPrevVisible +TreeView_GetRoot +TreeView_GetScrollTime +TreeView_GetSelectedCount +TreeView_GetSelection +TreeView_GetTextColor +TreeView_GetToolTips +TreeView_GetUnicodeFormat +TreeView_GetVisibleCount +TreeView_HitTest +TreeView_InsertItem +TreeView_InsertItemA +TreeView_InsertItemW +TreeView_MapAccIDToHTREEITEM +TreeView_MapHTREEITEMToAccID +TreeView_Select +TreeView_SelectDropTarget +TreeView_SelectItem +TreeView_SelectSetFirstVisible +TreeView_SetAutoScrollInfo +TreeView_SetBkColor +TreeView_SetCheckState +TreeView_SetExtendedStyle +TreeView_SetImageList +TreeView_SetIndent +TreeView_SetInsertMark +TreeView_SetInsertMarkColor +TreeView_SetItem +TreeView_SetItemA +TreeView_SetItemHeight +TreeView_SetItemState +TreeView_SetItemW +TreeView_SetLineColor +TreeView_SetScrollTime +TreeView_SetTextColor +TreeView_SetToolTips +TreeView_SetUnicodeFormat +TreeView_ShowInfoTip +TreeView_SortChildren +TreeView_SortChildrenCB +TreeViewError +TreeViewErrorFmt +TReferenceField +TReflectorWindow +TRegGroup +TRegGroups +TRegIniFile +TRegistry +TRegistryClass +TRegistryIniFile +TRemoteDataModule +TReplaceDialog +TReportDirProperty +TReportEditor +TReportNameProperty +TRichEditAction +TRichEditAlignCenter +TRichEditAlignLeft +TRichEditAlignRight +TRichEditBold +TRichEditBullets +TRichEditItalic +TRichEditStrikeOut +TRichEditUnderline +Trigger +Trim +TrimLeft +Trimmed +TrimPenData +TrimPunctuation +TrimRight +trlCode +TRootSprig +TRootSprigList +TRootSprigStructureContext +TRootSprigStructureNode +TRowCollection +true +Truncate +try +TryConvTypeToFamily +TryEncodeDate +TryEncodeDateDay +TryEncodeDateMonthWeek +TryEncodeDateTime +TryEncodeDateWeek +TryEncodeDayOfWeekInMonth +TryEncodeTime +TryEnter +TryEnterCriticalSection +TryFloatToCurr +TryFloatToDateTime +TryJulianDateToDateTime +TryLock +TryModifiedJulianDateToDateTime +TryObjectCreate +TryOpenForInput +TryOpenForOutput +TryRecodeDateTime +TryStrToBcd +TryStrToBool +TryStrToConvUnit +TryStrToCurr +TryStrToDate +TryStrToDateTime +TryStrToFloat +TryStrToInt +TryStrToInt64 +TryStrToSQLTimeStamp +TryStrToTime +TSaveAttributesAs +TSaveDialog +TSavePicture +TSavePictureDialog +TScreen +tScreenCoords +TScrollBar +TScroller +TScrollingWinControl +TSearchAction +TSearchFind +TSearchFindFirst +TSearchFindNext +TSearchReplace +TSelectDirCallback +TSelectDirDlg +TSelectionEditor +TSelectionEditorDefinition +TSelectionEditorDefinitionList +TSelectionEditorList +TSelectionMessageList +TSendMail +TServerAcceptThread +TServerClientThread +TServerClientWinSocket +TServerCollection +TServerEventDispatch +TServerItem +TServerNameProperty +TServerSocket +TServerSupportFunctionProc +TServerWinSocket +TService +TServiceApplication +TServiceStartThread +TServiceThread +TSession +TSessionList +TSessionNameProperty +TSessionSprig +TSetElementProperty +TSetProperty +TShadowWindow +TShape +TSharedConnection +TShortCutList +TShortCutProperty +TSilentPaintPanel +TSimpleObjectBroker +TSizeConstraints +TSmallintField +TSocketConnection +TSocketDispatcher +TSocketDispatcherThread +TSocketForm +TSocketService +TSocketTransport +TSparseList +TSparsePointerArray +TSpeedButton +TSpeedButtonActionLink +TSplitter +TSprig +TSprigIndex +TSprigIntfType +TSprigStructureNode +TSprigTreeNode +TSprigType +TSprigTypeList +TSQLEditForm +TSQLResolver +TSQLTimeStampData +TSQLTimeStampField +TSQLTimeStampVariantType +TSrvrConvEdit +TSrvrItemEdit +TStack +TStandardAddRemoveItem +TStandardButtonControl +TStandardColorMap +TStandardCustomizePopup +TStandardDropDownButton +TStandardMenuButton +TStandardMenuExpandBtn +TStandardMenuItem +TStandardMenuPopup +TStandardStyleActionBars +TStandardToolScrollBtn +TStaticListItems +TStatusBar +TStoredProc +TStoredProcEditor +TStoredProcParamsProperty +TStoredProcSprig +TStreamAdapter +TStreamedConnection +TStrEditDlg +TStringField +TStringGrid +TStringGridStrings +TStringHash +TStringListProperty +TStringsEditDlg +TStringsFileSystem +TStringsModuleCreator +TStringSparseList +TStringsStream +TStructureMenuItem +TStructureNodeMenuItem +TSubItems +TSynchroObject +TTabAction +TTabbedNotebook +TTabDockPanel +TTable +TTableEditor +TTableFieldLinkProperty +TTableNameProperty +TTableSprig +TTabList +TTabOrderProperty +TTabPage +TTabPageAccess +TTabSet +TTabSheet +TTabStrings +TTaskDialogBaseButtonItem +TTaskDialogButtonItem +TTaskDialogButtons +TTaskDialogButtonsEnumerator +TTaskDialogProgressBar +TTaskDialogRadioButtonItem +TThemeServices +TThread +TThreadList +TTimeField +TTimeProperty +TTimer +TToolBar +TToolbarDesignWindow +TToolBarEnumerator +TToolButton +TToolDockForm +TToolDockObject +TToolWindow +TTransientCollectionSprig +TTransientSprig +TTransportThread +TTreeNode +TTreeNodes +TTreeNodesEnumerator +TTreeStrings +TTwilightColorMap +TTypedComObject +TTypedComObjectFactory +TUniqueProperty +TUpdateSQL +TUpdateSQLEditor +TUpdateSQLSprig +TUpdateTree +TURLAction +TurnSiblingsOff +TUTF16BEToUTF8Stream +TValueEditDlg +TValueListEditor +TValueListProperty +TValueListStrings +TVarBytesField +TVariantField +TVariantProperty +TVariantTypeProperty +TVCLAutoObject +TVCLScreenApplication +TVirtualStream +TWebConnection +TWideCharProperty +TWideDataSet +TWideMemoField +TWideStringField +TWideStringList +TWideStringProperty +TWideStrings +TWideStringsEnumerator +TWinControl +TWinControlActionLink +TWinControlGuidelines +TWinControlRootSprig +TWinControlSprig +TWindowAction +TWindowArrange +TWindowCascade +TWindowClose +TWindowMinimizeAll +TWindowTileHorizontal +TWindowTileVertical +TWinHelpViewer +TWinSocketStream +TWizardInitProc +TwoBitsFromDIB +TWordField +TWorkArea +TWorkAreas +TWriter +TXDRImportTranslator +TXercesDOMImplementationFactory +TXMLAnnotation +TXMLAnnotationCollection +TXMLAnnotationItem +TXMLAppInfoCollection +TXMLAttributeDef +TXMLAttributeDefList +TXMLAttributeDefs +TXMLAttributeGroup +TXMLAttributeGroups +TXMLBaseTypeIndicator +TXMLBuiltInTypes +TXMLComplexContent +TXMLComplexTypeDef +TXMLComplexTypeDef99 +TXMLComplexTypeDefs +TXMLDataImporter +TXMLDocument +TXMLDocumentationCollection +TXMLElementCompositor +TXMLElementCompositors +TXMLElementDef +TXMLElementDefList +TXMLElementDefs +TXMLElementGroup +TXMLElementGroups +TXMLEnumeration +TXMLEnumerationCollection +TXMLNode +TXMLNodeCollection +TXMLNodeList +TXMLNotationDef +TXMLNotationDefs +TXMLSchema1999Translator +TXMLSchema1999TranslatorFactory +TXMLSchemaDef +TXMLSchemaDoc +TXMLSchemaDoc99 +TXMLSchemaDocRef +TXMLSchemaDocRefs +TXMLSchemaImports +TXMLSchemaIncludes +TXMLSchemaItem +TXMLSchemaItems +TXMLSchemaNode +TXMLSchemaTranslator +TXMLSchemaTranslatorFactory +TXMLSimpleTypeDef +TXMLSimpleTypeDefs +TXMLSimpleTypeList +TXMLSimpleTypeRestriction +TXMLSimpleTypeUnion +TXmlStandardDomReader +TXMLTypeDef +TXMLTypedSchemaItem +TXPColorMap +TXPStyleActionBars +TXPStyleAddRemoveItem +TXPStyleButton +TXPStyleCustomizePopup +TXPStyleDropDownBtn +TXPStyleExpandBtn +TXPStyleMenuButton +TXPStyleMenuItem +TXPStylePopupMenu +TXPStyleToolScrollBtn +TXToolDockForm +type +TypeChange +TypeCheckArithOp +types +TypInfo +UCS4CodeToUTF8String +UCS4StringToWideString +UIActivate +UIActivateIO +UIDeactivate +UIInitialize +Unadvise +UnaryOp +Unassigned +UnassociateAttributes +UnbindSource +UnblockOneWriter +UnblockOSExceptions +UnblockReaders +Uncache +UnDecorateSymbolName +UnderstandsContext +UnderstandsKeyword +UnderstandsTopic +Undo +UndoAutoResizing +UnDockControl +UndoLastChange +UnElideAllBlocks +UnElideNearestBlock +Unfreeze +UnhandledExceptionFilter +UnhookHintHooks +UnhookMainWindow +UnhookResultsHookHREC +UnhookSignal +UnhookSynchronizeWakeup +UnhookWindowsHook +UnhookWindowsHookEx +UnhookWinEvent +UnicodeToUtf8 +Uninitialize +UninitializeFlatSB +UninstallRecognizer +UninstallService +UnionRect +UniqueAttrName +UniqueCommand +uniqueID +UniqueImage +UniqueName +UniqueString +unit +UniUnimplemented +UnixToDateTime +UnlinkException +UnlistPublishedProperty +UnLoadKey +UnloadKeyboardLayout +UnloadPackage +UnloadThemeData +UnLock +UnlockFile +UnlockFileEx +UnlockList +UnLockObject +UnlockRegion +UnlockResource +UnlockSegment +UnlockSelect +UnlockSelection +UnlockServiceDatabase +UnlockSession +UnlockState +UnlockTable +UnlockUrlCacheEntryFile +UnlockUrlCacheEntryStream +UnMapAndLoad +UnmapDebugInformation +UnmapViewOfFile +UnmarshalInterface +Unmerge +Unmodify +UnNamedStored +Unnotify +UnnotifyGroupChange +UnpackDDElParam +UnpackParams +UnpackTime +UnPrepare +UnQuote +UnrealizeObject +UnRegActions +Unregister +UnregisterActionGroup +UnRegisterActions +UnRegisterActnBarStyle +UnRegisterCategories +UnRegisterChanges +UnRegisterClass +UnregisterClassA +UnRegisterClasses +UnRegisterClassImplCategories +UnRegisterClassReqCategories +UnregisterClassW +UnRegisterClient +UnRegisterColorScheme +UnregisterConversionFamily +UnregisterConversionType +UnregisterDesignNotification +UnregisterDeviceNotification +unregisterDocumentClass +UnRegisterDOMVendor +UnRegisterDragAcceptor +UnregisterExpectedMemoryLeak +UnRegisterFileSystem +UnregisterFindGlobalComponentProc +UnregisterGraphicClass +UnregisterHistoryProvider +UnregisterHotKey +UnregisterIntegerConsts +UnregisterLanguage +UnregisterModule +UnRegisterModuleClasses +UnregisterPooled +UnRegisterProvider +UnRegisterSchemaTranslator +UnregisterToolbarNotifier +UnRegisterTypeLib +UnregisterTypeLibrary +UnsetExceptionHandler +UnthemedDesigner +until +UntrackResource +UntrackResourceS +Unused +UnwindClosestHandler +UnwindDelphiLookup +UnwindRaiseException +UnwindRegisterIPLookup +UpCase +Update +UpdateAction +UpdateActionBar +UpdateActionBars +UpdateActions +UpdateActive +UpdateActivePage +UpdateActiveState +UpdateAll +UpdateAllButtons +UpdateAutoComplete +UpdateAutoSessionName +UpdateBand +UpdateBands +UpdateBatch +UpdateBounds +UpdateBufferCount +UpdateButton +UpdateButtons +UpdateButtonState +UpdateButtonStates +UpdateCache +UpdateCalcFields +UpdateCallbackRequired +UpdateCaption +UpdateCategory +UpdateCheckRange +UpdateCollectionList +UpdateColors +UpdateCols +UpdateColumn +UpdateColumnOrder +UpdateColumns +UpdateContents +UpdateControl +UpdateControlOriginalParentSize +UpdateControlSize +UpdateControlState +UpdateCursor +UpdateCursorPos +Updated +UpdateData +UpdateDataFields +UpdateDataLinks +UpdateDebugInfoFile +UpdateDebugInfoFileEx +UpdateDefs +UpdateDesigner +UpdateDialog +UpdateDisplay +UpdateDockCaptionPin +UpdateEdit +UpdateExclusive +UpdateExtents +UpdateField +UpdateFieldList +UpdateFile +UpdateFloatingDockSitePos +UpdateFont +UpdateFromCursor +UpdateFromIndexList +UpdateFromLogFont +UpdateGlassFrame +UpdateHeight +UpdateICMRegKey +UpdateICMRegKeyA +UpdateICMRegKeyW +UpdateImage +UpdateImages +UpdateIme +UpdateIndexDefs +UpdateItem +UpdateItem2 +UpdateItems +UpdateKind +UpdateLastActive +UpdateLayeredWindow +UpdateLink +UpdateList +UpdateListbox +UpdateListFields +UpdateLoc +UpdateLogFile +UpdateLookupControls +UpdateMDIMenuButtons +UpdateMenuAccelerators +UpdateMenus +UpdateNameHash +UpdateObject +UpdateObjectRect +UpdatePanel +UpdatePanels +UpdatePreferredSize +UpdateProgress +UpdateProviders +UpdateRange +UpdateRecord +UpdateRecordSetPosition +UpdateRecreatingFlag +UpdateRegistry +UpdateResource +UpdateResourceA +UpdateResourceW +UpdateRightToLeft +UpdateRowCount +UpdateScroll +UpdateScrollBar +UpdateScrollBars +UpdateScrollPos +UpdateScrollProperties +UpdateScrollRange +UpdateSection +UpdateSectionOrder +UpdateSections +UpdateSelection +UpdateShowing +UpdateSimpleText +UpdateSize +UpdateSizes +UpdateState +UpdateStatus +UpdateTab +UpdateTabHighlights +UpdateTabImages +UpdateTabOrder +UpdateTabShowing +UpdateTabSize +UpdateTarget +UpdateText +UpdateTextBounds +UpdateTextFlags +UpdateThemes +UpdateTimer +UpdateTimerTimer +UpdateTracking +UpdateUIState +UpdateValueHash +UpdateVerbs +UpdateView +UpdateVisible +UpdateWindow +UpdateWindowState +Updating +UpDownClick +UpperCase +UrlApplyScheme +UrlApplySchemeA +UrlApplySchemeW +UrlCanonicalize +UrlCanonicalizeA +UrlCanonicalizeW +UrlCombine +UrlCombineA +UrlCombineW +UrlCompare +UrlCompareA +UrlCompareW +UrlCreateFromPath +UrlCreateFromPathA +UrlCreateFromPathW +URLDownloadToCacheFile +URLDownloadToCacheFileA +URLDownloadToCacheFileW +URLDownloadToFile +URLDownloadToFileA +URLDownloadToFileW +URLEncode +UrlEscape +UrlEscapeA +UrlEscapeSpaces +UrlEscapeSpacesA +UrlEscapeSpacesW +UrlEscapeW +UrlGetLocation +UrlGetLocationA +UrlGetLocationW +UrlGetPart +UrlGetPartA +UrlGetPartW +UrlHash +UrlHashA +UrlHashW +UrlIs +UrlIsA +UrlIsFileUrl +UrlIsFileUrlA +UrlIsFileUrlW +UrlIsNoHistory +UrlIsNoHistoryA +UrlIsNoHistoryW +UrlIsOpaque +UrlIsOpaqueA +UrlIsOpaqueW +UrlIsW +UrlMkGetSessionOption +UrlMkSetSessionOption +UrlMon +URLOpenBlockingStream +URLOpenBlockingStreamA +URLOpenBlockingStreamW +URLOpenPullStream +URLOpenPullStreamA +URLOpenPullStreamW +URLOpenStream +URLOpenStreamA +URLOpenStreamW +URLPathEncode +UrlUnescape +UrlUnescapeA +UrlUnescapeInPlace +UrlUnescapeInPlaceA +UrlUnescapeInPlaceW +UrlUnescapeW +UseFieldInUpdate +UseFieldInWhere +UseIndexOrder +UserHandleGrantAccess +UseRightToLeftAlignment +UseRightToLeftAlignmentForField +UseRightToLeftReading +UseRightToLeftScrollBar +userpw +uses +UsesBitmap +UseThemes +UTF16BEToUTF8Str +UTF16HighSurrogate +UTF16LowSurrogate +UTF16SurrogateToInt +UTF8CharLength +UTF8CharSize +UTF8Decode +UTF8Encode +UTF8LowerCase +Utf8ToAnsi +Utf8ToAnsiEx +Utf8ToUnicode +UTF8ToUTF16BEStr +UTF8UpperCase +util_chdir2path +util_delete_directory +util_env_copy +util_env_create +util_env_find +util_env_free +util_env_replace +util_env_str +util_getline +util_hostname +util_is_mozilla +util_is_url +util_itoa +util_later_than +util_mime_separator +util_sh_escape +util_str_time_equal +util_strcasecmp +util_strftime +util_strncasecmp +util_time_equal +util_uri_escape +util_uri_is_evil +util_uri_parse +util_uri_unescape +util_url_escape +UxTheme +v +ValEdit +Validate +validate2 +ValidateAutoSession +ValidateComponent +ValidateComponentClass +ValidateContainer +ValidateEdit +ValidateError +ValidateExistingType +ValidateHelpSystem +ValidateHelpViewer +ValidateHintWindow +validateIDREFS +ValidateInsert +ValidateLookupInfo +ValidateName +ValidateParent +ValidateRect +ValidateRename +ValidateRgn +ValidateSelection +ValidateSizeGrip +ValidateSprigs +ValidateTemplates +ValidateUserLicense +ValidFieldIndex +ValidFile +ValidHeaderHandle +ValidInCurrentProcess +ValidInProcess +ValidParentForm +ValidTemplates +Value +ValueAvailable +ValueChanged +ValueEdit +ValueExists +ValueListEditor1KeyDown +ValueListEditor1StringsChange +ValueMatch +ValueOf +ValueOfKey +ValueOverOne +ValueToStr +ValueToString +var +VarAlloc +VarArrayAsPSafeArray +VarArrayClear +VarArrayCreate +VarArrayCreateError +VarArrayDimCount +VarArrayFromStrings +VarArrayFromWideStrings +VarArrayGet +VarArrayHighBound +VarArrayLock +VarArrayLowBound +VarArrayOf +VarArrayPut +VarArrayRef +VarArrayUnlock +VarAsComplex +VarAsConvert +VarAsError +VarAsSQLTimeStamp +VarAsType +VarBoolFromCy +VarBoolFromDate +VarBoolFromDec +VarBoolFromDisp +VarBoolFromI1 +VarBoolFromI2 +VarBoolFromI4 +VarBoolFromR4 +VarBoolFromR8 +VarBoolFromStr +VarBoolFromUI1 +VarBoolFromUI2 +VarBoolFromUI4 +VarBStrFromBool +VarBStrFromCy +VarBStrFromDate +VarBStrFromDec +VarBStrFromDisp +VarBStrFromI1 +VarBStrFromI2 +VarBStrFromI4 +VarBStrFromR4 +VarBStrFromR8 +VarBStrFromUI1 +VarBStrFromUI2 +VarBStrFromUI4 +VarCastAsAny +VarCastAsDispatch +VarCastAsInterface +VarCastAsOleStr +VarCastAsString +VarCastError +VarCastRare +VarCastViaOS +VarCheckEmpty +VarClearDeep +VarCmplx +VarCompare +VarCompareAny +VarCompareRare +VarCompareSimple +VarCompareValue +VarComplex +VarComplexAbs +VarComplexAbsSqr +VarComplexAngle +VarComplexArcCos +VarComplexArcCosH +VarComplexArcCot +VarComplexArcCotH +VarComplexArcCsc +VarComplexArcCscH +VarComplexArcSec +VarComplexArcSecH +VarComplexArcSin +VarComplexArcSinH +VarComplexArcTan +VarComplexArcTanH +VarComplexConjugate +VarComplexCos +VarComplexCosH +VarComplexCot +VarComplexCotH +VarComplexCreate +VarComplexCreateInto +VarComplexCsc +VarComplexCscH +VarComplexExp +VarComplexFromPolar +VarComplexInverse +VarComplexLn +VarComplexLog10 +VarComplexLog2 +VarComplexLogN +VarComplexPower +VarComplexSec +VarComplexSecH +VarComplexSign +VarComplexSimplify +VarComplexSin +VarComplexSinH +VarComplexSqr +VarComplexSqrt +VarComplexTan +VarComplexTanH +VarComplexTimesImaginary +VarComplexTimesNegI +VarComplexTimesPosI +VarComplexTimesReal +VarComplexToPolar +VarConv +VarConvert +VarConvertCreate +VarConvertCreateInto +VarCopyByRef +VarCopyNoInd +VarCopyNoIndCopyProc +VarCopyNoIndDeep +VarCopyNoIndOleStr +VarCopyNoIndViaOS +VarCyFromBool +VarCyFromDate +VarCyFromDec +VarCyFromDisp +VarCyFromI1 +VarCyFromI2 +VarCyFromI4 +VarCyFromR4 +VarCyFromR8 +VarCyFromStr +VarCyFromUI1 +VarCyFromUI2 +VarCyFromUI4 +VarDataCast +VarDataCastTo +VarDataCastToOleStr +VarDataClear +VarDataCopy +VarDataCopyNoInd +VarDataFromOleStr +VarDataFromStr +VarDataInit +VarDataIsArray +VarDataIsByRef +VarDataIsEmptyParam +VarDataIsFloat +VarDataIsNumeric +VarDataIsOrdinal +VarDataIsStr +VarDataSize +VarDataToStr +VarDateFromBool +VarDateFromCy +VarDateFromDec +VarDateFromDisp +VarDateFromI1 +VarDateFromI2 +VarDateFromI4 +VarDateFromR4 +VarDateFromR8 +VarDateFromStr +VarDateFromUI1 +VarDateFromUI2 +VarDateFromUI4 +VarDispInvoke +VarEnsureRange +VarEquals +VarExceptionToResult +VarFMTBcd +VarFMTBcdCreate +VarFromDateTime +VarFromInterface +VarHlpr +VarI2FromBool +VarI2FromCy +VarI2FromDate +VarI2FromDec +VarI2FromDisp +VarI2FromI1 +VarI2FromI4 +VarI2FromR4 +VarI2FromR8 +VarI2FromStr +VarI2FromUI1 +VarI2FromUI2 +VarI2FromUI4 +VarI4FromBool +VarI4FromCy +VarI4FromDate +VarI4FromDec +VarI4FromDisp +VarI4FromI1 +VarI4FromI2 +VarI4FromInt +VarI4FromR4 +VarI4FromR8 +VarI4FromStr +VarI4FromUI1 +VarI4FromUI2 +VarI4FromUI4 +Variance +VariantAdd +VariantAdd2 +VariantAnd +VariantAnd2 +VariantArrayRedim +VariantArrayToString +VariantCast +VariantChangeSimpleIntoSimple +VariantChangeType +VariantChangeTypeEx +VariantClear +VariantCmpEQ +VariantCmpGT +VariantCmpLT +VariantCopy +VariantCopyInd +VariantCpy +VariantDiv +VariantDiv2 +VariantGetElement +VariantInit +VariantMod +VariantMod2 +VariantMul +VariantMul2 +VariantNeg +VariantNot +VariantOr +VariantOr2 +VariantPutElement +Variants +VariantShl +VariantShl2 +VariantShr +VariantShr2 +VariantSub +VariantSub2 +VariantTimeToDosDateTime +VariantTimeToSystemTime +VariantXor +VariantXor2 +VarInRange +VarInt64FromVar +VarInvalidNullOp +VarInvalidOp +VarIsArray +VarIsByRef +VarIsClear +VarIsComplex +VarIsConvert +VarIsCustom +VarIsEmpty +VarIsEmptyParam +VarIsError +VarIsFloat +VarIsFMTBcd +VarIsNull +VarIsNumeric +VarIsOrdinal +VarIsSQLTimeStamp +VarIsStr +VarIsType +VarOleStrToString +VarOpRare +VarOverflowError +VarR4FromBool +VarR4FromCy +VarR4FromDate +VarR4FromDec +VarR4FromDisp +VarR4FromI1 +VarR4FromI2 +VarR4FromI4 +VarR4FromR8 +VarR4FromStr +VarR4FromUI1 +VarR4FromUI2 +VarR4FromUI4 +VarR8FromBool +VarR8FromCy +VarR8FromDate +VarR8FromDec +VarR8FromDisp +VarR8FromI1 +VarR8FromI2 +VarR8FromI4 +VarR8FromR4 +VarR8FromStr +VarR8FromUI1 +VarR8FromUI2 +VarR8FromUI4 +VarRangeCheckError +VarResultCheck +VarSameValue +VarSQLTimeStamp +VarSQLTimeStampCreate +VarStrCat +VarStringToOleStr +VarSupports +VarToAutoObject +VarToBcd +VarToBoolAny +VarToBoolAsString +VarToBoolCustom +VarToBoolViaOS +VarToBuffer +VarToCurrencyAny +VarToCurrencyAsDouble +VarToCurrencyAsString +VarToCurrencyCustom +VarToCurrencyViaOS +VarToDataPacket +VarToDateAny +VarToDateAsDouble +VarToDateAsString +VarToDateCustom +VarToDateTime +VarToDateViaOS +VarToDoubleAny +VarToDoubleAsString +VarToDoubleCustom +VarToDoubleViaOS +VarToInt64Any +VarToInt64AsString +VarToInt64Custom +VarToInt64ViaOS +VarToIntAny +VarToIntAsString +VarToIntCustom +VarToInterface +VarToIntViaOS +VarToLStrAny +VarToLStrCustom +VarToLStrViaOS +VarToSQLTimeStamp +VarToStr +VarToStrDef +VarToWideStr +VarToWideStrDef +VarToWStrAny +VarToWStrCustom +VarToWStrViaOS +VarType +VarTypeAsText +VarTypeIsCustom +VarTypeIsFloat +VarTypeIsNumeric +VarTypeIsOrdinal +VarTypeIsStr +VarTypeIsValidArrayType +VarTypeIsValidElementType +VarTypeToDataType +VarUI1FromBool +VarUI1FromCy +VarUI1FromDate +VarUI1FromDec +VarUI1FromDisp +VarUI1FromI1 +VarUI1FromI2 +VarUI1FromI4 +VarUI1FromR4 +VarUI1FromR8 +VarUI1FromStr +VarUI1FromUI2 +VarUI1FromUI4 +VarUtils +VCLCom +VCLEditors +VclExit +VclInit +VCLSprigs +VDBConsts +VectorFromBstr +VerFindFile +VerFindFileA +VerFindFileW +Verified +VerifyBoolStrArray +VerifyField +VerifyGroupIndex +VerInstallFile +VerInstallFileA +VerInstallFileW +VerLanguageName +VerLanguageNameA +VerLanguageNameW +VerQueryValue +VerQueryValueA +VerQueryValueW +vfprintf +ViewActivated +ViewAll +ViewExplorer +ViewForms +ViewModified +ViewNone +ViewNotification +ViewObjectInspector +ViewShowing +ViewUnits +VirtIntf +virtual +VirtualAlloc +VirtualAllocEx +VirtualFree +VirtualFreeEx +VirtualLock +VirtualProtect +VirtualProtectEx +VirtualQuery +VirtualQueryEx +VirtualUnlock +Visible +VisibleButtonCount +VisibleChanged +VisibleChanging +VisibleCount +VisualRefresh +VkKeyScan +VkKeyScanA +VkKeyScanEx +VkKeyScanExA +VkKeyScanExW +VkKeyScanW +VolumeID +vsfFunction +WaitCommEvent +WaitFor +WaitForConnectComplete +WaitForData +WaitForDebugEvent +WaitForInputIdle +WaitForMultipleObjects +WaitForMultipleObjectsEx +WaitForPrinterChange +WaitForReadSignal +WaitForSingleObject +WaitForSingleObjectEx +WaitForSyncEvent +WaitForWriteSignal +WaitMessage +WaitNamedPipe +WaitNamedPipeA +WaitNamedPipeW +WakeMainThread +WantChildKey +warning +was +WashVariant +waveInAddBuffer +waveInClose +waveInGetDevCaps +waveInGetDevCapsA +waveInGetDevCapsW +waveInGetErrorText +waveInGetErrorTextA +waveInGetErrorTextW +waveInGetID +waveInGetNumDevs +waveInGetPosition +waveInMessage +waveInOpen +waveInPrepareHeader +waveInReset +waveInStart +waveInStop +waveInUnprepareHeader +waveOutBreakLoop +waveOutClose +waveOutGetDevCaps +waveOutGetDevCapsA +waveOutGetDevCapsW +waveOutGetErrorText +waveOutGetErrorTextA +waveOutGetErrorTextW +waveOutGetID +waveOutGetNumDevs +waveOutGetPitch +waveOutGetPlaybackRate +waveOutGetPosition +waveOutGetVolume +waveOutMessage +waveOutOpen +waveOutPause +waveOutPrepareHeader +waveOutReset +waveOutRestart +waveOutSetPitch +waveOutSetPlaybackRate +waveOutSetVolume +waveOutUnprepareHeader +waveOutWrite +WCharFromChar +wContext +wContinue +wDriverId +WebColorNameToColor +WebColorStrToColor +WebColorToRGB +WebModuleCreate +WebModuleDestroy +WeekOf +WeekOfTheMonth +WeekOfTheYear +WeeksBetween +WeeksInAYear +WeeksInYear +WeekSpan +wFlags +wglCopyContext +wglCreateContext +wglCreateLayerContext +wglDeleteContext +wglDescribeLayerPlane +wglGetCurrentContext +wglGetCurrentDC +wglGetLayerPaletteEntries +wglGetProcAddress +wglMakeCurrent +wglRealizeLayerPalette +wglSetLayerPaletteEntries +wglShareLists +wglSwapLayerBuffers +wglSwapMultipleBuffers +wglUseFontBitmaps +wglUseFontBitmapsA +wglUseFontBitmapsW +wglUseFontOutlines +wglUseFontOutlinesA +wglUseFontOutlinesW +WHashValOfLHashVal +WhereX +WhereY +while +WideAdjustLineBreaks +WideAppend +WideAssign +WideCat +WideCharLenToString +WideCharLenToStrVar +WideCharToChar +WideCharToMultiByte +WideCharToShortString +WideCharToString +WideCharToStrVar +WideCompareStr +WideCompareText +WideCopy +WideDelete +WideDequotedStr +WideEqual +WideExtractQuotedStr +WideFmtStr +WideFormat +WideFormatBuf +WideFree +WideFromAnsi +WideFromPChar +WideGreater +WideInsert +WideLastChar +WideLength +WideLess +WideLowerCase +WidenPath +WidePos +WideQuotedStr +WideReplaceStr +WideReplaceText +WideSameStr +WideSameText +WideSetLength +WideStringAlloc +WideStringReplace +WideStrings +WideStringToBytes +wideStringToDom +WideStringToUCS4String +WideStrUtils +WideUpperCase +will +WillChangeField +WillChangeRecord +WillChangeRecordset +WillConnect +WillExecute +WillMove +Win32Check +Win32NLSEnableIME +WinControlDragDrop +WinControlDragOver +WinControlPaletteOver +window +WindowActivated +WindowCommand +WindowEnumerationTester +WindowFromDC +WindowFromPoint +WindowHide +WindowList +WindowNotification +WindowProc +Windows +WindowShow +WinError +WinExec +WinHelp +WinHelpA +WinHelpViewer +WinHelpW +WinInet +WinLoadTrustProvider +WinSock +WinSpool +WinSubmitCertificate +WinSvc +WinVerifyTrust +with +WithinPastDays +WithinPastHours +WithinPastMilliSeconds +WithinPastMinutes +WithinPastMonths +WithinPastSeconds +WithinPastWeeks +WithinPastYears +WMActivate +WMCancelMode +WMCaptureChanged +WMChar +WMCharToItem +WMClear +WMClose +WMCommand +WMCompareItem +WMContextMenu +WMCopy +WMCreate +WMCtlColorEdit +WMCut +WMDeleteItem +WMDestroy +WMDrawItem +WMEnterMenuLoop +WMEraseBkGnd +WMFontChange +WMGetDlgCode +WMGetMinMaxInfo +WMGetText +WMGetTextLength +WMHelp +WMHScroll +WMIconEraseBkgnd +WMIMEEndComp +WMIMEStartComp +WMInitDialog +WMInitMenuPopup +WMKeyDown +WMKeyUp +WMKillFocus +WMLButtonDblClk +WMLButtonDown +WMLButtonUp +WMMDIActivate +WMMeasureItem +WMMenuChar +WMMenuSelect +WMMIDASIcon +WMMouseActivate +WMMouseLeave +WMMouseMove +WMMove +WMNCCalcSize +WMNCCreate +WMNCDestroy +WMNCHitTest +WMNCLButtonDown +WMNCPaint +WMNextDlgCtl +WMNotify +WMNotifyFormat +WMPaint +WMPaletteChanged +WMParentNotify +WMPaste +WMPrint +WMPrintClient +WMQueryDragIcon +WMQueryEndSession +WMQueryNewPalette +WMRButtonUp +WMSetCursor +WMSetFocus +WMSetFont +WMSetText +WMSettingChange +WMShowWindow +WMSize +WMSysChar +WMSysColorChange +WMSysCommand +WMSysKeyDown +WMSysKeyUp +WMTimeChange +WMTimer +WMUndo +WMVKeyToItem +WMVScroll +WMWindowPosChanged +WMWindowPosChanging +WMWinIniChange +Wnd +WndCaller +wndParent +WndProc +WNetAddConnection +WNetAddConnection2 +WNetAddConnection2A +WNetAddConnection2W +WNetAddConnection3 +WNetAddConnection3A +WNetAddConnection3W +WNetAddConnectionA +WNetAddConnectionW +WNetCancelConnection +WNetCancelConnection2 +WNetCancelConnection2A +WNetCancelConnection2W +WNetCancelConnectionA +WNetCancelConnectionW +WNetCloseEnum +WNetConnectionDialog +WNetConnectionDialog1 +WNetConnectionDialog1A +WNetConnectionDialog1W +WNetDisconnectDialog +WNetDisconnectDialog1 +WNetDisconnectDialog1A +WNetDisconnectDialog1W +WNetEnumResource +WNetEnumResourceA +WNetEnumResourceW +WNetGetConnection +WNetGetConnectionA +WNetGetConnectionW +WNetGetLastError +WNetGetLastErrorA +WNetGetLastErrorW +WNetGetNetworkInformation +WNetGetNetworkInformationA +WNetGetNetworkInformationW +WNetGetProviderName +WNetGetProviderNameA +WNetGetProviderNameW +WNetGetResourceParent +WNetGetResourceParentA +WNetGetResourceParentW +WNetGetUniversalName +WNetGetUniversalNameA +WNetGetUniversalNameW +WNetGetUser +WNetGetUserA +WNetGetUserW +WNetOpenEnum +WNetOpenEnumA +WNetOpenEnumW +WNetSetConnection +WNetSetConnectionA +WNetSetConnectionW +WNetUseConnection +WNetUseConnectionA +WNetUseConnectionW +Word +WorkArea +WrapButtons +WrapDSOandSession +WrapHorz +WrapSizeHorz +WrapSizeVert +WrapText +Write +WriteArray +WriteAt +writeAttributeDeclaration +WriteAttributeSet +WriteBinary +WriteBinaryData +WriteBinaryStream +WriteBlock +WriteBool +WriteBoolean +WriteBuffer +WriteCalculated +writeCDATA +WriteChar +writeCharRef +WriteClassStg +WriteClassStm +writeCode +writeCodeAsUTF16 +writeCodeAsUTF8 +WriteCollection +WriteCollectionProp +WriteCols +WriteColumns +WriteColWidths +writeComment +WriteComponent +WriteComponentRes +WriteComponentResFile +WriteComponentSimulation +writeConditionalSection +WriteConsole +WriteConsoleA +WriteConsoleInput +WriteConsoleInputA +WriteConsoleInputW +WriteConsoleOutput +WriteConsoleOutputA +WriteConsoleOutputAttribute +WriteConsoleOutputCharacter +WriteConsoleOutputCharacterA +WriteConsoleOutputCharacterW +WriteConsoleOutputW +WriteConsoleW +writeContentspec +WriteControlName +WriteCurrency +WriteData +WriteDataPacket +WriteDataSet +WriteDate +WriteDateTime +WriteDescendent +WriteDescendentRes +WriteDesignerData +WriteDesignSize +writeDoctype +WriteDOMVendor +WriteDouble +writeElementDeclaration +WriteEMFStream +writeEmptyElement +writeEndElement +writeEndPrefixMapping +writeEntityDeclaration +writeEntityRef +WriteErrorMessage +WriteExpandedState +WriteExpandString +WriteFacet +WriteFile +WriteFileEx +WriteFloat +WriteFloatProp +WriteFmtUserTypeStg +WriteGlassFrameBottom +WriteGlassFrameEnabled +WriteGlassFrameLeft +WriteGlassFrameRight +WriteGlassFrameSheetOfGlass +WriteGlassFrameTop +WriteHeight +WriteHitLogging +WriteHorizontalOffset +WriteHWL +WriteIcon +WriteIdent +WriteInt64Prop +WriteInteger +WriteIntProp +WriteItemData +WriteItems +WriteLeft +WriteLinkInfo +WriteListBegin +WriteListEnd +writeLn +WriteLogRecord +WriteLogRecordVariants +WriteLookup +WriteMetaData +WriteMinStr +WriteMultiple +WriteNode +WriteNodeData +WriteNodes +writeNotationDeclaration +WriteObjectProp +WriteOrdProp +WriteOutline +WriteParamData +writeParameterEntityRef +writePCDATA +WritePixelsPerInch +WritePrefix +WritePrinter +WritePrivateProfileSection +WritePrivateProfileSectionA +WritePrivateProfileSectionW +WritePrivateProfileString +WritePrivateProfileStringA +WritePrivateProfileStringW +WritePrivateProfileStruct +WritePrivateProfileStructA +WritePrivateProfileStructW +writeProcessingInstruction +WriteProcessMemory +WriteProfileSection +WriteProfileSectionA +WriteProfileSectionW +WriteProfileString +WriteProfileStringA +WriteProfileStringW +WriteProp +WriteProperties +WriteProperty +WritePropertyNames +WritePropName +WritePropPath +WriteRaw +WriteResourceHeader +WriteRootComponent +WriteRowHeights +WriteScan +WriteSet +WriteSettings +WriteSignature +WriteSingle +writeStartElement +writeStartPrefixMapping +WriteState +WriteStr +WriteString +WriteStringToStorage +WriteStrProp +WriteStyleProp +WriteTapemark +WriteText +writeTextDeclaration +WriteTextHeight +WriteTime +WriteToClipBoard +WriteToolbar +WriteTop +WriteToStream +WriteUnNamed +WriteValue +WriteVariant +WriteVerticalOffset +writeWhileCheckingForAMPAndLT +WriteWideChar +writeWideChars +WriteWideString +writeWideStrings +WriteWidth +WriteWMFStream +writeXmlDeclaration +WSAAsyncGetHostByAddr +WSAAsyncGetHostByName +WSAAsyncGetProtoByName +WSAAsyncGetProtoByNumber +WSAAsyncGetServByName +WSAAsyncGetServByPort +WSAAsyncSelect +WSACancelAsyncRequest +WSACancelBlockingCall +WSACleanup +WSAGetAsyncBuflen +WSAGetAsyncError +WSAGetLastError +WSAGetSelectError +WSAGetSelectEvent +WSAIsBlocking +WSAMakeSelectReply +WSAMakeSyncReply +WSARecvEx +WSASetBlockingHook +WSASetLastError +WSAStartup +WSAUnhookBlockingHook +wsprintf +wsprintfA +wsprintfW +WStrAlloc +WStrBufSize +WStrCat +WStrComp +WStrCopy +WStrDispose +WStrEnd +WStrError +WStrLCopy +WStrLen +WStrMove +WStrNew +WStrPCopy +WStrPLCopy +WStrPos +WStrScan +WStrSet +WSyvToKanji +wvsprintf +wvsprintfA +wvsprintfW +XactComplete +xc +xdom +XDRSchema +XdrTypeToXsdType +xEnumDisplayMonitors +xercesxmldom +xGetMonitorInfo +xGetMonitorInfoA +xGetMonitorInfoW +xInfo +xitCode +xmlAnalyseElement +XMLAnalyseEntityDef +XMLAnalyseNotationDecl +XMLAnalysePCDATA +XMLAnalysePubSysId +xmlAnalyseTag +XmlCharRefToInt +XmlCharRefToStr +XMLConst +XMLDataToSchema +xmlDeclaration +XMLDoc +XMLDocError +xmldom +XMLExtractLocalName +XMLExtractPrefix +XMLIntf +XmlIntToCharRef +XMLIsolateQuote +xmlNormalizeLineBreaks +xmlReplaceQuotes +XMLSchema +XMLSchema99 +XMLSchemaTags +XMLStringsChanging +XMLStringToWideString +XmlStrToCharRef +xmlTrunc +XMLTruncAngularBrackets +XMLTruncRoundBrackets +XMLTruncSpace +xMonitorFromPoint +xMonitorFromRect +xMonitorFromWindow +xor +XorRects +XPActnCtrls +xpert +XPMan +XPStyleActnCtrls +xSysFreeMem +xSysGetMem +xSysReallocMem +YearOf +YearsBetween +YearSpan +Yesterday +Yield +yIn +ymbolName +ZeroBcd +ZeroMemory +ZLib +zlibAllocMem +ZLibConst +zlibFreeMem +ZoneCaptionHitTest +ZoomWindow \ No newline at end of file diff --git a/PowerEditor/bin/plugins/APIs/perl.api b/PowerEditor/bin/plugins/APIs/perl.api new file mode 100644 index 00000000..bfb3a67a --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/perl.api @@ -0,0 +1,467 @@ +-BGCOLOR=> +-absolute=> +-action=> +-align=> +-alt=> +-anchor=> +-author=> +-background=> +-base=> +-bgcolor=> +-border=> +-borderwidth=> +-boundary=> +-cellpadding=> +-cellspacing=> +-checked=> +-class=> +-code=> +-colheader=> +-color=> +-colspan=> +-columns=> +-command=> +-compact=> +-content=> +-cookie=> +-default=> +-defaultextension=> +-domain=> +-dtd=> +-expand=> +-expires=> +-face=> +-filetypes=> +-fill=> +-foreground=> +-full=> +-head=> +-height=> +-href=> +-initialdir=> +-initialfile=> +-justification=> +-label=> +-labels=> +-language=> +-leftmargin=> +-linebreak=> +-location=> +-maxlength=> +-meta=> +-method=> +-msg=> +-multiple=> +-name=> +-nolabels=> +-nph=> +-on=> +-onBlur=> +-onChange=> +-onClick=> +-onFocus=> +-onLoad=> +-onMouseOut=> +-onMouseOver=> +-onSelect=> +-onSubmit=> +-onUnload=> +-override=> +-padx=> +-pady=> +-path=> +-path_info=> +-query=> +-query_string=> +-refresh=> +-rel=> +-relative=> +-relief=> +-rowheader=> +-rows=> +-rowspan=> +-script=> +-secure=> +-selected=> +-side=> +-size=> +-src=> +-status=> +-style=> +-target=> +-text=> +-textvariable=> +-title=> +-topmargin=> +-type=> +-uri=> +-url=> +-valign=> +-value=> +-values=> +-width=> +-wrap=> +-xbase=> +ARGV +AUTOLOAD +Accept +BEGIN +Balloon +Button +CORE +DATA +DESTROY +END +Entry +Frame +Label +MainLoop +Radiobutton +STDERR +STDIN +STDOUT +SUPER +Tr +UNIVERSAL +__DATA__ +__END__ +__END__ +__FILE__ +__LINE__ +__PACKAGE__ +abs +accept +address +alarm +and +atan2 +attach +auth_type +autoEscape +bind +binmode +bless +br +button +caller +caption +chdir +checkbox +checkbox_group +chmod +chomp +chop +chown +chr +chroot +close +closedir +cmp +compile +configure +connect +constant +continue +cookie +cos +crypt +dbmclose +dbmopen +defaults +defined +deiconify +delete +delete_all +die +div +do +dump +each +else +elsif +em +end +end_h1 +end_html +end_table +end_ul +endform +endgrent +endhostent +endif +endnetent +endprotoent +endpwent +endservent +eof +eq +escape +escape_HTML +eval +exec +exists +exit +exp +fcntl +filefield +fileno +flock +font +for +foreach +fork +format +formline +ge +geometry +getc +getgrent +getgrgid +getgrname +gethostbyaddr +gethostbyname +gethostent +getlogin +getnetbyaddr +getnetbyname +getnetent +getpeername +getpgrp +getppid +getpriority +getprotobyname +getprotobynumber +getprotoent +getpwent +getpwnam +getpwuid +getservbyname +getservbyport +getservent +getsockname +getsockopt +glob +gmtime +goto +grep +groove +gt +h1 +h2 +h3 +h4 +h5 +header +hex +hidden +hr +http +https +if +image_button +img +index +insert +int +ioctl +isindex +join +keys +kill +last +lc +lcfirst +le +length +li +link +listen +local +localtime +log +lstat +lt +map +maxsize +minsize +mkdir +msgctl +msgget +msgrcv +msgsnd +multipart_end +multipart_init +multipart_start +my +ne +next +no +not +oct +ol +open +opendir +or +ord +pack +package +param +param_fetch +password_field +path_info +pipe +pop +popup_menu +pos +pre +print +printf +prototype +push +qq +query_string +quotemeta +qw +qx +radio_group +raise +rand +raw_cookie +read +readdir +readline +readlink +readpipe +recv +redirect +redo +ref +referer +remote_addr +remote_host +remote_indent +remote_user +rename +request_method +require +reset +resizable +return +reverse +rewinddir +rindex +rmdir +scalar +script_name +scrolling_list +seek +seekdir +select +self_url +semctl +semget +semop +send +server_name +server_port +server_software +set +setgrent +sethostent +setnetent +setpgrp +setpriority +setprotoent +setpwent +setservent +setsockopt +shift +shmctl +shmget +shmread +shmwrite +shutdown +sin +sleep +socket +socketpair +sort +span +splice +split +sprintf +sqrt +srand +start_form +start_h1 +start_html +start_multipart_form +start_table +start_ul +startform +stat +strict +strong +study +sub +submit +substr +symlink +syscall +sysopen +sysread +sysseek +system +syswrite +table +tagConfigure +td +tell +telldir +textarea +textfield +th +tie +tied +time +times +title +tmpFileName +top +tr +truncate +uc +ucfirst +ul +umask +undef +unescape +unescapeHTML +unless +unlink +unpack +unshift +untie +until +update +upload +uploadInfo +url +url_param +use +use_named_parameters +user_agent +user_name +utime +values +variable +vec +virtual_host +wait +waitpid +wantarray +warn +while +width +write +xor diff --git a/PowerEditor/bin/plugins/APIs/php.api b/PowerEditor/bin/plugins/APIs/php.api new file mode 100644 index 00000000..a89b9b1e --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/php.api @@ -0,0 +1,2655 @@ + +abs +abstract +acos +acosh +addcslashes +addslashes +apache_child_terminate +apache_lookup_uri +apache_note +apache_setenv +array +array_change_key_case +array_chunk +array_count_values +array_diff +array_fill +array_filter +array_flip +array_intersect +array_key_exists +array_keys +array_map +array_merge +array_merge_recursive +array_multisort +array_pad +array_pop +array_push +array_rand +array_reduce +array_reverse +array_search +array_shift +array_slice +array_splice +array_sum +array_unique +array_unshift +array_values +array_walk +arsort +ascii2ebcdic +asin +asinh +asort +aspell_check +aspell_check_raw +aspell_new +aspell_suggest +assert +assert_options +atan +atan2 +atanh +base64_decode +base64_encode +base_convert +basename +bcadd +bccomp +bcdiv +bcmod +bcmul +bcpow +bcscale +bcsqrt +bcsub +bin2hex +bind_textdomain_codeset +bindec +bindtextdomain +bzclose +bzcompress +bzdecompress +bzerrno +bzerror +bzerrstr +bzflush +bzopen +bzread +bzwrite +cal_days_in_month +cal_from_jd +cal_info +cal_to_jd +call_user_func +call_user_func_array +call_user_method +call_user_method_array +ccvs_add +ccvs_auth +ccvs_command +ccvs_count +ccvs_delete +ccvs_done +ccvs_init +ccvs_lookup +ccvs_new +ccvs_report +ccvs_return +ccvs_reverse +ccvs_sale +ccvs_status +ccvs_textvalue +ccvs_void +ceil +chdir +checkdate +checkdnsrr +chgrp +chmod +chop +chown +chr +chroot +chunk_split +class +class_exists +clearstatcache +closedir +closelog +com_addref +com_get +com_invoke +com_isenum +com_load +com_load_typelib +com_propget +com_propput +com_propset +com_release +com_set +compact +connection_aborted +connection_status +connection_timeout +const +constant +convert_cyr_string +copy +cos +cosh +count +count_chars +cpdf_add_annotation +cpdf_add_outline +cpdf_arc +cpdf_begin_text +cpdf_circle +cpdf_clip +cpdf_close +cpdf_closepath +cpdf_closepath_fill_stroke +cpdf_closepath_stroke +cpdf_continue_text +cpdf_curveto +cpdf_end_text +cpdf_fill +cpdf_fill_stroke +cpdf_finalize +cpdf_finalize_page +cpdf_global_set_document_limits +cpdf_import_jpeg +cpdf_lineto +cpdf_moveto +cpdf_newpath +cpdf_open +cpdf_output_buffer +cpdf_page_init +cpdf_place_inline_image +cpdf_rect +cpdf_restore +cpdf_rlineto +cpdf_rmoveto +cpdf_rotate +cpdf_rotate_text +cpdf_save +cpdf_save_to_file +cpdf_scale +cpdf_set_action_url +cpdf_set_char_spacing +cpdf_set_creator +cpdf_set_current_page +cpdf_set_font +cpdf_set_font_directories +cpdf_set_font_map_file +cpdf_set_horiz_scaling +cpdf_set_keywords +cpdf_set_leading +cpdf_set_page_animation +cpdf_set_subject +cpdf_set_text_matrix +cpdf_set_text_pos +cpdf_set_text_rendering +cpdf_set_text_rise +cpdf_set_title +cpdf_set_viewer_preferences +cpdf_set_word_spacing +cpdf_setdash +cpdf_setflat +cpdf_setgray +cpdf_setgray_fill +cpdf_setgray_stroke +cpdf_setlinecap +cpdf_setlinejoin +cpdf_setlinewidth +cpdf_setmiterlimit +cpdf_setrgbcolor +cpdf_setrgbcolor_fill +cpdf_setrgbcolor_stroke +cpdf_show +cpdf_show_xy +cpdf_stringwidth +cpdf_stroke +cpdf_text +cpdf_translate +crack_check +crack_closedict +crack_getlastmessage +crack_opendict +crc32 +create_function +crypt +ctype_alnum +ctype_alpha +ctype_cntrl +ctype_digit +ctype_graph +ctype_lower +ctype_print +ctype_punct +ctype_space +ctype_upper +ctype_xdigit +curl_close +curl_errno +curl_error +curl_exec +curl_getinfo +curl_init +curl_setopt +curl_version +current +cybercash_base64_decode +cybercash_base64_encode +cybercash_decr +cybercash_encr +cybermut_creerformulairecm +cybermut_creerreponsecm +cybermut_testmac +cyrus_authenticate +cyrus_bind +cyrus_close +cyrus_connect +cyrus_query +cyrus_unbind +date +dba_close +dba_delete +dba_exists +dba_fetch +dba_firstkey +dba_insert +dba_nextkey +dba_open +dba_optimize +dba_popen +dba_replace +dba_sync +dbase_add_record +dbase_close +dbase_create +dbase_delete_record +dbase_get_record +dbase_get_record_with_names +dbase_numfields +dbase_numrecords +dbase_open +dbase_pack +dbase_replace_record +dblist +dbmclose +dbmdelete +dbmexists +dbmfetch +dbmfirstkey +dbminsert +dbmnextkey +dbmopen +dbmreplace +dbplus_add +dbplus_aql +dbplus_chdir +dbplus_close +dbplus_curr +dbplus_errcode +dbplus_errno +dbplus_find +dbplus_first +dbplus_flush +dbplus_freealllocks +dbplus_freelock +dbplus_freerlocks +dbplus_getlock +dbplus_getunique +dbplus_info +dbplus_last +dbplus_lockrel +dbplus_next +dbplus_open +dbplus_prev +dbplus_rchperm +dbplus_rcreate +dbplus_rcrtexact +dbplus_rcrtlike +dbplus_resolve +dbplus_restorepos +dbplus_rkeys +dbplus_ropen +dbplus_rquery +dbplus_rrename +dbplus_rsecindex +dbplus_runlink +dbplus_rzap +dbplus_savepos +dbplus_setindex +dbplus_setindexbynumber +dbplus_sql +dbplus_tcl +dbplus_tremove +dbplus_undo +dbplus_undoprepare +dbplus_unlockrel +dbplus_unselect +dbplus_update +dbplus_xlockrel +dbplus_xunlockrel +dbx_close +dbx_compare +dbx_connect +dbx_error +dbx_query +dbx_sort +dcgettext +dcngettext +debugger_off +debugger_on +decbin +dechex +decoct +define +define_syslog_variables +defined +deg2rad +delete +dgettext +die +dio_close +dio_fcntl +dio_open +dio_read +dio_seek +dio_stat +dio_truncate +dio_write +dirname +disk_free_space +disk_total_space +diskfreespace +dl +dngettext +domattribute->name +domattribute->specified +domattribute->value +domdocument->create_attribute +domdocument->create_cdata_section +domdocument->create_comment +domdocument->create_element +domdocument->create_entity_reference +domdocument->create_processing_instruction +domdocument->create_text_node +domdocument->doctype +domdocument->document_element +domdocument->dump_file +domdocument->dump_mem +domdocument->get_element_by_id +domdocument->get_elements_by_tagname +domdocument->html_dump_mem +domdocumenttype->entities +domdocumenttype->internal_subset +domdocumenttype->name +domdocumenttype->notations +domdocumenttype->public_id +domdocumenttype->system_id +domelement->get_attribute +domelement->get_attribute_node +domelement->get_elements_by_tagname +domelement->has_attribute +domelement->remove_attribute +domelement->set_attribute +domelement->set_attribute_node +domelement->tagname +domnode->append_child +domnode->append_sibling +domnode->attributes +domnode->clone_node +domnode->dump_node +domnode->first_child +domnode->get_content +domnode->has_child_nodes +domnode->insert_before +domnode->is_blank_node +domnode->last_child +domnode->next_sibling +domnode->node_name +domnode->node_type +domnode->node_value +domnode->owner_document +domnode->parent_node +domnode->prefix +domnode->previous_sibling +domnode->remove_child +domnode->replace_child +domnode->replace_node +domnode->set_content +domnode->set_name +domnode->unlink_node +domprocessinginstruction->data +domprocessinginstruction->target +domxml_new_doc +domxml_open_file +domxml_open_mem +domxml_version +domxml_xmltree +dotnet_load +doubleval +each +easter_date +easter_days +ebcdic2ascii +echo +empty +end +ereg +ereg_replace +eregi +eregi_replace +error_log +error_reporting +escapeshellarg +escapeshellcmd +eval +exec +exif_imagetype +exif_read_data +exif_thumbnail +exit +exp +explode +expm1 +extension_loaded +extract +ezmlm_hash +fbsql_affected_rows +fbsql_autocommit +fbsql_change_user +fbsql_close +fbsql_commit +fbsql_connect +fbsql_create_blob +fbsql_create_clob +fbsql_create_db +fbsql_data_seek +fbsql_database +fbsql_database_password +fbsql_db_query +fbsql_db_status +fbsql_drop_db +fbsql_errno +fbsql_error +fbsql_fetch_array +fbsql_fetch_assoc +fbsql_fetch_field +fbsql_fetch_lengths +fbsql_fetch_object +fbsql_fetch_row +fbsql_field_flags +fbsql_field_len +fbsql_field_name +fbsql_field_seek +fbsql_field_table +fbsql_field_type +fbsql_free_result +fbsql_get_autostart_info +fbsql_hostname +fbsql_insert_id +fbsql_list_dbs +fbsql_list_fields +fbsql_list_tables +fbsql_next_result +fbsql_num_fields +fbsql_num_rows +fbsql_password +fbsql_pconnect +fbsql_query +fbsql_read_blob +fbsql_read_clob +fbsql_result +fbsql_rollback +fbsql_select_db +fbsql_set_lob_mode +fbsql_set_transaction +fbsql_start_db +fbsql_stop_db +fbsql_tablename +fbsql_username +fbsql_warnings +fclose +fdf_add_template +fdf_close +fdf_create +fdf_get_file +fdf_get_status +fdf_get_value +fdf_next_field_name +fdf_open +fdf_save +fdf_set_ap +fdf_set_encoding +fdf_set_file +fdf_set_flags +fdf_set_javascript_action +fdf_set_opt +fdf_set_status +fdf_set_submit_form_action +fdf_set_value +feof +fflush +fgetc +fgetcsv +fgets +fgetss +file +file_exists +file_get_contents +file_get_wrapper_data +file_register_wrapper +fileatime +filectime +filegroup +fileinode +filemtime +fileowner +fileperms +filepro +filepro_fieldcount +filepro_fieldname +filepro_fieldtype +filepro_fieldwidth +filepro_retrieve +filepro_rowcount +filesize +filetype +floatval +flock +floor +flush +fopen +fpassthru +fputs +fread +frenchtojd +fribidi_log2vis +fscanf +fseek +fsockopen +fstat +ftell +ftok +ftp_cdup +ftp_chdir +ftp_close +ftp_connect +ftp_delete +ftp_exec +ftp_fget +ftp_fput +ftp_get +ftp_get_option +ftp_login +ftp_mdtm +ftp_mkdir +ftp_nlist +ftp_pasv +ftp_put +ftp_pwd +ftp_quit +ftp_rawlist +ftp_rename +ftp_rmdir +ftp_set_option +ftp_site +ftp_size +ftp_systype +ftruncate +func_get_arg +func_get_args +func_num_args +function +function_exists +fwrite +get_browser +get_cfg_var +get_class +get_class_methods +get_class_vars +get_current_user +get_declared_classes +get_defined_constants +get_defined_functions +get_defined_vars +get_extension_funcs +get_html_translation_table +get_included_files +get_loaded_extensions +get_magic_quotes_gpc +get_magic_quotes_runtime +get_meta_tags +get_object_vars +get_parent_class +get_required_files +get_resource_type +getallheaders +getcwd +getdate +getenv +gethostbyaddr +gethostbyname +gethostbynamel +getimagesize +getlastmod +getmxrr +getmygid +getmyinode +getmypid +getmyuid +getprotobyname +getprotobynumber +getrandmax +getrusage +getservbyname +getservbyport +gettext +gettimeofday +gettype +gmdate +gmmktime +gmp_abs +gmp_add +gmp_and +gmp_clrbit +gmp_cmp +gmp_com +gmp_div +gmp_div_q +gmp_div_qr +gmp_div_r +gmp_divexact +gmp_fact +gmp_gcd +gmp_gcdext +gmp_hamdist +gmp_init +gmp_intval +gmp_invert +gmp_jacobi +gmp_legendre +gmp_mod +gmp_mul +gmp_neg +gmp_or +gmp_perfect_square +gmp_popcount +gmp_pow +gmp_powm +gmp_prob_prime +gmp_random +gmp_scan0 +gmp_scan1 +gmp_setbit +gmp_sign +gmp_sqrt +gmp_strval +gmp_sub +gmp_xor +gmstrftime +gregoriantojd +gzclose +gzcompress +gzdeflate +gzencode +gzeof +gzfile +gzgetc +gzgets +gzgetss +gzinflate +gzopen +gzpassthru +gzputs +gzread +gzrewind +gzseek +gztell +gzuncompress +gzwrite +header +headers_sent +hebrev +hebrevc +hexdec +highlight_file +highlight_string +htmlentities +htmlspecialchars +hw_array2objrec +hw_changeobject +hw_children +hw_childrenobj +hw_close +hw_connect +hw_connection_info +hw_cp +hw_deleteobject +hw_docbyanchor +hw_docbyanchorobj +hw_document_attributes +hw_document_bodytag +hw_document_content +hw_document_setcontent +hw_document_size +hw_dummy +hw_edittext +hw_error +hw_errormsg +hw_free_document +hw_getanchors +hw_getanchorsobj +hw_getandlock +hw_getchildcoll +hw_getchildcollobj +hw_getchilddoccoll +hw_getchilddoccollobj +hw_getobject +hw_getobjectbyquery +hw_getobjectbyquerycoll +hw_getobjectbyquerycollobj +hw_getobjectbyqueryobj +hw_getparents +hw_getparentsobj +hw_getrellink +hw_getremote +hw_getremotechildren +hw_getsrcbydestobj +hw_gettext +hw_getusername +hw_identify +hw_incollections +hw_info +hw_inscoll +hw_insdoc +hw_insertanchors +hw_insertdocument +hw_insertobject +hw_mapid +hw_modifyobject +hw_mv +hw_new_document +hw_objrec2array +hw_output_document +hw_pconnect +hw_pipedocument +hw_root +hw_setlinkroot +hw_stat +hw_unlock +hw_who +hwapi_hgcsp +hypot +ibase_blob_add +ibase_blob_cancel +ibase_blob_close +ibase_blob_create +ibase_blob_echo +ibase_blob_get +ibase_blob_import +ibase_blob_info +ibase_blob_open +ibase_close +ibase_commit +ibase_connect +ibase_errmsg +ibase_execute +ibase_fetch_object +ibase_fetch_row +ibase_field_info +ibase_free_query +ibase_free_result +ibase_num_fields +ibase_pconnect +ibase_prepare +ibase_query +ibase_rollback +ibase_timefmt +ibase_trans +icap_close +icap_create_calendar +icap_delete_calendar +icap_delete_event +icap_fetch_event +icap_list_alarms +icap_list_events +icap_open +icap_rename_calendar +icap_reopen +icap_snooze +icap_store_event +iconv +iconv_get_encoding +iconv_set_encoding +ifx_affected_rows +ifx_blobinfile_mode +ifx_byteasvarchar +ifx_close +ifx_connect +ifx_copy_blob +ifx_create_blob +ifx_create_char +ifx_do +ifx_error +ifx_errormsg +ifx_fetch_row +ifx_fieldproperties +ifx_fieldtypes +ifx_free_blob +ifx_free_char +ifx_free_result +ifx_get_blob +ifx_get_char +ifx_getsqlca +ifx_htmltbl_result +ifx_nullformat +ifx_num_fields +ifx_num_rows +ifx_pconnect +ifx_prepare +ifx_query +ifx_textasvarchar +ifx_update_blob +ifx_update_char +ifxus_close_slob +ifxus_create_slob +ifxus_free_slob +ifxus_open_slob +ifxus_read_slob +ifxus_seek_slob +ifxus_tell_slob +ifxus_write_slob +ignore_user_abort +image2wbmp +imagealphablending +imagearc +imagechar +imagecharup +imagecolorallocate +imagecolorat +imagecolorclosest +imagecolorclosestalpha +imagecolorclosesthwb +imagecolordeallocate +imagecolorexact +imagecolorexactalpha +imagecolorresolve +imagecolorresolvealpha +imagecolorset +imagecolorsforindex +imagecolorstotal +imagecolortransparent +imagecopy +imagecopymerge +imagecopymergegray +imagecopyresampled +imagecopyresized +imagecreate +imagecreatefromgd +imagecreatefromgd2 +imagecreatefromgd2part +imagecreatefromgif +imagecreatefromjpeg +imagecreatefrompng +imagecreatefromstring +imagecreatefromwbmp +imagecreatefromxbm +imagecreatefromxpm +imagecreatetruecolor +imagedashedline +imagedestroy +imageellipse +imagefill +imagefilledarc +imagefilledellipse +imagefilledpolygon +imagefilledrectangle +imagefilltoborder +imagefontheight +imagefontwidth +imageftbbox +imagefttext +imagegammacorrect +imagegd +imagegd2 +imagegif +imageinterlace +imagejpeg +imageline +imageloadfont +imagepalettecopy +imagepng +imagepolygon +imagepsbbox +imagepscopyfont +imagepsencodefont +imagepsextendfont +imagepsfreefont +imagepsloadfont +imagepsslantfont +imagepstext +imagerectangle +imagesetbrush +imagesetpixel +imagesetstyle +imagesetthickness +imagesettile +imagestring +imagestringup +imagesx +imagesy +imagetruecolortopalette +imagettfbbox +imagettftext +imagetypes +imagewbmp +imap_8bit +imap_alerts +imap_append +imap_base64 +imap_binary +imap_body +imap_bodystruct +imap_check +imap_clearflag_full +imap_close +imap_createmailbox +imap_delete +imap_deletemailbox +imap_errors +imap_expunge +imap_fetch_overview +imap_fetchbody +imap_fetchheader +imap_fetchstructure +imap_get_quota +imap_getmailboxes +imap_getsubscribed +imap_header +imap_headerinfo +imap_headers +imap_last_error +imap_listmailbox +imap_listsubscribed +imap_mail +imap_mail_compose +imap_mail_copy +imap_mail_move +imap_mailboxmsginfo +imap_mime_header_decode +imap_msgno +imap_num_msg +imap_num_recent +imap_open +imap_ping +imap_popen +imap_qprint +imap_renamemailbox +imap_reopen +imap_rfc822_parse_adrlist +imap_rfc822_parse_headers +imap_rfc822_write_address +imap_scanmailbox +imap_search +imap_set_quota +imap_setacl +imap_setflag_full +imap_sort +imap_status +imap_subscribe +imap_thread +imap_uid +imap_undelete +imap_unsubscribe +imap_utf7_decode +imap_utf7_encode +imap_utf8 +implements +implode +import_request_variables +in_array +include +include_once +ingres_autocommit +ingres_close +ingres_commit +ingres_connect +ingres_fetch_array +ingres_fetch_object +ingres_fetch_row +ingres_field_length +ingres_field_name +ingres_field_nullable +ingres_field_precision +ingres_field_scale +ingres_field_type +ingres_num_fields +ingres_num_rows +ingres_pconnect +ingres_query +ingres_rollback +ini_alter +ini_get +ini_get_all +ini_restore +ini_set +instanceof +interface +intval +ip2long +iptcembed +iptcparse +ircg_channel_mode +ircg_disconnect +ircg_fetch_error_msg +ircg_get_username +ircg_html_encode +ircg_ignore_add +ircg_ignore_del +ircg_is_conn_alive +ircg_join +ircg_kick +ircg_lookup_format_messages +ircg_msg +ircg_nick +ircg_nickname_escape +ircg_nickname_unescape +ircg_notice +ircg_part +ircg_pconnect +ircg_register_format_messages +ircg_set_current +ircg_set_file +ircg_set_on_die +ircg_topic +ircg_whois +is_a +is_array +is_bool +is_callable +is_dir +is_double +is_executable +is_file +is_finite +is_float +is_infinite +is_int +is_integer +is_link +is_long +is_nan +is_null +is_numeric +is_object +is_readable +is_real +is_resource +is_scalar +is_string +is_subclass_of +is_uploaded_file +is_writable +is_writeable +isset +java_last_exception_clear +java_last_exception_get +jddayofweek +jdmonthname +jdtofrench +jdtogregorian +jdtojewish +jdtojulian +jdtounix +jewishtojd +join +jpeg2wbmp +juliantojd +key +krsort +ksort +lcg_value +ldap_8859_to_t61 +ldap_add +ldap_bind +ldap_close +ldap_compare +ldap_connect +ldap_count_entries +ldap_delete +ldap_dn2ufn +ldap_err2str +ldap_errno +ldap_error +ldap_explode_dn +ldap_first_attribute +ldap_first_entry +ldap_first_reference +ldap_free_result +ldap_get_attributes +ldap_get_dn +ldap_get_entries +ldap_get_option +ldap_get_values +ldap_get_values_len +ldap_list +ldap_mod_add +ldap_mod_del +ldap_mod_replace +ldap_modify +ldap_next_attribute +ldap_next_entry +ldap_next_reference +ldap_parse_reference +ldap_parse_result +ldap_read +ldap_rename +ldap_search +ldap_set_option +ldap_set_rebind_proc +ldap_sort +ldap_start_tls +ldap_t61_to_8859 +ldap_unbind +leak +levenshtein +link +linkinfo +list +localeconv +localtime +log +log10 +log1p +long2ip +lstat +ltrim +mail +mailparse_determine_best_xfer_encoding +mailparse_msg_create +mailparse_msg_extract_part +mailparse_msg_extract_part_file +mailparse_msg_free +mailparse_msg_get_part +mailparse_msg_get_part_data +mailparse_msg_get_structure +mailparse_msg_parse +mailparse_msg_parse_file +mailparse_rfc822_parse_addresses +mailparse_stream_encode +mailparse_uudecode_all +max +mb_convert_encoding +mb_convert_kana +mb_convert_variables +mb_decode_mimeheader +mb_decode_numericentity +mb_detect_encoding +mb_detect_order +mb_encode_mimeheader +mb_encode_numericentity +mb_ereg +mb_ereg_match +mb_ereg_replace +mb_ereg_search +mb_ereg_search_getpos +mb_ereg_search_getregs +mb_ereg_search_init +mb_ereg_search_pos +mb_ereg_search_regs +mb_ereg_search_setpos +mb_eregi +mb_eregi_replace +mb_get_info +mb_http_input +mb_http_output +mb_internal_encoding +mb_language +mb_output_handler +mb_parse_str +mb_preferred_mime_name +mb_regex_encoding +mb_send_mail +mb_split +mb_strcut +mb_strimwidth +mb_strlen +mb_strpos +mb_strrpos +mb_strwidth +mb_substitute_character +mb_substr +mcal_append_event +mcal_close +mcal_create_calendar +mcal_date_compare +mcal_date_valid +mcal_day_of_week +mcal_day_of_year +mcal_days_in_month +mcal_delete_calendar +mcal_delete_event +mcal_event_add_attribute +mcal_event_init +mcal_event_set_alarm +mcal_event_set_category +mcal_event_set_class +mcal_event_set_description +mcal_event_set_end +mcal_event_set_recur_daily +mcal_event_set_recur_monthly_mday +mcal_event_set_recur_monthly_wday +mcal_event_set_recur_none +mcal_event_set_recur_weekly +mcal_event_set_recur_yearly +mcal_event_set_start +mcal_event_set_title +mcal_expunge +mcal_fetch_current_stream_event +mcal_fetch_event +mcal_is_leap_year +mcal_list_alarms +mcal_list_events +mcal_next_recurrence +mcal_open +mcal_popen +mcal_rename_calendar +mcal_reopen +mcal_snooze +mcal_store_event +mcal_time_valid +mcal_week_of_year +mcrypt_cbc +mcrypt_cfb +mcrypt_create_iv +mcrypt_decrypt +mcrypt_ecb +mcrypt_enc_get_algorithms_name +mcrypt_enc_get_block_size +mcrypt_enc_get_iv_size +mcrypt_enc_get_key_size +mcrypt_enc_get_modes_name +mcrypt_enc_get_supported_key_sizes +mcrypt_enc_is_block_algorithm +mcrypt_enc_is_block_algorithm_mode +mcrypt_enc_is_block_mode +mcrypt_enc_self_test +mcrypt_encrypt +mcrypt_generic +mcrypt_generic_deinit +mcrypt_generic_end +mcrypt_generic_init +mcrypt_get_block_size +mcrypt_get_cipher_name +mcrypt_get_iv_size +mcrypt_get_key_size +mcrypt_list_algorithms +mcrypt_list_modes +mcrypt_module_close +mcrypt_module_get_algo_block_size +mcrypt_module_get_algo_key_size +mcrypt_module_get_supported_key_sizes +mcrypt_module_is_block_algorithm +mcrypt_module_is_block_algorithm_mode +mcrypt_module_is_block_mode +mcrypt_module_open +mcrypt_module_self_test +mcrypt_ofb +md5 +md5_file +mdecrypt_generic +metaphone +method_exists +mhash +mhash_count +mhash_get_block_size +mhash_get_hash_name +mhash_keygen_s2k +microtime +min +ming_setcubicthreshold +ming_setscale +ming_useswfversion +mkdir +mktime +move_uploaded_file +msession_connect +msession_count +msession_create +msession_destroy +msession_disconnect +msession_find +msession_get +msession_get_array +msession_getdata +msession_inc +msession_list +msession_listvar +msession_lock +msession_plugin +msession_randstr +msession_set +msession_set_array +msession_setdata +msession_timeout +msession_uniq +msession_unlock +msql +msql_affected_rows +msql_close +msql_connect +msql_create_db +msql_createdb +msql_data_seek +msql_dbname +msql_drop_db +msql_dropdb +msql_error +msql_fetch_array +msql_fetch_field +msql_fetch_object +msql_fetch_row +msql_field_seek +msql_fieldflags +msql_fieldlen +msql_fieldname +msql_fieldtable +msql_fieldtype +msql_free_result +msql_freeresult +msql_list_dbs +msql_list_fields +msql_list_tables +msql_listdbs +msql_listfields +msql_listtables +msql_num_fields +msql_num_rows +msql_numfields +msql_numrows +msql_pconnect +msql_query +msql_regcase +msql_result +msql_select_db +msql_selectdb +msql_tablename +mssql_bind +mssql_close +mssql_connect +mssql_data_seek +mssql_execute +mssql_fetch_array +mssql_fetch_assoc +mssql_fetch_batch +mssql_fetch_field +mssql_fetch_object +mssql_fetch_row +mssql_field_length +mssql_field_name +mssql_field_seek +mssql_field_type +mssql_free_result +mssql_get_last_message +mssql_guid_string +mssql_init +mssql_min_error_severity +mssql_min_message_severity +mssql_next_result +mssql_num_fields +mssql_num_rows +mssql_pconnect +mssql_query +mssql_result +mssql_rows_affected +mssql_select_db +mt_getrandmax +mt_rand +mt_srand +muscat_close +muscat_get +muscat_give +muscat_setup +muscat_setup_net +mysql_affected_rows +mysql_change_user +mysql_character_set_name +mysql_close +mysql_connect +mysql_create_db +mysql_data_seek +mysql_db_name +mysql_db_query +mysql_drop_db +mysql_errno +mysql_error +mysql_escape_string +mysql_fetch_array +mysql_fetch_assoc +mysql_fetch_field +mysql_fetch_lengths +mysql_fetch_object +mysql_fetch_row +mysql_field_flags +mysql_field_len +mysql_field_name +mysql_field_seek +mysql_field_table +mysql_field_type +mysql_free_result +mysql_get_client_info +mysql_get_host_info +mysql_get_proto_info +mysql_get_server_info +mysql_info +mysql_insert_id +mysql_list_dbs +mysql_list_fields +mysql_list_processes +mysql_list_tables +mysql_num_fields +mysql_num_rows +mysql_pconnect +mysql_ping +mysql_query +mysql_real_escape_string +mysql_result +mysql_select_db +mysql_stat +mysql_tablename +mysql_thread_id +mysql_unbuffered_query +natcasesort +natsort +ncurses_addch +ncurses_addchnstr +ncurses_addchstr +ncurses_addnstr +ncurses_addstr +ncurses_assume_default_colors +ncurses_attroff +ncurses_attron +ncurses_attrset +ncurses_baudrate +ncurses_beep +ncurses_bkgd +ncurses_bkgdset +ncurses_border +ncurses_can_change_color +ncurses_cbreak +ncurses_clear +ncurses_clrtobot +ncurses_clrtoeol +ncurses_color_set +ncurses_curs_set +ncurses_def_prog_mode +ncurses_def_shell_mode +ncurses_define_key +ncurses_delay_output +ncurses_delch +ncurses_deleteln +ncurses_delwin +ncurses_doupdate +ncurses_echo +ncurses_echochar +ncurses_end +ncurses_erase +ncurses_erasechar +ncurses_filter +ncurses_flash +ncurses_flushinp +ncurses_getch +ncurses_getmouse +ncurses_halfdelay +ncurses_has_colors +ncurses_has_ic +ncurses_has_il +ncurses_has_key +ncurses_hline +ncurses_inch +ncurses_init +ncurses_init_color +ncurses_init_pair +ncurses_insch +ncurses_insdelln +ncurses_insertln +ncurses_insstr +ncurses_instr +ncurses_isendwin +ncurses_keyok +ncurses_killchar +ncurses_longname +ncurses_mouseinterval +ncurses_mousemask +ncurses_move +ncurses_mvaddch +ncurses_mvaddchnstr +ncurses_mvaddchstr +ncurses_mvaddnstr +ncurses_mvaddstr +ncurses_mvcur +ncurses_mvdelch +ncurses_mvgetch +ncurses_mvhline +ncurses_mvinch +ncurses_mvvline +ncurses_mvwaddstr +ncurses_napms +ncurses_newwin +ncurses_nl +ncurses_nocbreak +ncurses_noecho +ncurses_nonl +ncurses_noqiflush +ncurses_noraw +ncurses_putp +ncurses_qiflush +ncurses_raw +ncurses_refresh +ncurses_resetty +ncurses_savetty +ncurses_scr_dump +ncurses_scr_init +ncurses_scr_restore +ncurses_scr_set +ncurses_scrl +ncurses_slk_attr +ncurses_slk_attroff +ncurses_slk_attron +ncurses_slk_attrset +ncurses_slk_clear +ncurses_slk_color +ncurses_slk_init +ncurses_slk_noutrefresh +ncurses_slk_refresh +ncurses_slk_restore +ncurses_slk_touch +ncurses_standend +ncurses_standout +ncurses_start_color +ncurses_termattrs +ncurses_termname +ncurses_timeout +ncurses_typeahead +ncurses_ungetch +ncurses_ungetmouse +ncurses_use_default_colors +ncurses_use_env +ncurses_use_extended_names +ncurses_vidattr +ncurses_vline +ncurses_wrefresh +next +ngettext +nl2br +nl_langinfo +notes_body +notes_copy_db +notes_create_db +notes_create_note +notes_drop_db +notes_find_note +notes_header_info +notes_list_msgs +notes_mark_read +notes_mark_unread +notes_nav_create +notes_search +notes_unread +notes_version +number_format +ob_clean +ob_end_clean +ob_end_flush +ob_flush +ob_get_contents +ob_get_length +ob_get_level +ob_gzhandler +ob_iconv_handler +ob_implicit_flush +ob_start +ocibindbyname +ocicancel +ocicollappend +ocicollassign +ocicollassignelem +ocicollgetelem +ocicollmax +ocicollsize +ocicolltrim +ocicolumnisnull +ocicolumnname +ocicolumnprecision +ocicolumnscale +ocicolumnsize +ocicolumntype +ocicolumntyperaw +ocicommit +ocidefinebyname +ocierror +ociexecute +ocifetch +ocifetchinto +ocifetchstatement +ocifreecollection +ocifreecursor +ocifreedesc +ocifreestatement +ociinternaldebug +ociloadlob +ocilogoff +ocilogon +ocinewcollection +ocinewcursor +ocinewdescriptor +ocinlogon +ocinumcols +ociparse +ociplogon +ociresult +ocirollback +ocirowcount +ocisavelob +ocisavelobfile +ociserverversion +ocisetprefetch +ocistatementtype +ociwritelobtofile +octdec +odbc_autocommit +odbc_binmode +odbc_close +odbc_close_all +odbc_columnprivileges +odbc_columns +odbc_commit +odbc_connect +odbc_cursor +odbc_do +odbc_error +odbc_errormsg +odbc_exec +odbc_execute +odbc_fetch_array +odbc_fetch_into +odbc_fetch_object +odbc_fetch_row +odbc_field_len +odbc_field_name +odbc_field_num +odbc_field_precision +odbc_field_scale +odbc_field_type +odbc_foreignkeys +odbc_free_result +odbc_gettypeinfo +odbc_longreadlen +odbc_next_result +odbc_num_fields +odbc_num_rows +odbc_pconnect +odbc_prepare +odbc_primarykeys +odbc_procedurecolumns +odbc_procedures +odbc_result +odbc_result_all +odbc_rollback +odbc_setoption +odbc_specialcolumns +odbc_statistics +odbc_tableprivileges +odbc_tables +opendir +openlog +openssl_csr_export +openssl_csr_export_to_file +openssl_csr_new +openssl_csr_sign +openssl_error_string +openssl_free_key +openssl_get_privatekey +openssl_get_publickey +openssl_open +openssl_pkcs7_decrypt +openssl_pkcs7_encrypt +openssl_pkcs7_sign +openssl_pkcs7_verify +openssl_pkey_export +openssl_pkey_export_to_file +openssl_pkey_new +openssl_private_decrypt +openssl_private_encrypt +openssl_public_decrypt +openssl_public_encrypt +openssl_seal +openssl_sign +openssl_verify +openssl_x509_check_private_key +openssl_x509_checkpurpose +openssl_x509_export +openssl_x509_export_to_file +openssl_x509_free +openssl_x509_parse +openssl_x509_read +ora_bind +ora_close +ora_columnname +ora_columnsize +ora_columntype +ora_commit +ora_commitoff +ora_commiton +ora_do +ora_error +ora_errorcode +ora_exec +ora_fetch +ora_fetch_into +ora_getcolumn +ora_logoff +ora_logon +ora_numcols +ora_numrows +ora_open +ora_parse +ora_plogon +ora_rollback +ord +overload +ovrimos_close +ovrimos_commit +ovrimos_connect +ovrimos_cursor +ovrimos_exec +ovrimos_execute +ovrimos_fetch_into +ovrimos_fetch_row +ovrimos_field_len +ovrimos_field_name +ovrimos_field_num +ovrimos_field_type +ovrimos_free_result +ovrimos_longreadlen +ovrimos_num_fields +ovrimos_num_rows +ovrimos_prepare +ovrimos_result +ovrimos_result_all +ovrimos_rollback +pack +parse_ini_file +parse_str +parse_url +passthru +pathinfo +pclose +pcntl_exec +pcntl_fork +pcntl_signal +pcntl_waitpid +pcntl_wexitstatus +pcntl_wifexited +pcntl_wifsignaled +pcntl_wifstopped +pcntl_wstopsig +pcntl_wtermsig +pdf_add_annotation +pdf_add_bookmark +pdf_add_launchlink +pdf_add_locallink +pdf_add_note +pdf_add_outline +pdf_add_pdflink +pdf_add_thumbnail +pdf_add_weblink +pdf_arc +pdf_arcn +pdf_attach_file +pdf_begin_page +pdf_begin_pattern +pdf_begin_template +pdf_circle +pdf_clip +pdf_close +pdf_close_image +pdf_close_pdi +pdf_close_pdi_page +pdf_closepath +pdf_closepath_fill_stroke +pdf_closepath_stroke +pdf_concat +pdf_continue_text +pdf_curveto +pdf_delete +pdf_end_page +pdf_end_pattern +pdf_end_template +pdf_endpath +pdf_fill +pdf_fill_stroke +pdf_findfont +pdf_get_buffer +pdf_get_font +pdf_get_fontname +pdf_get_fontsize +pdf_get_image_height +pdf_get_image_width +pdf_get_majorversion +pdf_get_minorversion +pdf_get_parameter +pdf_get_pdi_parameter +pdf_get_pdi_value +pdf_get_value +pdf_initgraphics +pdf_lineto +pdf_makespotcolor +pdf_moveto +pdf_new +pdf_open +pdf_open_ccitt +pdf_open_file +pdf_open_gif +pdf_open_image +pdf_open_image_file +pdf_open_jpeg +pdf_open_memory_image +pdf_open_pdi +pdf_open_pdi_page +pdf_open_png +pdf_open_tiff +pdf_place_image +pdf_place_pdi_page +pdf_rect +pdf_restore +pdf_rotate +pdf_save +pdf_scale +pdf_set_border_color +pdf_set_border_dash +pdf_set_border_style +pdf_set_char_spacing +pdf_set_duration +pdf_set_font +pdf_set_horiz_scaling +pdf_set_info +pdf_set_info_author +pdf_set_info_creator +pdf_set_info_keywords +pdf_set_info_subject +pdf_set_info_title +pdf_set_leading +pdf_set_parameter +pdf_set_text_pos +pdf_set_text_rendering +pdf_set_text_rise +pdf_set_value +pdf_set_word_spacing +pdf_setcolor +pdf_setdash +pdf_setflat +pdf_setfont +pdf_setgray +pdf_setgray_fill +pdf_setgray_stroke +pdf_setlinecap +pdf_setlinejoin +pdf_setlinewidth +pdf_setmatrix +pdf_setmiterlimit +pdf_setpolydash +pdf_setrgbcolor +pdf_setrgbcolor_fill +pdf_setrgbcolor_stroke +pdf_show +pdf_show_boxed +pdf_show_xy +pdf_skew +pdf_stringwidth +pdf_stroke +pdf_translate +pfpro_cleanup +pfpro_init +pfpro_process +pfpro_process_raw +pfpro_version +pfsockopen +pg_affected_rows +pg_cancel_query +pg_client_encoding +pg_close +pg_connect +pg_connection_busy +pg_connection_reset +pg_connection_status +pg_convert +pg_copy_from +pg_copy_to +pg_dbname +pg_delete +pg_end_copy +pg_escape_bytea +pg_escape_string +pg_fetch_array +pg_fetch_object +pg_fetch_result +pg_fetch_row +pg_field_is_null +pg_field_name +pg_field_num +pg_field_prtlen +pg_field_size +pg_field_type +pg_free_result +pg_get_result +pg_host +pg_insert +pg_last_error +pg_last_notice +pg_last_oid +pg_lo_close +pg_lo_create +pg_lo_export +pg_lo_import +pg_lo_open +pg_lo_read +pg_lo_read_all +pg_lo_seek +pg_lo_tell +pg_lo_unlink +pg_lo_write +pg_metadata +pg_num_fields +pg_num_rows +pg_options +pg_pconnect +pg_port +pg_put_line +pg_query +pg_result_error +pg_result_status +pg_select +pg_send_query +pg_set_client_encoding +pg_trace +pg_tty +pg_untrace +pg_update +php_logo_guid +php_sapi_name +php_uname +phpcredits +phpinfo +phpversion +pi +png2wbmp +popen +pos +posix_ctermid +posix_getcwd +posix_getegid +posix_geteuid +posix_getgid +posix_getgrgid +posix_getgrnam +posix_getgroups +posix_getlogin +posix_getpgid +posix_getpgrp +posix_getpid +posix_getppid +posix_getpwnam +posix_getpwuid +posix_getrlimit +posix_getsid +posix_getuid +posix_isatty +posix_kill +posix_mkfifo +posix_setegid +posix_seteuid +posix_setgid +posix_setpgid +posix_setsid +posix_setuid +posix_times +posix_ttyname +posix_uname +pow +preg_grep +preg_match +preg_match_all +preg_quote +preg_replace +preg_replace_callback +preg_split +prev +print +print_r +printer_abort +printer_close +printer_create_brush +printer_create_dc +printer_create_font +printer_create_pen +printer_delete_brush +printer_delete_dc +printer_delete_font +printer_delete_pen +printer_draw_bmp +printer_draw_chord +printer_draw_elipse +printer_draw_line +printer_draw_pie +printer_draw_rectangle +printer_draw_roundrect +printer_draw_text +printer_end_doc +printer_end_page +printer_get_option +printer_list +printer_logical_fontheight +printer_open +printer_select_brush +printer_select_font +printer_select_pen +printer_set_option +printer_start_doc +printer_start_page +printer_write +printf +private +proc_close +proc_open +protected +pspell_add_to_personal +pspell_add_to_session +pspell_check +pspell_clear_session +pspell_config_create +pspell_config_ignore +pspell_config_mode +pspell_config_personal +pspell_config_repl +pspell_config_runtogether +pspell_config_save_repl +pspell_new +pspell_new_config +pspell_new_personal +pspell_save_wordlist +pspell_store_replacement +pspell_suggest +public +putenv +qdom_error +qdom_tree +quoted_printable_decode +quotemeta +rad2deg +rand +range +rawurldecode +rawurlencode +read_exif_data +readdir +readfile +readgzfile +readline +readline_add_history +readline_clear_history +readline_completion_function +readline_info +readline_list_history +readline_read_history +readline_write_history +readlink +realpath +recode +recode_file +recode_string +register_shutdown_function +register_tick_function +rename +require +require_once +reset +restore_error_handler +rewind +rewinddir +rmdir +round +rsort +rtrim +sem_acquire +sem_get +sem_release +sem_remove +serialize +sesam_affected_rows +sesam_commit +sesam_connect +sesam_diagnostic +sesam_disconnect +sesam_errormsg +sesam_execimm +sesam_fetch_array +sesam_fetch_result +sesam_fetch_row +sesam_field_array +sesam_field_name +sesam_free_result +sesam_num_fields +sesam_query +sesam_rollback +sesam_seek_row +sesam_settransaction +session_cache_expire +session_cache_limiter +session_decode +session_destroy +session_encode +session_get_cookie_params +session_id +session_is_registered +session_module_name +session_name +session_readonly +session_register +session_save_path +session_set_cookie_params +session_set_save_handler +session_start +session_unregister +session_unset +session_write_close +set_error_handler +set_file_buffer +set_magic_quotes_runtime +set_time_limit +setcookie +setlocale +settype +shell_exec +shm_attach +shm_detach +shm_get_var +shm_put_var +shm_remove +shm_remove_var +shmop_close +shmop_delete +shmop_open +shmop_read +shmop_size +shmop_write +show_source +shuffle +similar_text +sin +sinh +sizeof +sleep +snmp_get_quick_print +snmp_set_quick_print +snmpget +snmprealwalk +snmpset +snmpwalk +snmpwalkoid +socket_accept +socket_bind +socket_close +socket_connect +socket_create +socket_create_listen +socket_create_pair +socket_fd_alloc +socket_fd_clear +socket_fd_free +socket_fd_isset +socket_fd_set +socket_fd_zero +socket_get_status +socket_getopt +socket_getpeername +socket_getsockname +socket_iovec_add +socket_iovec_alloc +socket_iovec_delete +socket_iovec_fetch +socket_iovec_free +socket_iovec_set +socket_last_error +socket_listen +socket_read +socket_readv +socket_recv +socket_recvfrom +socket_recvmsg +socket_select +socket_send +socket_sendmsg +socket_sendto +socket_set_blocking +socket_set_nonblock +socket_set_timeout +socket_setopt +socket_shutdown +socket_strerror +socket_write +socket_writev +sort +soundex +split +spliti +sprintf +sql_regcase +sqrt +srand +sscanf +stat +str_pad +str_repeat +str_replace +str_rot13 +strcasecmp +strchr +strcmp +strcoll +strcspn +strftime +strip_tags +stripcslashes +stripslashes +stristr +strlen +strnatcasecmp +strnatcmp +strncasecmp +strncmp +strpos +strrchr +strrev +strrpos +strspn +strstr +strtok +strtolower +strtotime +strtoupper +strtr +strval +substr +substr_count +substr_replace +swf_actiongeturl +swf_actiongotoframe +swf_actiongotolabel +swf_actionnextframe +swf_actionplay +swf_actionprevframe +swf_actionsettarget +swf_actionstop +swf_actiontogglequality +swf_actionwaitforframe +swf_addbuttonrecord +swf_addcolor +swf_closefile +swf_definebitmap +swf_definefont +swf_defineline +swf_definepoly +swf_definerect +swf_definetext +swf_endbutton +swf_enddoaction +swf_endshape +swf_endsymbol +swf_fontsize +swf_fontslant +swf_fonttracking +swf_getbitmapinfo +swf_getfontinfo +swf_getframe +swf_labelframe +swf_lookat +swf_modifyobject +swf_mulcolor +swf_nextid +swf_oncondition +swf_openfile +swf_ortho +swf_ortho2 +swf_perspective +swf_placeobject +swf_polarview +swf_popmatrix +swf_posround +swf_pushmatrix +swf_removeobject +swf_rotate +swf_scale +swf_setfont +swf_setframe +swf_shapearc +swf_shapecurveto +swf_shapecurveto3 +swf_shapefillbitmapclip +swf_shapefillbitmaptile +swf_shapefilloff +swf_shapefillsolid +swf_shapelinesolid +swf_shapelineto +swf_shapemoveto +swf_showframe +swf_startbutton +swf_startdoaction +swf_startshape +swf_startsymbol +swf_textwidth +swf_translate +swf_viewport +swfaction +swfbitmap +swfbitmap->getheight +swfbitmap->getwidth +swfbutton +swfbutton->addaction +swfbutton->addshape +swfbutton->setaction +swfbutton->setdown +swfbutton->sethit +swfbutton->setover +swfbutton->setup +swfbutton_keypress +swfdisplayitem +swfdisplayitem->addcolor +swfdisplayitem->move +swfdisplayitem->moveto +swfdisplayitem->multcolor +swfdisplayitem->remove +swfdisplayitem->rotate +swfdisplayitem->rotateto +swfdisplayitem->scale +swfdisplayitem->scaleto +swfdisplayitem->setdepth +swfdisplayitem->setname +swfdisplayitem->setratio +swfdisplayitem->skewx +swfdisplayitem->skewxto +swfdisplayitem->skewy +swfdisplayitem->skewyto +swffill +swffill->moveto +swffill->rotateto +swffill->scaleto +swffill->skewxto +swffill->skewyto +swffont +swffont->getwidth +swfgradient +swfgradient->addentry +swfmorph +swfmorph->getshape1 +swfmorph->getshape2 +swfmovie +swfmovie->add +swfmovie->nextframe +swfmovie->output +swfmovie->remove +swfmovie->save +swfmovie->setbackground +swfmovie->setdimension +swfmovie->setframes +swfmovie->setrate +swfmovie->streammp3 +swfshape +swfshape->addfill +swfshape->drawcurve +swfshape->drawcurveto +swfshape->drawline +swfshape->drawlineto +swfshape->movepen +swfshape->movepento +swfshape->setleftfill +swfshape->setline +swfshape->setrightfill +swfsprite +swfsprite->add +swfsprite->nextframe +swfsprite->remove +swfsprite->setframes +swftext +swftext->addstring +swftext->getwidth +swftext->moveto +swftext->setcolor +swftext->setfont +swftext->setheight +swftext->setspacing +swftextfield +swftextfield->addstring +swftextfield->align +swftextfield->setbounds +swftextfield->setcolor +swftextfield->setfont +swftextfield->setheight +swftextfield->setindentation +swftextfield->setleftmargin +swftextfield->setlinespacing +swftextfield->setmargins +swftextfield->setname +swftextfield->setrightmargin +sybase_affected_rows +sybase_close +sybase_connect +sybase_data_seek +sybase_fetch_array +sybase_fetch_field +sybase_fetch_object +sybase_fetch_row +sybase_field_seek +sybase_free_result +sybase_get_last_message +sybase_min_client_severity +sybase_min_error_severity +sybase_min_message_severity +sybase_min_server_severity +sybase_num_fields +sybase_num_rows +sybase_pconnect +sybase_query +sybase_result +sybase_select_db +symlink +syslog +system +tan +tanh +tempnam +textdomain +time +tmpfile +touch +trigger_error +trim +uasort +ucfirst +ucwords +udm_add_search_limit +udm_alloc_agent +udm_api_version +udm_cat_list +udm_cat_path +udm_check_charset +udm_check_stored +udm_clear_search_limits +udm_close_stored +udm_crc32 +udm_errno +udm_error +udm_find +udm_free_agent +udm_free_ispell_data +udm_free_res +udm_get_doc_count +udm_get_res_field +udm_get_res_param +udm_load_ispell_data +udm_open_stored +udm_set_agent_param +uksort +umask +uniqid +unixtojd +unlink +unpack +unregister_tick_function +unserialize +unset +urldecode +urlencode +user_error +usleep +usort +utf8_decode +utf8_encode +var_dump +var_export +version_compare +virtual +vpopmail_add_alias_domain +vpopmail_add_alias_domain_ex +vpopmail_add_domain +vpopmail_add_domain_ex +vpopmail_add_user +vpopmail_alias_add +vpopmail_alias_del +vpopmail_alias_del_domain +vpopmail_alias_get +vpopmail_alias_get_all +vpopmail_auth_user +vpopmail_del_domain +vpopmail_del_domain_ex +vpopmail_del_user +vpopmail_error +vpopmail_passwd +vpopmail_set_user_quota +vprintf +vsprintf +w32api_deftype +w32api_init_dtype +w32api_invoke_function +w32api_register_function +w32api_set_call_method +wddx_add_vars +wddx_deserialize +wddx_packet_end +wddx_packet_start +wddx_serialize_value +wddx_serialize_vars +wordwrap +xml_error_string +xml_get_current_byte_index +xml_get_current_column_number +xml_get_current_line_number +xml_get_error_code +xml_parse +xml_parse_into_struct +xml_parser_create +xml_parser_create_ns +xml_parser_free +xml_parser_get_option +xml_parser_set_option +xml_set_character_data_handler +xml_set_default_handler +xml_set_element_handler +xml_set_end_namespace_decl_handler +xml_set_external_entity_ref_handler +xml_set_notation_decl_handler +xml_set_object +xml_set_processing_instruction_handler +xml_set_start_namespace_decl_handler +xml_set_unparsed_entity_decl_handler +xmlrpc_decode +xmlrpc_decode_request +xmlrpc_encode +xmlrpc_encode_request +xmlrpc_get_type +xmlrpc_parse_method_descriptions +xmlrpc_server_add_introspection_data +xmlrpc_server_call_method +xmlrpc_server_create +xmlrpc_server_destroy +xmlrpc_server_register_introspection_callback +xmlrpc_server_register_method +xmlrpc_set_type +xpath_eval +xpath_eval_expression +xpath_new_context +xptr_eval +xptr_new_context +xslt_create +xslt_errno +xslt_error +xslt_free +xslt_process +xslt_set_base +xslt_set_encoding +xslt_set_error_handler +xslt_set_log +xslt_set_sax_handler +xslt_set_sax_handlers +xslt_set_scheme_handler +xslt_set_scheme_handlers +yaz_addinfo +yaz_ccl_conf +yaz_ccl_parse +yaz_close +yaz_connect +yaz_database +yaz_element +yaz_errno +yaz_error +yaz_hits +yaz_itemorder +yaz_present +yaz_range +yaz_record +yaz_scan +yaz_scan_result +yaz_search +yaz_sort +yaz_syntax +yaz_wait +yp_all +yp_cat +yp_err_string +yp_errno +yp_first +yp_get_default_domain +yp_master +yp_match +yp_next +yp_order +zend_logo_guid +zend_version +zip_close +zip_entry_close +zip_entry_compressedsize +zip_entry_compressionmethod +zip_entry_filesize +zip_entry_name +zip_entry_open +zip_entry_read +zip_open +zip_read diff --git a/PowerEditor/bin/plugins/APIs/python.api b/PowerEditor/bin/plugins/APIs/python.api new file mode 100644 index 00000000..c51e4f98 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/python.api @@ -0,0 +1,290 @@ +AST +ArithmeticError +AssertionError +AttributeError +BaseHTTPServer +Bastion +CGIHTTPServer +Complex +EOFError +Exception +FloatingPointError +IOError +ImportError +IndentationError +IndexError +KeyError +KeyboardInterrupt +LookupError +MemoryError +Mimewriter +NameError +None +OverflowError +Para +Queue +RuntimeError +SimpleHTTPServer +SocketServer +StandardError +StringIO +SyntaxError +SystemError +SystemExit +TabError +Tkinter +TypeError +UserDict +UserList +ValueError +ZeroDivisionError +__abs__ +__add__ +__and__ +__bases__ +__call__ +__class__ +__cmp__ +__coerce__ +__del__ +__delattr__ +__delitem__ +__delslice__ +__dict__ +__div__ +__divmod__ +__float__ +__getattr__ +__getitem__ +__getslice__ +__hash__ +__hex__ +__iadd__ +__iand__ +__idiv__ +__ilshift__ +__imod__ +__import__ +__init__ +__int__ +__invert__ +__ior__ +__ipow__ +__irshift__ +__isub__ +__ixor__ +__len__ +__long__ +__lshift__ +__members__ +__methods__ +__mod__ +__mul__ +__name__ +__neg__ +__nonzero__ +__oct__ +__or__ +__pos__ +__pow__ +__radd__ +__rand__ +__rdiv__ +__rdivmod__ +__repr__ +__rlshift__ +__rmod__ +__rmul__ +__ror__ +__rpow__ +__rrshift__ +__rshift__ +__rsub__ +__rxor__ +__setattr__ +__setitem__ +__setslice__ +__str__ +__sub__ +__version__ +__xor__ +abs +and +apply +array +assert +atexit +break +callable +chr +class +cmd +cmp +codecs +coerce +commands +compile +compileall +complex +continue +copy +dbhash +def +del +delattr +dir +dircmp +dis +divmod +dospath +dumbdbm +elif +else +emacs +eval +except +exec +execfile +filter +finally +find +float +fmt +fnmatch +for +from +ftplib +getattr +getopt +glob +global +globals +gopherlib +grep +group +hasattr +hash +hex +htmllib +httplib +id +if +ihooks +imghdr +import +imputil +in +input +int +intern +is +isinstance +issubclass +joinfields +lambda +len +linecache +list +local +lockfile +long +macpath +macurl2path +mailbox +mailcap +map +match +math +max +mimetools +mimify +min +mutex +newdir +ni +nntplib +not +ntpath +nturl2path +oct +open +or +ord +os +ospath +pass +pdb +pickle +pipes +poly +popen2 +posixfile +posixpath +pow +print +profile +pstats +pyclbr +pyexpat +quopri +raise +rand +random +range +raw_input +reduce +regex +regsub +reload +repr +return +rfc822 +round +sched +search +self +setattr +setdefault +sgmllib +shelve +site +slice +sndhdr +snmp +splitfields +str +string +struct +sys +tb +tempfile +toaiff +token +tokenize +traceback +try +tty +tuple +type +types +tzparse +unichr +unicode +unicodedata +urllib +urlparse +util +uu +vars +wave +webbrowser +whatsound +whichdb +while +whrandom +xdrlib +xml +xmlpackage +xrange +zip +zmod diff --git a/PowerEditor/bin/plugins/APIs/tex.api b/PowerEditor/bin/plugins/APIs/tex.api new file mode 100644 index 00000000..43edfbd1 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/tex.api @@ -0,0 +1,2154 @@ +Alph +Alpha +AltMacroFont +AmSTeX +Appendix +Arrowvert +AtBeginDocument +AtEndClass +AtEndDocument +AtEndOfClass +AtEndOfPackage +AtEndPackage +Bbb +Bbbk +Beta +BibTeX +Big +Box +CJK +CJK* +CJKfamily +Cap +CharacterTable +CheckCommand +CheckCommand* +CheckModules +CheckSum +ClassError +ClassInfo +ClassWarning +ClassWarningNoLine +CodelineFont +CodelineIndex +CodelineNumbered +CurrentOption +CurrentOption +DeclareErrorFont +DeclareFixedFont +DeclareFontEncoding +DeclareFontEncodingDefaults +DeclareFontFamily +DeclareFontShape +DeclareFontSubstitution +DeclareInputMath +DeclareInputText +DeclareMathAccent +DeclareMathAlphabet +DeclareMathSizes +DeclareMathSymbol +DeclareMathVersion +DeclareOldFontCommand +DeclareOption +DeclareOption* +DeclareRobustCommand +DeclareRobustCommand* +DeclareSymbolFont +DeclareSymbolFontAlphabet +DeclareTextAccent +DeclareTextAccentDefault +DeclareTextCommand +DeclareTextCommandDefault +DeclareTextCompositeCommand +DeclareTextFontCommand +DeclareTextSymbol +DeclareTextSymbolDefault +DeleteShortVerb +Delta +DescribeEnv +DescribeEnvironment +DescribeMacro +Diamond +DisableCrossrefs +DoNotIndex +DocInput +DocstyleParms +DontCheckModules +Downarrow +EnableCrossrefs +Esper +EuFrak +EuScript +ExecuteOptions +Finale +Finv +GBK +Game +Gamma +GapDepth +GapWidth +GetFileInfo +GlossaryMin +GlossaryParms +GlossaryPrologue +HUGE +Huge +Huge +IfFileExists +Im +IndexInput +IndexMin +IndexParms +IndexPrologue +InputIfFileExists +Join +LARGE +LARGE +LTcapuidth +LTchunksize +LTleft +LTpost +LTpre +LTright +LaTeX +LaTeX +LaTeXe +LaTeXe +Lambda +Large +Large +Leftarrow +Leftrightarrow +Lentrylabel +Lleftarrow +LoadClass +Longleftarrow +Longleftrightarrow +Longrightarrow +Lsh +MacroFont +MacroIndent +MacrocodeTopsep +MakeLowercase +MakePrivateLetters +MakeShortVerb +MakeUppercase +Mentry +Mentrylabel +Module +Msgrigid +NeedsTeXFormat{format} +NouveauLangage +Omega +OnlyDescription +OptionNotUsed +OptionNotUsed +Ovalbox +PScommands +PackageError +PackageError +PackageInfo +PackageInfo +PackageWarning +PackageWarning +PackageWarningNoLine +PackageWarningNoLine +PageIndex +PassOptionsToClass +PassOptionsToPackage +Phi +Pi +Pifill +Pifont +Piline +Pisymbol +PreserveBackslash +PrintChanges +PrintDescribeEnv +PrintDescribeMacro +PrintIndex +PrintMacroName +ProcessOptions +ProcessOptions +ProcessOptions* +ProvideTextCommand +ProvideTextCommandDefault +ProvidesClass +ProvidesFile +ProvidesPackage +Psi +REVTeX +Re +RecordChanges +Relbar +RequirePackage +Rightarrow +Roman +Rsh +SS +SetMathAlphabet +SetSymbolFont +Sigma +SortIndex +SortNoop +SpecialEnvIndex +SpecialEscapechar +SpecialIndex +SpecialMainIndex +SpecialUsageIndex +StopEventually +Subset +Supset +TH +TeX +TheSbox +Theta +Thicklines +ULforem +UTF8 +Uparrow +Updownarrow +Upsilon +Vdash +Vert +Vvdeah +WideMargins +Xarea +XeTeX +Xi +Xsize +Yarea +Ysize +above +abovecaptionskip +abovedisplayshortskip +abovedisplayskip +abovewithdelims +abstract +abstract +abstractname +abstractname{name} +accent +accentedsymbol +acknowledgments +active +actualchar +acute +addcontentsline +adddialect +addlanguage +addpenalty +address +addtime +addto +addtocontents +addtocounter +addtolength +addtoreset +addtoversion +addvspace +adjdemerits +advance +advancepageno +afterassignment +aftergroup +afterpage +aleph +align +align* +alignat +aligned +allinethickness +allocationnumber +allowbreak +allowdisplaybreaks +allowhyphens +alph +alpha +also +amalg +and +and +angle +annotations +appendix +appendix +appendix +appendixname +approx +approxeq +arabic +arc +arccos +arcsin +arctan +arg +arraybackslash +arraycolsep +arrayrulewidth +arraystretch +arrowvert +article +ast +astroncite +asymp +atop +atopwithdelims +author +backepsilon +backprime +backsim +backsimeq +backslash +badness +bar +barwedge +baselineskip +baselinestretch +batchfile +batchmode +because +begin +beginchapter +begindisplay +begingroup +beginsection +begintt +belowcaptionskip +belowdisplayshortskip +belowdisplayskip +beta +beth +between +bezier +bf +bfdefault +bffam +bfseries +bgroup +bibhang +bibindent +bibitem +bibliography +bibliographystyle +bibliographyunit +bibname +bibpunct +big +bigbreak +bigcap +bigcirc +bigcircle +bigcup +bigodot +bigoplus +bigotimes +bigskip +bigskipamount +bigsqcup +bigstar +bigstrutjot +bigtriangledown +bigtriangleup +bigtype +biguplus +bigvee +bigwedge +binom +binoppenalty +blacklozenge +blacksquare +blacktriangle +blacktriangledown +blacktriangleleft +blacktriangleright +bmit +bmod +body +boldmath +boldsymbol +book +boolean +bordermatrix +bot +botfigrule +botmark +bottomcaption +bottomfraction +bottomnumber +bowtie +box +boxdot +boxed +boxmaxdepth +boxminus +boxplus +boxtimes +brace +braceld +bracelu +bracerd +braceru +bracevert +brack +branch +branchlabels +break +breve +brokenpenalty +brush +bslash +buildrel +bull +bullet +bumpeq +bye +cal +cap +caption +captionwidth +cases +catcode +cbend +cbstart +ccname +cctart +cctbook +cdot +cdotp +cdots +centerdot +centering +centerline +cents +cfoot +cfrac +changebarsep +changebarwidth +changes +chapter +chapter* +chaptermark +chaptername +char +chardef +chead +check +chi +choose +chunk +circ +circeq +circle +circle* +circlearrowleft +circlearrowright +circledS +circledast +circledcirc +circleddash +cite +citeA +citeN +citeNP +citen +citeyear +cleaders +cleardoublepage +clearemptydoublepage +clearpage +cleartabs +cline +closecurve +closein +closeout +closing +clubpenalty +clubsuit +colon +color +colorbox +columns +columnsep +columnseprule +columnwidth +complement +cong +contentsline +contentsname +coprod +copy +copyright +cornersize +cos +cosh +cot +coth +count +countdef +cr +csc +csname +cstok +ctex +ctexart +ctexbook +cup +curlyeqprec +curlyeqsucc +curlyvee +curlywedge +curve +curvearrowleft +curvearrowright +curvedashes +curvesymbol +cwfsu +cwhbu +cwku +cwmu +cwyu +dag +dagger +daleth +dash +dashbox +dashleftarrow +dashline +dashlinestretch +dashrightarrow +dashv +date +datelang +day +dbinom +dblfigrule +dblfloatpagefraction +dblfloatsep +dbltextfloatsep +dbltopfraction +dbltopnumber +ddag +ddagger +ddddot +dddot +ddot +ddots +ddraft +ddt +deadcycles +def +defaulthyphenchar +defaultscriptratio +defaultscriptscriptratio +defaultskewchar +deffootnote +definecounter +deg +delcode +deletebarwidth +delimiter +delimiterfactor +delimitershortfall +delta +depth +description +descriptionlabel +det +dfrac +diagdown +diagup +diamond +diamondpar +diamondsuit +digamma +dim +dimendef +ding +dingfill +dingline +discretionary +displaybreak +displayindent +displaylimits +displaylines +displaymath +displaystyle +displaywidowpenalty +displaywidth +div +divide +divideontimes +do +docdate +document +documentclass +documentstyle +dominitoc +dospecials +dosupereject +dot +doteq +doteqdot +dotfill +dotplus +dots +dotsb +dotsc +dotsep +dotsi +dotsm +dottedline +dottedtocline +doublebarwedge +doublebox +doublehyphendemerits +doublerulesep +downarrow +downbracefill +downdownarrows +downharpoonleft +downharpoonright +draw +drawline +drawlinestretch +drawwith +driver +dummy +dump +edef +egroup +eightpoint +eject +ell +ellipse +else +em +emergencystretch +emph +empty +emptyset +encapchar +encl +enclname +encodingdefault +end +endabstract +endchapter +endcsname +enddisplay +endfig +endfoot +endgraf +endgroup +endhead +endinput +endinsert +endlastfoot +endletter +endline +endlinechar +endlist +endnote +endnotesize +endpostamble +endpreamble +endquotation +endtemplate +endtt +enlargethispage +enlargethispage* +enskip +enspace +ensuremath +entrylabel +epsf +epsfbox +epsfig +epsfxsize +epsfysize +epsilon +eqalign +eqalignno +eqcirc +eqnarray +eqref +eqslantgtr +eqslantless +equal +equation +equiv +errhelp +errmessage +errorcontextlines +errorstopmode +escapechar +esper +eta +eth +evenfoot +evenhead +evensidemargin +everycr +everydisplay +everyhbox +everyjob +everymath +everypar +everyvbox +excludeversion +exercise +exhyphenpenalty +exists +exp +expandafter +externaldocument +extracolsep +extralang +extrarowheight +extratabsurround +extrealang +faketableofcontents +fallingdotseq +fam +family +familydefault +fancyplain +fang +fbaselineskip +fbox +fboxrule +fboxsep +fencoding +ffamily +fig +figurename +figureplace +filbreak +filedate +filename +fileversion +fill +filltype +finalhyphendemerits +firsthline +firstmark +fiverm +flalign +flalign* +flat +float +floatingpenalty +floatname +floatpagefraction +floatpagefraction +floatplacement +floatsep +flq +flqq +flushbottom +flushcolumns +flushleft +flushright +fminilength +fmtname +fmtversion +fnsymbol +folio +font +fontdimen +fontencoding +fontfamily +fontname +fontseries +fontshape +fontsize +fontsubfuzz +footheight +footins +footline +footnote +footnotemark +footnoterule +footnotesep +footnotesize +footnotetext +footrule +footrulewidth +footskip +for +forall +frac +fracwithdelims +frak +frakfamily +frame +framebox +frenchhyphenation +frenchlayout +frenchmacros +frenchspacing +frenchtranslation +frenchtypography +from +fromname +frontmatter +frown +frq +frqq +fshape +fsize +fullhsize +fullline +fussy +futurelet +futurenonspacelet +gamma +gather +gathered +gcd +gdef +ge +generateFile +geq +geqq +geqslant +getfactor +gets +ggg +gimel +global +globaldefs +glossary +glossaryentry +glq +glqq +gnapprox +gneq +gneqq +gnsim +goodbreak +gothfamily +graphpaper +grave +grid +grq +grqq +gtrapprox +gtrdot +gtreqless +gtreqqless +gtrless +guillemotleft +guillemotright +guilsinglleft +guilsinglright +gvertneqq +halign +hang +hangafter +hangindent +hat +hbadness +hbar +hbox +hdotsfor +headheight +headline +headpagename +headrule +headrulewidth +headsep +headtoname +headwidth +heartpar +heartsuit +hei +height +height +help +hfil +hfill +hfilneg +hfuzz +hglue +hhline +hideskip +hidewidth +hline +hlinefill +hlineon +hodiau +hodiaun +hoffset +holdinginserts +hom +hookleftarrow +hookrightarrow +hphantom +hrule +hrulefill +hsize +hskip +hslash +hspace +hspace* +hss +ht +huge +hyphenation +hyphenchar +hyphenpenalty +ialign +icolorbox +idotsint +idxitem +if +ifcase +ifcat +ifdim +ifeof +iff +iffalse +ifhbox +ifhmode +ifinner +iflanguage +ifmmode +ifmode +ifnextchar +ifnum +ifodd +ifstar +ifthenelse +iftrue +ifundefined +ifundefined +ifvbox +ifvmode +ifvoid +ifx +ignorespaces +iiiint +iiint +iint +imath +immediate +in +inaccessible +include +includegraphics +includegraphics* +includeonly +includeversion +indent +index +indexentry +indexname +indexproofstyle +indexspace +inf +infty +init +initfloatingfigs +input +inputlineno +insert +insertpenalties +int +intercal +interdisplaylinepenalty +interfootnotelinepenalty +interlinepenalty +intertext +intextsep +invisible +iota +iseries +isodd +isucaption +it +itdefault +item +itemindent +itemize +itemsep +iterate +itfam +itshape +jmath +jobname +joinrel +jot +jput +kappa +keepsilent +ker +kern +kill +label +labelenumi +labelenumii +labelenumiii +labelenumiv +labelitemi +labelitemii +labelitemiii +labelitemiv +labelnum +labelsep +labelwidth +label{key} +lambda +land +landscape +langle +language +large +lastbox +lasthline +lastkern +lastpenalty +lastskip +latexerr +layout +lbrace +lccode +lceil +lcfrac +ldotp +ldots +le +leaders +leadsto +leaf +leavevmode +left +leftarrow +leftarrowfill +leftarrowtail +lefteqn +leftharpoondown +leftharpoonup +lefthyphenmin +leftleftarrows +leftline +leftmargin +leftmargini +leftmarginii +leftmarginiii +leftmarginiv +leftmarginv +leftmarginvi +leftmark +leftnode +leftrightaquigarrow +leftrightarrow +leftrightarrows +leftrightharpoons +leftroot +leftskip +leftthreetimes +legend +lengthtest +leq +leqalignno +leqno +leqq +leqslant +lessapprox +lessdot +lesseqgtr +lesseqqgtr +lessgtr +lesssim +let +letterspace +levelchar +lfloor +lfoot +lg +lgroup +lhd +lhead +lhook +li +lim +liminf +limits +limsup +line +linebreak +linepenalty +lineskip +lineskiplimit +lineskiplimits +linethickness +linewidth +lisitablename +list +listfigurename +listfiles +listing +listof +listoffigures +listoftables +listparindent +listtablename +llap +llcorner +llstparindent +lmoustache +ln +lnapprox +lneq +lneqq +lnot +load +log +long +longindentation +longleftarrow +longleftrightarrow +longmapsto +longpage +longrightarrow +loop +looparrowleft +looparrowright +looseness +lor +lower +lowercase +lozenge +lrcorner +ltimes +lusim +lvertneqq +mag +magnification +magstep +magstephalf +main +mainmatter +maintoks +makeatletter +makeatother +makebox +makecaption +makefigcaption +makefnmark +makefntext +makefootline +makeglossary +makeglossary +makeheadline +makeindex +makelabel +makelabels +maketitle +mapsto +mapstochar +margin +marginlabel +marginpar +marginparpush +marginparsep +marginparwidth +mark +markboth +markright +match +mathaccent +mathafal +mathalpha +mathbb +mathbf +mathbin +mathcal +mathchar +mathchardef +mathchoice +mathclose +mathcode +mathellipsis +mathfrak +mathgroup +mathhexbox +mathindent +mathinner +mathit +mathnormal +mathop +mathopen +mathord +mathpalette +mathpunct +mathrel +mathrm +mathrm +mathsf +mathsf +mathsterling +mathstrut +mathsurround +mathtt +mathunderscore +mathversion +matrix +matrixput +max +maxdeadcycles +maxdepth +maxdimen +maxovaldiam +mbox +mddefault +mdseries +meaning +measuredangle +medbreak +medmuskip +medskip +medskipamount +medspace +medtype +message +meta +mho +mid +midinsert +min +minitoc +mit +mkboth +mkern +mne +mod +models +month +moveleft +moveright +mp +mskip +mth +mu +multicolsep +multicolumn +multiframe +multimake +multimap +multiply +multiput +multiputlist +multirow +multirowsetup +multispan +multlinegap +muskip +muskipdef +nLeftarrow +nLeftrightarrow +nRightarrow +nYDash +nabla +namedef +names +nameuse +narrower +natural +naturalwidth +ncong +ne +nearrow +neg +negmedspace +negthickspace +negthinspace +neq +newX +newY +newblock +newboolean +newbox +newcolumntype +newcommand +newcommand* +newcount +newcounter +newdimen +newenvironment +newfam +newfloat +newfont +newhelp +newif +newindex +newinsert +newlabel +newlanguage +newlength +newletter +newline +newlinechar +newmuskip +newpage +newread +newsavebox +newsavebox{box} +newskip +newtheorem +newtoks +newwrite +nexists +next +ngeq +ngeqq +ngeqslant +ngtr +ninepoint +ninerm +ninesl +nintt +nlefirightarrow +nleftarrow +nleq +nleqq +nleqslant +nless +nmid +noalign +noboundary +nobreak +nochangebars +nocite +nocorr +nocorrlist +noexpand +noextraslang +nofiglist +nofiles +nofrenchlayout +nofrenchtypography +noindent +nointerlineskip +nolimits +nolinebreak +nomarkersintext +nonfrenchspacing +nonscript +nonstopmode +nonumber +nopagebreak +nopagenumbers +normalbaselines +normalbaselineskip +normalbottom +normalcolor +normalem +normalfont +normallineskip +normallineskiplimit +normalmarginpar +normalsize +not +notablist +notag +notin +nouppercase +nparallel +nprec +npreceq +nrightarrow +nshortmid +nshortparallel +nsim +nsubseteq +nsucc +nsucceq +nsupseteq +nsupseteqq +ntriangleleft +ntrianglelefteq +ntriangleright +ntrianglerighteq +nu +null +nulldelimiterspace +nullfont +number +numberline +numberwithin +nvDash +nwarrow +oalign +obeycr +obeylines +obeyspaces +oddfoot +oddhead +oddsidemargin +odot +offinterlineskip +oint +oldstyle +oldstylenums +omega +omicron +ominus +omit +onecolumn +onlynotes +onlypreamble +ooalign +openin +openout +openup +operatorname +operatornamewithlimits +oplus +options +or +oslash +other +otimes +outer +output +outputpenalty +oval +ovalbox +over +overbrace +overfullrule +overleftarrow +overline +overrightarrow +overset +overwithdelims +owns +pacs +padraft +pagebody +pagebreak +pagecolor +pagecontents +pagedepth +pagefilllstretch +pagefillstretch +pagefilstretch +pagegoal +pageinsert +pagename +pagename +pageno +pagenumbering +pageref +pageshrink +pagestretch +pagestyle +pagetotal +paperheight +paperwidth +par +paragraph +paragraphmark +parallel +parbox +parfillskip +parindent +parsep +parshape +parskip +part +part* +partial +partname +partopsep +path +patterns +pausing +penalty +penumi +penumii +penumiii +penumiv +perp +phantom +phi +pi +pitchfork +plainfootrulewidth +plainheadrulewidth +plainoutput +plus +pm +pmatrix +pmb +pmod +pnt +pnumwidth +pod +poptabs +postamble +postdisplaypenalty +postmulticols +pounds +preamble +prec +precapprox +preccurlyeq +preceq +precnapprox +precnsim +precsim +predisplaypenalty +predisplaysize +prefacename +preloaded +premulticols +prenwd +preparefootins +preprint +pretolerance +prevdepth +prevgraf +prime +printindex +proclaim +prod +proofmodetrue +propto +protect +providecommand +psboxit +psfig +psfigdriver +psfull +psi +pt +ptsize +pushtabs +put +putbib +putfile +qbezier +qquad +quad +quotation +quotechar +quotedblbase +quotesinglbase +radical +raggedbottom +raggedcenter +raggedcolumns +raggedleft +raggedright +raise +raisebox +rangle +ratio +rbrace +rbrack +rceil +rcfrac +rcomment +read +real +ref +reflectbox +refname +refstepcounter +reftextafter +reftextbefore +reftextcurrent +reftextfaceafter +reftextfacebefore +reftextfarawy +reftextvario +relax +relbar +relpenalty +removelastskip +renewcommand +renewcommand* +renewenvironment +renewenvironment* +renewindex +repeat +resizebox +resizebox* +restorecr +restylefloat +resume +reversemarginpar +rfloor +rfoot +rgroup +rhd +rhead +rho +rhook +right +rightarrow +rightarrowfill +rightarrowtail +rightharpoondown +rightharpoonup +righthyphenmin +rightleftarrowa +rightleftharpoons +rightline +rightmargin +rightmark +rightnode +rightrightarrows +rightskip +rightsquigarrow +rightthreetimes +risingdotseq +rlap +rm +rmdefault +rmfamily +rmoustache +roman +romannumeral +root +rotatebox +rotcaption +rotdriver +rq +rtimes +rule +sAppendix +samepage +savebox +sbox +sboxrule +sboxsep +scalebox +scaleput +scdefault +scriptfont +scriptscriptfont +scriptscriptstyle +scriptsize +scriptspace +scriptstyle +scrollmode +scshape +sdim +searrow +sec +seccntformat +secdef +section +section* +sectionmark +seename +selectfont +selectlanguage +seriesdefault +setboolean +setbox +setcounter +setdepth +sethapace +setlanguage +setlength +setlinestyle +setlongtables +setmargins +setmarginsrb +setminus +setnumberpos +setpapersize +setprecision +setstretch +setstyle +settabs +settodepth +settoheight +settowidth +setupverbatim +setwidth +setxaxis +setxname +setxvaluetyp +setyaxis +setyname +sevenrm +sfcode +sfdefault +sffamily +sfsize +shabox +shadowbox +shadowsize +shapedefault +shapepar +sharp +shipout +shortcite +shortciteA +shortciteN +shortindexingoff +shortindexingon +shortmid +shortparallel +shortstack +show +showbox +showboxbreadth +showboxdepth +showcols +showhyphens +showlists +showprogress +showthe +sideset +sigma +signature +signed +sim +simeq +sin +sinh +skew +skewchar +skip +skipdef +sl +slash +sldefault +slfam +slfamily +sloppy +slshape +small +smallbreak +smallfrown +smallint +smallsetminus +smallskip +smallskipamount +smallsmile +smalltype +smash +smile +song +space +spacefactor +spaceskip +spadesuit +span +spbreve +spcheck +spdddot +spddot +spdot +special +sphat +sphericalangle +spline +split +splitbotmark +splitfirstmark +splitmaxdepth +splittopskip +sptilde +sqcap +sqcup +sqrt +sqsubset +sqsubseteq +sqsupset +sqsupseteq +square +squarepar +ssfsize +stackrel +star +startsection +starttoc +stepcounter +stop +stretch +string +strut +strutbox +subfigcapakip +subfigtopakip +subfigure +subitem +subject +subparagraph +subparagraph* +subparagraphmark +subsection +subsection* +subset +subseteq +subseteqq +subsetneq +subsetneqq +subsubitem +subsubitem +subsubsection +subsubsection*{title} +subsubsection[short]{title} +subsubsectionmark{code} +subsubsection{title} +succ +succapprox +succcurlyeq +succeq +succnapprox +succnsim +succsim +sum +sup +supereject +supertabular +suppressfloats +suppressfloats[placement] +supset +supsetaqq +supseteq +supsetneq +supsetneqq +surd +swabfamily +swarrow +symbol +symbol{n} +syntaxonly +tabalign +tabbing +tabbingsep +tabcolsep +tabcolsep +table +table +tablecaption +tablefirsthead +tablehead +tablelasttail +tableline +tablename +tablenote +tablenotemark +tablenotetext +tableofcontents +tableplace +tabletail +tabs +tabskip +tabularnewline +tabularnewline +tabularxcolumn +tag +tagcurve +tan +tanh +tau +tbinom +tbranch +telephone +tempboxa +tenex +tenpoint +tenrm +tensl +tensy +texlmd +text +textasciicircum +textasciitilde +textasteriskcentered +textbackslash +textbar +textbf +textbraceleft +textbraceright +textbullet +textcircled +textcolor +textcompwordmark +textdagger +textdaggerdbl +textdollar +textellipsis +textemdash +textendash +textexclamdown +textfloatsep +textfont +textfraction +textfrak +textgoth +textgreater +textheight +textindent +textit +textless +textmd +textnormal +textparagraph +textperiodcentered +textquestiondown +textquotedbl +textquotedblleft +textquotedblright +textquoteleft +textquoteright +textregistered +textrm +textsc +textsection +textsf +textsl +textsterling +textstyle +textsuperscript +textswab +texttrademark +texttt +textunderscore +textup +textvisiblespace +textwidth +tfrac +tfsize +thanks +the +theCodelineNo +thechapter +theendnotes +theenumi +theenumii +theenumiii +theenumiv +theequation +thefigure +thefnmark +thefootnote +thefootnotemark +thehours +theminutes +thempfn +thempfootnote +themptootnote +theorembodyfont +theoremheaderfont +theorempostskipamount +theorempreskipamount +theoremstyle +thepage +theparagraph +thepart +therefore +thesection +thesubfigure +thesubparagraph +thesubsection +thesubsubsection +theta +thetable +thickapprox +thicklines +thickmuskip +thicksim +thickspace +thinlines +thinmuskip +thinspace +thispagestyle +thispagestyle{option} +tighten +tightenlines +tilde +time +times +tiny +title +titlepage +tocrmarg +today +toks +toksdef +tolerance +top +topcaption +topfigrule +topfraction +topglue +topins +topinsert +topmargin +topmark +topnum +topnumber +topsep +topskip +toptigrule +totalheight +totalnumber +tracingall +tracingcommands +tracingfonts +tracinglostchars +tracingmacros +tracingonline +tracingoutput +tracingpages +tracingparagraphs +tracingrestores +tracingstats +tracingtabularx +triangle +triangledown +triangleleft +trianglelefteq +triangleq +triangleright +trianglerighteq +tt +ttdefault +ttfam +ttfamily +ttglue +ttraggedright +turnbox +twlrm +twocolumn +twoheadleftarrow +twoheadrightarrow +typein +typeout +uccode +uchyph +ulcorner +uline +unboldmath +uncatcodespecials +undefined +underbar +underbrace +underleftarrow +underleftrightarrow +underline +underrightarrow +underset +unhbox +unhcopy +unitlength +unkern +unlhd +unpenalty +unrhd +unskip +unvbox +unvcopy +up +uparrow +upbracefill +updefault +updownarrow +upharpoonleft +upharpoonright +uplus +uppercase +uproot +upshape +upsilon +upuparrows +urcorner +usage +usebox +usecounter +usefont +usepackage +vDash +vadjust +valign +value +varaupaetneq +varepsilon +varinjlim +varkappa +varliminf +varlimsup +varnothing +varphi +varpi +varprojlim +varpropto +varrho +varsigma +varsupsetneqq +vartheta +vartriangle +vartriangleleft +vartriangleright +vbadness +vbox +vcenter +vdash +vdots +vec +vector +vee +veebar +verb +verb* +verbatim +verbatim* +verbatimchar +verbatiminput +verbatimtabinput +verse +vert +vfil +vfill +vfilll +vfilneg +vfootnote +vfuzz +vglue +visible +vline +voffset +voidbx +vpageref +vphantom +vref +vrule +vsize +vskip +vspace +vspace* +vsplit +vss +vtop +warning +wedge +whiledo +widehat +widetilde +widowpenalty +width +wlog +write +xdef +xi +xleaders +xout +xspace +xspaceskip +xyzzy +year +you +zeta +zskip diff --git a/PowerEditor/bin/plugins/APIs/vb.api b/PowerEditor/bin/plugins/APIs/vb.api new file mode 100644 index 00000000..022563c7 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/vb.api @@ -0,0 +1,512 @@ +<% Option Explicit %> +<%@ language="vbscript" %> +ADODB.Connection +ADODB.Recordset +ALL_RAW +APPL_MD_PATH +APPL_PHYSICAL_PATH +ASP_LICENSE +ASP_OS +ASP_VERSION +ASP_VERSION_MAJOR +ASP_VERSION_MINOR +AUTH_PASSWORD +AUTH_TYPE +AUTH_USER +Abs +And +Application +Application.Lock +Application.Unlock +Archive +Array +Asc +AscB +AscW +Atn +ByRef +ByVal +CBool +CByte +CCur +CDate +CDbl +CERT_COOKIE +CERT_FLAGS +CERT_ISSUER +CERT_KEYSIZE +CERT_SECRETKEYSIZE +CERT_SERIALNUMBER +CERT_SERVER_ISSUER +CERT_SERVER_SUBJECT +CERT_SUBJECT +CInt +CLng +CONTENT_LENGTH +CONTENT_TYPE +CSng +CStr +Call +Case +Chr +ChrB +ChrW +Class +Cos +Count +CreateObject +Date +DateAdd +DateDiff +DatePart +DateSerial +DateValue +Day +Dict.Add +Dict.CompareMode +Dict.Const +Dict.Exists +Dict.Item +Dict.Items +Dict.Key +Dict.Keys +Dict.Remove +Dict.RemoveAll +Dim +Directory +Do +Do Until +Do While +Drive.AvailableSpace +Drive.DriveLetter +Drive.DriveType +Drive.FileSystem +Drive.FreeSpace +Drive.IsReady +Drive.Path +Drive.RootFolder +Drive.SerialNumber +Drive.ShareName +Drive.TotalSize +Drive.VolumeName +Drives.Count +Drives.Item +Else +End Class +End Function +End If +End Property +End Select +End Sub +End Type +End With +Eqv +Erase +Err +Err.Clear +Err.Description +Err.HelpContect +Err.HelpFile +Err.Number +Err.Raise +Err.Source +Eval +Excel.Application +Execute +ExecuteGlobal +Exit Do +Exit For +Exit Function +Exit Property +Exit Sub +Exp +False +File.Attributes +File.Copy +File.DateCreated +File.DateLastAccessed +File.DateLastModified +File.Delete +File.Drive +File.Move +File.Name +File.OpenAsTextStream +File.ParentFolder +File.Path +File.ShortName +File.ShortPath +File.Size +File.Type +FileSystemObject.BuildPath +FileSystemObject.CopyFile +FileSystemObject.CopyFolder +FileSystemObject.CreateFolder +FileSystemObject.CreateTextFile +FileSystemObject.DeleteFile +FileSystemObject.DeleteFolder +FileSystemObject.DriveExists +FileSystemObject.FileExists +FileSystemObject.FolderExists +FileSystemObject.GetAbsolutePathName +FileSystemObject.GetBaseName +FileSystemObject.GetDrive +FileSystemObject.GetDriveName +FileSystemObject.GetExtensionName +FileSystemObject.GetFile +FileSystemObject.GetFileName +FileSystemObject.GetFolder +FileSystemObject.GetParentFolderName +FileSystemObject.GetSpecialFolder +FileSystemObject.GetStandardStream +FileSystemObject.GetTempName +FileSystemObject.MoveFile +FileSystemObject.MoveFolder +FileSystemObject.OpenTextFile +Files.Count +Files.Item +Filter +Fix +Folder.Copy +Folder.CreateTextFile +Folder.DateCreated +Folder.DateLastAccessed +Folder.DateLastModified +Folder.Delete +Folder.Drive +Folder.Files +Folder.IsRootFolder +Folder.Name +Folder.ParentFolder +Folder.Path +Folder.ShortName +Folder.ShortPath +Folder.Size +Folder.SubFolders +Folder.Type +Folders.Add +Folders.Count +Folders.Item +For +For () = () To () +For () = () To () Step () +For Each () In () +ForAppending +ForWriting +FormatCurrency +FormatDateTime +FormatNumber +FormatPercent +Function +GATEWAY_INTERFACE +GetLocale +GetObject +GetRef +HTTPS +HTTPS_KEYSIZE +HTTPS_SECRET_KEYSIZE +HTTPS_SERVER_ISSUER +HTTPS_SERVER_SUBJECT +Hex +Hidden +Hour +INSTANCE_ID +INSTANCE_META_PATH +If +If Then +If Then Else +Imp +InStr +InputBox +InstrB +InstrRev +Int +Is +IsArray +IsDate +IsEmpty +IsNull +IsNumeric +IsObject +Join +LBound +LCase +LOCAL_ADDR +LOGON_USERLog +LTrim +Left +LeftB +Len +LenB +LoadPicture +Loop +Loop Until +Loop While +MAPI.Session +Matches.Count +Matches.Item +Mid +MidB +Minute +Mod +Month +MonthName +MsgBox +Next +Not +Nothing +Now +Oct +On Error +On Error Goto 0 +On Error Resume Next +Option Explicit +Or +Outlook.Application +PATH_INFO +PATH_TRANSLATEDPrivate +Private Const +Private Function +Private Property Get +Private Property Let +Private Property Set +Private Sub +Private Sub Class_Terminate +Private Sub object_Initialize +Property Get +Property Let +Property Set +Public +Public Const +Public Default Property Get +Public Default Property Let +Public Default Sub +Public Function +Public Property Get +Public Property Let +Public Property Set +Public Sub +QUERY_STRING +REMOTE_ADDR +REMOTE_HOST +REMOTE_USER +REQUEST_METHOD +RGB +RTrim +Randomize +ReadOnly +Redim +RegExp.Execute +RegExp.Global +RegExp.IgnoreCase +RegExp.Pattern +RegExp.Replace +RegExp.Test +Rem +Replace +Request.BinaryRead +Request.Cookies +Request.Cookies("cookie").HasKeys +Request.Form +Request.Form("form").Count +Request.QueryString +Request.QueryString("id").Count +Request.ServerVariables +Request.TotalBytes +Response.AddHeader +Response.AppendToLog +Response.BinaryWrite +Response.Buffer = True +Response.CacheControl +Response.Charset +Response.Clear +Response.ContentType +Response.Cookies("cookie").Expires +Response.Cookies("cookie").HasKeys +Response.Cookies("cookie").Path +Response.Cookies("cookie").Secure +Response.End +Response.Expires +Response.ExpiresAbsolute +Response.Flush +Response.IsClientConnected +Response.PICS +Response.Redirect +Response.Status +Response.Write +Right +RightB +Rnd +Round +SCRIPT_NAME +SERVER_NAME +SERVER_PORT +SERVER_PORT_SECURE +SERVER_PROTOCOL +SERVER_SOFTWARE +ScriptEngine +ScriptEngineBuildVersion +ScriptEngineMajorVersion +ScriptEngineMinorVersion +Scripting.Dictionary +Scripting.FileSystemObject +Scriptlet.TypeLib +Second +Select Case +Server.CreateObject +Server.HTMLEncode +Server.MapPath +Server.ScriptTimeout +Server.URLEncode +Session +Session.Abandom +Session.Contents +Session.Contents.Remove +Session.LCID +Session.SessionID +Session.StaticObjects +Session.Timeout +Set +Set oRegExp = New RegExp +SetLocale +Sgn +Sin +Space +Split +Sqr +StrComp +StrReverse +String +Sub +System +Tan +Terminate +TextStream.AtEndOfLine +TextStream.AtEndOfStream +TextStream.Close +TextStream.Column +TextStream.Line +TextStream.Read +TextStream.ReadAll +TextStream.ReadLine +TextStream.Skip +TextStream.SkipLine +TextStream.Write +TextStream.WriteBlankLines +TextStream.WriteLine +Then +Time +TimeSerial +TimeValue +Timer +To +Trim +TristateFalse +TristateTrue +TristateUseDefault +True +TypeLib.Guid +TypeName +UBound +UCase +URL +VarType +Weekday +WeekdayName +Wend +While +WinHttp.WinHttpRequest.5.1 +With +Word.Application +Xor +Year +adModeRead +adModeReadWrite +adOpenDynamic +adOpenForwardOnly = 0 +adOpenKeyset +adOpenStatic +http.responseText +http.send +http.setRequestHeader +vbAbort +vbAbortRetryIgnore +vbApplicationModal +vbArray +vbBinaryCompare +vbBlack +vbBlue +vbBoolean +vbByte +vbCancel +vbCr +vbCritical +vbCrlf +vbCurrency +vbCyan +vbDataObject +vbDate +vbDecimal +vbDefaultButton1 +vbDefaultButton2 +vbDefaultButton3 +vbDefaultButton4 +vbDouble +vbEmpty +vbError +vbExclamation +vbFalse +vbFirstFourDays +vbFirstFullWeek +vbFirstJan1 +vbFormFeed +vbFriday +vbGeneralDate +vbGreen +vbIgnore +vbInformation +vbInteger +vbLf +vbLong +vbLongDate +vbLongTime +vbMagenta +vbMonday +vbMsgBoxHelpButton +vbMsgBoxRight +vbMsgBoxRtlReading +vbMsgBoxSetForeground +vbNewLine +vbNo +vbNull +vbNullChar +vbNullString +vbOK +vbOKCancel +vbOKOnly +vbObject +vbQuestion +vbRed +vbRetryCancel +vbSaturday +vbShortDate +vbShortTime +vbSingle +vbString +vbSunday +vbSystemModal +vbTab +vbTextCompare +vbThursday +vbTrue +vbTuesday +vbUseDefault +vbUseSystem +vbUseSystemDayOfWeek +vbVerticalTab +vbWednesday +vbWhite +vbYellow +vbYes +vbYesNo +vbYesNoCancel +vbretry diff --git a/PowerEditor/bin/plugins/APIs/vhdl.api b/PowerEditor/bin/plugins/APIs/vhdl.api new file mode 100644 index 00000000..5709ed83 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/vhdl.api @@ -0,0 +1,90 @@ +abs +access +add +after +alias +all +and +architecture +array +assert +attribute +begin +block +body +buffer +bus +case +component +configuration +constant +downto +else +elsif +end +entity +error +exit +for +file +function +generate +generic +group +if +in +inout +inertial +impure +is +label +library +loop +map +mod +nand +next +nor +not +null +of +on +or +others +out +package +port +procedure +process +pure +range +record +reject +rem +report +register +return +rol +ror +select +severity +signal +sla +sll +sra +srl +subtype +then +transport +to +type +unaffected +until +use +variable +wait +when +while +with +xnor +xor \ No newline at end of file diff --git a/PowerEditor/bin/plugins/APIs/xml.api b/PowerEditor/bin/plugins/APIs/xml.api new file mode 100644 index 00000000..74df5668 --- /dev/null +++ b/PowerEditor/bin/plugins/APIs/xml.api @@ -0,0 +1,376 @@ +abbrev +abstract +accel +ackno +acronym +action +address +affiliation +alt +anchor +answer +appendix +appendixinfo +application +area +areaset +areaspec +arg +article +articleinfo +artpagenums +attribution +audiodata +audioobject +author +authorblurb +authorgroup +authorinitials +beginpage +bibliodiv +biblioentry +bibliography +bibliographyinfo +bibliomisc +bibliomixed +bibliomset +biblioset +blockquote +book +bookinfo +bridgehead +callout +calloutlist +caption +caution +chapter +chapterinfo +citation +citerefentry +citetitle +city +classname +classsynopsis +classsynopsisinfo +cmdsynopsis +co +collab +collabname +colophon +colspec +command +computeroutput +confdates +confgroup +confnum +confsponsor +conftitle +constant +constructorsynopsis +contractnum +contractsponsor +contrib +copyright +corpauthor +corpname +country +database +date +dedication +destructorsynopsis +edition +editor +email +emphasis +entry +entrytbl +envar +epigraph +equation +errorcode +errorname +errortype +example +exceptionname +fax +fieldsynopsis +figure +filename +firstname +firstterm +footnote +footnoteref +foreignphrase +formalpara +funcdef +funcparams +funcprototype +funcsynopsis +funcsynopsisinfo +function +glossary +glossaryinfo +glossdef +glossdiv +glossentry +glosslist +glosssee +glossseealso +glossterm +graphic +graphicco +group +guibutton +guiicon +guilabel +guimenu +guimenuitem +guisubmenu +hardware +highlights +holder +honorific +imagedata +imageobject +imageobjectco +important +index +indexdiv +indexentry +indexinfo +indexterm +informalequation +informalexample +informalfigure +informaltable +initializer +inlineequation +inlinegraphic +inlinemediaobject +interface +interfacename +invpartnumber +isbn +issn +issuenum +itemizedlist +itermset +jobtitle +keycap +keycode +keycombo +keysym +keyword +keywordset +label +legalnotice +lineage +lineannotation +link +listitem +literal +literallayout +lot +lotentry +manvolnum +markup +medialabel +mediaobject +mediaobjectco +member +menuchoice +methodname +methodparam +methodsynopsis +modespec +modifier +mousebutton +msg +msgaud +msgentry +msgexplan +msginfo +msglevel +msgmain +msgorig +msgrel +msgset +msgsub +msgtext +note +objectinfo +olink +ooclass +ooexception +oointerface +option +optional +orderedlist +orgdiv +orgname +otheraddr +othercredit +othername +pagenums +para +paramdef +parameter +part +partinfo +partintro +phone +phrase +pob +postcode +preface +prefaceinfo +primary +primaryie +printhistory +procedure +productname +productnumber +programlisting +programlistingco +prompt +property +pubdate +publisher +publishername +pubsnumber +qandadiv +qandaentry +qandaset +question +quote +refclass +refdescriptor +refentry +refentryinfo +refentrytitle +reference +referenceinfo +refmeta +refmiscinfo +refname +refnamediv +refpurpose +refsect1 +refsect1info +refsect2 +refsect2info +refsect3 +refsect3info +refsynopsisdiv +refsynopsisdivinfo +releaseinfo +remark +replaceable +returnvalue +revdescription +revhistory +revision +revnumber +revremark +row +sbr +screen +screenco +screeninfo +screenshot +secondary +secondaryie +sect1 +sect1info +sect2 +sect2info +sect3 +sect3info +sect4 +sect4info +sect5 +sect5info +section +sectioninfo +see +seealso +seealsoie +seeie +seg +seglistitem +segmentedlist +segtitle +seriesvolnums +set +setindex +setindexinfo +setinfo +sgmltag +shortaffil +shortcut +sidebar +sidebarinfo +simpara +simplelist +simplemsgentry +simplesect +spanspec +state +step +street +structfield +structname +subject +subjectset +subjectterm +subscript +substeps +subtitle +superscript +surname +symbol +synopfragment +synopfragmentref +synopsis +systemitem +table +tbody +term +tertiary +tertiaryie +textobject +tfoot +tgroup +thead +tip +title +titleabbrev +toc +tocback +tocchap +tocentry +tocfront +toclevel1 +toclevel2 +toclevel3 +toclevel4 +toclevel5 +tocpart +token +trademark +type +ulink +userinput +varargs +variablelist +varlistentry +varname +videodata +videoobject +void +volumenum +warning +wordasword +xref +year +url \ No newline at end of file diff --git a/PowerEditor/bin/plugins/Config/Explorer.ini b/PowerEditor/bin/plugins/Config/Explorer.ini new file mode 100644 index 00000000..b14d7d2c --- /dev/null +++ b/PowerEditor/bin/plugins/Config/Explorer.ini @@ -0,0 +1,21 @@ +[Explorer] +LastPath=C:\Temp\ +SplitterPos=224 +SplitterPosHor=200 +SortAsc=1 +SortPos=0 +ColPosName=150 +ColPosExt=51 +ColPosSize=70 +ColPosDate=100 +ShowHiddenData=0 +ShowBraces=1 +ShowLongInfo=0 +AddExtToName=0 +SizeFormat=1 +DateFormat=0 +TimeOut=1000 +UseSystemIcons=1 +LastFilter=*.* +[FilterHistory] +0=*.* diff --git a/PowerEditor/bin/plugins/Config/Favorites.dat b/PowerEditor/bin/plugins/Config/Favorites.dat new file mode 100644 index 00000000..260c7dc3 --- /dev/null +++ b/PowerEditor/bin/plugins/Config/Favorites.dat @@ -0,0 +1,12 @@ +[Folders] +Expand=0 + +[Files] +Expand=0 + +[Web] +Expand=0 + +[Sessions] +Expand=0 + diff --git a/PowerEditor/bin/plugins/Config/HexEditor.ini b/PowerEditor/bin/plugins/Config/HexEditor.ini new file mode 100644 index 00000000..1917ab9f --- /dev/null +++ b/PowerEditor/bin/plugins/Config/HexEditor.ini @@ -0,0 +1,7 @@ +[HEX-Editor] +Columns=16 +Bits=1 +Binary=0 +Little=0 +Capitel=0 +Extensions= diff --git a/PowerEditor/bin/plugins/Config/NppExec.ini b/PowerEditor/bin/plugins/Config/NppExec.ini new file mode 100644 index 00000000..224fecfb --- /dev/null +++ b/PowerEditor/bin/plugins/Config/NppExec.ini @@ -0,0 +1,7 @@ +[Console] +Height=162 +Visible=0 +OEM=1 +CmdHistory=0 +[Options] +HotKey=F6 diff --git a/PowerEditor/bin/plugins/Config/SpellChecker.ini b/PowerEditor/bin/plugins/Config/SpellChecker.ini new file mode 100644 index 00000000..2a06088a --- /dev/null +++ b/PowerEditor/bin/plugins/Config/SpellChecker.ini @@ -0,0 +1,2 @@ +[Spell-Checker] +Current Language=en diff --git a/PowerEditor/bin/plugins/ConvertExt.dll b/PowerEditor/bin/plugins/ConvertExt.dll new file mode 100644 index 00000000..2c56eae3 Binary files /dev/null and b/PowerEditor/bin/plugins/ConvertExt.dll differ diff --git a/PowerEditor/bin/plugins/Explorer.dll b/PowerEditor/bin/plugins/Explorer.dll new file mode 100644 index 00000000..47679e94 Binary files /dev/null and b/PowerEditor/bin/plugins/Explorer.dll differ diff --git a/PowerEditor/bin/plugins/FunctionList.dll b/PowerEditor/bin/plugins/FunctionList.dll new file mode 100644 index 00000000..62912fbd Binary files /dev/null and b/PowerEditor/bin/plugins/FunctionList.dll differ diff --git a/PowerEditor/bin/plugins/HexEditor.dll b/PowerEditor/bin/plugins/HexEditor.dll new file mode 100644 index 00000000..607c4e38 Binary files /dev/null and b/PowerEditor/bin/plugins/HexEditor.dll differ diff --git a/PowerEditor/bin/plugins/NPPTextFX.dll b/PowerEditor/bin/plugins/NPPTextFX.dll new file mode 100644 index 00000000..e64e4c30 Binary files /dev/null and b/PowerEditor/bin/plugins/NPPTextFX.dll differ diff --git a/PowerEditor/bin/plugins/NPPTextFX.ini b/PowerEditor/bin/plugins/NPPTextFX.ini new file mode 100644 index 00000000..5769c7c1 --- /dev/null +++ b/PowerEditor/bin/plugins/NPPTextFX.ini @@ -0,0 +1,29 @@ +[FindReplace] +RepositoryFolders=TextFX Original:%CSIDLX_TEXTFXDATA%\ReplaceSets;Most Recent Folder:;My Documents:%CSIDL_PERSONAL% +RepositorySelected=0 +[Settings] +SeparateQuickMenus=0 +BlockOverwrite=0 +AutoCloseBrace=0 +AutoCloseHTMLtag=0 +AutoSpace2Tab=0 +AutoConvertHTML=0 +SortAscending=1 +SortLinesUnique=0 +MarkWordFindCaseSensitive=0 +MarkWordFindWholeWord=0 +DisableSubclassing=0 +CaptureCutCopyPaste=0 +CtrlDAlsoDupsBlock=0 +[Viz] +VizCaseSensitive=0 +VizWholeWords=0 +VizRegex=0 +VizCutCopyAppend=0 +VizClipboardAlwaysCRLF=1 +VizClipboardReplaceNulls=0 +VizClipboardCopyAlsoUTF8=0 +VizClipboardNotUnicode=0 +VizPasteRetainsPosition=0 +VizPasteBinary=0 +VizPasteToEditorEOL=1 diff --git a/PowerEditor/bin/plugins/NPPTextFX/AsciiToEBCDIC.bin b/PowerEditor/bin/plugins/NPPTextFX/AsciiToEBCDIC.bin new file mode 100644 index 00000000..0a2c2b2f Binary files /dev/null and b/PowerEditor/bin/plugins/NPPTextFX/AsciiToEBCDIC.bin differ diff --git a/PowerEditor/bin/plugins/NPPTextFX/NPPTextFXdemo.TXT b/PowerEditor/bin/plugins/NPPTextFX/NPPTextFXdemo.TXT new file mode 100644 index 00000000..9fb22f5d --- /dev/null +++ b/PowerEditor/bin/plugins/NPPTextFX/NPPTextFXdemo.TXT @@ -0,0 +1,386 @@ +Bugs: Indent & Surround is messing up CRLF line endings +Bugs: Delete Blank lines won't delete every line if only blank lines are marked. + +To install this plugin, unpack NPPTextFX.DLL and NPPTextFX\*.HTM;*.TXT ;*.INI to the plugins folder in the N++ install folder then load N++. Delete those files without N++ running to remove the plugin. If everything is working, a Plugins menu will appear and the new tool should be listed under it. + +To develop this plugin if you have the source, unpack the entire structure to the plugins folder. Dev-C++ and Code::Blocks projects are provided. All the compilers are supported but OpenWatcom32 1.3 produces a DLL that is incompatible with Windows 98. + +To view this demo, load it into Notepad++ and perform the actions suggested to see how they work. If many tools are similar, only a few may be shown. No descriptions will be provided for tools that are totally obvious. + +**Demo: Characters Menu +**Demo: NPPTextFX + +Programmers waste lots of time and make lots of mistakes doing repetetive but simple tasks. TextFX performs a lot of very odd transforms the purpose and usage of which may not be immediately obvious from the menu descriptions even if you perform them manually on a regular basis. Because of the limited user interface implemented, some transforms require obscure actions on your part. This demo will show you in detail what the transforms do and how they are used. Always remember that no matter what happens, Notepad++ can undo it so you can try again, unless of course, you ask TextFX to erase the Undo Buffer. + +**Demo: Quote Changers & Text Converters all require some text to be selected + +You are often programming several languages at once and each may have different quote ("') rules. The Quote Changers allow you to alter quotes in large blocks in ways that are neither easy nor reliable with normal or regex search and replace. The rules are not tied to the current language selected since some languages are embedded in others. + +... This PHP code is incorrect since proper HTML tolerates ' but prefers ". +echo "\n"; +... We can use the Swap Quotes to alter it to this: +echo '\n'; +... but that is still not correct because \n does not expand inside of 'PHP' strings. +... Undo that and Escape ' to \" to get the correct result. +echo "\n"; +... Doing this is neither reliable nor easy with search and replace. + +**Demo: Zap all characters + +This tool is usually used with a rectangular selection on text that is in columns. All it does is convert every character to a space, useful for erasing columns so that new text can be written in. It easily zaps all characters in a non rectangular selection but I can't think of any reason why this would be useful. Zapping all non + +**Demo: Zap all non printable characters to # + +No compiler will accept following math but it's not immediately obvious where the problem is. Mark it and zap all characters to # and you'll immediately see what the compiler doesn't like. Any character that isn't a part of standard ASCII (32-126 TAB CR LF) is replaced with a # sign. Typically you'll want to undo any changes this tool makes and manually make the corrections. The purpose is to make it easy to find where the odd characters are. + +c=x­4; + +**Demo: Quick Menu (this menu can be pulled out of the Plugins menu by ticking Move quick ... in TextFX Settings) +**Demo: Mark word or find Reverse/Forward + +Programmers need fast and handy ways to jump to different points in a file. In this file, there are some printf statements. Search-Find is clumsy because it requires so many check boxes and text entries to get what you want. Instead, you can move to the nearest printf and hit Ctrl-Alt-DOWN ARROW. If nothing is marked, the nearest word will be marked, and when you hit the key again, the next occurance will be found and remarked to make it easy to find again. You can easily navigate between every such word in this file, including using Ctrl-Alt-UP ARROW to come right back up and continue the demo. If the automatic word selection is insufficient you can make a more precise selection and search for that. Some languages and situations will require that the search word be case sensitive. To make movement fast and easy, no beeps or screen flashes occur when the text is not found. For example, we want to write a new convert() all line but we have forgotten the proper calling sequence. I've written in "convertall" below so I can return to this point then we can find the next occurance to see how the function is used, make a copy, and bring it back. + +convertall + +**Demo: Matching Brace tools require a brace to the left or right of your cursor. The left will be used if there is a brace on each side. You may optionally select the brace but this is usually not necessary. + +Mark to matching brace is best used to grab () enclosed text. In the following, we would like to move (bktpos=...) somewhere else but it's hard to visually pick out the correct ending parenthesis because of the confusion. Place your cursor to the left of "(bkt..." and select "Mark to matching brace". We can be to the left because there is no other brace to the left of the carat that could be used instead. You could also place your carat to the right of the ) if you knew which one it was. + + if (curpos>0 && (bktpos=SendMessage(getCurrentHScintilla(currentEdit), SCI_BRACEMATCH, curpos-1, 0))>=0) { + +Mark lines to matching brace is best to grab complete function, do, while, and if code blocks. We want to move the following struct somewhere else. If we were to select Mark to matching brace, we would need to manually augment the selection to include the "struct NppData" and some whitespace at the end which is quite difficult. Place your cursor on either { or } and select Mark lines to matching brace. + +struct NppData { + HWND _nppHandle; + HWND _scintillaMainHandle; + HWND _scintillaSecondHandle; +}; + +... Notice that lines are marked after the end of the } up to the next non CR/LF so the entire function along with the trailing whitespace is marked. No whitespace left behind! If demand warrants I'll support crossing over "} else {" lines to reach the end of the if statement. + +**Demo: Edit Menu +**Demo: Fill down & insert + +We have just modified the convertall() function to take an additional integer parameter after the first char. I have modified the first line with the new desired value but I'd prefer not to hit the down-left sequence that everyone loves to hate. Having recently lined up the by a (,), I'd prefer making a rectangular selection around the text and the lines to which it is to be copied and having the editor insert the text for me when I pick Fill down & insert. Spreadsheets have done this for like, ever. Why can't editors do it? + + v Alt-Click before the 0 +convertall('c',0,"'" ,"\"" ,NULL,NULL);} +convertall('c',"\"" ,"'" ,NULL,NULL); } +convertall('C',"\"'","'\"",NULL,NULL);} + ^drag until after the slash (for demo above) + ^drag until after the 0 (for demo below) + +Thanks to us putting in the wrong value, we can demonstrate the other fill tool. We want all (1) ones to be in that newly created parameter. Change the first one to a (1) one then box out a single column for the 3 digits vertically. Select Fill down & overwrite and they will all switch to ones. + +**Demo: Insert (Clipboard) at column through lines + +This demo is tricky at first but is quite easy when you get used to it, much easier than hitting down-left-text-down-left-text... The first step is to specify the text to be inserted. The following lines need to have id changed to "testid". First, we mark the word test (<- you can mark that one if you want) and copy that to the clipboard. Then, we mark the following text without the Alt key starting just before the i of id and mark down to just before the i of the last id, then select Insert ... through lines. In standard editors, transforms typically do something to the entire selection. For a programmer's editor, we don't adhere to that rule for substantially greater functionality. + + v-start before this i + + + + + ^end before this i + +... inserting is not limited to static text. You can use # to specify incrementing +counters and $+-number$ to insert before, at, or after the end of line. Here are some +// Examples: +// "text" insert text +// "#" insert 0..1..2..3... +// "#5" insert 5..6..7..8..9... (the default increment is +1) +// "#5+2" insert 5..7..9..11... +// "$#5-2" insert 5..3..1..-1... at end of line +// "$$M$soft" insert M$soft at end of line +// "$4$text" insert text 4 characters beyond end of line. line will be ammended as necessary +// "$-3$#-5-2" insert -5..-7..-9..-11... 3 characters before end of line. lines that are too short will be skipped +This capability is likely to be expanded greatly when someone thinks of how. + +**Demo Reindent C++ code: + +This feature is begged for over and over in editor forums. It's a shame that more editors don't have it since it is easy enough to implement. It calculates the starting indent from the first marked line then simply counts { and } to increase and decrease the indent. This is not intended to be a full styler. All it does is reindent, particularly so you can find that bracket nesting error which is suddenly causing everything to crash. If you code doesn't compile, you might get some unexpected indent results. There are some special cases: + +1) Indents for /* stream comments */ are not changed. +2) goto labels and #preprocessor statements are always at the beginning of the line +3) switch..case statements are indented in a special way that allows them to follow the bracket count exactly. I've always manually written them this way and was very glad when the easiest numeric technique was the one I had been using from the beginning. +4) Since there are no braces, this case is too much extra work to implement properly. These lines will be flat. + if (cond) + stmt; + else + stmt; +5) + +There's some code not far down that needs some reindenting. + +**Demo: convert leading spaces or tabs to ... + +This will read tabwidth and Replace by Space under Settings-Tab Settings and perform the proper conversion of leading whitespace, destroying any non tabwidth multiples of spaces. If a lifetime of horrible editors has trained you to use spaces because tab handling and conversion is so bad, you can train yourself to use tabs by turning on [x]Autoconvert typed leading spaces to tabs and when ever you enter enough spaces, a tab will be substituted in their place. You will need to show Whitespace and Tabs if you want to see this in action. You must have Replace by Space unchecked for this conversion to take place. + +**Demo: trim trailing spaces + +The best programmer editors always trim trailing spaces and always allow the cursor to go beyond the end of the line. The built in editor in Borland C++ 3.1 DOS does this. When cirumstances prevent you from using an editor done right, extra spaces accumulate randomly on the end of lines. This tool kills them. I had considered removing this since Notepad++ implements it but there are two problems. The N++ implementation is substantially slower than mine, and N++ always trims spaces over the entire file. There might be areas where you don't want spaces removed. + +**Demo: Indent sticky... + +Every editor author thinks they know how to indent until someone else starts writing code. The following code needs some indenting. Which lines should and should not be indented? + +void indentfn(char *text,int tabwidth) { + char *d; + if (*text) { + for(d=text; *d; *d++) { +#ifdef DEBUG +/* Another Debug Routine */ + printf("."); +#endif + // Erase some text + *d=' '; + } + } +} + +Try marking the improperly indented lines from "for..." to the first "}" and indenting with the built in tool (Edit-Insert TAB (Indent)). Then undo and try the TextFX sticky indent. Which one is more desirable? Notice that undent does not present these complex problems. Now mark the entire function from "void..." to the last "}" and sticky indent to see that the indent is not sticky if the first marked line starts without any whitespace. + +**Demo: Indent and Surround with {} + +Same as indent but it ads a two lines with { and } around the text ready and waiting for a control statement. + +**Demo: Strip unquoted text. + +Initially you write nasty code. Later you decide to write a much better code to process some strings but now you need to get the strings now interspersed in code into an array. First copy a (,) into the clipboard as our separator, select the following lines, then select Strip unquoted text and you'll see the strings nicely separated by commas. A CRLF works good as a separator too. + +if (strcmp(s,"NASTY")) { +} else if (strcmp(s,"CODE")) { +} + +If you leave more than 20 characters in the clipboard, a comma (,) will be used as the separator. + +**Demo: Kill unquoted whitespace + +Lining up text by (,) or other characters can lead to whitespace getting out of hand. Sometimes you need to revert back to the original non spaced version. Select Kill unquoted whitespace to make the following lines small again. + +{"E:-" ,pfdummy ,0,FALSE}, +{"E:Sort lines case sensitive (at column)" ,pfqsortlinesc ,0,FALSE}, // this isn't handled right +{"E:Sort lines case insensitive (at column)" ,pfqsortlinesnc ,0,FALSE}, +{"E:+Sort ascending" ,pfSortAscending ,0,TRUE} , +{"E:+Sort outputs only UNIQUE (at column) lines",pfSortLinesUnique,0,TRUE} , +{"E:-" ,pfdummy ,0,FALSE}, + +**Demo: Split lines at clipboard character. + +Joining lines is easy. Splitting lines is more trouble. The following lines can be converted from a list on a single line to a list on multiple lines. Copy a (,) to the clipboard and select Split lines at clipboard character. This tool may be dropped when Replace is improved to where it can do the same thing. + +" Quick"," Edit"," Convert"," HTML Tidy"," Tools"," Viz"," Viz Settings"," Settings" + +**Demo: Line up multiple lines + +The following lines are hard to read and would be much easier to debug if all the commas (,) were lined up. Select the text and choose Line up ... by (,). Notice that the (,) embedded in the string is skipped. At this time I'm only detecting C-strings but VB/SQL and non escaped string detection is already available and used in some other tools should demand warrant its addition. Most of the time you can just manually fix any incorrectly detected characters. + +{"Escape \" to \\\"",convertescapesq,0,FALSE}, +{"Escape ' to \\\"",convertescape1qsq,0,FALSE}, +{"unEscape \\\" to \"",convertunescapesq,0,FALSE}, +{"1:Line up multiple lines by (,)",lineupcomma,0,FALSE}, + +... You may line up by equals (=) or any character of your choice by copying the desired lineup character to the clipboard and selecting Line up ... by (Clipboard). + +**Demo: Rewrap Text + +To rewrap text at any desired column number, copy the number to the clipboard and select Rewrap Text at (clipboard) column. If you use a number<8 or number>2048, the default width of 72 will be used. Rewrap text automatically assumes that blank lines are the start of a new paragraph. + +**Demo: Pad rectangular selection with spaces + +The Scintilla editor component copies a rectangular selection that includes uneven end of lines as a jagged edge. This is no good if where you want to paste it requires that the right edge be smooth. Use this tool on a rectangular selection in the following text from "Short" to "Longer Line" and you'll be able to copy and paste as a truly rectangular block. If the last line isn't long enough to envelope all the lines you will need to pad with spaces manually. + +Ignore This Short +Ignore This Long Line +Ignore This Longer Line + +**Demo: Convert Menu +**Demo: Encode HTML/URI compnent + +The following is an address we would like to embed in our web page. Upon submitting it to http://validator.w3.org/ we get a barrage of errors that indicate that we have used & inappropriately. We can fix that by selecting the latter part of the href and selecting Encode HTML. + + +Similar pages + + +This will convert the 4 characters <"&> to the appropriate &entity; If you would like special HTML characters converted as you type, enable Autoconvert typed HTML/XML. The Close Tag, and "quot; conversions are blocked depending on your position near an open or closed tag to allow tags to be typed without turning this feature off. Autoconvert HTML/XML only scans the current line for open/close tags so characters may convert in multi line tags unexpectantly. Use UNDO to revert any undesired automatic action. + +**Demo: Strip HTML tags + +This converts HTML to plain text, using or not using tabs for tables as desired. You can select the above HTML and see how little is left after Strip HTML tags. Some common &entity; characters are converted. Unlike most editors which only strip the tags, I try to produce the same amount of whitespace as would be produced from a browser rendered page. You may want to delete surplus blank lines and unwrap text on the text output. + +**Demo: Submit HTML to W3C + +Select the HTML above and select Submit HTML. The text will be launched in a browser ready to submit to the W3C. If you don't mark any text, the entire file will be sent. + +**Demo: Convert .. code command() + +We have the following embedded HTML that we need to change into program lines because we now need our server side scripting to calculate the values. Select the language you want the resulting code to run in then you can change the following into code: + + + + + + + + + +... I'll select Language=ASP which will produce the following VBScript compatible code, correctly terminated and escaped for VB: + + Response.Write(""&vbCrLf) + Response.Write(" "&vbCrLf) + Response.Write(" "&vbCrLf) + Response.Write(" "&vbCrLf) + Response.Write(" "&vbCrLf) + Response.Write(" "&vbCrLf) + Response.Write(""&vbCrLf) + +... Notice that the indentation was calculated from the first line processed and is preserved throughout all the lines processed. Pick an unsuported language like "Normal Text" and choose Convert ... code command() to see what languages are currently supported. + +**Demo: Convert text to hex + +There are lots of requests for a hex editor. Initially I though that a hex editor would be too difficult to implement as a plugin. Then I thought of simply converting the text to hex and edit it as text but it seemed too stupid to bother implementing. Now I use it constantly and would rather have it than most other hex editors. Later, I discovered the need to expand from 16 to 128 characters per line. You can pick as little or as much text as you want to convert to hex. Because this isn't a real hex editor you get to change the text pretty much any way you want and you are fully able to import or produce textual hex listings. When you go to convert hex back to text, you need to be aware of a few rules... + +**Demo: Convert hex to text + +Once you have modified hex or imported it from elsewhere and want to converted to characters, you need to know how it decodes so that you can make way for major unsafe hex. Characters are produced from hex codes that are exactly two and only two hex characters (0-9,A-F,a-f) followed by a space or a dash (-). The decoding jumps to the next line when 3 spaces or a vertical bar (|) is hit. This should be compatible with all DEBUG outputs and most common hex listings. Since it is real text you are editing, you can use the normal editor tools to doctor non compilant hex up so that it will convert to characters properly. There is no required number of hex on a line so you can add or remove hex or entire lines as desired. The offset number need not be present. The text decode on the right need not be present. The only warning you'll get is if you convert hex with offsets and the offsets don't match the original position in the file. Just think of the terrible things that can be accomplished with a binary safe editor. + +**Demo: Convert hex byte runs to LE-... + +It's a bit hard to read Little Endian WORD and DWORDS in one byte hexen. These tools will allow you to concatenate those Little Endian hexors 2 or 4 at a time in the correct order. Because the hex you are editing is nothing but text, you can select precisely the runs you want to see in a different word size. + +**Demo: Convert LE-words to hex byte runs + +Once you get your screen all doctored up with WORDS and DWORDS, you may wish to convert the whole thing back to characters. Don't start with converting hex to text because that only recognizes 2 character hex sequences. 4 and 8 character sequences will be discarded. You must first use this tool to convert them all back to 2 character hex runs. This tool autodetects the width which can be any even number of hex characters and it jumps to the next line when 3 spaces or a vertical bar (|) is detected. Note that the hex offset is always 9 hex characters so it is skipped. + +**Demo: ROT13 Text + +Vs lbh pna ernq guvf, V guvax lbh'ir svtherq guvf bar bhg! Move along, nothing to see here! + +**Demo: Ascii & EBCDIC + +Vedit is the only true EBCDIC editor I've heard of. All the rest including this one perform a lossy conversion back and forth. This is usually sufficient for minor uses and better than not having it at all. + +EBCDIC: ㈅@˜¤‰ƒ’@‚™–¦•@†–§@‰†Mð]@À£ˆ…@“©¨@„–‡KÐ + +There is a built in ASCII EBCDIC table and one provided in a disk file "AsciiToEBCDIC.bin". All of the conversion tables I found differed substantially so I picked the Microsoft table which may not be the best for everyone. If this table isn't good enough, load the .bin file into Notepad++, use the hex conversion, and build a table you like better. If the .bin file is not exactly 512 bytes it will be ignored and the internal table will be used instead. The first 256 bytes convert ASCII -> EBCDIC. The last 256 bytes convert EBCDIC to ASCII. + +**Demo: Tidy Menu +**Demo: HTML Tidy (Thanks to PSPAD, an excellent freeware editor, for the ready-made conversions) + +HTML Tidy is an optional component that may not be included with your Notepad++ distribution. If it is not present, most menu items will be disabled and a menu item to the download site will be provided. Select About Tidy to find out what went wrong during loading. The TextFX plugin source includes a project to compile Tidy sources into a DLL if you need a newer one than is available. You may also download the publically available libTidy.DLL which is very old and lacks many modern features. + +Once you get HTML Tidy installed and running the menus will open up and About Tidy will show you the Tidy version in use. If SubClassing is disabled, you can only run Tidy against a single configuration in HTMLTIDY.CFG which you may need to build and change yourself. If SubClassing is enabled, Tidycfg.ini is scanned to produce the menu items (limit 50) from which HTMLTIDY.CFG is automatically generated each time you select a Tidy Menu item. If you run the same Tidy over and over, the first Tidy option will run Tidy with the same configuration until another Tidy menu item alters it. If you add or alter the name of any Tidy menu options in Tidycfg.ini you can select Refresh Menu to update the menu from the file. + +Tidy will use the selected text or the entire file if no text is selected. Often times a Tidy run will produce a Htmltidy.err file which you can leave loaded in another Notepad++ tab and any time it changes, that tab will refresh the error text. + +**Demo: Sort lines + +You can sort lines on the the first character or at any column of the line. Entire lines will be sorted and where you start your mark on the line determines which column the sort starts on. Text before that column on every line is not considered in the sort or uniqueness test. + +v-start before the "P" marking entire lines to sort on the first column +v v-start marking before this character to sort on this column +PFUNCPLUGINCMD hex2decimal() { convertall('n',CAFLAG_DENYBLOCK,"h","d",NULL,NULL); } +PFUNCPLUGINCMD octal2decimal() { convertall('n',CAFLAG_DENYBLOCK,"o","d",NULL,NULL); } +PFUNCPLUGINCMD binary2decimal() { convertall('n',CAFLAG_DENYBLOCK,"b","d",NULL,NULL); } + +Line 1 XYZZY +Line 2 The Cave +Line 3 XYZZY +Line 4 XYZZY +Line 5 The Cave + +If you sort the above lines at the column starting XYZZY outputing only unique lines, only a two lines will be output. Since a tool to insert and remove line numbers is provided, you can sort unique lines then return them back to their original order in 4 steps. + +1) Insert line numbers +2) Sort unique after the line numbers +3) Sort the line numbers +4) Remove the line numbers + +**Demo: Tools Menu +**Demo: Insert Ascii chart or character. + +If you mark a single character, one line of the ascii chart is inserted +into the document for that character. Otherwise the entire 0-256 Ascii +chart is inserted. If you don't know the ascii code for the following, +you can select it and choose Insert Ascii ... and all of it's codes will +be inserted. + +¨ + +**Demo: Insert Ruler + +Notepad++ doesn't have a ruler so I built one that can be inserted into the document. Using rectangular copy and paste you can make this ruler as long as you need. + +--- 0---|--- 10---|--- 20---|--- 30---|--- 40---|--- 50---|--- 60---|--- 70---|--- 80---|--- 90---| +123456789|123456789|123456789|123456789|123456789|123456789|123456789|123456789|123456789|123456789| + +**Demo: add up numbers + +Most of my use of commerical spreadsheets is to type in a column of +numbers and add them up. I thought it would be nice if my plugin could +do the same thing. The following is a magic square. You can select each +line and column and use Add up Numbers to verify it. You may sum the +entire square to verify that it is 4 times what the line sum is. + + 16 3 2 13 + 5 10 11 8 + 9 6 7 12 + 4 15 14 1 + +**Demo: Viz Menu +**Demo: Hide/Show Lines + +Some editors implement code folding which takes too much manual labor to set up. Some editors can bookmark all found lines but this is little use if you need to see many lines of bounding text interspersed with undesired text. Viz can hide and show lines based on a search criteria or selected lines. You can run several viz operations in a row to generate a sequence that can be inserted as comment text and reused later. Select Show ... All/Reset Lines to start a new sequence. + +**Demo: For example, we would like to know what all the Demos are in this file. +**Demo: Copy **Demo to the clipboard then select Hide Lines Without (Clipboard) +**Demo: text. Now you can move around, make changes, search/replace, copy text +**Demo: from one place to another, perhaps return to your starting position, and +**Demo: when finished, select Show All Lines to continue the demo! The line you +**Demo: started on is always left visible no matter what rules may try to hide it +**Demo: Cut-Copy-Delete tools are provided to operate specifically on hidden +**Demo or visible text. Be careful since all other operations on selected text +**Demo: includes all the hidden text in between. + +**Demo: Viz Settings Menu +**Demo: Cut Copy Paste + +I have added many features to cut copy and paste so I have Subclassed Scintilla's. The original tools are still available in the edit menu in case you find a situation that isn't handled right. At this time Paste Binary cannot paste rectangular text. I expect to have this working in the near future. The default Viz Settings are selected to be both compatible with the Scintilla originals and to be more officially compatible with the Windows Clipboard. + +**Demo: Cut-Copy not in UNICODE + +Scintilla is a UTF-8 editor which is why there are no double byte Scintilla messages. UCS-2 is always handled through translation, such as copying to the Windows Clipboard. Unicode is preferred on the clipboard because Windows can paste it into any Unicode aware application. Windows cannot translate UTF-8 to UNICODE. In some cases it will be necessary to have the UTF-8 text on the clipboard without the UNICODE conversion. This option will only copy UTF-8 as 8 bit ANSI and Windows may convert it to a double byte padded UTF-8, any of which will paste as UTF-8 into any application. Depending on the OS and the editor mode, this and similar options may be autoselected or blocked to ensure compatibility. + +**Demo: Capture Keyboard Ctrl+C,X,V + +TextFX doesn't yet do the conversions from UNICODE to ansi codepages that Scintilla does. If this is a problem in your language you will want these keys to map to the built in Scintilla routines. If this is only a rare occurance then you may want to use Edit: Cut-Copy-Paste and let TextFX have these keys. + +**Demo: Paste/Append binary + +Paste binary disables EOL conversion and takes the entire contents without the last NUL character. Binary paste may behave unexpectedly depending on the copy-cut application and OS. Check operation carefully before using regularly. For example, Windows 9x pads the buffer with random trash. Many editors are not careful about how big the clipboard buffer is. + +**Demo: Settings Menu +**Demo: Cancel overwrite moving from current line + +Proper handling of Insert/Overwrite is ignored by editor authors but vexes programmers constantly. So far switching to insert moving away from the current line is the best way I have thought of to eliminate overwrite accidents without totally disabling overwrite mode. + +**Demo: Autoclose HTML tag + +This is copied and updated from the N++ supplied InsertPluginDemo. I hope it handles more strange cases than the original. You must have an appropriate language selected (HTML,XML) for this feature to perform. Any time you type a tag such as , a closing tag will be inserted after the cursor, unless you enter a close or self closing tag like or
    . A single UNDO will remove any undesired automatic action. + +**Demo: Autoclose brace + +Each time you type a ([{, it will be closed for you. ([ will be closed immediately after the cursor and the { will be closed on the next line with the same indent as the current line. A single UNDO will remove any undesired automatic action. You must have a supported language selected for this feature to perform and you must be at the end of a line. Braces will not be autoclosed when editing existing text. + +**Demo: Disable Subclassing and advanced features. + +At this time the extended Tidy menu and Ctrl-B require subclassing to capture. A future version of Notepad++ may cause Subclassing to fail to operate correctly. The features are still available in a more limited form if Subclassing is turned off. + +**Demo: Move quick menus out of 'Plugins' Menu + +TextFX Quick and TextFX Viz can be made into separate menus for easier use. They are left inside Plugins by default so that users know that TextFX is separate from Notepad++. + +**Demo: Improve Home-End ... + +Many people ask for Home and End to not go from BOL to EOL in line wrap mode. The ability to go EOL and BOL of screen lines is built in to Scintilla. This option enables it. diff --git a/PowerEditor/bin/plugins/NPPTextFX/TIDYCFG.INI b/PowerEditor/bin/plugins/NPPTextFX/TIDYCFG.INI new file mode 100644 index 00000000..c8aeec2e --- /dev/null +++ b/PowerEditor/bin/plugins/NPPTextFX/TIDYCFG.INI @@ -0,0 +1,190 @@ +; quick reference: http://tidy.sourceforge.net/docs/quickref.html +; cesky preklad: http://www.pspad.com/cz/tidy.htm +; sample config file for HTML tidy from http://www.w3.org/People/Raggett/tidy/ +[Sample from Web Page] +indent: auto +indent-spaces: 2 +wrap: 72 +markup: yes +output-xml: yes +input-xml: no +show-warnings: yes +numeric-entities: yes +quote-marks: yes +quote-nbsp: yes +quote-ampersand: no +break-before-br: no +uppercase-tags: no +uppercase-attributes: no +char-encoding: latin1 +new-inline-tags: cfif, cfelse, math, mroot, + mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover, + munder, mover, mmultiscripts, msup, msub, mtext, + mprescripts, mtable, mtr, mtd, mth +new-blocklevel-tags: cfoutput, cfquery +new-empty-tags: cfelse + +[TiDy clean Document - wrap] +bare:no +clean:no +fix-bad-comments:yes +fix-backslash:yes +indent:yes +indent-attributes:no +indent-spaces:2 +char-encoding:raw +replace-color:yes +wrap:80 +wrap-asp:yes +wrap-jste:yes +wrap-php:yes +write-back:yes + +[TiDy clean Document - nowrap] +bare:no +clean:no +fix-bad-comments:yes +fix-backslash:yes +indent:yes +indent-attributes:no +indent-spaces:2 +char-encoding:raw +replace-color:yes +wrap:0 +wrap-asp:no +wrap-jste:no +wrap-php:no +write-back:yes + +[TiDy clean Document - nowrap, no indent] +bare:no +clean:no +fix-bad-comments:yes +fix-backslash:yes +indent:no +indent-attributes:no +indent-spaces:2 +char-encoding:raw +replace-color:yes +wrap:0 +wrap-asp:no +wrap-jste:no +wrap-php:no +write-back:yes + +[TiDy clean Microsoft Word 2000 document] +doctype:auto +drop-empty-paras:yes +fix-bad-comments:yes +fix-uri:yes +join-styles:yes +lower-literals:yes +ncr:yes +quote-ampersand:yes +quote-nbsp:yes +word-2000:yes +markup:yes +wrap-jste:yes +wrap-php:yes +wrap-sections:yes +write-back:yes + +[TiDy clean Document - quote] +quote-ampersand:yes +quote-marks:yes +quote-nbsp:yes +write-back:yes + +[TiDy upgrade to CSS] +add-xml-decl:no +;add-xml-pi:no +alt-text:Image +break-before-br:no +clean:yes +doctype:auto +drop-empty-paras:no +drop-font-tags:yes +fix-backslash:yes +fix-bad-comments:yes +hide-endtags:no +char-encoding:raw +indent:yes +indent-spaces:2 +input-xml:no +markup:yes +quiet:yes +tidy-mark:no +uppercase-attributes:no +uppercase-tags:no +word-2000:yes +wrap:100 +wrap-asp:yes +wrap-attributes:yes +wrap-jste:yes +wrap-php:yes +write-back:yes + +[TiDy convert to XML] +add-xml-decl:yes +;add-xml-pi:yes +alt-text:Image +break-before-br:no +clean:yes +doctype:AUTO +drop-empty-paras:no +drop-font-tags:yes +fix-bad-comments:yes +hide-endtags:no +char-encoding:raw +indent:yes +indent-spaces:2 +input-xml:no +markup:yes +output-xml:yes +quiet:yes +tidy-mark:no +uppercase-attributes:no +uppercase-tags:no +word-2000:no +wrap:100 +wrap-asp:yes +wrap-attributes:yes +wrap-jste:yes +wrap-php:yes +write-back:yes + +[Tidy convert to XHTML] +add-xml-decl:no +;add-xml-pi:no +alt-text:Image +break-before-br:no +clean:yes +doctype:auto +drop-empty-paras:no +drop-font-tags:yes +error-file:error.log +fix-backslash:yes +fix-bad-comments:yes +hide-endtags:no +char-encoding:raw +indent:yes +indent-spaces:2 +input-xml:no +markup:yes +output-xhtml:yes +output-xml:no +quiet:yes +tidy-mark:no +uppercase-attributes:no +uppercase-tags:no +word-2000:no +wrap:100 +wrap-asp:yes +wrap-attributes:yes +wrap-jste:yes +wrap-php:yes +write-back:yes + +[Tidy: Reindent XML] +input-xml: yes +indent:yes diff --git a/PowerEditor/bin/plugins/NPPTextFX/W3C-CSSValidator.htm b/PowerEditor/bin/plugins/NPPTextFX/W3C-CSSValidator.htm new file mode 100644 index 00000000..da6d45e7 --- /dev/null +++ b/PowerEditor/bin/plugins/NPPTextFX/W3C-CSSValidator.htm @@ -0,0 +1,5 @@ + +
    +
    + +
    diff --git a/PowerEditor/bin/plugins/NPPTextFX/W3C-HTMLValidator.htm b/PowerEditor/bin/plugins/NPPTextFX/W3C-HTMLValidator.htm new file mode 100644 index 00000000..ac7ebfb2 --- /dev/null +++ b/PowerEditor/bin/plugins/NPPTextFX/W3C-HTMLValidator.htm @@ -0,0 +1,6 @@ + +
    +
    + +
    + diff --git a/PowerEditor/bin/plugins/NPPTextFX/libTidy.dll b/PowerEditor/bin/plugins/NPPTextFX/libTidy.dll new file mode 100644 index 00000000..e0205d31 Binary files /dev/null and b/PowerEditor/bin/plugins/NPPTextFX/libTidy.dll differ diff --git a/PowerEditor/bin/plugins/NppExec.dll b/PowerEditor/bin/plugins/NppExec.dll new file mode 100644 index 00000000..252afa18 Binary files /dev/null and b/PowerEditor/bin/plugins/NppExec.dll differ diff --git a/PowerEditor/bin/plugins/QuickText.dll b/PowerEditor/bin/plugins/QuickText.dll new file mode 100644 index 00000000..99dd9246 Binary files /dev/null and b/PowerEditor/bin/plugins/QuickText.dll differ diff --git a/PowerEditor/bin/plugins/SpellChecker.dll b/PowerEditor/bin/plugins/SpellChecker.dll new file mode 100644 index 00000000..bc07219d Binary files /dev/null and b/PowerEditor/bin/plugins/SpellChecker.dll differ diff --git a/PowerEditor/bin/plugins/doc/NppExec.txt b/PowerEditor/bin/plugins/doc/NppExec.txt new file mode 100644 index 00000000..fd5bf029 --- /dev/null +++ b/PowerEditor/bin/plugins/doc/NppExec.txt @@ -0,0 +1,72 @@ + **************************************************************************** + * NppExec plugin ver. 0.2 for Notepad++ 4.0.2 (and above) + * by DV, December 2006 - April 2007 + **************************************************************************** + * + * Possibilities: + * 1) Run multiple commands from main window + * 2) Run stand-alone command from Console Dlg + * 3) Additional commands: + * npp_exec + + Scintilla and SciTE + + + + + + + + + + +
    + Scintilla + + A free source code editing component for Win32 and + GTK+ + + Release version 1.73
    + Site last modified March 31 2007
    +
    +   +
    + + + + +
    +   +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Version 1.73 allows style changes to be made during text modification events. +
    + Version 1.72 is more efficient at handling per-line information. +
    + Version 1.71 has some internationalisation fixes. +
    + Version 1.70 allows, on GTK+, approximate character set conversions + for pasting and uses internationalised input at all times. +
    + Version 1.69 supports the Spice language and can draw + the selection and whole line markers translucently. +
    + Version 1.68 can draw the caret line + and box indicators translucently and has an accurate TCL lexer. +
    + Version 1.67 enhances some lexers and fixes bugs. +
    + Version 1.66 has a new Ruby lexer and fixes bugs on GTK+ + with Pango 1.8. +
    + + + + +
    + + + Documentation   + Bugs   + + + History   Related   +
    +

    + Scintilla is a free source code editing component. + It comes with complete source code and a license that + permits use in any free project or commercial product. +

    +

    + As well as features found in standard text editing components, Scintilla includes features + especially useful when editing and debugging source code. + These include support for syntax styling, error indicators, code completion and call tips. + The selection margin can contain markers like those used in debuggers to indicate + breakpoints and the current line. Styling choices are more open than with many editors, + allowing the use of proportional fonts, bold and italics, multiple foreground and background + colours and multiple fonts. +

    +

    + The SinkWorld project + investigates possible future directions for Scintilla to make it more flexible, robust, perform + better and run on the .NET and Java virtual machines. +

    +

    + SciTE is a SCIntilla based Text Editor. Originally built to + demonstrate Scintilla, it has grown to be a generally useful editor with facilities for + building and running programs. It is best used for jobs with simple configurations - I use it + for building test and demonstration programs as well as SciTE and Scintilla, themselves. +

    +

    + Development of Scintilla started as an effort to improve the text editor in PythonWin. After + being frustrated by problems in the Richedit control used by PythonWin, it looked like the + best way forward was to write a new edit control. The biggest problem with Richedit and other + similar controls is that they treat styling changes as important persistent changes to the + document so they are saved into the undo stack and set the document's dirty flag. For source + code, styling should not be persisted as it can be mechanically recreated. +

    +

    + Scintilla and SciTE are currently available for Intel Win32 and Linux compatible operating + systems with GTK+. They have been run on Windows 95, NT 4.0, Windows 2000, and on Red Hat + Linux 8 and 9 with GTK+ 1.2 and 2.0. Here is a screenshot of + SciTE.
    +

    +

    + You can download Scintilla. +

    +

    + The source code can be downloaded via CVS at the Source Forge + Scintilla project page. +

    +

    + Related sites. +

    +

    + Bugs and To Do list. +

    +

    + History and contribution credits. +

    +

    + Icons that can be used with Scintilla. +

    +

    + Questions and comments about Scintilla should be directed to the + scintilla-interest + mailing list, + which is for discussion of Scintilla and related projects, their bugs and future features. + This is a low traffic list, averaging less than 50 messages per week. + To avoid spam, only list members can write to the list. + Announcements of new versions of Scintilla go to both the scintilla-interest list and + scintilla-announce. + Messages sent to my personal email address that could have been sent to the list + may receive no response. +
    +

    + + + + diff --git a/scintilla/gtk/Converter.h b/scintilla/gtk/Converter.h new file mode 100644 index 00000000..aeb5e159 --- /dev/null +++ b/scintilla/gtk/Converter.h @@ -0,0 +1,87 @@ +// Scintilla source code edit control +// Converter.h - Encapsulation of iconv +// Copyright 2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#if GTK_MAJOR_VERSION >= 2 + typedef GIConv ConverterHandle; +#else + typedef iconv_t ConverterHandle; +#endif +const ConverterHandle iconvhBad = (ConverterHandle)(-1); +// Since various versions of iconv can not agree on whether the src argument +// is char ** or const char ** provide a templatised adaptor. +template +size_t iconv_adaptor(size_t(*f_iconv)(ConverterHandle, T, size_t *, char **, size_t *), + ConverterHandle cd, char** src, size_t *srcleft, + char **dst, size_t *dstleft) { + return f_iconv(cd, (T)src, srcleft, dst, dstleft); +} +/** + * Encapsulate iconv safely and avoid iconv_adaptor complexity in client code. + */ +class Converter { + ConverterHandle iconvh; + void OpenHandle(const char *fullDestination, const char *charSetSource) { +#if GTK_MAJOR_VERSION >= 2 + iconvh = g_iconv_open(fullDestination, charSetSource); +#else + iconvh = iconv_open(fullDestination, charSetSource); +#endif + } + bool Succeeded() const { + return iconvh != iconvhBad; + } +public: + Converter() { + iconvh = iconvhBad; + } + Converter(const char *charSetDestination, const char *charSetSource, bool transliterations) { + iconvh = iconvhBad; + Open(charSetDestination, charSetSource, transliterations); + } + ~Converter() { + Close(); + } + operator bool() const { + return Succeeded(); + } + void Open(const char *charSetDestination, const char *charSetSource, bool transliterations=true) { + Close(); + if (*charSetSource) { + // Try allowing approximate transliterations + if (transliterations) { + char fullDest[200]; + strcpy(fullDest, charSetDestination); + strcat(fullDest, "//TRANSLIT"); + OpenHandle(fullDest, charSetSource); + } + if (!Succeeded()) { + // Transliterations failed so try basic name + OpenHandle(charSetDestination, charSetSource); + } + } + } + void Close() { + if (Succeeded()) { +#if GTK_MAJOR_VERSION >= 2 + g_iconv_close(iconvh); +#else + iconv_close(iconvh); +#endif + iconvh = iconvhBad; + } + } + size_t Convert(char** src, size_t *srcleft, char **dst, size_t *dstleft) const { + if (!Succeeded()) { + return (size_t)(-1); + } else { +#if GTK_MAJOR_VERSION >= 2 + return iconv_adaptor(g_iconv, iconvh, src, srcleft, dst, dstleft); +#else + return iconv_adaptor(iconv, iconvh, src, srcleft, dst, dstleft); +#endif + } + } +}; diff --git a/scintilla/gtk/PlatGTK.cxx b/scintilla/gtk/PlatGTK.cxx new file mode 100644 index 00000000..d48d574b --- /dev/null +++ b/scintilla/gtk/PlatGTK.cxx @@ -0,0 +1,2711 @@ +// Scintilla source code edit control +// PlatGTK.cxx - implementation of platform facilities on GTK+/Linux +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "ScintillaWidget.h" +#include "UniConversion.h" +#include "XPM.h" + +/* GLIB must be compiled with thread support, otherwise we + will bail on trying to use locks, and that could lead to + problems for someone. `glib-config --libs gthread` needs + to be used to get the glib libraries for linking, otherwise + g_thread_init will fail */ +#define USE_LOCK defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE) +/* Use fast way of getting char data on win32 to work around problems + with gdk_string_extents. */ +#define FAST_WAY + +#ifdef G_OS_WIN32 +#define snprintf _snprintf +#endif + +#if GTK_MAJOR_VERSION >= 2 +#define USE_PANGO 1 +#include "Converter.h" +#endif + +#ifdef _MSC_VER +// Ignore unreferenced local functions in GTK+ headers +#pragma warning(disable: 4505) +#endif + +enum encodingType { singleByte, UTF8, dbcs}; + +struct LOGFONT { + int size; + bool bold; + bool italic; + int characterSet; + char faceName[300]; +}; + +#if USE_LOCK +static GMutex *fontMutex = NULL; + +static void InitializeGLIBThreads() { + if (!g_thread_supported()) { + g_thread_init(NULL); + } +} +#endif + +static void FontMutexAllocate() { +#if USE_LOCK + if (!fontMutex) { + InitializeGLIBThreads(); + fontMutex = g_mutex_new(); + } +#endif +} + +static void FontMutexFree() { +#if USE_LOCK + if (fontMutex) { + g_mutex_free(fontMutex); + fontMutex = NULL; + } +#endif +} + +static void FontMutexLock() { +#if USE_LOCK + g_mutex_lock(fontMutex); +#endif +} + +static void FontMutexUnlock() { +#if USE_LOCK + if (fontMutex) { + g_mutex_unlock(fontMutex); + } +#endif +} + +// On GTK+ 1.x holds a GdkFont* but on GTK+ 2.x can hold a GdkFont* or a +// PangoFontDescription*. +class FontHandle { + int width[128]; + encodingType et; +public: + int ascent; + GdkFont *pfont; +#ifdef USE_PANGO + PangoFontDescription *pfd; + int characterSet; +#endif + FontHandle(GdkFont *pfont_) { + et = singleByte; + ascent = 0; + pfont = pfont_; +#ifdef USE_PANGO + pfd = 0; + characterSet = -1; +#endif + ResetWidths(et); + } +#ifdef USE_PANGO + FontHandle(PangoFontDescription *pfd_, int characterSet_) { + et = singleByte; + ascent = 0; + pfont = 0; + pfd = pfd_; + characterSet = characterSet_; + ResetWidths(et); + } +#endif + ~FontHandle() { + if (pfont) + gdk_font_unref(pfont); + pfont = 0; +#ifdef USE_PANGO + if (pfd) + pango_font_description_free(pfd); + pfd = 0; +#endif + } + void ResetWidths(encodingType et_) { + et = et_; + for (int i=0; i<=127; i++) { + width[i] = 0; + } + } + int CharWidth(unsigned char ch, encodingType et_) { + int w = 0; + FontMutexLock(); + if ((ch <= 127) && (et == et_)) { + w = width[ch]; + } + FontMutexUnlock(); + return w; + } + void SetCharWidth(unsigned char ch, int w, encodingType et_) { + if (ch <= 127) { + FontMutexLock(); + if (et != et_) { + ResetWidths(et_); + } + width[ch] = w; + FontMutexUnlock(); + } + } +}; + +// X has a 16 bit coordinate space, so stop drawing here to avoid wrapping +static const int maxCoordinate = 32000; + +static FontHandle *PFont(Font &f) { + return reinterpret_cast(f.GetID()); +} + +static GtkWidget *PWidget(WindowID id) { + return reinterpret_cast(id); +} + +static GtkWidget *PWidget(Window &w) { + return PWidget(w.GetID()); +} + +Point Point::FromLong(long lpoint) { + return Point( + Platform::LowShortFromLong(lpoint), + Platform::HighShortFromLong(lpoint)); +} + +Palette::Palette() { + used = 0; + allowRealization = false; + allocatedPalette = 0; + allocatedLen = 0; + size = 100; + entries = new ColourPair[size]; +} + +Palette::~Palette() { + Release(); + delete []entries; + entries = 0; +} + +void Palette::Release() { + used = 0; + delete [](reinterpret_cast(allocatedPalette)); + allocatedPalette = 0; + allocatedLen = 0; + delete []entries; + size = 100; + entries = new ColourPair[size]; +} + +// This method either adds a colour to the list of wanted colours (want==true) +// or retrieves the allocated colour back to the ColourPair. +// This is one method to make it easier to keep the code for wanting and retrieving in sync. +void Palette::WantFind(ColourPair &cp, bool want) { + if (want) { + for (int i=0; i < used; i++) { + if (entries[i].desired == cp.desired) + return; + } + + if (used >= size) { + int sizeNew = size * 2; + ColourPair *entriesNew = new ColourPair[sizeNew]; + for (int j=0; j(allocatedPalette), + allocatedLen); + delete [](reinterpret_cast(allocatedPalette)); + allocatedPalette = 0; + allocatedLen = 0; + } + GdkColor *paletteNew = new GdkColor[used]; + allocatedPalette = paletteNew; + gboolean *successPalette = new gboolean[used]; + if (paletteNew) { + allocatedLen = used; + int iPal = 0; + for (iPal = 0; iPal < used; iPal++) { + paletteNew[iPal].red = entries[iPal].desired.GetRed() * (65535 / 255); + paletteNew[iPal].green = entries[iPal].desired.GetGreen() * (65535 / 255); + paletteNew[iPal].blue = entries[iPal].desired.GetBlue() * (65535 / 255); + paletteNew[iPal].pixel = entries[iPal].desired.AsLong(); + } + gdk_colormap_alloc_colors(gtk_widget_get_colormap(PWidget(w)), + paletteNew, allocatedLen, FALSE, TRUE, + successPalette); + for (iPal = 0; iPal < used; iPal++) { + entries[iPal].allocated.Set(paletteNew[iPal].pixel); + } + } + delete []successPalette; +} + +static const char *CharacterSetName(int characterSet) { + switch (characterSet) { + case SC_CHARSET_ANSI: + return "iso8859-*"; + case SC_CHARSET_DEFAULT: + return "iso8859-*"; + case SC_CHARSET_BALTIC: + return "iso8859-13"; + case SC_CHARSET_CHINESEBIG5: + return "*-*"; + case SC_CHARSET_EASTEUROPE: + return "*-2"; + case SC_CHARSET_GB2312: + return "gb2312.1980-*"; + case SC_CHARSET_GREEK: + return "*-7"; + case SC_CHARSET_HANGUL: + return "ksc5601.1987-*"; + case SC_CHARSET_MAC: + return "*-*"; + case SC_CHARSET_OEM: + return "*-*"; + case SC_CHARSET_RUSSIAN: + return "*-r"; + case SC_CHARSET_CYRILLIC: + return "*-cp1251"; + case SC_CHARSET_SHIFTJIS: + return "jisx0208.1983-*"; + case SC_CHARSET_SYMBOL: + return "*-*"; + case SC_CHARSET_TURKISH: + return "*-9"; + case SC_CHARSET_JOHAB: + return "*-*"; + case SC_CHARSET_HEBREW: + return "*-8"; + case SC_CHARSET_ARABIC: + return "*-6"; + case SC_CHARSET_VIETNAMESE: + return "*-*"; + case SC_CHARSET_THAI: + return "iso8859-11"; + case SC_CHARSET_8859_15: + return "iso8859-15"; + default: + return "*-*"; + } +} + +static bool IsDBCSCharacterSet(int characterSet) { + switch (characterSet) { + case SC_CHARSET_GB2312: + case SC_CHARSET_HANGUL: + case SC_CHARSET_SHIFTJIS: + case SC_CHARSET_CHINESEBIG5: + return true; + default: + return false; + } +} + +static void GenerateFontSpecStrings(const char *fontName, int characterSet, + char *foundary, int foundary_len, + char *faceName, int faceName_len, + char *charset, int charset_len) { + // supported font strings include: + // foundary-fontface-isoxxx-x + // fontface-isoxxx-x + // foundary-fontface + // fontface + if (strchr(fontName, '-')) { + char tmp[300]; + char *d1 = NULL, *d2 = NULL, *d3 = NULL; + strncpy(tmp, fontName, sizeof(tmp) - 1); + d1 = strchr(tmp, '-'); + // we know the first dash exists + d2 = strchr(d1 + 1, '-'); + if (d2) + d3 = strchr(d2 + 1, '-'); + if (d3) { + // foundary-fontface-isoxxx-x + *d2 = '\0'; + foundary[0] = '-'; + foundary[1] = '\0'; + strncpy(faceName, tmp, foundary_len - 1); + strncpy(charset, d2 + 1, charset_len - 1); + } else if (d2) { + // fontface-isoxxx-x + *d1 = '\0'; + strcpy(foundary, "-*-"); + strncpy(faceName, tmp, faceName_len - 1); + strncpy(charset, d1 + 1, charset_len - 1); + } else { + // foundary-fontface + foundary[0] = '-'; + foundary[1] = '\0'; + strncpy(faceName, tmp, faceName_len - 1); + strncpy(charset, CharacterSetName(characterSet), charset_len - 1); + } + } else { + strncpy(foundary, "-*-", foundary_len); + strncpy(faceName, fontName, faceName_len - 1); + strncpy(charset, CharacterSetName(characterSet), charset_len - 1); + } +} + +static void SetLogFont(LOGFONT &lf, const char *faceName, int characterSet, int size, bool bold, bool italic) { + memset(&lf, 0, sizeof(lf)); + lf.size = size; + lf.bold = bold; + lf.italic = italic; + lf.characterSet = characterSet; + strncpy(lf.faceName, faceName, sizeof(lf.faceName) - 1); +} + +/** + * Create a hash from the parameters for a font to allow easy checking for identity. + * If one font is the same as another, its hash will be the same, but if the hash is the + * same then they may still be different. + */ +static int HashFont(const char *faceName, int characterSet, int size, bool bold, bool italic) { + return + size ^ + (characterSet << 10) ^ + (bold ? 0x10000000 : 0) ^ + (italic ? 0x20000000 : 0) ^ + faceName[0]; +} + +class FontCached : Font { + FontCached *next; + int usage; + LOGFONT lf; + int hash; + FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); + ~FontCached() {} + bool SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); + virtual void Release(); + static FontID CreateNewFont(const char *fontName, int characterSet, + int size, bool bold, bool italic); + static FontCached *first; +public: + static FontID FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_); + static void ReleaseId(FontID id_); +}; + +FontCached *FontCached::first = 0; + +FontCached::FontCached(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) : +next(0), usage(0), hash(0) { + ::SetLogFont(lf, faceName_, characterSet_, size_, bold_, italic_); + hash = HashFont(faceName_, characterSet_, size_, bold_, italic_); + id = CreateNewFont(faceName_, characterSet_, size_, bold_, italic_); + usage = 1; +} + +bool FontCached::SameAs(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) { + return + lf.size == size_ && + lf.bold == bold_ && + lf.italic == italic_ && + lf.characterSet == characterSet_ && + 0 == strcmp(lf.faceName, faceName_); +} + +void FontCached::Release() { + if (id) + delete PFont(*this); + id = 0; +} + +FontID FontCached::FindOrCreate(const char *faceName_, int characterSet_, int size_, bool bold_, bool italic_) { + FontID ret = 0; + FontMutexLock(); + int hashFind = HashFont(faceName_, characterSet_, size_, bold_, italic_); + for (FontCached *cur = first; cur; cur = cur->next) { + if ((cur->hash == hashFind) && + cur->SameAs(faceName_, characterSet_, size_, bold_, italic_)) { + cur->usage++; + ret = cur->id; + } + } + if (ret == 0) { + FontCached *fc = new FontCached(faceName_, characterSet_, size_, bold_, italic_); + if (fc) { + fc->next = first; + first = fc; + ret = fc->id; + } + } + FontMutexUnlock(); + return ret; +} + +void FontCached::ReleaseId(FontID id_) { + FontMutexLock(); + FontCached **pcur = &first; + for (FontCached *cur = first; cur; cur = cur->next) { + if (cur->id == id_) { + cur->usage--; + if (cur->usage == 0) { + *pcur = cur->next; + cur->Release(); + cur->next = 0; + delete cur; + } + break; + } + pcur = &cur->next; + } + FontMutexUnlock(); +} + +static GdkFont *LoadFontOrSet(const char *fontspec, int characterSet) { + if (IsDBCSCharacterSet(characterSet)) { + return gdk_fontset_load(fontspec); + } else { + return gdk_font_load(fontspec); + } +} + +FontID FontCached::CreateNewFont(const char *fontName, int characterSet, + int size, bool bold, bool italic) { + char fontset[1024]; + char fontspec[300]; + char foundary[50]; + char faceName[100]; + char charset[50]; + fontset[0] = '\0'; + fontspec[0] = '\0'; + foundary[0] = '\0'; + faceName[0] = '\0'; + charset[0] = '\0'; + +#ifdef USE_PANGO + if (fontName[0] == '!') { + PangoFontDescription *pfd = pango_font_description_new(); + if (pfd) { + pango_font_description_set_family(pfd, fontName+1); + pango_font_description_set_size(pfd, size * PANGO_SCALE); + pango_font_description_set_weight(pfd, bold ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); + pango_font_description_set_style(pfd, italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); + return new FontHandle(pfd, characterSet); + } + } +#endif + + GdkFont *newid = 0; + // If name of the font begins with a '-', assume, that it is + // a full fontspec. + if (fontName[0] == '-') { + if (strchr(fontName, ',') || IsDBCSCharacterSet(characterSet)) { + newid = gdk_fontset_load(fontName); + } else { + newid = gdk_font_load(fontName); + } + if (!newid) { + // Font not available so substitute a reasonable code font + // iso8859 appears to only allow western characters. + newid = LoadFontOrSet("-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-*", + characterSet); + } + return new FontHandle(newid); + } + + // it's not a full fontspec, build one. + + // This supports creating a FONT_SET + // in a method that allows us to also set size, slant and + // weight for the fontset. The expected input is multiple + // partial fontspecs seperated by comma + // eg. adobe-courier-iso10646-1,*-courier-iso10646-1,*-*-*-* + if (strchr(fontName, ',')) { + // build a fontspec and use gdk_fontset_load + int remaining = sizeof(fontset); + char fontNameCopy[1024]; + strncpy(fontNameCopy, fontName, sizeof(fontNameCopy) - 1); + char *fn = fontNameCopy; + char *fp = strchr(fn, ','); + for (;;) { + const char *spec = "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s"; + if (fontset[0] != '\0') { + // if this is not the first font in the list, + // append a comma seperator + spec = ",%s%s%s%s-*-*-*-%0d-*-*-*-*-%s"; + } + + if (fp) + *fp = '\0'; // nullify the comma + GenerateFontSpecStrings(fn, characterSet, + foundary, sizeof(foundary), + faceName, sizeof(faceName), + charset, sizeof(charset)); + + snprintf(fontspec, + sizeof(fontspec) - 1, + spec, + foundary, faceName, + bold ? "-bold" : "-medium", + italic ? "-i" : "-r", + size * 10, + charset); + + // if this is the first font in the list, and + // we are doing italic, add an oblique font + // to the list + if (italic && fontset[0] == '\0') { + strncat(fontset, fontspec, remaining - 1); + remaining -= strlen(fontset); + + snprintf(fontspec, + sizeof(fontspec) - 1, + ",%s%s%s-o-*-*-*-%0d-*-*-*-*-%s", + foundary, faceName, + bold ? "-bold" : "-medium", + size * 10, + charset); + } + + strncat(fontset, fontspec, remaining - 1); + remaining -= strlen(fontset); + + if (!fp) + break; + + fn = fp + 1; + fp = strchr(fn, ','); + } + + newid = gdk_fontset_load(fontset); + if (newid) + return new FontHandle(newid); + + // if fontset load failed, fall through, we'll use + // the last font entry and continue to try and + // get something that matches + } + + // single fontspec support + + GenerateFontSpecStrings(fontName, characterSet, + foundary, sizeof(foundary), + faceName, sizeof(faceName), + charset, sizeof(charset)); + + snprintf(fontspec, + sizeof(fontspec) - 1, + "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s", + foundary, faceName, + bold ? "-bold" : "-medium", + italic ? "-i" : "-r", + size * 10, + charset); + newid = LoadFontOrSet(fontspec, characterSet); + if (!newid) { + // some fonts have oblique, not italic + snprintf(fontspec, + sizeof(fontspec) - 1, + "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s", + foundary, faceName, + bold ? "-bold" : "-medium", + italic ? "-o" : "-r", + size * 10, + charset); + newid = LoadFontOrSet(fontspec, characterSet); + } + if (!newid) { + snprintf(fontspec, + sizeof(fontspec) - 1, + "-*-*-*-*-*-*-*-%0d-*-*-*-*-%s", + size * 10, + charset); + newid = gdk_font_load(fontspec); + } + if (!newid) { + // Font not available so substitute a reasonable code font + // iso8859 appears to only allow western characters. + newid = LoadFontOrSet("-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-*", + characterSet); + } + return new FontHandle(newid); +} + +Font::Font() : id(0) {} + +Font::~Font() {} + +void Font::Create(const char *faceName, int characterSet, int size, + bool bold, bool italic, bool) { + Release(); + id = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic); +} + +void Font::Release() { + if (id) + FontCached::ReleaseId(id); + id = 0; +} + +class SurfaceImpl : public Surface { + encodingType et; + GdkDrawable *drawable; + GdkGC *gc; + GdkPixmap *ppixmap; + int x; + int y; + bool inited; + bool createdGC; +#ifdef USE_PANGO + PangoContext *pcontext; + PangoLayout *layout; + Converter conv; + int characterSet; + void SetConverter(int characterSet_); +#endif +public: + SurfaceImpl(); + virtual ~SurfaceImpl(); + + void Init(WindowID wid); + void Init(SurfaceID sid, WindowID wid); + void InitPixMap(int width, int height, Surface *surface_, WindowID wid); + + void Release(); + bool Initialised(); + void PenColour(ColourAllocated fore); + int LogPixelsY(); + int DeviceHeightFont(int points); + void MoveTo(int x_, int y_); + void LineTo(int x_, int y_); + void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back); + void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back); + void FillRectangle(PRectangle rc, ColourAllocated back); + void FillRectangle(PRectangle rc, Surface &surfacePattern); + void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back); + void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, + ColourAllocated outline, int alphaOutline, int flags); + void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); + void Copy(PRectangle rc, Point from, Surface &surfaceSource); + + void DrawTextBase(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); + void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); + void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); + void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); + void MeasureWidths(Font &font_, const char *s, int len, int *positions); + int WidthText(Font &font_, const char *s, int len); + int WidthChar(Font &font_, char ch); + int Ascent(Font &font_); + int Descent(Font &font_); + int InternalLeading(Font &font_); + int ExternalLeading(Font &font_); + int Height(Font &font_); + int AverageCharWidth(Font &font_); + + int SetPalette(Palette *pal, bool inBackGround); + void SetClip(PRectangle rc); + void FlushCachedState(); + + void SetUnicodeMode(bool unicodeMode_); + void SetDBCSMode(int codePage); +}; + +const char *CharacterSetID(int characterSet) { + switch (characterSet) { + case SC_CHARSET_ANSI: + return ""; + case SC_CHARSET_DEFAULT: + return "ISO-8859-1"; + case SC_CHARSET_BALTIC: + return "ISO-8859-13"; + case SC_CHARSET_CHINESEBIG5: + return "BIG-5"; + case SC_CHARSET_EASTEUROPE: + return "ISO-8859-2"; + case SC_CHARSET_GB2312: + return "GB2312"; + case SC_CHARSET_GREEK: + return "ISO-8859-7"; + case SC_CHARSET_HANGUL: + return ""; + case SC_CHARSET_MAC: + return "MACINTOSH"; + case SC_CHARSET_OEM: + return "ASCII"; + case SC_CHARSET_RUSSIAN: + return "KOI8-R"; + case SC_CHARSET_CYRILLIC: + return "CP1251"; + case SC_CHARSET_SHIFTJIS: + return "SHIFT-JIS"; + case SC_CHARSET_SYMBOL: + return ""; + case SC_CHARSET_TURKISH: + return "ISO-8859-9"; + case SC_CHARSET_JOHAB: + return "JOHAB"; + case SC_CHARSET_HEBREW: + return "ISO-8859-8"; + case SC_CHARSET_ARABIC: + return "ISO-8859-6"; + case SC_CHARSET_VIETNAMESE: + return ""; + case SC_CHARSET_THAI: + return "ISO-8859-11"; + case SC_CHARSET_8859_15: + return "ISO-8859-15"; + default: + return ""; + } +} + +#ifdef USE_PANGO + +void SurfaceImpl::SetConverter(int characterSet_) { + if (characterSet != characterSet_) { + characterSet = characterSet_; + conv.Open("UTF-8", CharacterSetID(characterSet), false); + } +} +#endif + +SurfaceImpl::SurfaceImpl() : et(singleByte), drawable(0), gc(0), ppixmap(0), +x(0), y(0), inited(false), createdGC(false) +#ifdef USE_PANGO +, pcontext(0), layout(0), characterSet(-1) +#endif +{ +} + +SurfaceImpl::~SurfaceImpl() { + Release(); +} + +void SurfaceImpl::Release() { + et = singleByte; + drawable = 0; + if (createdGC) { + createdGC = false; + gdk_gc_unref(gc); + } + gc = 0; + if (ppixmap) + gdk_pixmap_unref(ppixmap); + ppixmap = 0; +#ifdef USE_PANGO + if (layout) + g_object_unref(layout); + layout = 0; + if (pcontext) + g_object_unref(pcontext); + pcontext = 0; + conv.Close(); + characterSet = -1; +#endif + x = 0; + y = 0; + inited = false; + createdGC = false; +} + +bool SurfaceImpl::Initialised() { + return inited; +} + +// The WindowID argument is only used for Pango builds +#ifdef USE_PANGO +#define WID_NAME wid +#else +#define WID_NAME +#endif + +void SurfaceImpl::Init(WindowID WID_NAME) { + Release(); +#ifdef USE_PANGO + PLATFORM_ASSERT(wid); + pcontext = gtk_widget_create_pango_context(PWidget(wid)); + PLATFORM_ASSERT(pcontext); + layout = pango_layout_new(pcontext); + PLATFORM_ASSERT(layout); +#endif + inited = true; +} + +void SurfaceImpl::Init(SurfaceID sid, WindowID WID_NAME) { + PLATFORM_ASSERT(sid); + GdkDrawable *drawable_ = reinterpret_cast(sid); + Release(); +#ifdef USE_PANGO + PLATFORM_ASSERT(wid); + pcontext = gtk_widget_create_pango_context(PWidget(wid)); + layout = pango_layout_new(pcontext); +#endif + drawable = drawable_; + gc = gdk_gc_new(drawable_); + // Ask for lines that do not paint the last pixel so is like Win32 + gdk_gc_set_line_attributes(gc, 0, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER); + createdGC = true; + inited = true; +} + +void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID WID_NAME) { + PLATFORM_ASSERT(surface_); + Release(); + SurfaceImpl *surfImpl = static_cast(surface_); + PLATFORM_ASSERT(surfImpl->drawable); +#ifdef USE_PANGO + PLATFORM_ASSERT(wid); + pcontext = gtk_widget_create_pango_context(PWidget(wid)); + PLATFORM_ASSERT(pcontext); + layout = pango_layout_new(pcontext); + PLATFORM_ASSERT(layout); +#endif + if (height > 0 && width > 0) + ppixmap = gdk_pixmap_new(surfImpl->drawable, width, height, -1); + drawable = ppixmap; + gc = gdk_gc_new(surfImpl->drawable); + // Ask for lines that do not paint the last pixel so is like Win32 + gdk_gc_set_line_attributes(gc, 0, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER); + createdGC = true; + inited = true; +} + +void SurfaceImpl::PenColour(ColourAllocated fore) { + if (gc) { + GdkColor co; + co.pixel = fore.AsLong(); + gdk_gc_set_foreground(gc, &co); + } +} + +int SurfaceImpl::LogPixelsY() { + return 72; +} + +int SurfaceImpl::DeviceHeightFont(int points) { + int logPix = LogPixelsY(); + return (points * logPix + logPix / 2) / 72; +} + +void SurfaceImpl::MoveTo(int x_, int y_) { + x = x_; + y = y_; +} + +void SurfaceImpl::LineTo(int x_, int y_) { + if (drawable && gc) { + gdk_draw_line(drawable, gc, + x, y, + x_, y_); + } + x = x_; + y = y_; +} + +void SurfaceImpl::Polygon(Point *pts, int npts, ColourAllocated fore, + ColourAllocated back) { + GdkPoint gpts[20]; + if (npts < static_cast((sizeof(gpts) / sizeof(gpts[0])))) { + for (int i = 0;i < npts;i++) { + gpts[i].x = pts[i].x; + gpts[i].y = pts[i].y; + } + PenColour(back); + gdk_draw_polygon(drawable, gc, 1, gpts, npts); + PenColour(fore); + gdk_draw_polygon(drawable, gc, 0, gpts, npts); + } +} + +void SurfaceImpl::RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back) { + if (gc && drawable) { + PenColour(back); + gdk_draw_rectangle(drawable, gc, 1, + rc.left + 1, rc.top + 1, + rc.right - rc.left - 2, rc.bottom - rc.top - 2); + + PenColour(fore); + // The subtraction of 1 off the width and height here shouldn't be needed but + // otherwise a different rectangle is drawn than would be done if the fill parameter == 1 + gdk_draw_rectangle(drawable, gc, 0, + rc.left, rc.top, + rc.right - rc.left - 1, rc.bottom - rc.top - 1); + } +} + +void SurfaceImpl::FillRectangle(PRectangle rc, ColourAllocated back) { + PenColour(back); + if (drawable && (rc.left < maxCoordinate)) { // Protect against out of range + gdk_draw_rectangle(drawable, gc, 1, + rc.left, rc.top, + rc.right - rc.left, rc.bottom - rc.top); + } +} + +void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) { + if (static_cast(surfacePattern).drawable) { + // Tile pattern over rectangle + // Currently assumes 8x8 pattern + int widthPat = 8; + int heightPat = 8; + for (int xTile = rc.left; xTile < rc.right; xTile += widthPat) { + int widthx = (xTile + widthPat > rc.right) ? rc.right - xTile : widthPat; + for (int yTile = rc.top; yTile < rc.bottom; yTile += heightPat) { + int heighty = (yTile + heightPat > rc.bottom) ? rc.bottom - yTile : heightPat; + gdk_draw_pixmap(drawable, + gc, + static_cast(surfacePattern).drawable, + 0, 0, + xTile, yTile, + widthx, heighty); + } + } + } else { + // Something is wrong so try to show anyway + // Shows up black because colour not allocated + FillRectangle(rc, ColourAllocated(0)); + } +} + +void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back) { + if (((rc.right - rc.left) > 4) && ((rc.bottom - rc.top) > 4)) { + // Approximate a round rect with some cut off corners + Point pts[] = { + Point(rc.left + 2, rc.top), + Point(rc.right - 2, rc.top), + Point(rc.right, rc.top + 2), + Point(rc.right, rc.bottom - 2), + Point(rc.right - 2, rc.bottom), + Point(rc.left + 2, rc.bottom), + Point(rc.left, rc.bottom - 2), + Point(rc.left, rc.top + 2), + }; + Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore, back); + } else { + RectangleDraw(rc, fore, back); + } +} + +#if GTK_MAJOR_VERSION >= 2 + +// Plot a point into a guint32 buffer symetrically to all 4 qudrants +static void AllFour(guint32 *pixels, int stride, int width, int height, int x, int y, guint32 val) { + pixels[y*stride+x] = val; + pixels[y*stride+width-1-x] = val; + pixels[(height-1-y)*stride+x] = val; + pixels[(height-1-y)*stride+width-1-x] = val; +} + +static unsigned int GetRValue(unsigned int co) { + return (co >> 16) & 0xff; +} + +static unsigned int GetGValue(unsigned int co) { + return (co >> 8) & 0xff; +} + +static unsigned int GetBValue(unsigned int co) { + return co & 0xff; +} + +#endif + +#if GTK_MAJOR_VERSION < 2 +void SurfaceImpl::AlphaRectangle(PRectangle rc, int , ColourAllocated , int , ColourAllocated outline, int , int ) { + if (gc && drawable) { + // Can't use GdkPixbuf on GTK+ 1.x, so draw an outline rather than use alpha. + PenColour(outline); + gdk_draw_rectangle(drawable, gc, 0, + rc.left, rc.top, + rc.right - rc.left - 1, rc.bottom - rc.top - 1); + } +} +#else +void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, + ColourAllocated outline, int alphaOutline, int flags) { + if (gc && drawable) { + int width = rc.Width(); + int height = rc.Height(); + // Ensure not distorted too much by corners when small + cornerSize = Platform::Minimum(cornerSize, (Platform::Minimum(width, height) / 2) - 2); + // Make a 32 bit deep pixbuf with alpha + GdkPixbuf *pixalpha = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height); + + guint8 pixVal[4] = {0}; + guint32 valEmpty = *(reinterpret_cast(pixVal)); + pixVal[0] = GetRValue(fill.AsLong()); + pixVal[1] = GetGValue(fill.AsLong()); + pixVal[2] = GetBValue(fill.AsLong()); + pixVal[3] = alphaFill; + guint32 valFill = *(reinterpret_cast(pixVal)); + pixVal[0] = GetRValue(outline.AsLong()); + pixVal[1] = GetGValue(outline.AsLong()); + pixVal[2] = GetBValue(outline.AsLong()); + pixVal[3] = alphaOutline; + guint32 valOutline = *(reinterpret_cast(pixVal)); + guint32 *pixels = reinterpret_cast(gdk_pixbuf_get_pixels(pixalpha)); + int stride = gdk_pixbuf_get_rowstride(pixalpha) / 4; + for (int y=0; y(surfaceSource).drawable) { + gdk_draw_pixmap(drawable, + gc, + static_cast(surfaceSource).drawable, + from.x, from.y, + rc.left, rc.top, + rc.right - rc.left, rc.bottom - rc.top); + } +} + +static size_t UTF8Len(char ch) { + unsigned char uch = static_cast(ch); + if (uch < 0x80) + return 1; + else if (uch < (0x80 + 0x40 + 0x20)) + return 2; + else + return 3; +} + +char *UTF8FromLatin1(const char *s, int &len) { + char *utfForm = new char[len*2+1]; + size_t lenU = 0; + for (int i=0;i(s[i]); + if (uch < 0x80) { + utfForm[lenU++] = uch; + } else { + utfForm[lenU++] = static_cast(0xC0 | (uch >> 6)); + utfForm[lenU++] = static_cast(0x80 | (uch & 0x3f)); + } + } + utfForm[lenU] = '\0'; + len = lenU; + return utfForm; +} + +#ifdef USE_PANGO +static char *UTF8FromIconv(const Converter &conv, const char *s, int &len) { + if (conv) { + char *utfForm = new char[len*3+1]; + char *pin = const_cast(s); + size_t inLeft = len; + char *pout = utfForm; + size_t outLeft = len*3+1; + size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); + if (conversions != ((size_t)(-1))) { + *pout = '\0'; + len = pout - utfForm; + return utfForm; + } + delete []utfForm; + } + return 0; +} + +// Work out how many bytes are in a character by trying to convert using iconv, +// returning the first length that succeeds. +static size_t MultiByteLenFromIconv(const Converter &conv, const char *s, size_t len) { + for (size_t lenMB=1; (lenMB<4) && (lenMB <= len); lenMB++) { + char wcForm[2]; + char *pin = const_cast(s); + size_t inLeft = lenMB; + char *pout = wcForm; + size_t outLeft = 2; + size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); + if (conversions != ((size_t)(-1))) { + return lenMB; + } + } + return 1; +} + +static char *UTF8FromGdkWChar(GdkWChar *wctext, int wclen) { + char *utfForm = new char[wclen*3+1]; // Maximum of 3 UTF-8 bytes per character + size_t lenU = 0; + for (int i = 0; i < wclen && wctext[i]; i++) { + unsigned int uch = wctext[i]; + if (uch < 0x80) { + utfForm[lenU++] = static_cast(uch); + } else if (uch < 0x800) { + utfForm[lenU++] = static_cast(0xC0 | (uch >> 6)); + utfForm[lenU++] = static_cast(0x80 | (uch & 0x3f)); + } else { + utfForm[lenU++] = static_cast(0xE0 | (uch >> 12)); + utfForm[lenU++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); + utfForm[lenU++] = static_cast(0x80 | (uch & 0x3f)); + } + } + utfForm[lenU] = '\0'; + return utfForm; +} + +static char *UTF8FromDBCS(const char *s, int &len) { + GdkWChar *wctext = new GdkWChar[len + 1]; + GdkWChar *wcp = wctext; + int wclen = gdk_mbstowcs(wcp, s, len); + if (wclen < 1) { + // In the annoying case when non-locale chars in the line. + // e.g. latin1 chars in Japanese locale. + delete []wctext; + return 0; + } + + char *utfForm = UTF8FromGdkWChar(wctext, wclen); + delete []wctext; + len = strlen(utfForm); + return utfForm; +} + +static size_t UTF8CharLength(const char *s) { + const unsigned char *us = reinterpret_cast(s); + unsigned char ch = *us; + if (ch < 0x80) { + return 1; + } else if (ch < 0x80 + 0x40 + 0x20) { + return 2; + } else { + return 3; + } +} + +#endif + +// On GTK+, wchar_t is 4 bytes + +const int maxLengthTextRun = 10000; + +void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char *s, int len, + ColourAllocated fore) { + PenColour(fore); + if (gc && drawable) { + int x = rc.left; +#ifdef USE_PANGO + if (PFont(font_)->pfd) { + char *utfForm = 0; + bool useGFree = false; + if (et == UTF8) { + pango_layout_set_text(layout, s, len); + } else { + if (!utfForm) { + SetConverter(PFont(font_)->characterSet); + utfForm = UTF8FromIconv(conv, s, len); + } + if (!utfForm) { // iconv failed so try DBCS if DBCS mode + if (et == dbcs) { + // Convert to utf8 + utfForm = UTF8FromDBCS(s, len); + } + } + if (!utfForm) { // iconv and DBCS failed so treat as Latin1 + utfForm = UTF8FromLatin1(s, len); + } + pango_layout_set_text(layout, utfForm, len); + } + pango_layout_set_font_description(layout, PFont(font_)->pfd); + PangoLayoutLine *pll = pango_layout_get_line(layout,0); + gdk_draw_layout_line(drawable, gc, x, ybase, pll); + if (useGFree) { + g_free(utfForm); + } else { + delete []utfForm; + } + return; + } +#endif + // Draw text as a series of segments to avoid limitations in X servers + const int segmentLength = 1000; + bool draw8bit = true; + if (et != singleByte) { + GdkWChar wctext[maxLengthTextRun]; + if (len >= maxLengthTextRun) + len = maxLengthTextRun-1; + int wclen; + if (et == UTF8) { + wclen = UCS2FromUTF8(s, len, + static_cast(static_cast(wctext)), maxLengthTextRun - 1); + } else { // dbcs, so convert using current locale + char sMeasure[maxLengthTextRun]; + memcpy(sMeasure, s, len); + sMeasure[len] = '\0'; + wclen = gdk_mbstowcs( + wctext, sMeasure, maxLengthTextRun - 1); + } + if (wclen > 0) { + draw8bit = false; + wctext[wclen] = L'\0'; + GdkWChar *wcp = wctext; + while ((wclen > 0) && (x < maxCoordinate)) { + int lenDraw = Platform::Minimum(wclen, segmentLength); + gdk_draw_text_wc(drawable, PFont(font_)->pfont, gc, + x, ybase, wcp, lenDraw); + wclen -= lenDraw; + if (wclen > 0) { // Avoid next calculation if possible as may be expensive + x += gdk_text_width_wc(PFont(font_)->pfont, + wcp, lenDraw); + } + wcp += lenDraw; + } + } + } + if (draw8bit) { + while ((len > 0) && (x < maxCoordinate)) { + int lenDraw = Platform::Minimum(len, segmentLength); + gdk_draw_text(drawable, PFont(font_)->pfont, gc, + x, ybase, s, lenDraw); + len -= lenDraw; + if (len > 0) { // Avoid next calculation if possible as may be expensive + x += gdk_text_width(PFont(font_)->pfont, s, lenDraw); + } + s += lenDraw; + } + } + } +} + +void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, + ColourAllocated fore, ColourAllocated back) { + FillRectangle(rc, back); + DrawTextBase(rc, font_, ybase, s, len, fore); +} + +// On GTK+, exactly same as DrawTextNoClip +void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, + ColourAllocated fore, ColourAllocated back) { + FillRectangle(rc, back); + DrawTextBase(rc, font_, ybase, s, len, fore); +} + +void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, + ColourAllocated fore) { + // Avoid drawing spaces in transparent mode + for (int i=0;ipfd) { + if (len == 1) { + int width = PFont(font_)->CharWidth(*s, et); + if (width) { + positions[0] = width; + return; + } + } + PangoRectangle pos; + pango_layout_set_font_description(layout, PFont(font_)->pfd); + if (et == UTF8) { + // Simple and direct as UTF-8 is native Pango encoding + pango_layout_set_text(layout, s, len); + PangoLayoutIter *iter = pango_layout_get_iter(layout); + pango_layout_iter_get_cluster_extents(iter, NULL, &pos); + int i = 0; + while (pango_layout_iter_next_cluster(iter)) { + pango_layout_iter_get_cluster_extents(iter, NULL, &pos); + int position = PANGO_PIXELS(pos.x); + int curIndex = pango_layout_iter_get_index(iter); + while (i < curIndex) { + positions[i++] = position; + } + } + while (i < lenPositions) + positions[i++] = PANGO_PIXELS(pos.x + pos.width); + pango_layout_iter_free(iter); + PLATFORM_ASSERT(i == lenPositions); + } else { + int positionsCalculated = 0; + if (et == dbcs) { + SetConverter(PFont(font_)->characterSet); + char *utfForm = UTF8FromIconv(conv, s, len); + if (utfForm) { + // Convert to UTF-8 so can ask Pango for widths, then + // Loop through UTF-8 and DBCS forms, taking account of different + // character byte lengths. + Converter convMeasure("UCS-2", CharacterSetID(characterSet), false); + pango_layout_set_text(layout, utfForm, strlen(utfForm)); + int i = 0; + int utfIndex = 0; + PangoLayoutIter *iter = pango_layout_get_iter(layout); + pango_layout_iter_get_cluster_extents(iter, NULL, &pos); + while (pango_layout_iter_next_cluster(iter)) { + pango_layout_iter_get_cluster_extents (iter, NULL, &pos); + int position = PANGO_PIXELS(pos.x); + int utfIndexNext = pango_layout_iter_get_index(iter); + while (utfIndex < utfIndexNext) { + size_t lenChar = MultiByteLenFromIconv(convMeasure, s+i, len-i); + //size_t lenChar = mblen(s+i, MB_CUR_MAX); + while (lenChar--) { + positions[i++] = position; + positionsCalculated++; + } + utfIndex += UTF8CharLength(utfForm+utfIndex); + } + } + while (i < lenPositions) + positions[i++] = PANGO_PIXELS(pos.x + pos.width); + pango_layout_iter_free(iter); + delete []utfForm; + PLATFORM_ASSERT(i == lenPositions); + } + } + if (positionsCalculated < 1 ) { + // Either Latin1 or DBCS conversion failed so treat as Latin1. + bool useGFree = false; + SetConverter(PFont(font_)->characterSet); + char *utfForm = UTF8FromIconv(conv, s, len); + if (!utfForm) { + utfForm = UTF8FromLatin1(s, len); + } + pango_layout_set_text(layout, utfForm, len); + int i = 0; + PangoLayoutIter *iter = pango_layout_get_iter(layout); + pango_layout_iter_get_cluster_extents(iter, NULL, &pos); + while (pango_layout_iter_next_cluster(iter)) { + pango_layout_iter_get_cluster_extents(iter, NULL, &pos); + positions[i++] = PANGO_PIXELS(pos.x); + } + while (i < lenPositions) + positions[i++] = PANGO_PIXELS(pos.x + pos.width); + pango_layout_iter_free(iter); + if (useGFree) { + g_free(utfForm); + } else { + delete []utfForm; + } + PLATFORM_ASSERT(i == lenPositions); + } + } + if (len == 1) { + PFont(font_)->SetCharWidth(*s, positions[0], et); + } + return; + } +#endif + GdkFont *gf = PFont(font_)->pfont; + bool measure8bit = true; + if (et != singleByte) { + GdkWChar wctext[maxLengthTextRun]; + if (len >= maxLengthTextRun) + len = maxLengthTextRun-1; + int wclen; + if (et == UTF8) { + wclen = UCS2FromUTF8(s, len, + static_cast(static_cast(wctext)), maxLengthTextRun - 1); + } else { // dbcsMode, so convert using current locale + char sDraw[maxLengthTextRun]; + memcpy(sDraw, s, len); + sDraw[len] = '\0'; + wclen = gdk_mbstowcs( + wctext, sDraw, maxLengthTextRun - 1); + } + if (wclen > 0) { + measure8bit = false; + wctext[wclen] = L'\0'; + // Map widths back to utf-8 or DBCS input string + int i = 0; + for (int iU = 0; iU < wclen; iU++) { + int width = gdk_char_width_wc(gf, wctext[iU]); + totalWidth += width; + int lenChar; + if (et == UTF8) { + lenChar = UTF8Len(s[i]); + } else { + lenChar = mblen(s+i, MB_CUR_MAX); + if (lenChar < 0) + lenChar = 1; + } + while (lenChar--) { + positions[i++] = totalWidth; + } + } + while (i < len) { // In case of problems with lengths + positions[i++] = totalWidth; + } + } + } + if (measure8bit) { + // Either Latin1 or conversion failed so treat as Latin1. + for (int i = 0; i < len; i++) { + int width = gdk_char_width(gf, s[i]); + totalWidth += width; + positions[i] = totalWidth; + } + } + } else { + // No font so return an ascending range of values + for (int i = 0; i < len; i++) { + positions[i] = i + 1; + } + } +} + +int SurfaceImpl::WidthText(Font &font_, const char *s, int len) { + if (font_.GetID()) { +#ifdef USE_PANGO + if (PFont(font_)->pfd) { + char *utfForm = 0; + pango_layout_set_font_description(layout, PFont(font_)->pfd); + PangoRectangle pos; + bool useGFree = false; + if (et == UTF8) { + pango_layout_set_text(layout, s, len); + } else { + if (et == dbcs) { + // Convert to utf8 + utfForm = UTF8FromDBCS(s, len); + } + if (!utfForm) { // DBCS failed so treat as iconv + SetConverter(PFont(font_)->characterSet); + utfForm = UTF8FromIconv(conv, s, len); + } + if (!utfForm) { // g_locale_to_utf8 failed so treat as Latin1 + utfForm = UTF8FromLatin1(s, len); + } + pango_layout_set_text(layout, utfForm, len); + } + PangoLayoutLine *pangoLine = pango_layout_get_line(layout, 0); + pango_layout_line_get_extents(pangoLine, NULL, &pos); + if (useGFree) { + g_free(utfForm); + } else { + delete []utfForm; + } + return PANGO_PIXELS(pos.width); + } +#endif + if (et == UTF8) { + GdkWChar wctext[maxLengthTextRun]; + size_t wclen = UCS2FromUTF8(s, len, static_cast(static_cast(wctext)), + sizeof(wctext) / sizeof(GdkWChar) - 1); + wctext[wclen] = L'\0'; + return gdk_text_width_wc(PFont(font_)->pfont, wctext, wclen); + } else { + return gdk_text_width(PFont(font_)->pfont, s, len); + } + } else { + return 1; + } +} + +int SurfaceImpl::WidthChar(Font &font_, char ch) { + if (font_.GetID()) { +#ifdef USE_PANGO + if (PFont(font_)->pfd) { + return WidthText(font_, &ch, 1); + } +#endif + return gdk_char_width(PFont(font_)->pfont, ch); + } else { + return 1; + } +} + +// Three possible strategies for determining ascent and descent of font: +// 1) Call gdk_string_extents with string containing all letters, numbers and punctuation. +// 2) Use the ascent and descent fields of GdkFont. +// 3) Call gdk_string_extents with string as 1 but also including accented capitals. +// Smallest values given by 1 and largest by 3 with 2 in between. +// Techniques 1 and 2 sometimes chop off extreme portions of ascenders and +// descenders but are mostly OK except for accented characters like Å which are +// rarely used in code. + +// This string contains a good range of characters to test for size. +//const char largeSizeString[] = "ÂÃÅÄ `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890" +// "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; +#ifndef FAST_WAY +const char sizeString[] = "`~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890" + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; +#endif + +int SurfaceImpl::Ascent(Font &font_) { + if (!(font_.GetID())) + return 1; +#ifdef FAST_WAY + FontMutexLock(); + int ascent = PFont(font_)->ascent; +#ifdef USE_PANGO + if ((ascent == 0) && (PFont(font_)->pfd)) { + PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, + PFont(font_)->pfd, pango_context_get_language(pcontext)); + PFont(font_)->ascent = + PANGO_PIXELS(pango_font_metrics_get_ascent(metrics)); + pango_font_metrics_unref(metrics); + ascent = PFont(font_)->ascent; + } +#endif + if ((ascent == 0) && (PFont(font_)->pfont)) { + ascent = PFont(font_)->pfont->ascent; + } + if (ascent == 0) { + ascent = 1; + } + FontMutexUnlock(); + return ascent; +#else + + gint lbearing; + gint rbearing; + gint width; + gint ascent; + gint descent; + + gdk_string_extents(PFont(font_)->pfont, sizeString, + &lbearing, &rbearing, &width, &ascent, &descent); + return ascent; +#endif +} + +int SurfaceImpl::Descent(Font &font_) { + if (!(font_.GetID())) + return 1; +#ifdef FAST_WAY + +#ifdef USE_PANGO + if (PFont(font_)->pfd) { + PangoFontMetrics *metrics = pango_context_get_metrics(pcontext, + PFont(font_)->pfd, pango_context_get_language(pcontext)); + int descent = PANGO_PIXELS(pango_font_metrics_get_descent(metrics)); + pango_font_metrics_unref(metrics); + return descent; + } +#endif + return PFont(font_)->pfont->descent; +#else + + gint lbearing; + gint rbearing; + gint width; + gint ascent; + gint descent; + + gdk_string_extents(PFont(font_)->pfont, sizeString, + &lbearing, &rbearing, &width, &ascent, &descent); + return descent; +#endif +} + +int SurfaceImpl::InternalLeading(Font &) { + return 0; +} + +int SurfaceImpl::ExternalLeading(Font &) { + return 0; +} + +int SurfaceImpl::Height(Font &font_) { + return Ascent(font_) + Descent(font_); +} + +int SurfaceImpl::AverageCharWidth(Font &font_) { + return WidthChar(font_, 'n'); +} + +int SurfaceImpl::SetPalette(Palette *, bool) { + // Handled in palette allocation for GTK so this does nothing + return 0; +} + +void SurfaceImpl::SetClip(PRectangle rc) { + GdkRectangle area = {rc.left, rc.top, + rc.right - rc.left, rc.bottom - rc.top}; + gdk_gc_set_clip_rectangle(gc, &area); +} + +void SurfaceImpl::FlushCachedState() {} + +void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) { + if (unicodeMode_) + et = UTF8; +} + +void SurfaceImpl::SetDBCSMode(int codePage) { + if (codePage && (codePage != SC_CP_UTF8)) + et = dbcs; +} + +Surface *Surface::Allocate() { + return new SurfaceImpl; +} + +Window::~Window() {} + +void Window::Destroy() { + if (id) + gtk_widget_destroy(GTK_WIDGET(id)); + id = 0; +} + +bool Window::HasFocus() { + return GTK_WIDGET_HAS_FOCUS(id); +} + +PRectangle Window::GetPosition() { + // Before any size allocated pretend its 1000 wide so not scrolled + PRectangle rc(0, 0, 1000, 1000); + if (id) { + rc.left = PWidget(id)->allocation.x; + rc.top = PWidget(id)->allocation.y; + if (PWidget(id)->allocation.width > 20) { + rc.right = rc.left + PWidget(id)->allocation.width; + rc.bottom = rc.top + PWidget(id)->allocation.height; + } + } + return rc; +} + +void Window::SetPosition(PRectangle rc) { +#if 1 + //gtk_widget_set_uposition(id, rc.left, rc.top); + GtkAllocation alloc; + alloc.x = rc.left; + alloc.y = rc.top; + alloc.width = rc.Width(); + alloc.height = rc.Height(); + gtk_widget_size_allocate(PWidget(id), &alloc); +#else + + gtk_widget_set_uposition(id, rc.left, rc.top); + gtk_widget_set_usize(id, rc.right - rc.left, rc.bottom - rc.top); +#endif +} + +void Window::SetPositionRelative(PRectangle rc, Window relativeTo) { + int ox = 0; + int oy = 0; + gdk_window_get_origin(PWidget(relativeTo.id)->window, &ox, &oy); + ox += rc.left; + if (ox < 0) + ox = 0; + oy += rc.top; + if (oy < 0) + oy = 0; + + /* do some corrections to fit into screen */ + int sizex = rc.right - rc.left; + int sizey = rc.bottom - rc.top; + int screenWidth = gdk_screen_width(); + int screenHeight = gdk_screen_height(); + if (sizex > screenWidth) + ox = 0; /* the best we can do */ + else if (ox + sizex > screenWidth) + ox = screenWidth - sizex; + if (oy + sizey > screenHeight) + oy = screenHeight - sizey; + + gtk_widget_set_uposition(PWidget(id), ox, oy); +#if 0 + + GtkAllocation alloc; + alloc.x = rc.left + ox; + alloc.y = rc.top + oy; + alloc.width = rc.right - rc.left; + alloc.height = rc.bottom - rc.top; + gtk_widget_size_allocate(id, &alloc); +#endif + gtk_widget_set_usize(PWidget(id), sizex, sizey); +} + +PRectangle Window::GetClientPosition() { + // On GTK+, the client position is the window position + return GetPosition(); +} + +void Window::Show(bool show) { + if (show) + gtk_widget_show(PWidget(id)); +} + +void Window::InvalidateAll() { + if (id) { + gtk_widget_queue_draw(PWidget(id)); + } +} + +void Window::InvalidateRectangle(PRectangle rc) { + if (id) { + gtk_widget_queue_draw_area(PWidget(id), + rc.left, rc.top, + rc.right - rc.left, rc.bottom - rc.top); + } +} + +void Window::SetFont(Font &) { + // Can not be done generically but only needed for ListBox +} + +void Window::SetCursor(Cursor curs) { + // We don't set the cursor to same value numerous times under gtk because + // it stores the cursor in the window once it's set + if (curs == cursorLast) + return; + + cursorLast = curs; + GdkCursor *gdkCurs; + switch (curs) { + case cursorText: + gdkCurs = gdk_cursor_new(GDK_XTERM); + break; + case cursorArrow: + gdkCurs = gdk_cursor_new(GDK_LEFT_PTR); + break; + case cursorUp: + gdkCurs = gdk_cursor_new(GDK_CENTER_PTR); + break; + case cursorWait: + gdkCurs = gdk_cursor_new(GDK_WATCH); + break; + case cursorHand: + gdkCurs = gdk_cursor_new(GDK_HAND2); + break; + case cursorReverseArrow: + gdkCurs = gdk_cursor_new(GDK_RIGHT_PTR); + break; + default: + gdkCurs = gdk_cursor_new(GDK_LEFT_PTR); + cursorLast = cursorArrow; + break; + } + + if (PWidget(id)->window) + gdk_window_set_cursor(PWidget(id)->window, gdkCurs); + gdk_cursor_destroy(gdkCurs); +} + +void Window::SetTitle(const char *s) { + gtk_window_set_title(GTK_WINDOW(id), s); +} + +struct ListImage { + const char *xpm_data; +#if GTK_MAJOR_VERSION < 2 + GdkPixmap *pixmap; + GdkBitmap *bitmap; +#else + GdkPixbuf *pixbuf; +#endif +}; + +static void list_image_free(gpointer, gpointer value, gpointer) { + ListImage *list_image = (ListImage *) value; +#if GTK_MAJOR_VERSION < 2 + if (list_image->pixmap) + gdk_pixmap_unref(list_image->pixmap); + if (list_image->bitmap) + gdk_bitmap_unref(list_image->bitmap); +#else + if (list_image->pixbuf) + gdk_pixbuf_unref (list_image->pixbuf); +#endif + g_free(list_image); +} + +ListBox::ListBox() { +} + +ListBox::~ListBox() { +} + +#if GTK_MAJOR_VERSION >= 2 +enum { + PIXBUF_COLUMN, + TEXT_COLUMN, + N_COLUMNS +}; +#endif + +class ListBoxX : public ListBox { + WindowID list; + WindowID scroller; +#if GTK_MAJOR_VERSION < 2 + int current; +#endif + void *pixhash; + int lineHeight; + XPMSet xset; + bool unicodeMode; + int desiredVisibleRows; + unsigned int maxItemCharacters; + unsigned int aveCharWidth; +public: + CallBackAction doubleClickAction; + void *doubleClickActionData; + + ListBoxX() : list(0), pixhash(NULL), desiredVisibleRows(5), maxItemCharacters(0), + doubleClickAction(NULL), doubleClickActionData(NULL) { +#if GTK_MAJOR_VERSION < 2 + current = 0; +#endif + } + virtual ~ListBoxX() { + if (pixhash) { + g_hash_table_foreach((GHashTable *) pixhash, list_image_free, NULL); + g_hash_table_destroy((GHashTable *) pixhash); + } + } + virtual void SetFont(Font &font); + virtual void Create(Window &parent, int ctrlID, Point location_, int lineHeight_, bool unicodeMode_); + virtual void SetAverageCharWidth(int width); + virtual void SetVisibleRows(int rows); + virtual int GetVisibleRows() const; + virtual PRectangle GetDesiredRect(); + virtual int CaretFromEdge(); + virtual void Clear(); + virtual void Append(char *s, int type = -1); + virtual int Length(); + virtual void Select(int n); + virtual int GetSelection(); + virtual int Find(const char *prefix); + virtual void GetValue(int n, char *value, int len); + virtual void RegisterImage(int type, const char *xpm_data); + virtual void ClearRegisteredImages(); + virtual void SetDoubleClickAction(CallBackAction action, void *data) { + doubleClickAction = action; + doubleClickActionData = data; + } + virtual void SetList(const char* list, char separator, char typesep); +}; + +ListBox *ListBox::Allocate() { + ListBoxX *lb = new ListBoxX(); + return lb; +} + +#if GTK_MAJOR_VERSION < 2 +static void UnselectionAC(GtkWidget *, gint, gint, + GdkEventButton *, gpointer p) { + int *pi = reinterpret_cast(p); + *pi = -1; +} +static void SelectionAC(GtkWidget *, gint row, gint, + GdkEventButton *, gpointer p) { + int *pi = reinterpret_cast(p); + *pi = row; +} +#endif + +static gboolean ButtonPress(GtkWidget *, GdkEventButton* ev, gpointer p) { + ListBoxX* lb = reinterpret_cast(p); + if (ev->type == GDK_2BUTTON_PRESS && lb->doubleClickAction != NULL) { + lb->doubleClickAction(lb->doubleClickActionData); + return TRUE; + } + + return FALSE; +} + +#if GTK_MAJOR_VERSION >= 2 +/* Change the active color to the selected color so the listbox uses the color +scheme that it would use if it had the focus. */ +static void StyleSet(GtkWidget *w, GtkStyle*, void*) { + GtkStyle* style; + + g_return_if_fail(w != NULL); + + /* Copy the selected color to active. Note that the modify calls will cause + recursive calls to this function after the value is updated and w->style to + be set to a new object */ + style = gtk_widget_get_style(w); + if (style == NULL) + return; + if (!gdk_color_equal(&style->base[GTK_STATE_SELECTED], &style->base[GTK_STATE_ACTIVE])) + gtk_widget_modify_base(w, GTK_STATE_ACTIVE, &style->base[GTK_STATE_SELECTED]); + + style = gtk_widget_get_style(w); + if (style == NULL) + return; + if (!gdk_color_equal(&style->text[GTK_STATE_SELECTED], &style->text[GTK_STATE_ACTIVE])) + gtk_widget_modify_text(w, GTK_STATE_ACTIVE, &style->text[GTK_STATE_SELECTED]); +} +#endif + +void ListBoxX::Create(Window &, int, Point, int, bool) { + id = gtk_window_new(GTK_WINDOW_POPUP); + + GtkWidget *frame = gtk_frame_new(NULL); + gtk_widget_show(frame); + gtk_container_add(GTK_CONTAINER(GetID()), frame); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT); + gtk_container_set_border_width(GTK_CONTAINER(frame), 0); + + scroller = gtk_scrolled_window_new(NULL, NULL); + gtk_container_set_border_width(GTK_CONTAINER(scroller), 0); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_container_add(GTK_CONTAINER(frame), PWidget(scroller)); + gtk_widget_show(PWidget(scroller)); + +#if GTK_MAJOR_VERSION < 2 + list = gtk_clist_new(1); + GtkWidget *wid = PWidget(list); // No code inside the GTK_OBJECT macro + gtk_widget_show(wid); + gtk_container_add(GTK_CONTAINER(PWidget(scroller)), wid); + gtk_clist_set_column_auto_resize(GTK_CLIST(wid), 0, TRUE); + gtk_clist_set_selection_mode(GTK_CLIST(wid), GTK_SELECTION_BROWSE); + gtk_signal_connect(GTK_OBJECT(wid), "unselect_row", + GTK_SIGNAL_FUNC(UnselectionAC), ¤t); + gtk_signal_connect(GTK_OBJECT(wid), "select_row", + GTK_SIGNAL_FUNC(SelectionAC), ¤t); + gtk_signal_connect(GTK_OBJECT(wid), "button_press_event", + GTK_SIGNAL_FUNC(ButtonPress), this); + gtk_clist_set_shadow_type(GTK_CLIST(wid), GTK_SHADOW_NONE); +#else + /* Tree and its model */ + GtkListStore *store = + gtk_list_store_new(N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING); + + list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); + g_signal_connect(G_OBJECT(list), "style-set", G_CALLBACK(StyleSet), NULL); + + GtkTreeSelection *selection = + gtk_tree_view_get_selection(GTK_TREE_VIEW(list)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(list), FALSE); + gtk_tree_view_set_reorderable(GTK_TREE_VIEW(list), FALSE); + + /* Columns */ + GtkTreeViewColumn *column = gtk_tree_view_column_new(); + gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); + gtk_tree_view_column_set_title(column, "Autocomplete"); + + GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new(); + gtk_tree_view_column_pack_start(column, renderer, FALSE); + gtk_tree_view_column_add_attribute(column, renderer, + "pixbuf", PIXBUF_COLUMN); + + renderer = gtk_cell_renderer_text_new(); + gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer), 1); + gtk_tree_view_column_pack_start(column, renderer, TRUE); + gtk_tree_view_column_add_attribute(column, renderer, + "text", TEXT_COLUMN); + + gtk_tree_view_append_column(GTK_TREE_VIEW(list), column); + if (g_object_class_find_property(G_OBJECT_GET_CLASS(list), "fixed-height-mode")) + g_object_set(G_OBJECT(list), "fixed-height-mode", TRUE, NULL); + + GtkWidget *wid = PWidget(list); // No code inside the G_OBJECT macro + gtk_container_add(GTK_CONTAINER(PWidget(scroller)), wid); + gtk_widget_show(wid); + g_signal_connect(G_OBJECT(wid), "button_press_event", + G_CALLBACK(ButtonPress), this); +#endif + gtk_widget_realize(PWidget(id)); +} + +void ListBoxX::SetFont(Font &scint_font) { +#if GTK_MAJOR_VERSION < 2 + GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(PWidget(list))); + if (!gdk_font_equal(style->font, PFont(scint_font)->pfont)) { + style = gtk_style_copy(style); + gdk_font_unref(style->font); + style->font = PFont(scint_font)->pfont; + gdk_font_ref(style->font); + gtk_widget_set_style(GTK_WIDGET(PWidget(list)), style); + gtk_style_unref(style); + } +#else + // Only do for Pango font as there have been crashes for GDK fonts + if (Created() && PFont(scint_font)->pfd) { + // Current font is Pango font + gtk_widget_modify_font(PWidget(list), PFont(scint_font)->pfd); + } +#endif +} + +void ListBoxX::SetAverageCharWidth(int width) { + aveCharWidth = width; +} + +void ListBoxX::SetVisibleRows(int rows) { + desiredVisibleRows = rows; +} + +int ListBoxX::GetVisibleRows() const { + return desiredVisibleRows; +} + +PRectangle ListBoxX::GetDesiredRect() { + // Before any size allocated pretend its 100 wide so not scrolled + PRectangle rc(0, 0, 100, 100); + if (id) { + int rows = Length(); + if ((rows == 0) || (rows > desiredVisibleRows)) + rows = desiredVisibleRows; + + GtkRequisition req; + int height; + + // First calculate height of the clist for our desired visible + // row count otherwise it tries to expand to the total # of rows +#if GTK_MAJOR_VERSION < 2 + int ythickness = PWidget(list)->style->klass->ythickness; + height = (rows * GTK_CLIST(list)->row_height + + rows + 1 + + 2 * (ythickness + + GTK_CONTAINER(PWidget(list))->border_width)); +#else + // Get cell height + int row_width=0; + int row_height=0; + GtkTreeViewColumn * column = + gtk_tree_view_get_column(GTK_TREE_VIEW(list), 0); + gtk_tree_view_column_cell_get_size(column, NULL, + NULL, NULL, &row_width, &row_height); + int ythickness = PWidget(list)->style->ythickness; + height = (rows * row_height + + 2 * (ythickness + + GTK_CONTAINER(PWidget(list))->border_width + 1)); +#endif + gtk_widget_set_usize(GTK_WIDGET(PWidget(list)), -1, height); + + // Get the size of the scroller because we set usize on the window + gtk_widget_size_request(GTK_WIDGET(scroller), &req); + rc.right = req.width; + rc.bottom = req.height; + + gtk_widget_set_usize(GTK_WIDGET(list), -1, -1); + int width = maxItemCharacters; + if (width < 12) + width = 12; + rc.right = width * (aveCharWidth + aveCharWidth / 3); + if (Length() > rows) + rc.right = rc.right + 16; + } + return rc; +} + +int ListBoxX::CaretFromEdge() { + return 4 + xset.GetWidth(); +} + +void ListBoxX::Clear() { +#if GTK_MAJOR_VERSION < 2 + gtk_clist_clear(GTK_CLIST(list)); +#else + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); + gtk_list_store_clear(GTK_LIST_STORE(model)); +#endif + maxItemCharacters = 0; +} + +#if GTK_MAJOR_VERSION < 2 +static void init_pixmap(ListImage *list_image, GtkWidget *window) { +#else +static void init_pixmap(ListImage *list_image) { +#endif + const char *textForm = list_image->xpm_data; + const char * const * xpm_lineform = reinterpret_cast(textForm); + const char **xpm_lineformfromtext = 0; + // The XPM data can be either in atext form as will be read from a file + // or in a line form (array of char *) as will be used for images defined in code. + // Test for text form and convert to line form + if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) { + // Test done is two parts to avoid possibility of overstepping the memory + // if memcmp implemented strangely. Must be 4 bytes at least at destination. + xpm_lineformfromtext = XPM::LinesFormFromTextForm(textForm); + xpm_lineform = xpm_lineformfromtext; + } + + // Drop any existing pixmap/bitmap as data may have changed +#if GTK_MAJOR_VERSION < 2 + if (list_image->pixmap) + gdk_pixmap_unref(list_image->pixmap); + list_image->pixmap = NULL; + if (list_image->bitmap) + gdk_bitmap_unref(list_image->bitmap); + list_image->bitmap = NULL; + + list_image->pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL + , gtk_widget_get_colormap(window), &(list_image->bitmap), NULL + , (gchar **) xpm_lineform); + if (NULL == list_image->pixmap) { + if (list_image->bitmap) + gdk_bitmap_unref(list_image->bitmap); + list_image->bitmap = NULL; + } +#else + if (list_image->pixbuf) + gdk_pixbuf_unref(list_image->pixbuf); + list_image->pixbuf = + gdk_pixbuf_new_from_xpm_data((const gchar**)xpm_lineform); +#endif + delete []xpm_lineformfromtext; +} + +#define SPACING 5 + +void ListBoxX::Append(char *s, int type) { + ListImage *list_image = NULL; + if ((type >= 0) && pixhash) { + list_image = (ListImage *) g_hash_table_lookup((GHashTable *) pixhash + , (gconstpointer) GINT_TO_POINTER(type)); + } +#if GTK_MAJOR_VERSION < 2 + char * szs[] = { s, NULL }; + int rownum = gtk_clist_append(GTK_CLIST(list), szs); + if (list_image) { + if (NULL == list_image->pixmap) + init_pixmap(list_image, (GtkWidget *) list); + gtk_clist_set_pixtext(GTK_CLIST(list), rownum, 0, s, SPACING + , list_image->pixmap, list_image->bitmap); + } +#else + GtkTreeIter iter; + GtkListStore *store = + GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(list))); + gtk_list_store_append(GTK_LIST_STORE(store), &iter); + if (list_image) { + if (NULL == list_image->pixbuf) + init_pixmap(list_image); + if (list_image->pixbuf) { + gtk_list_store_set(GTK_LIST_STORE(store), &iter, + PIXBUF_COLUMN, list_image->pixbuf, + TEXT_COLUMN, s, -1); + } else { + gtk_list_store_set(GTK_LIST_STORE(store), &iter, + TEXT_COLUMN, s, -1); + } + } else { + gtk_list_store_set(GTK_LIST_STORE(store), &iter, + TEXT_COLUMN, s, -1); + } +#endif + size_t len = strlen(s); + if (maxItemCharacters < len) + maxItemCharacters = len; +} + +int ListBoxX::Length() { + if (id) +#if GTK_MAJOR_VERSION < 2 + return GTK_CLIST(list)->rows; +#else + return gtk_tree_model_iter_n_children(gtk_tree_view_get_model + (GTK_TREE_VIEW(list)), NULL); +#endif + return 0; +} + +void ListBoxX::Select(int n) { +#if GTK_MAJOR_VERSION < 2 + if (n == -1) { + gtk_clist_unselect_row(GTK_CLIST(list), current, 0); + } else { + gtk_clist_select_row(GTK_CLIST(list), n, 0); + gtk_clist_moveto(GTK_CLIST(list), n, 0, 0.5, 0.5); + } +#else + GtkTreeIter iter; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); + GtkTreeSelection *selection = + gtk_tree_view_get_selection(GTK_TREE_VIEW(list)); + + if (n < 0) { + gtk_tree_selection_unselect_all(selection); + return; + } + + bool valid = gtk_tree_model_iter_nth_child(model, &iter, NULL, n) != FALSE; + if (valid) { + gtk_tree_selection_select_iter(selection, &iter); + + // Move the scrollbar to show the selection. + int total = Length(); + GtkAdjustment *adj = + gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(list)); + gfloat value = ((gfloat)n / total) * (adj->upper - adj->lower) + + adj->lower - adj->page_size / 2; + + // Get cell height + int row_width; + int row_height; + GtkTreeViewColumn * column = + gtk_tree_view_get_column(GTK_TREE_VIEW(list), 0); + gtk_tree_view_column_cell_get_size(column, NULL, NULL, + NULL, &row_width, &row_height); + + int rows = Length(); + if ((rows == 0) || (rows > desiredVisibleRows)) + rows = desiredVisibleRows; + if (rows & 0x1) { + // Odd rows to display -- We are now in the middle. + // Align it so that we don't chop off rows. + value += (gfloat)row_height / 2.0; + } + // Clamp it. + value = (value < 0)? 0 : value; + value = (value > (adj->upper - adj->page_size))? + (adj->upper - adj->page_size) : value; + + // Set it. + gtk_adjustment_set_value(adj, value); + } else { + gtk_tree_selection_unselect_all(selection); + } +#endif +} + +int ListBoxX::GetSelection() { +#if GTK_MAJOR_VERSION < 2 + return current; +#else + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreeSelection *selection; + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list)); + if (gtk_tree_selection_get_selected(selection, &model, &iter)) { + GtkTreePath *path = gtk_tree_model_get_path(model, &iter); + int *indices = gtk_tree_path_get_indices(path); + // Don't free indices. + if (indices) + return indices[0]; + } + return -1; +#endif +} + +int ListBoxX::Find(const char *prefix) { +#if GTK_MAJOR_VERSION < 2 + int count = Length(); + for (int i = 0; i < count; i++) { + char *s = 0; + gtk_clist_get_text(GTK_CLIST(list), i, 0, &s); + if (s && (0 == strncmp(prefix, s, strlen(prefix)))) { + return i; + } + } +#else + GtkTreeIter iter; + GtkTreeModel *model = + gtk_tree_view_get_model(GTK_TREE_VIEW(list)); + bool valid = gtk_tree_model_get_iter_first(model, &iter) != FALSE; + int i = 0; + while(valid) { + gchar *s; + gtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1); + if (s && (0 == strncmp(prefix, s, strlen(prefix)))) { + return i; + } + valid = gtk_tree_model_iter_next(model, &iter) != FALSE; + i++; + } +#endif + return -1; +} + +void ListBoxX::GetValue(int n, char *value, int len) { + char *text = NULL; +#if GTK_MAJOR_VERSION < 2 + GtkCellType type = gtk_clist_get_cell_type(GTK_CLIST(list), n, 0); + switch (type) { + case GTK_CELL_TEXT: + gtk_clist_get_text(GTK_CLIST(list), n, 0, &text); + break; + case GTK_CELL_PIXTEXT: + gtk_clist_get_pixtext(GTK_CLIST(list), n, 0, &text, NULL, NULL, NULL); + break; + default: + break; + } +#else + GtkTreeIter iter; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); + bool valid = gtk_tree_model_iter_nth_child(model, &iter, NULL, n) != FALSE; + if (valid) { + gtk_tree_model_get(model, &iter, TEXT_COLUMN, &text, -1); + } +#endif + if (text && len > 0) { + strncpy(value, text, len); + value[len - 1] = '\0'; + } else { + value[0] = '\0'; + } +} + +// g_return_if_fail causes unnecessary compiler warning in release compile. +#ifdef _MSC_VER +#pragma warning(disable: 4127) +#endif + +void ListBoxX::RegisterImage(int type, const char *xpm_data) { + g_return_if_fail(xpm_data); + + // Saved and use the saved copy so caller's copy can disappear. + xset.Add(type, xpm_data); + XPM *pxpm = xset.Get(type); + xpm_data = reinterpret_cast(pxpm->InLinesForm()); + + if (!pixhash) { + pixhash = g_hash_table_new(g_direct_hash, g_direct_equal); + } + ListImage *list_image = (ListImage *) g_hash_table_lookup((GHashTable *) pixhash, + (gconstpointer) GINT_TO_POINTER(type)); + if (list_image) { + // Drop icon already registered +#if GTK_MAJOR_VERSION < 2 + if (list_image->pixmap) + gdk_pixmap_unref(list_image->pixmap); + list_image->pixmap = 0; + if (list_image->bitmap) + gdk_bitmap_unref(list_image->bitmap); + list_image->bitmap = 0; +#else + if (list_image->pixbuf) + gdk_pixbuf_unref(list_image->pixbuf); + list_image->pixbuf = NULL; +#endif + list_image->xpm_data = xpm_data; + } else { + list_image = g_new0(ListImage, 1); + list_image->xpm_data = xpm_data; + g_hash_table_insert((GHashTable *) pixhash, GINT_TO_POINTER(type), + (gpointer) list_image); + } +} + +void ListBoxX::ClearRegisteredImages() { + xset.Clear(); +} + +void ListBoxX::SetList(const char* list, char separator, char typesep) { + Clear(); + int count = strlen(list) + 1; + char *words = new char[count]; + if (words) { + memcpy(words, list, count); + char *startword = words; + char *numword = NULL; + int i = 0; + for (; words[i]; i++) { + if (words[i] == separator) { + words[i] = '\0'; + if (numword) + *numword = '\0'; + Append(startword, numword?atoi(numword + 1):-1); + startword = words + i + 1; + numword = NULL; + } else if (words[i] == typesep) { + numword = words + i; + } + } + if (startword) { + if (numword) + *numword = '\0'; + Append(startword, numword?atoi(numword + 1):-1); + } + delete []words; + } +} + +Menu::Menu() : id(0) {} + +void Menu::CreatePopUp() { + Destroy(); + id = gtk_item_factory_new(GTK_TYPE_MENU, "
    ", NULL); +} + +void Menu::Destroy() { + if (id) +#if GTK_MAJOR_VERSION < 2 + gtk_object_unref(GTK_OBJECT(id)); +#else + g_object_unref(G_OBJECT(id)); +#endif + id = 0; +} + +void Menu::Show(Point pt, Window &) { + int screenHeight = gdk_screen_height(); + int screenWidth = gdk_screen_width(); + GtkItemFactory *factory = reinterpret_cast(id); + GtkWidget *widget = gtk_item_factory_get_widget(factory, "
    "); + gtk_widget_show_all(widget); + GtkRequisition requisition; + gtk_widget_size_request(widget, &requisition); + if ((pt.x + requisition.width) > screenWidth) { + pt.x = screenWidth - requisition.width; + } + if ((pt.y + requisition.height) > screenHeight) { + pt.y = screenHeight - requisition.height; + } +#if GTK_MAJOR_VERSION >= 2 + gtk_item_factory_popup(factory, pt.x - 4, pt.y - 4, 3, + gtk_get_current_event_time()); +#else + gtk_item_factory_popup(factory, pt.x - 4, pt.y - 4, 3, 0); +#endif +} + +ElapsedTime::ElapsedTime() { + GTimeVal curTime; + g_get_current_time(&curTime); + bigBit = curTime.tv_sec; + littleBit = curTime.tv_usec; +} + +class DynamicLibraryImpl : public DynamicLibrary { +protected: + GModule* m; +public: + DynamicLibraryImpl(const char *modulePath) { + m = g_module_open(modulePath, G_MODULE_BIND_LAZY); + } + + virtual ~DynamicLibraryImpl() { + if (m != NULL) + g_module_close(m); + } + + // Use g_module_symbol to get a pointer to the relevant function. + virtual Function FindFunction(const char *name) { + if (m != NULL) { + gpointer fn_address = NULL; + gboolean status = g_module_symbol(m, name, &fn_address); + if (status) + return static_cast(fn_address); + else + return NULL; + } else + return NULL; + } + + virtual bool IsValid() { + return m != NULL; + } +}; + +DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { + return static_cast( new DynamicLibraryImpl(modulePath) ); +} + +double ElapsedTime::Duration(bool reset) { + GTimeVal curTime; + g_get_current_time(&curTime); + long endBigBit = curTime.tv_sec; + long endLittleBit = curTime.tv_usec; + double result = 1000000.0 * (endBigBit - bigBit); + result += endLittleBit - littleBit; + result /= 1000000.0; + if (reset) { + bigBit = endBigBit; + littleBit = endLittleBit; + } + return result; +} + +ColourDesired Platform::Chrome() { + return ColourDesired(0xe0, 0xe0, 0xe0); +} + +ColourDesired Platform::ChromeHighlight() { + return ColourDesired(0xff, 0xff, 0xff); +} + +const char *Platform::DefaultFont() { +#ifdef G_OS_WIN32 + return "Lucida Console"; +#else +#ifdef USE_PANGO + return "!Sans"; +#else + return "lucidatypewriter"; +#endif +#endif +} + +int Platform::DefaultFontSize() { +#ifdef G_OS_WIN32 + return 10; +#else + return 12; +#endif +} + +unsigned int Platform::DoubleClickTime() { + return 500; // Half a second +} + +bool Platform::MouseButtonBounce() { + return true; +} + +void Platform::DebugDisplay(const char *s) { + printf("%s", s); +} + +bool Platform::IsKeyDown(int) { + // TODO: discover state of keys in GTK+/X + return false; +} + +long Platform::SendScintilla( + WindowID w, unsigned int msg, unsigned long wParam, long lParam) { + return scintilla_send_message(SCINTILLA(w), msg, wParam, lParam); +} + +long Platform::SendScintillaPointer( + WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { + return scintilla_send_message(SCINTILLA(w), msg, wParam, + reinterpret_cast(lParam)); +} + +bool Platform::IsDBCSLeadByte(int /* codePage */, char /* ch */) { + return false; +} + +int Platform::DBCSCharLength(int, const char *s) { + int bytes = mblen(s, MB_CUR_MAX); + if (bytes >= 1) + return bytes; + else + return 1; +} + +int Platform::DBCSCharMaxLength() { + return MB_CUR_MAX; + //return 2; +} + +// These are utility functions not really tied to a platform + +int Platform::Minimum(int a, int b) { + if (a < b) + return a; + else + return b; +} + +int Platform::Maximum(int a, int b) { + if (a > b) + return a; + else + return b; +} + +//#define TRACE + +#ifdef TRACE +void Platform::DebugPrintf(const char *format, ...) { + char buffer[2000]; + va_list pArguments; + va_start(pArguments, format); + vsprintf(buffer, format, pArguments); + va_end(pArguments); + Platform::DebugDisplay(buffer); +} +#else +void Platform::DebugPrintf(const char *, ...) {} + +#endif + +// Not supported for GTK+ +static bool assertionPopUps = true; + +bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { + bool ret = assertionPopUps; + assertionPopUps = assertionPopUps_; + return ret; +} + +void Platform::Assert(const char *c, const char *file, int line) { + char buffer[2000]; + sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); + strcat(buffer, "\r\n"); + Platform::DebugDisplay(buffer); + abort(); +} + +int Platform::Clamp(int val, int minVal, int maxVal) { + if (val > maxVal) + val = maxVal; + if (val < minVal) + val = minVal; + return val; +} + +void Platform_Initialise() { + FontMutexAllocate(); +} + +void Platform_Finalise() { + FontMutexFree(); +} diff --git a/scintilla/gtk/ScintillaGTK.cxx b/scintilla/gtk/ScintillaGTK.cxx new file mode 100644 index 00000000..b330a19b --- /dev/null +++ b/scintilla/gtk/ScintillaGTK.cxx @@ -0,0 +1,2671 @@ +// Scintilla source code edit control +// ScintillaGTK.cxx - GTK+ specific subclass of ScintillaBase +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include +#include + +#include "Platform.h" + +#if PLAT_GTK_WIN32 +#include "Windows.h" +#endif + +#include "Scintilla.h" +#include "ScintillaWidget.h" +#ifdef SCI_LEXER +#include "SciLexer.h" +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#endif +#include "ContractionState.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" +#include "CallTip.h" +#include "KeyMap.h" +#include "Indicator.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Style.h" +#include "AutoComplete.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Document.h" +#include "Editor.h" +#include "SString.h" +#include "ScintillaBase.h" +#include "UniConversion.h" + +#include "gtk/gtksignal.h" +#include "gtk/gtkmarshal.h" +#if GLIB_MAJOR_VERSION >= 2 +#include "scintilla-marshal.h" +#endif + +#ifdef SCI_LEXER +#include +#include +#include "ExternalLexer.h" +#endif + +#define INTERNATIONAL_INPUT + +#if !PLAT_GTK_WIN32 || GTK_MAJOR_VERSION >= 2 +#define USE_CONVERTER +#endif + +#ifdef USE_CONVERTER +#include "Converter.h" +#endif + +#ifdef _MSC_VER +// Constant conditional expressions are because of GTK+ headers +#pragma warning(disable: 4127) +// Ignore unreferenced local functions in GTK+ headers +#pragma warning(disable: 4505) +#endif + +#if GTK_CHECK_VERSION(2,2,0) +#define USE_GTK_CLIPBOARD +#endif + +#if GLIB_MAJOR_VERSION < 2 +#define OBJECT_CLASS GtkObjectClass +#else +#define OBJECT_CLASS GObjectClass +#endif + +extern char *UTF8FromLatin1(const char *s, int &len); + +class ScintillaGTK : public ScintillaBase { + _ScintillaObject *sci; + Window wText; + Window scrollbarv; + Window scrollbarh; + GtkObject *adjustmentv; + GtkObject *adjustmenth; + int scrollBarWidth; + int scrollBarHeight; + + // Because clipboard access is asynchronous, copyText is created by Copy +#ifndef USE_GTK_CLIPBOARD + SelectionText copyText; +#endif + + SelectionText primary; + + GdkEventButton evbtn; + bool capturedMouse; + bool dragWasDropped; + int lastKey; + + GtkWidgetClass *parentClass; + + static GdkAtom atomClipboard; + static GdkAtom atomUTF8; + static GdkAtom atomString; + static GdkAtom atomUriList; + static GdkAtom atomDROPFILES_DND; + GdkAtom atomSought; + +#if PLAT_GTK_WIN32 + CLIPFORMAT cfColumnSelect; +#endif + +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 + // Input context used for supporting internationalized key entry + GdkIC *ic; + GdkICAttr *ic_attr; +#else + Window wPreedit; + Window wPreeditDraw; + GtkIMContext *im_context; +#endif +#endif + + // Wheel mouse support + unsigned int linesPerScroll; + GTimeVal lastWheelMouseTime; + gint lastWheelMouseDirection; + gint wheelMouseIntensity; + + GdkRegion *rgnUpdate; + + // Private so ScintillaGTK objects can not be copied + ScintillaGTK(const ScintillaGTK &) : ScintillaBase() {} + ScintillaGTK &operator=(const ScintillaGTK &) { return * this; } + +public: + ScintillaGTK(_ScintillaObject *sci_); + virtual ~ScintillaGTK(); + static void ClassInit(OBJECT_CLASS* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class); +private: + virtual void Initialise(); + virtual void Finalise(); + virtual void DisplayCursor(Window::Cursor c); + virtual void StartDrag(); + int TargetAsUTF8(char *text); + int EncodedFromUTF8(char *utf8, char *encoded); + virtual bool ValidCodePage(int codePage) const; +public: // Public for scintilla_send_message + virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); +private: + virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); + virtual void SetTicking(bool on); + virtual bool SetIdle(bool on); + virtual void SetMouseCapture(bool on); + virtual bool HaveMouseCapture(); + virtual bool PaintContains(PRectangle rc); + void FullPaint(); + virtual PRectangle GetClientRectangle(); + void SyncPaint(PRectangle rc); + virtual void ScrollText(int linesToMove); + virtual void SetVerticalScrollPos(); + virtual void SetHorizontalScrollPos(); + virtual bool ModifyScrollBars(int nMax, int nPage); + void ReconfigureScrollBars(); + virtual void NotifyChange(); + virtual void NotifyFocus(bool focus); + virtual void NotifyParent(SCNotification scn); + void NotifyKey(int key, int modifiers); + void NotifyURIDropped(const char *list); + const char *CharacterSetID() const; + virtual int KeyDefault(int key, int modifiers); + virtual void CopyToClipboard(const SelectionText &selectedText); + virtual void Copy(); + virtual void Paste(); + virtual void CreateCallTipWindow(PRectangle rc); + virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); + bool OwnPrimarySelection(); + virtual void ClaimSelection(); + void GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText); + void ReceivedSelection(GtkSelectionData *selection_data); + void ReceivedDrop(GtkSelectionData *selection_data); + static void GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *selected); +#ifdef USE_GTK_CLIPBOARD + static void ClipboardGetSelection(GtkClipboard* clip, GtkSelectionData *selection_data, guint info, void *data); + static void ClipboardClearSelection(GtkClipboard* clip, void *data); +#endif + + void UnclaimSelection(GdkEventSelection *selection_event); + void Resize(int width, int height); + + // Callback functions + void RealizeThis(GtkWidget *widget); + static void Realize(GtkWidget *widget); + void UnRealizeThis(GtkWidget *widget); + static void UnRealize(GtkWidget *widget); + void MapThis(); + static void Map(GtkWidget *widget); + void UnMapThis(); + static void UnMap(GtkWidget *widget); + static gint CursorMoved(GtkWidget *widget, int xoffset, int yoffset, ScintillaGTK *sciThis); + static gint FocusIn(GtkWidget *widget, GdkEventFocus *event); + static gint FocusOut(GtkWidget *widget, GdkEventFocus *event); + static void SizeRequest(GtkWidget *widget, GtkRequisition *requisition); + static void SizeAllocate(GtkWidget *widget, GtkAllocation *allocation); + gint Expose(GtkWidget *widget, GdkEventExpose *ose); + static gint ExposeMain(GtkWidget *widget, GdkEventExpose *ose); + static void Draw(GtkWidget *widget, GdkRectangle *area); + void ForAll(GtkCallback callback, gpointer callback_data); + static void MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data); + + static void ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis); + static void ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis); + gint PressThis(GdkEventButton *event); + static gint Press(GtkWidget *widget, GdkEventButton *event); + static gint MouseRelease(GtkWidget *widget, GdkEventButton *event); +#if PLAT_GTK_WIN32 || (GTK_MAJOR_VERSION >= 2) + static gint ScrollEvent(GtkWidget *widget, GdkEventScroll *event); +#endif + static gint Motion(GtkWidget *widget, GdkEventMotion *event); + gboolean KeyThis(GdkEventKey *event); + static gboolean KeyPress(GtkWidget *widget, GdkEventKey *event); + static gboolean KeyRelease(GtkWidget *widget, GdkEventKey *event); +#if GTK_MAJOR_VERSION >= 2 + static gboolean ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis); + gboolean ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose); + static void Commit(GtkIMContext *context, char *str, ScintillaGTK *sciThis); + void CommitThis(char *str); + static void PreeditChanged(GtkIMContext *context, ScintillaGTK *sciThis); + void PreeditChangedThis(); +#endif + static gint StyleSetText(GtkWidget *widget, GtkStyle *previous, void*); + static gint RealizeText(GtkWidget *widget, void*); +#if GLIB_MAJOR_VERSION < 2 + static void Destroy(GtkObject *object); +#else + static void Destroy(GObject *object); +#endif + static void SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data, + guint time); + static void SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data, + guint info, guint time); + static gint SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event); +#if GTK_MAJOR_VERSION < 2 + static gint SelectionNotify(GtkWidget *widget, GdkEventSelection *selection_event); +#endif + static void DragBegin(GtkWidget *widget, GdkDragContext *context); + static gboolean DragMotion(GtkWidget *widget, GdkDragContext *context, + gint x, gint y, guint time); + static void DragLeave(GtkWidget *widget, GdkDragContext *context, + guint time); + static void DragEnd(GtkWidget *widget, GdkDragContext *context); + static gboolean Drop(GtkWidget *widget, GdkDragContext *context, + gint x, gint y, guint time); + static void DragDataReceived(GtkWidget *widget, GdkDragContext *context, + gint x, gint y, GtkSelectionData *selection_data, guint info, guint time); + static void DragDataGet(GtkWidget *widget, GdkDragContext *context, + GtkSelectionData *selection_data, guint info, guint time); + static gint TimeOut(ScintillaGTK *sciThis); + static gint IdleCallback(ScintillaGTK *sciThis); + static void PopUpCB(ScintillaGTK *sciThis, guint action, GtkWidget *widget); + + gint ExposeTextThis(GtkWidget *widget, GdkEventExpose *ose); + static gint ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis); + + static gint ExposeCT(GtkWidget *widget, GdkEventExpose *ose, CallTip *ct); + static gint PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis); + + static sptr_t DirectFunction(ScintillaGTK *sciThis, + unsigned int iMessage, uptr_t wParam, sptr_t lParam); +}; + +enum { + COMMAND_SIGNAL, + NOTIFY_SIGNAL, + LAST_SIGNAL +}; + +static gint scintilla_signals[LAST_SIGNAL] = { 0 }; +#if GLIB_MAJOR_VERSION < 2 +static GtkWidgetClass *parent_class = NULL; +#endif + +enum { + TARGET_STRING, + TARGET_TEXT, + TARGET_COMPOUND_TEXT, + TARGET_UTF8_STRING, + TARGET_URI +}; + +GdkAtom ScintillaGTK::atomClipboard = 0; +GdkAtom ScintillaGTK::atomUTF8 = 0; +GdkAtom ScintillaGTK::atomString = 0; +GdkAtom ScintillaGTK::atomUriList = 0; +GdkAtom ScintillaGTK::atomDROPFILES_DND = 0; + +static const GtkTargetEntry clipboardTargets[] = { + { "text/uri-list", 0, TARGET_URI }, + { "UTF8_STRING", 0, TARGET_UTF8_STRING }, + { "STRING", 0, TARGET_STRING }, +}; +static const gint nClipboardTargets = sizeof(clipboardTargets) / sizeof(clipboardTargets[0]); + +static GtkWidget *PWidget(Window &w) { + return reinterpret_cast(w.GetID()); +} + +static ScintillaGTK *ScintillaFromWidget(GtkWidget *widget) { + ScintillaObject *scio = reinterpret_cast(widget); + return reinterpret_cast(scio->pscin); +} + +ScintillaGTK::ScintillaGTK(_ScintillaObject *sci_) : + adjustmentv(0), adjustmenth(0), + scrollBarWidth(30), scrollBarHeight(30), + capturedMouse(false), dragWasDropped(false), + lastKey(0), parentClass(0), +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 + ic(NULL), + ic_attr(NULL), +#else + im_context(NULL), +#endif +#endif + lastWheelMouseDirection(0), + wheelMouseIntensity(0), + rgnUpdate(0) { + sci = sci_; + wMain = GTK_WIDGET(sci); + +#if PLAT_GTK_WIN32 + // There does not seem to be a real standard for indicating that the clipboard + // contains a rectangular selection, so copy Developer Studio. + cfColumnSelect = static_cast( + ::RegisterClipboardFormat("MSDEVColumnSelect")); + + // Get intellimouse parameters when running on win32; otherwise use + // reasonable default +#ifndef SPI_GETWHEELSCROLLLINES +#define SPI_GETWHEELSCROLLLINES 104 +#endif + ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &linesPerScroll, 0); +#else + linesPerScroll = 4; +#endif + lastWheelMouseTime.tv_sec = 0; + lastWheelMouseTime.tv_usec = 0; + + Initialise(); +} + +ScintillaGTK::~ScintillaGTK() { +} + +void ScintillaGTK::RealizeThis(GtkWidget *widget) { + //Platform::DebugPrintf("ScintillaGTK::realize this\n"); + GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); + GdkWindowAttr attrs; + attrs.window_type = GDK_WINDOW_CHILD; + attrs.x = widget->allocation.x; + attrs.y = widget->allocation.y; + attrs.width = widget->allocation.width; + attrs.height = widget->allocation.height; + attrs.wclass = GDK_INPUT_OUTPUT; + attrs.visual = gtk_widget_get_visual(widget); + attrs.colormap = gtk_widget_get_colormap(widget); + attrs.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK; + GdkCursor *cursor = gdk_cursor_new(GDK_XTERM); + attrs.cursor = cursor; + widget->window = gdk_window_new(gtk_widget_get_parent_window(widget), &attrs, + GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_CURSOR); + gdk_window_set_user_data(widget->window, widget); + gdk_window_set_background(widget->window, &widget->style->bg[GTK_STATE_NORMAL]); + gdk_window_show(widget->window); + gdk_cursor_destroy(cursor); + widget->style = gtk_style_attach(widget->style, widget->window); +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 + if (gdk_im_ready() && (ic_attr = gdk_ic_attr_new()) != NULL) { + gint width, height; + GdkColormap *colormap; + GdkEventMask mask; + GdkICAttr *attr = ic_attr; + GdkICAttributesType attrmask = GDK_IC_ALL_REQ; + GdkIMStyle style; + GdkIMStyle supported_style = (GdkIMStyle) (GDK_IM_PREEDIT_NONE | + GDK_IM_PREEDIT_NOTHING | + GDK_IM_PREEDIT_POSITION | + GDK_IM_STATUS_NONE | + GDK_IM_STATUS_NOTHING); + + if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) + supported_style = (GdkIMStyle) ((int) supported_style & ~GDK_IM_PREEDIT_POSITION); + + attr->style = style = gdk_im_decide_style(supported_style); + attr->client_window = widget->window; + + if ((colormap = gtk_widget_get_colormap (widget)) != gtk_widget_get_default_colormap ()) { + attrmask = (GdkICAttributesType) ((int) attrmask | GDK_IC_PREEDIT_COLORMAP); + attr->preedit_colormap = colormap; + } + + switch (style & GDK_IM_PREEDIT_MASK) { + case GDK_IM_PREEDIT_POSITION: + if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) { + g_warning("over-the-spot style requires fontset"); + break; + } + + attrmask = (GdkICAttributesType) ((int) attrmask | GDK_IC_PREEDIT_POSITION_REQ); + gdk_window_get_size(widget->window, &width, &height); + attr->spot_location.x = 0; + attr->spot_location.y = height; + attr->preedit_area.x = 0; + attr->preedit_area.y = 0; + attr->preedit_area.width = width; + attr->preedit_area.height = height; + attr->preedit_fontset = widget->style->font; + + break; + } + ic = gdk_ic_new(attr, attrmask); + + if (ic == NULL) { + g_warning("Can't create input context."); + } else { + mask = gdk_window_get_events(widget->window); + mask = (GdkEventMask) ((int) mask | gdk_ic_get_events(ic)); + gdk_window_set_events(widget->window, mask); + + if (GTK_WIDGET_HAS_FOCUS(widget)) + gdk_im_begin(ic, widget->window); + } + } +#else + wPreedit = gtk_window_new(GTK_WINDOW_POPUP); + wPreeditDraw = gtk_drawing_area_new(); + GtkWidget *predrw = PWidget(wPreeditDraw); // No code inside the G_OBJECT macro + g_signal_connect(G_OBJECT(predrw), "expose_event", + G_CALLBACK(ExposePreedit), this); + gtk_container_add(GTK_CONTAINER(PWidget(wPreedit)), predrw); + gtk_widget_realize(PWidget(wPreedit)); + gtk_widget_realize(predrw); + gtk_widget_show(predrw); + + im_context = gtk_im_multicontext_new(); + g_signal_connect(G_OBJECT(im_context), "commit", + G_CALLBACK(Commit), this); + g_signal_connect(G_OBJECT(im_context), "preedit_changed", + G_CALLBACK(PreeditChanged), this); + gtk_im_context_set_client_window(im_context, widget->window); +#endif +#endif + GtkWidget *widtxt = PWidget(wText); // // No code inside the G_OBJECT macro +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_connect_after(GTK_OBJECT(widtxt), "style_set", + GtkSignalFunc(ScintillaGTK::StyleSetText), NULL); + gtk_signal_connect_after(GTK_OBJECT(widtxt), "realize", + GtkSignalFunc(ScintillaGTK::RealizeText), NULL); +#else + g_signal_connect_after(G_OBJECT(widtxt), "style_set", + G_CALLBACK(ScintillaGTK::StyleSetText), NULL); + g_signal_connect_after(G_OBJECT(widtxt), "realize", + G_CALLBACK(ScintillaGTK::RealizeText), NULL); +#endif + gtk_widget_realize(widtxt); + gtk_widget_realize(PWidget(scrollbarv)); + gtk_widget_realize(PWidget(scrollbarh)); +} + +void ScintillaGTK::Realize(GtkWidget *widget) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + sciThis->RealizeThis(widget); +} + +void ScintillaGTK::UnRealizeThis(GtkWidget *widget) { + if (GTK_WIDGET_MAPPED(widget)) { + gtk_widget_unmap(widget); + } + GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); + gtk_widget_unrealize(PWidget(wText)); + gtk_widget_unrealize(PWidget(scrollbarv)); + gtk_widget_unrealize(PWidget(scrollbarh)); +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 + if (ic) { + gdk_ic_destroy(ic); + ic = NULL; + } + if (ic_attr) { + gdk_ic_attr_destroy(ic_attr); + ic_attr = NULL; + } +#else + gtk_widget_unrealize(PWidget(wPreedit)); + gtk_widget_unrealize(PWidget(wPreeditDraw)); + g_object_unref(im_context); + im_context = NULL; +#endif +#endif + if (GTK_WIDGET_CLASS(parentClass)->unrealize) + GTK_WIDGET_CLASS(parentClass)->unrealize(widget); + + Finalise(); +} + +void ScintillaGTK::UnRealize(GtkWidget *widget) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + sciThis->UnRealizeThis(widget); +} + +static void MapWidget(GtkWidget *widget) { + if (widget && + GTK_WIDGET_VISIBLE(widget) && + !GTK_WIDGET_MAPPED(widget)) { + gtk_widget_map(widget); + } +} + +void ScintillaGTK::MapThis() { + //Platform::DebugPrintf("ScintillaGTK::map this\n"); + GTK_WIDGET_SET_FLAGS(PWidget(wMain), GTK_MAPPED); + MapWidget(PWidget(wText)); + MapWidget(PWidget(scrollbarh)); + MapWidget(PWidget(scrollbarv)); + wMain.SetCursor(Window::cursorArrow); + scrollbarv.SetCursor(Window::cursorArrow); + scrollbarh.SetCursor(Window::cursorArrow); + ChangeSize(); + gdk_window_show(PWidget(wMain)->window); +} + +void ScintillaGTK::Map(GtkWidget *widget) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + sciThis->MapThis(); +} + +void ScintillaGTK::UnMapThis() { + //Platform::DebugPrintf("ScintillaGTK::unmap this\n"); + GTK_WIDGET_UNSET_FLAGS(PWidget(wMain), GTK_MAPPED); + DropGraphics(); + gdk_window_hide(PWidget(wMain)->window); + gtk_widget_unmap(PWidget(wText)); + gtk_widget_unmap(PWidget(scrollbarh)); + gtk_widget_unmap(PWidget(scrollbarv)); +} + +void ScintillaGTK::UnMap(GtkWidget *widget) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + sciThis->UnMapThis(); +} + +void ScintillaGTK::ForAll(GtkCallback callback, gpointer callback_data) { + (*callback) (PWidget(wText), callback_data); + (*callback) (PWidget(scrollbarv), callback_data); + (*callback) (PWidget(scrollbarh), callback_data); +} + +void ScintillaGTK::MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { + ScintillaGTK *sciThis = ScintillaFromWidget((GtkWidget *)container); + + if (callback != NULL && include_internals) { + sciThis->ForAll(callback, callback_data); + } +} + +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 +gint ScintillaGTK::CursorMoved(GtkWidget *widget, int xoffset, int yoffset, ScintillaGTK *sciThis) { + if (GTK_WIDGET_HAS_FOCUS(widget) && gdk_im_ready() && sciThis->ic && + (gdk_ic_get_style(sciThis->ic) & GDK_IM_PREEDIT_POSITION)) { + sciThis->ic_attr->spot_location.x = xoffset; + sciThis->ic_attr->spot_location.y = yoffset; + gdk_ic_set_attr(sciThis->ic, sciThis->ic_attr, GDK_IC_SPOT_LOCATION); + } + return FALSE; +} +#else +gint ScintillaGTK::CursorMoved(GtkWidget *, int xoffset, int yoffset, ScintillaGTK *sciThis) { + GdkRectangle area; + area.x = xoffset; + area.y = yoffset; + area.width = 1; + area.height = 1; + gtk_im_context_set_cursor_location(sciThis->im_context, &area); + return FALSE; +} +#endif +#else +gint ScintillaGTK::CursorMoved(GtkWidget *, int, int, ScintillaGTK *) { + return FALSE; +} +#endif + +gint ScintillaGTK::FocusIn(GtkWidget *widget, GdkEventFocus * /*event*/) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("ScintillaGTK::focus in %x\n", sciThis); + GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS); + sciThis->SetFocusState(true); + +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 + if (sciThis->ic) + gdk_im_begin(sciThis->ic, widget->window); +#else + if (sciThis->im_context != NULL) { + gchar *str = NULL; + gint cursor_pos; + + gtk_im_context_get_preedit_string(sciThis->im_context, &str, NULL, &cursor_pos); + if (PWidget(sciThis->wPreedit) != NULL) { + if (strlen(str) > 0) { + gtk_widget_show(PWidget(sciThis->wPreedit)); + } else { + gtk_widget_hide(PWidget(sciThis->wPreedit)); + } + } + g_free(str); + gtk_im_context_focus_in(sciThis->im_context); + } +#endif +#endif + + return FALSE; +} + +gint ScintillaGTK::FocusOut(GtkWidget *widget, GdkEventFocus * /*event*/) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("ScintillaGTK::focus out %x\n", sciThis); + GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS); + sciThis->SetFocusState(false); + +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 + gdk_im_end(); +#else + if (PWidget(sciThis->wPreedit) != NULL) + gtk_widget_hide(PWidget(sciThis->wPreedit)); + if (sciThis->im_context != NULL) + gtk_im_context_focus_out(sciThis->im_context); +#endif +#endif + + return FALSE; +} + +void ScintillaGTK::SizeRequest(GtkWidget *widget, GtkRequisition *requisition) { + requisition->width = 600; + requisition->height = gdk_screen_height(); + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + GtkRequisition child_requisition; + gtk_widget_size_request(PWidget(sciThis->scrollbarh), &child_requisition); + gtk_widget_size_request(PWidget(sciThis->scrollbarv), &child_requisition); +} + +void ScintillaGTK::SizeAllocate(GtkWidget *widget, GtkAllocation *allocation) { + widget->allocation = *allocation; + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + if (GTK_WIDGET_REALIZED(widget)) + gdk_window_move_resize(widget->window, + widget->allocation.x, + widget->allocation.y, + widget->allocation.width, + widget->allocation.height); + + sciThis->Resize(allocation->width, allocation->height); + +#ifdef INTERNATIONAL_INPUT +#if GTK_MAJOR_VERSION < 2 + if (sciThis->ic && (gdk_ic_get_style(sciThis->ic) & GDK_IM_PREEDIT_POSITION)) { + gint width, height; + + gdk_window_get_size(widget->window, &width, &height); + sciThis->ic_attr->preedit_area.width = width; + sciThis->ic_attr->preedit_area.height = height; + + gdk_ic_set_attr(sciThis->ic, sciThis->ic_attr, GDK_IC_PREEDIT_AREA); + } +#endif +#endif +} + +void ScintillaGTK::Initialise() { + //Platform::DebugPrintf("ScintillaGTK::Initialise\n"); + parentClass = reinterpret_cast( + gtk_type_class(gtk_container_get_type())); + + GTK_WIDGET_SET_FLAGS(PWidget(wMain), GTK_CAN_FOCUS); + GTK_WIDGET_SET_FLAGS(GTK_WIDGET(PWidget(wMain)), GTK_SENSITIVE); + gtk_widget_set_events(PWidget(wMain), + GDK_EXPOSURE_MASK + | GDK_STRUCTURE_MASK + | GDK_KEY_PRESS_MASK + | GDK_KEY_RELEASE_MASK + | GDK_FOCUS_CHANGE_MASK + | GDK_LEAVE_NOTIFY_MASK + | GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK + | GDK_POINTER_MOTION_MASK + | GDK_POINTER_MOTION_HINT_MASK); + + wText = gtk_drawing_area_new(); + gtk_widget_set_parent(PWidget(wText), PWidget(wMain)); + GtkWidget *widtxt = PWidget(wText); // No code inside the G_OBJECT macro + gtk_widget_show(widtxt); +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_connect(GTK_OBJECT(widtxt), "expose_event", + GtkSignalFunc(ScintillaGTK::ExposeText), this); +#else + g_signal_connect(G_OBJECT(widtxt), "expose_event", + G_CALLBACK(ScintillaGTK::ExposeText), this); +#endif + gtk_widget_set_events(widtxt, GDK_EXPOSURE_MASK); +#if GTK_MAJOR_VERSION >= 2 + // Avoid background drawing flash + gtk_widget_set_double_buffered(widtxt, FALSE); +#endif + gtk_drawing_area_size(GTK_DRAWING_AREA(widtxt), + 100,100); + adjustmentv = gtk_adjustment_new(0.0, 0.0, 201.0, 1.0, 20.0, 20.0); + scrollbarv = gtk_vscrollbar_new(GTK_ADJUSTMENT(adjustmentv)); + GTK_WIDGET_UNSET_FLAGS(PWidget(scrollbarv), GTK_CAN_FOCUS); +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_connect(adjustmentv, "value_changed", + GtkSignalFunc(ScrollSignal), this); +#else + g_signal_connect(G_OBJECT(adjustmentv), "value_changed", + G_CALLBACK(ScrollSignal), this); +#endif + gtk_widget_set_parent(PWidget(scrollbarv), PWidget(wMain)); + gtk_widget_show(PWidget(scrollbarv)); + + adjustmenth = gtk_adjustment_new(0.0, 0.0, 101.0, 1.0, 20.0, 20.0); + scrollbarh = gtk_hscrollbar_new(GTK_ADJUSTMENT(adjustmenth)); + GTK_WIDGET_UNSET_FLAGS(PWidget(scrollbarh), GTK_CAN_FOCUS); +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_connect(adjustmenth, "value_changed", + GtkSignalFunc(ScrollHSignal), this); +#else + g_signal_connect(G_OBJECT(adjustmenth), "value_changed", + G_CALLBACK(ScrollHSignal), this); +#endif + gtk_widget_set_parent(PWidget(scrollbarh), PWidget(wMain)); + gtk_widget_show(PWidget(scrollbarh)); + + gtk_widget_grab_focus(PWidget(wMain)); + + gtk_selection_add_targets(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_PRIMARY, + clipboardTargets, nClipboardTargets); + +#ifndef USE_GTK_CLIPBOARD + gtk_selection_add_targets(GTK_WIDGET(PWidget(wMain)), atomClipboard, + clipboardTargets, nClipboardTargets); +#endif + + gtk_drag_dest_set(GTK_WIDGET(PWidget(wMain)), + GTK_DEST_DEFAULT_ALL, clipboardTargets, nClipboardTargets, + static_cast(GDK_ACTION_COPY | GDK_ACTION_MOVE)); + + SetTicking(true); +} + +void ScintillaGTK::Finalise() { + SetTicking(false); + ScintillaBase::Finalise(); +} + +void ScintillaGTK::DisplayCursor(Window::Cursor c) { + if (cursorMode == SC_CURSORNORMAL) + wText.SetCursor(c); + else + wText.SetCursor(static_cast(cursorMode)); +} + +void ScintillaGTK::StartDrag() { + dragWasDropped = false; + static const GtkTargetEntry targets[] = { + { "UTF8_STRING", 0, TARGET_UTF8_STRING }, + { "STRING", 0, TARGET_STRING }, + }; + static const gint n_targets = sizeof(targets) / sizeof(targets[0]); + GtkTargetList *tl = gtk_target_list_new(targets, n_targets); + gtk_drag_begin(GTK_WIDGET(PWidget(wMain)), + tl, + static_cast(GDK_ACTION_COPY | GDK_ACTION_MOVE), + evbtn.button, + reinterpret_cast(&evbtn)); +} + +#ifdef USE_CONVERTER +static char *ConvertText(int *lenResult, char *s, size_t len, const char *charSetDest, + const char *charSetSource, bool transliterations) { + *lenResult = 0; + char *destForm = 0; + Converter conv(charSetDest, charSetSource, transliterations); + if (conv) { + destForm = new char[len*3+1]; + char *pin = s; + size_t inLeft = len; + char *pout = destForm; + size_t outLeft = len*3+1; + size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); + if (conversions == ((size_t)(-1))) { +fprintf(stderr, "iconv %s->%s failed for %s\n", charSetSource, charSetDest, static_cast(s)); + delete []destForm; + destForm = 0; + } else { +//fprintf(stderr, "iconv OK %s %d\n", destForm, pout - destForm); + *pout = '\0'; + *lenResult = pout - destForm; + } + } else { +fprintf(stderr, "Can not iconv %s %s\n", charSetDest, charSetSource); + } + if (!destForm) { + destForm = new char[1]; + destForm[0] = '\0'; + *lenResult = 0; + } + return destForm; +} +#endif + +// Returns the target converted to UTF8. +// Return the length in bytes. +int ScintillaGTK::TargetAsUTF8(char *text) { + int targetLength = targetEnd - targetStart; + if (IsUnicodeMode()) { + if (text) { + pdoc->GetCharRange(text, targetStart, targetLength); + } + } else { + // Need to convert +#ifdef USE_CONVERTER + const char *charSetBuffer = CharacterSetID(); + if (*charSetBuffer) { +//~ fprintf(stderr, "AsUTF8 %s %d %0d-%0d\n", charSetBuffer, targetLength, targetStart, targetEnd); + char *s = new char[targetLength]; + if (s) { + pdoc->GetCharRange(s, targetStart, targetLength); +//~ fprintf(stderr, " \"%s\"\n", s); + if (text) { + char *tmputf = ConvertText(&targetLength, s, targetLength, "UTF-8", charSetBuffer, false); + memcpy(text, tmputf, targetLength); + delete []tmputf; +//~ fprintf(stderr, " \"%s\"\n", text); + } + delete []s; + } + } else { + if (text) { + pdoc->GetCharRange(text, targetStart, targetLength); + } + } +#else + // Fail + return 0; +#endif + } +//~ fprintf(stderr, "Length = %d bytes\n", targetLength); + return targetLength; +} + +// Translates a nul terminated UTF8 string into the document encoding. +// Return the length of the result in bytes. +int ScintillaGTK::EncodedFromUTF8(char *utf8, char *encoded) { + int inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8); + if (IsUnicodeMode()) { + if (encoded) { + memcpy(encoded, utf8, inputLength); + } + return inputLength; + } else { + // Need to convert +#ifdef USE_CONVERTER + const char *charSetBuffer = CharacterSetID(); + if (*charSetBuffer) { +//~ fprintf(stderr, "Encode %s %d\n", charSetBuffer, inputLength); + int outLength = 0; + char *tmpEncoded = ConvertText(&outLength, utf8, inputLength, charSetBuffer, "UTF-8", true); + if (tmpEncoded) { +//~ fprintf(stderr, " \"%s\"\n", tmpEncoded); + if (encoded) { + memcpy(encoded, tmpEncoded, outLength); + } + delete []tmpEncoded; + } + return outLength; + } else { + if (encoded) { + memcpy(encoded, utf8, inputLength); + } + return inputLength; + } +#endif + } + // Fail + return 0; +} + +bool ScintillaGTK::ValidCodePage(int codePage) const { + return codePage == 0 || codePage == SC_CP_UTF8 || codePage == SC_CP_DBCS; +} + +sptr_t ScintillaGTK::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + switch (iMessage) { + + case SCI_GRABFOCUS: + gtk_widget_grab_focus(PWidget(wMain)); + break; + + case SCI_GETDIRECTFUNCTION: + return reinterpret_cast(DirectFunction); + + case SCI_GETDIRECTPOINTER: + return reinterpret_cast(this); + +#ifdef SCI_LEXER + case SCI_LOADLEXERLIBRARY: + LexerManager::GetInstance()->Load(reinterpret_cast(wParam)); + break; +#endif + case SCI_TARGETASUTF8: + return TargetAsUTF8(reinterpret_cast(lParam)); + + case SCI_ENCODEDFROMUTF8: + return EncodedFromUTF8(reinterpret_cast(wParam), + reinterpret_cast(lParam)); + + default: + return ScintillaBase::WndProc(iMessage, wParam, lParam); + } + return 0l; +} + +sptr_t ScintillaGTK::DefWndProc(unsigned int, uptr_t, sptr_t) { + return 0; +} + +void ScintillaGTK::SetTicking(bool on) { + if (timer.ticking != on) { + timer.ticking = on; + if (timer.ticking) { + timer.tickerID = reinterpret_cast(gtk_timeout_add(timer.tickSize, (GtkFunction)TimeOut, this)); + } else { + gtk_timeout_remove(GPOINTER_TO_UINT(timer.tickerID)); + } + } + timer.ticksToWait = caret.period; +} + +bool ScintillaGTK::SetIdle(bool on) { + if (on) { + // Start idler, if it's not running. + if (idler.state == false) { + idler.state = true; + idler.idlerID = reinterpret_cast + (gtk_idle_add((GtkFunction)IdleCallback, this)); + } + } else { + // Stop idler, if it's running + if (idler.state == true) { + idler.state = false; + gtk_idle_remove(GPOINTER_TO_UINT(idler.idlerID)); + } + } + return true; +} + +void ScintillaGTK::SetMouseCapture(bool on) { + if (mouseDownCaptures) { + if (on) { + gtk_grab_add(GTK_WIDGET(PWidget(wMain))); + } else { + gtk_grab_remove(GTK_WIDGET(PWidget(wMain))); + } + } + capturedMouse = on; +} + +bool ScintillaGTK::HaveMouseCapture() { + return capturedMouse; +} + +bool ScintillaGTK::PaintContains(PRectangle rc) { + bool contains = true; + if (paintState == painting) { + if (!rcPaint.Contains(rc)) { + contains = false; + } else if (rgnUpdate) { + GdkRectangle grc = {rc.left, rc.top, + rc.right - rc.left, rc.bottom - rc.top}; + if (gdk_region_rect_in(rgnUpdate, &grc) != GDK_OVERLAP_RECTANGLE_IN) { + contains = false; + } + } + } + return contains; +} + +// Redraw all of text area. This paint will not be abandoned. +void ScintillaGTK::FullPaint() { +#if GTK_MAJOR_VERSION < 2 + paintState = painting; + rcPaint = GetClientRectangle(); + //Platform::DebugPrintf("ScintillaGTK::FullPaint %0d,%0d %0d,%0d\n", + // rcPaint.left, rcPaint.top, rcPaint.right, rcPaint.bottom); + paintingAllText = true; + if ((PWidget(wText))->window) { + Surface *sw = Surface::Allocate(); + if (sw) { + sw->Init(PWidget(wText)->window, PWidget(wText)); + Paint(sw, rcPaint); + sw->Release(); + delete sw; + } + } + paintState = notPainting; +#else + wText.InvalidateAll(); +#endif +} + +PRectangle ScintillaGTK::GetClientRectangle() { + PRectangle rc = wMain.GetClientPosition(); + if (verticalScrollBarVisible) + rc.right -= scrollBarWidth; + if (horizontalScrollBarVisible && (wrapState == eWrapNone)) + rc.bottom -= scrollBarHeight; + // Move to origin + rc.right -= rc.left; + rc.bottom -= rc.top; + rc.left = 0; + rc.top = 0; + return rc; +} + +// Synchronously paint a rectangle of the window. +void ScintillaGTK::SyncPaint(PRectangle rc) { + paintState = painting; + rcPaint = rc; + PRectangle rcClient = GetClientRectangle(); + paintingAllText = rcPaint.Contains(rcClient); + if ((PWidget(wText))->window) { + Surface *sw = Surface::Allocate(); + if (sw) { + sw->Init(PWidget(wText)->window, PWidget(wText)); + Paint(sw, rc); + sw->Release(); + delete sw; + } + } + if (paintState == paintAbandoned) { + // Painting area was insufficient to cover new styling or brace highlight positions + FullPaint(); + } + paintState = notPainting; +} + +void ScintillaGTK::ScrollText(int linesToMove) { + int diff = vs.lineHeight * -linesToMove; + //Platform::DebugPrintf("ScintillaGTK::ScrollText %d %d %0d,%0d %0d,%0d\n", linesToMove, diff, + // rc.left, rc.top, rc.right, rc.bottom); + GtkWidget *wi = PWidget(wText); + +#if GTK_MAJOR_VERSION < 2 + PRectangle rc = GetClientRectangle(); + GdkGC *gc = gdk_gc_new(wi->window); + + // Set up gc so we get GraphicsExposures from gdk_draw_pixmap + // which calls XCopyArea + gdk_gc_set_exposures(gc, TRUE); + + // Redraw exposed bit : scrolling upwards + if (diff > 0) { + gdk_draw_pixmap(wi->window, + gc, wi->window, + 0, diff, + 0, 0, + rc.Width()-1, rc.Height() - diff); + SyncPaint(PRectangle(0, rc.Height() - diff, + rc.Width(), rc.Height()+1)); + + // Redraw exposed bit : scrolling downwards + } else { + gdk_draw_pixmap(wi->window, + gc, wi->window, + 0, 0, + 0, -diff, + rc.Width()-1, rc.Height() + diff); + SyncPaint(PRectangle(0, 0, rc.Width(), -diff)); + } + + // Look for any graphics expose + GdkEvent* event; + while ((event = gdk_event_get_graphics_expose(wi->window)) != NULL) { + gtk_widget_event(wi, event); + if (event->expose.count == 0) { + gdk_event_free(event); + break; + } + gdk_event_free(event); + } + + gdk_gc_unref(gc); +#else + gdk_window_scroll(wi->window, 0, -diff); + gdk_window_process_updates(wi->window, FALSE); +#endif +} + +void ScintillaGTK::SetVerticalScrollPos() { + DwellEnd(true); + gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmentv), topLine); +} + +void ScintillaGTK::SetHorizontalScrollPos() { + DwellEnd(true); + gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmenth), xOffset / 2); +} + +bool ScintillaGTK::ModifyScrollBars(int nMax, int nPage) { + bool modified = false; + int pageScroll = LinesToScroll(); + + if (GTK_ADJUSTMENT(adjustmentv)->upper != (nMax + 1) || + GTK_ADJUSTMENT(adjustmentv)->page_size != nPage || + GTK_ADJUSTMENT(adjustmentv)->page_increment != pageScroll) { + GTK_ADJUSTMENT(adjustmentv)->upper = nMax + 1; + GTK_ADJUSTMENT(adjustmentv)->page_size = nPage; + GTK_ADJUSTMENT(adjustmentv)->page_increment = pageScroll; + gtk_adjustment_changed(GTK_ADJUSTMENT(adjustmentv)); + modified = true; + } + + PRectangle rcText = GetTextRectangle(); + int horizEndPreferred = scrollWidth; + if (horizEndPreferred < 0) + horizEndPreferred = 0; + unsigned int pageWidth = rcText.Width(); + unsigned int pageIncrement = pageWidth / 3; + unsigned int charWidth = vs.styles[STYLE_DEFAULT].aveCharWidth; + if (GTK_ADJUSTMENT(adjustmenth)->upper != horizEndPreferred || + GTK_ADJUSTMENT(adjustmenth)->page_size != pageWidth || + GTK_ADJUSTMENT(adjustmenth)->page_increment != pageIncrement || + GTK_ADJUSTMENT(adjustmenth)->step_increment != charWidth) { + GTK_ADJUSTMENT(adjustmenth)->upper = horizEndPreferred; + GTK_ADJUSTMENT(adjustmenth)->step_increment = charWidth; + GTK_ADJUSTMENT(adjustmenth)->page_size = pageWidth; + GTK_ADJUSTMENT(adjustmenth)->page_increment = pageIncrement; + gtk_adjustment_changed(GTK_ADJUSTMENT(adjustmenth)); + modified = true; + } + return modified; +} + +void ScintillaGTK::ReconfigureScrollBars() { + PRectangle rc = wMain.GetClientPosition(); + Resize(rc.Width(), rc.Height()); +} + +void ScintillaGTK::NotifyChange() { +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_emit(GTK_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], + Platform::LongFromTwoShorts(GetCtrlID(), SCEN_CHANGE), PWidget(wMain)); +#else + g_signal_emit(G_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], 0, + Platform::LongFromTwoShorts(GetCtrlID(), SCEN_CHANGE), PWidget(wMain)); +#endif +} + +void ScintillaGTK::NotifyFocus(bool focus) { +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_emit(GTK_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], + Platform::LongFromTwoShorts + (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), PWidget(wMain)); +#else + g_signal_emit(G_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], 0, + Platform::LongFromTwoShorts + (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), PWidget(wMain)); +#endif +} + +void ScintillaGTK::NotifyParent(SCNotification scn) { + scn.nmhdr.hwndFrom = PWidget(wMain); + scn.nmhdr.idFrom = GetCtrlID(); +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_emit(GTK_OBJECT(sci), scintilla_signals[NOTIFY_SIGNAL], + GetCtrlID(), &scn); +#else + g_signal_emit(G_OBJECT(sci), scintilla_signals[NOTIFY_SIGNAL], 0, + GetCtrlID(), &scn); +#endif +} + +void ScintillaGTK::NotifyKey(int key, int modifiers) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_KEY; + scn.ch = key; + scn.modifiers = modifiers; + + NotifyParent(scn); +} + +void ScintillaGTK::NotifyURIDropped(const char *list) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_URIDROPPED; + scn.text = list; + + NotifyParent(scn); +} + +const char *CharacterSetID(int characterSet); + +const char *ScintillaGTK::CharacterSetID() const { + return ::CharacterSetID(vs.styles[STYLE_DEFAULT].characterSet); +} + +int ScintillaGTK::KeyDefault(int key, int modifiers) { + if (!(modifiers & SCI_CTRL) && !(modifiers & SCI_ALT)) { + if (key < 256) { + NotifyKey(key, modifiers); + return 0; + } else { + // Pass up to container in case it is an accelerator + NotifyKey(key, modifiers); + return 0; + } + } else { + // Pass up to container in case it is an accelerator + NotifyKey(key, modifiers); + return 0; + } + //Platform::DebugPrintf("SK-key: %d %x %x\n",key, modifiers); +} + +void ScintillaGTK::CopyToClipboard(const SelectionText &selectedText) { +#ifndef USE_GTK_CLIPBOARD + copyText.Copy(selectedText); + gtk_selection_owner_set(GTK_WIDGET(PWidget(wMain)), + atomClipboard, + GDK_CURRENT_TIME); +#else + GtkClipboard *clipBoard; + clipBoard = gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), atomClipboard); + if (clipBoard == NULL) // Occurs if widget isn't in a toplevel + return; + + SelectionText *clipText = new SelectionText(); + clipText->Copy(selectedText); + + gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets, + ClipboardGetSelection, ClipboardClearSelection, clipText); + +#endif +} + +void ScintillaGTK::Copy() { + if (currentPos != anchor) { +#ifndef USE_GTK_CLIPBOARD + CopySelectionRange(©Text); + gtk_selection_owner_set(GTK_WIDGET(PWidget(wMain)), + atomClipboard, + GDK_CURRENT_TIME); +#else + GtkClipboard *clipBoard; + clipBoard = gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), atomClipboard); + if (clipBoard == NULL) // Occurs if widget isn't in a toplevel + return; + + SelectionText *clipText = new SelectionText(); + CopySelectionRange(clipText); + + gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets, + ClipboardGetSelection, ClipboardClearSelection, clipText); + +#endif +#if PLAT_GTK_WIN32 + if (selType == selRectangle) { + ::OpenClipboard(NULL); + ::SetClipboardData(cfColumnSelect, 0); + ::CloseClipboard(); + } +#endif + } +} + +void ScintillaGTK::Paste() { + atomSought = atomUTF8; + gtk_selection_convert(GTK_WIDGET(PWidget(wMain)), + atomClipboard, atomSought, GDK_CURRENT_TIME); +} + +void ScintillaGTK::CreateCallTipWindow(PRectangle rc) { + if (!ct.wCallTip.Created()) { + ct.wCallTip = gtk_window_new(GTK_WINDOW_POPUP); + ct.wDraw = gtk_drawing_area_new(); + GtkWidget *widcdrw = PWidget(ct.wDraw); // // No code inside the G_OBJECT macro + gtk_container_add(GTK_CONTAINER(PWidget(ct.wCallTip)), widcdrw); +#if GLIB_MAJOR_VERSION < 2 + gtk_signal_connect(GTK_OBJECT(widcdrw), "expose_event", + GtkSignalFunc(ScintillaGTK::ExposeCT), &ct); + gtk_signal_connect(GTK_OBJECT(widcdrw), "button_press_event", + GtkSignalFunc(ScintillaGTK::PressCT), static_cast(this)); +#else + g_signal_connect(G_OBJECT(widcdrw), "expose_event", + G_CALLBACK(ScintillaGTK::ExposeCT), &ct); + g_signal_connect(G_OBJECT(widcdrw), "button_press_event", + G_CALLBACK(ScintillaGTK::PressCT), static_cast(this)); +#endif + gtk_widget_set_events(widcdrw, + GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK); + } + gtk_drawing_area_size(GTK_DRAWING_AREA(PWidget(ct.wDraw)), + rc.Width(), rc.Height()); + ct.wDraw.Show(); + if (PWidget(ct.wCallTip)->window) { + gdk_window_resize(PWidget(ct.wCallTip)->window, rc.Width(), rc.Height()); + } +} + +void ScintillaGTK::AddToPopUp(const char *label, int cmd, bool enabled) { + char fulllabel[200]; + strcpy(fulllabel, "/"); + strcat(fulllabel, label); + GtkItemFactoryCallback menuSig = GtkItemFactoryCallback(PopUpCB); + GtkItemFactoryEntry itemEntry = { + fulllabel, NULL, + menuSig, + cmd, + const_cast(label[0] ? "" : ""), +#if GTK_MAJOR_VERSION >= 2 + NULL +#endif + }; + gtk_item_factory_create_item(GTK_ITEM_FACTORY(popup.GetID()), + &itemEntry, this, 1); + if (cmd) { + GtkWidget *item = gtk_item_factory_get_widget_by_action( + reinterpret_cast(popup.GetID()), cmd); + if (item) + gtk_widget_set_sensitive(item, enabled); + } +} + +bool ScintillaGTK::OwnPrimarySelection() { + return ((gdk_selection_owner_get(GDK_SELECTION_PRIMARY) + == GTK_WIDGET(PWidget(wMain))->window) && + (GTK_WIDGET(PWidget(wMain))->window != NULL)); +} + +void ScintillaGTK::ClaimSelection() { + // X Windows has a 'primary selection' as well as the clipboard. + // Whenever the user selects some text, we become the primary selection + if (currentPos != anchor && GTK_WIDGET_REALIZED(GTK_WIDGET(PWidget(wMain)))) { + primarySelection = true; + gtk_selection_owner_set(GTK_WIDGET(PWidget(wMain)), + GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); + primary.Free(); + } else if (OwnPrimarySelection()) { + primarySelection = true; + if (primary.s == NULL) + gtk_selection_owner_set(NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); + } else { + primarySelection = false; + primary.Free(); + } +} + +// Detect rectangular text, convert line ends to current mode, convert from or to UTF-8 +void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText) { + char *data = reinterpret_cast(selectionData->data); + int len = selectionData->length; + GdkAtom selectionType = selectionData->type; + + // Return empty string if selection is not a string + if ((selectionType != GDK_TARGET_STRING) && (selectionType != atomUTF8)) { + char *empty = new char[1]; + empty[0] = '\0'; + selText.Set(empty, 0, SC_CP_UTF8, 0, false); + return; + } + + // Check for "\n\0" ending to string indicating that selection is rectangular + bool isRectangular; +#if PLAT_GTK_WIN32 + isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0; +#else + isRectangular = ((len > 2) && (data[len - 1] == 0 && data[len - 2] == '\n')); +#endif + + char *dest; + if (selectionType == GDK_TARGET_STRING) { + dest = Document::TransformLineEnds(&len, data, len, pdoc->eolMode); + if (IsUnicodeMode()) { + // Unknown encoding so assume in Latin1 + char *destPrevious = dest; + dest = UTF8FromLatin1(dest, len); + selText.Set(dest, len, SC_CP_UTF8, 0, selText.rectangular); + delete []destPrevious; + } else { + // Assume buffer is in same encoding as selection + selText.Set(dest, len, pdoc->dbcsCodePage, + vs.styles[STYLE_DEFAULT].characterSet, isRectangular); + } + } else { // UTF-8 + dest = Document::TransformLineEnds(&len, data, len, pdoc->eolMode); + selText.Set(dest, len, SC_CP_UTF8, 0, isRectangular); +#ifdef USE_CONVERTER + const char *charSetBuffer = CharacterSetID(); + if (!IsUnicodeMode() && *charSetBuffer) { +//fprintf(stderr, "Convert to locale %s\n", CharacterSetID()); + // Convert to locale + dest = ConvertText(&len, selText.s, selText.len, charSetBuffer, "UTF-8", true); + selText.Set(dest, len, pdoc->dbcsCodePage, + vs.styles[STYLE_DEFAULT].characterSet, selText.rectangular); + } +#endif + } +} + +void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) { + if ((selection_data->selection == atomClipboard) || + (selection_data->selection == GDK_SELECTION_PRIMARY)) { + if ((atomSought == atomUTF8) && (selection_data->length <= 0)) { + atomSought = atomString; + gtk_selection_convert(GTK_WIDGET(PWidget(wMain)), + selection_data->selection, atomSought, GDK_CURRENT_TIME); + } else if ((selection_data->length > 0) && + ((selection_data->type == GDK_TARGET_STRING) || (selection_data->type == atomUTF8))) { + SelectionText selText; + GetGtkSelectionText(selection_data, selText); + + pdoc->BeginUndoAction(); + if (selection_data->selection != GDK_SELECTION_PRIMARY) { + ClearSelection(); + } + int selStart = SelectionStart(); + + if (selText.rectangular) { + PasteRectangular(selStart, selText.s, selText.len); + } else { + pdoc->InsertString(currentPos, selText.s, selText.len); + SetEmptySelection(currentPos + selText.len); + } + pdoc->EndUndoAction(); + EnsureCaretVisible(); + } + } +// else fprintf(stderr, "Target non string %d %d\n", (int)(selection_data->type), +// (int)(atomUTF8)); + Redraw(); +} + +void ScintillaGTK::ReceivedDrop(GtkSelectionData *selection_data) { + dragWasDropped = true; + if (selection_data->type == atomUriList || selection_data->type == atomDROPFILES_DND) { + char *ptr = new char[selection_data->length + 1]; + ptr[selection_data->length] = '\0'; + memcpy(ptr, selection_data->data, selection_data->length); + NotifyURIDropped(ptr); + delete []ptr; + } else if ((selection_data->type == GDK_TARGET_STRING) || (selection_data->type == atomUTF8)) { + if (selection_data->length > 0) { + SelectionText selText; + GetGtkSelectionText(selection_data, selText); + DropAt(posDrop, selText.s, false, selText.rectangular); + } + } else if (selection_data->length > 0) { + //~ fprintf(stderr, "ReceivedDrop other %p\n", static_cast(selection_data->type)); + } + Redraw(); +} + + + +void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text) { +#if PLAT_GTK_WIN32 + // Many native win32 programs require \n line endings, so make a copy of + // the clip text now with newlines converted. Use { } to hide symbols + // from code below + SelectionText *newline_normalized = NULL; + { + int tmpstr_len; + char *tmpstr = Document::TransformLineEnds(&tmpstr_len, text->s, text->len, SC_EOL_LF); + newline_normalized = new SelectionText(); + newline_normalized->Set(tmpstr, tmpstr_len, SC_CP_UTF8, 0, text->rectangular); + text = newline_normalized; + } +#endif + +#if GTK_MAJOR_VERSION >= 2 + // Convert text to utf8 if it isn't already + SelectionText *converted = 0; + if ((text->codePage != SC_CP_UTF8) && (info == TARGET_UTF8_STRING)) { + const char *charSet = ::CharacterSetID(text->characterSet); + if (*charSet) { + int new_len; + char* tmputf = ConvertText(&new_len, text->s, text->len, "UTF-8", charSet, false); + converted = new SelectionText(); + converted->Set(tmputf, new_len, SC_CP_UTF8, 0, text->rectangular); + text = converted; + } + } + + // Here is a somewhat evil kludge. + // As I can not work out how to store data on the clipboard in multiple formats + // and need some way to mark the clipping as being stream or rectangular, + // the terminating \0 is included in the length for rectangular clippings. + // All other tested aplications behave benignly by ignoring the \0. + // The #if is here because on Windows cfColumnSelect clip entry is used + // instead as standard indicator of rectangularness (so no need to kludge) + int len = strlen(text->s); +#if PLAT_GTK_WIN32 == 0 + if (text->rectangular) + len++; +#endif + + if (info == TARGET_UTF8_STRING) { + gtk_selection_data_set_text(selection_data, text->s, len); + } else { + gtk_selection_data_set(selection_data, + static_cast(GDK_SELECTION_TYPE_STRING), + 8, reinterpret_cast(text->s), len); + } + delete converted; + +#else /* Gtk 1 */ + char *selBuffer = text->s; + + char *tmputf = 0; + if ((info == TARGET_UTF8_STRING) || (info == TARGET_STRING)) { + int len = strlen(selBuffer); +#ifdef USE_CONVERTER + // Possible character set conversion + const char *charSetBuffer = ::CharacterSetID(text->characterSet); + if (info == TARGET_UTF8_STRING) { + //fprintf(stderr, "Copy to clipboard as UTF-8\n"); + if (text->codePage != SC_CP_UTF8) { + // Convert to UTF-8 + //fprintf(stderr, "Convert to UTF-8 from %s\n", charSetBuffer); + tmputf = ConvertText(&len, selBuffer, len, "UTF-8", charSetBuffer, false); + selBuffer = tmputf; + } + } else if (info == TARGET_STRING) { + if (text->codePage == SC_CP_UTF8) { + //fprintf(stderr, "Convert to locale %s\n", charSetBuffer); + // Convert to locale + tmputf = ConvertText(&len, selBuffer, len, charSetBuffer, "UTF-8", true); + selBuffer = tmputf; + } + } +#endif + + // Here is a somewhat evil kludge. + // As I can not work out how to store data on the clipboard in multiple formats + // and need some way to mark the clipping as being stream or rectangular, + // the terminating \0 is included in the length for rectangular clippings. + // All other tested aplications behave benignly by ignoring the \0. + // The #if is here because on Windows cfColumnSelect clip entry is used + // instead as standard indicator of rectangularness (so no need to kludge) +#if PLAT_GTK_WIN32 == 0 + if (text->rectangular) + len++; +#endif + gtk_selection_data_set(selection_data, + (info == TARGET_STRING) ? + static_cast(GDK_SELECTION_TYPE_STRING) : atomUTF8, + 8, reinterpret_cast(selBuffer), + len); + } else if ((info == TARGET_TEXT) || (info == TARGET_COMPOUND_TEXT)) { + guchar *text; + GdkAtom encoding; + gint format; + gint new_length; + + gdk_string_to_compound_text(reinterpret_cast(selBuffer), + &encoding, &format, &text, &new_length); + gtk_selection_data_set(selection_data, encoding, format, text, new_length); + gdk_free_compound_text(text); + } + + delete []tmputf; +#endif /* Gtk >= 2 */ + +#if PLAT_GTK_WIN32 + delete newline_normalized; +#endif +} + +#ifdef USE_GTK_CLIPBOARD +void ScintillaGTK::ClipboardGetSelection(GtkClipboard *, GtkSelectionData *selection_data, guint info, void *data) { + GetSelection(selection_data, info, static_cast(data)); +} + +void ScintillaGTK::ClipboardClearSelection(GtkClipboard *, void *data) { + SelectionText *obj = static_cast(data); + delete obj; +} +#endif + +void ScintillaGTK::UnclaimSelection(GdkEventSelection *selection_event) { + //Platform::DebugPrintf("UnclaimSelection\n"); + if (selection_event->selection == GDK_SELECTION_PRIMARY) { + //Platform::DebugPrintf("UnclaimPrimarySelection\n"); + if (!OwnPrimarySelection()) { + primary.Free(); + primarySelection = false; + FullPaint(); + } + } +} + +void ScintillaGTK::Resize(int width, int height) { + //Platform::DebugPrintf("Resize %d %d\n", width, height); + //printf("Resize %d %d\n", width, height); + + // Not always needed, but some themes can have different sizes of scrollbars + scrollBarWidth = GTK_WIDGET(PWidget(scrollbarv))->requisition.width; + scrollBarHeight = GTK_WIDGET(PWidget(scrollbarh))->requisition.height; + + // These allocations should never produce negative sizes as they would wrap around to huge + // unsigned numbers inside GTK+ causing warnings. + bool showSBHorizontal = horizontalScrollBarVisible && (wrapState == eWrapNone); + int horizontalScrollBarHeight = scrollBarHeight; + if (!showSBHorizontal) + horizontalScrollBarHeight = 0; + int verticalScrollBarHeight = scrollBarWidth; + if (!verticalScrollBarVisible) + verticalScrollBarHeight = 0; + + GtkAllocation alloc; + if (showSBHorizontal) { + gtk_widget_show(GTK_WIDGET(PWidget(scrollbarh))); + alloc.x = 0; + alloc.y = height - scrollBarHeight; + alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1; + alloc.height = horizontalScrollBarHeight; + gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarh)), &alloc); + } else { + gtk_widget_hide(GTK_WIDGET(PWidget(scrollbarh))); + } + + if (verticalScrollBarVisible) { + gtk_widget_show(GTK_WIDGET(PWidget(scrollbarv))); + alloc.x = width - scrollBarWidth; + alloc.y = 0; + alloc.width = scrollBarWidth; + alloc.height = Platform::Maximum(1, height - scrollBarHeight) + 1; + if (!showSBHorizontal) + alloc.height += scrollBarWidth-1; + gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarv)), &alloc); + } else { + gtk_widget_hide(GTK_WIDGET(PWidget(scrollbarv))); + } + if (GTK_WIDGET_MAPPED(PWidget(wMain))) { + ChangeSize(); + } + + alloc.x = 0; + alloc.y = 0; + alloc.width = Platform::Maximum(1, width - scrollBarWidth); + alloc.height = Platform::Maximum(1, height - scrollBarHeight); + if (!showSBHorizontal) + alloc.height += scrollBarHeight; + if (!verticalScrollBarVisible) + alloc.width += scrollBarWidth; + gtk_widget_size_allocate(GTK_WIDGET(PWidget(wText)), &alloc); +} + +static void SetAdjustmentValue(GtkObject *object, int value) { + GtkAdjustment *adjustment = GTK_ADJUSTMENT(object); + int maxValue = static_cast( + adjustment->upper - adjustment->page_size); + if (value > maxValue) + value = maxValue; + if (value < 0) + value = 0; + gtk_adjustment_set_value(adjustment, value); +} + +gint ScintillaGTK::PressThis(GdkEventButton *event) { + //Platform::DebugPrintf("Press %x time=%d state = %x button = %x\n",this,event->time, event->state, event->button); + // Do not use GTK+ double click events as Scintilla has its own double click detection + if (event->type != GDK_BUTTON_PRESS) + return FALSE; + + evbtn = *event; + Point pt; + pt.x = int(event->x); + pt.y = int(event->y); + PRectangle rcClient = GetClientRectangle(); + //Platform::DebugPrintf("Press %0d,%0d in %0d,%0d %0d,%0d\n", + // pt.x, pt.y, rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); + if ((pt.x > rcClient.right) || (pt.y > rcClient.bottom)) { + Platform::DebugPrintf("Bad location\n"); + return FALSE; + } + + bool ctrl = (event->state & GDK_CONTROL_MASK) != 0; + + gtk_widget_grab_focus(PWidget(wMain)); + if (event->button == 1) { + // On X, instead of sending literal modifiers use control instead of alt + // This is because most X window managers grab alt + click for moving +#if !PLAT_GTK_WIN32 + ButtonDown(pt, event->time, + (event->state & GDK_SHIFT_MASK) != 0, + (event->state & GDK_CONTROL_MASK) != 0, + (event->state & GDK_CONTROL_MASK) != 0); +#else + ButtonDown(pt, event->time, + (event->state & GDK_SHIFT_MASK) != 0, + (event->state & GDK_CONTROL_MASK) != 0, + (event->state & GDK_MOD1_MASK) != 0); +#endif + } else if (event->button == 2) { + // Grab the primary selection if it exists + Position pos = PositionFromLocation(pt); + if (OwnPrimarySelection() && primary.s == NULL) + CopySelectionRange(&primary); + + SetSelection(pos, pos); + atomSought = atomUTF8; + gtk_selection_convert(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_PRIMARY, + atomSought, event->time); + } else if (event->button == 3) { + if (displayPopupMenu) { + // PopUp menu + // Convert to screen + int ox = 0; + int oy = 0; + gdk_window_get_origin(PWidget(wMain)->window, &ox, &oy); + ContextMenu(Point(pt.x + ox, pt.y + oy)); + } else { + return FALSE; + } + } else if (event->button == 4) { + // Wheel scrolling up (only GTK 1.x does it this way) + if (ctrl) + SetAdjustmentValue(adjustmenth, (xOffset / 2) - 6); + else + SetAdjustmentValue(adjustmentv, topLine - 3); + } else if (event->button == 5) { + // Wheel scrolling down (only GTK 1.x does it this way) + if (ctrl) + SetAdjustmentValue(adjustmenth, (xOffset / 2) + 6); + else + SetAdjustmentValue(adjustmentv, topLine + 3); + } +#if GTK_MAJOR_VERSION >= 2 + return TRUE; +#else + return FALSE; +#endif +} + +gint ScintillaGTK::Press(GtkWidget *widget, GdkEventButton *event) { + if (event->window != widget->window) + return FALSE; + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + return sciThis->PressThis(event); +} + +gint ScintillaGTK::MouseRelease(GtkWidget *widget, GdkEventButton *event) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Release %x %d %d\n",sciThis,event->time,event->state); + if (!sciThis->HaveMouseCapture()) + return FALSE; + if (event->button == 1) { + Point pt; + pt.x = int(event->x); + pt.y = int(event->y); + //Platform::DebugPrintf("Up %x %x %d %d %d\n", + // sciThis,event->window,event->time, pt.x, pt.y); + if (event->window != PWidget(sciThis->wMain)->window) + // If mouse released on scroll bar then the position is relative to the + // scrollbar, not the drawing window so just repeat the most recent point. + pt = sciThis->ptMouseLast; + sciThis->ButtonUp(pt, event->time, (event->state & 4) != 0); + } + return FALSE; +} + +// win32gtk and GTK >= 2 use SCROLL_* events instead of passing the +// button4/5/6/7 events to the GTK app +#if PLAT_GTK_WIN32 || (GTK_MAJOR_VERSION >= 2) +gint ScintillaGTK::ScrollEvent(GtkWidget *widget, + GdkEventScroll *event) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + + if (widget == NULL || event == NULL) + return FALSE; + + // Compute amount and direction to scroll (even tho on win32 there is + // intensity of scrolling info in the native message, gtk doesn't + // support this so we simulate similarly adaptive scrolling) + // Note that this is disabled on OS X (Darwin) where the X11 server already has + // and adaptive scrolling algorithm that fights with this one + int cLineScroll; +#if defined(__MWERKS__) || defined(__APPLE_CPP__) || defined(__APPLE_CC__) + cLineScroll = sciThis->linesPerScroll; + if (cLineScroll == 0) + cLineScroll = 4; + sciThis->wheelMouseIntensity = cLineScroll; +#else + int timeDelta = 1000000; + GTimeVal curTime; + g_get_current_time(&curTime); + if (curTime.tv_sec == sciThis->lastWheelMouseTime.tv_sec) + timeDelta = curTime.tv_usec - sciThis->lastWheelMouseTime.tv_usec; + else if (curTime.tv_sec == sciThis->lastWheelMouseTime.tv_sec + 1) + timeDelta = 1000000 + (curTime.tv_usec - sciThis->lastWheelMouseTime.tv_usec); + if ((event->direction == sciThis->lastWheelMouseDirection) && (timeDelta < 250000)) { + if (sciThis->wheelMouseIntensity < 12) + sciThis->wheelMouseIntensity++; + cLineScroll = sciThis->wheelMouseIntensity; + } else { + cLineScroll = sciThis->linesPerScroll; + if (cLineScroll == 0) + cLineScroll = 4; + sciThis->wheelMouseIntensity = cLineScroll; + } +#endif + if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_LEFT) { + cLineScroll *= -1; + } + g_get_current_time(&sciThis->lastWheelMouseTime); + sciThis->lastWheelMouseDirection = event->direction; + + // Note: Unpatched versions of win32gtk don't set the 'state' value so + // only regular scrolling is supported there. Also, unpatched win32gtk + // issues spurious button 2 mouse events during wheeling, which can cause + // problems (a patch for both was submitted by archaeopteryx.com on 13Jun2001) + + // Data zoom not supported + if (event->state & GDK_SHIFT_MASK) { + return FALSE; + } + + // Horizontal scrolling + if (event->direction == GDK_SCROLL_LEFT || event->direction == GDK_SCROLL_RIGHT) { + sciThis->HorizontalScrollTo(sciThis->xOffset + cLineScroll); + + // Text font size zoom + } else if (event->state & GDK_CONTROL_MASK) { + if (cLineScroll < 0) { + sciThis->KeyCommand(SCI_ZOOMIN); + } else { + sciThis->KeyCommand(SCI_ZOOMOUT); + } + + // Regular scrolling + } else { + sciThis->ScrollTo(sciThis->topLine + cLineScroll); + } + return TRUE; +} +#endif + +gint ScintillaGTK::Motion(GtkWidget *widget, GdkEventMotion *event) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Motion %x %d\n",sciThis,event->time); + if (event->window != widget->window) + return FALSE; + int x = 0; + int y = 0; + GdkModifierType state; + if (event->is_hint) { + gdk_window_get_pointer(event->window, &x, &y, &state); + } else { + x = static_cast(event->x); + y = static_cast(event->y); + state = static_cast(event->state); + } + //Platform::DebugPrintf("Move %x %x %d %c %d %d\n", + // sciThis,event->window,event->time,event->is_hint? 'h' :'.', x, y); + Point pt(x, y); + sciThis->ButtonMove(pt); + return FALSE; +} + +// Map the keypad keys to their equivalent functions +static int KeyTranslate(int keyIn) { + switch (keyIn) { + case GDK_ISO_Left_Tab: + return SCK_TAB; + case GDK_KP_Down: + return SCK_DOWN; + case GDK_KP_Up: + return SCK_UP; + case GDK_KP_Left: + return SCK_LEFT; + case GDK_KP_Right: + return SCK_RIGHT; + case GDK_KP_Home: + return SCK_HOME; + case GDK_KP_End: + return SCK_END; + case GDK_KP_Page_Up: + return SCK_PRIOR; + case GDK_KP_Page_Down: + return SCK_NEXT; + case GDK_KP_Delete: + return SCK_DELETE; + case GDK_KP_Insert: + return SCK_INSERT; + case GDK_KP_Enter: + return SCK_RETURN; + + case GDK_Down: + return SCK_DOWN; + case GDK_Up: + return SCK_UP; + case GDK_Left: + return SCK_LEFT; + case GDK_Right: + return SCK_RIGHT; + case GDK_Home: + return SCK_HOME; + case GDK_End: + return SCK_END; + case GDK_Page_Up: + return SCK_PRIOR; + case GDK_Page_Down: + return SCK_NEXT; + case GDK_Delete: + return SCK_DELETE; + case GDK_Insert: + return SCK_INSERT; + case GDK_Escape: + return SCK_ESCAPE; + case GDK_BackSpace: + return SCK_BACK; + case GDK_Tab: + return SCK_TAB; + case GDK_Return: + return SCK_RETURN; + case GDK_KP_Add: + return SCK_ADD; + case GDK_KP_Subtract: + return SCK_SUBTRACT; + case GDK_KP_Divide: + return SCK_DIVIDE; + case GDK_Super_L: + return SCK_WIN; + case GDK_Super_R: + return SCK_RWIN; + case GDK_Menu: + return SCK_MENU; + default: + return keyIn; + } +} + +gboolean ScintillaGTK::KeyThis(GdkEventKey *event) { + //fprintf(stderr, "SC-key: %d %x [%s]\n", + // event->keyval, event->state, (event->length > 0) ? event->string : "empty"); +#if GTK_MAJOR_VERSION >= 2 + if (gtk_im_context_filter_keypress(im_context, event)) { + return 1; + } +#endif + if (!event->keyval) { + return true; + } + + bool shift = (event->state & GDK_SHIFT_MASK) != 0; + bool ctrl = (event->state & GDK_CONTROL_MASK) != 0; + bool alt = (event->state & GDK_MOD1_MASK) != 0; + guint key = event->keyval; + if (ctrl && (key < 128)) + key = toupper(key); + else if (!ctrl && (key >= GDK_KP_Multiply && key <= GDK_KP_9)) + key &= 0x7F; + // Hack for keys over 256 and below command keys but makes Hungarian work. + // This will have to change for Unicode + else if (key >= 0xFE00) + key = KeyTranslate(key); +#if GTK_MAJOR_VERSION < 2 + else if (!IsUnicodeMode() && (key >= 0x100) && (key < 0x1000)) + key &= 0xff; +#endif + + bool consumed = false; + bool added = KeyDown(key, shift, ctrl, alt, &consumed) != 0; + if (!consumed) + consumed = added; + //fprintf(stderr, "SK-key: %d %x %x\n",event->keyval, event->state, consumed); + if (event->keyval == 0xffffff && event->length > 0) { + ClearSelection(); + if (pdoc->InsertCString(CurrentPosition(), event->string)) { + MovePositionTo(CurrentPosition() + event->length); + } + } + return consumed; +} + +gboolean ScintillaGTK::KeyPress(GtkWidget *widget, GdkEventKey *event) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + return sciThis->KeyThis(event); +} + +gboolean ScintillaGTK::KeyRelease(GtkWidget *, GdkEventKey * /*event*/) { + //Platform::DebugPrintf("SC-keyrel: %d %x %3s\n",event->keyval, event->state, event->string); + return FALSE; +} + +#if GTK_MAJOR_VERSION >= 2 +gboolean ScintillaGTK::ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis) { + return sciThis->ExposePreeditThis(widget, ose); +} + +gboolean ScintillaGTK::ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose) { + gchar *str; + gint cursor_pos; + PangoAttrList *attrs; + + gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); + PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); + pango_layout_set_attributes(layout, attrs); + + GdkGC *gc = gdk_gc_new(widget->window); + GdkColor color[2] = { {0, 0x0000, 0x0000, 0x0000}, + {0, 0xffff, 0xffff, 0xffff}}; + gdk_color_alloc(gdk_colormap_get_system(), color); + gdk_color_alloc(gdk_colormap_get_system(), color + 1); + + gdk_gc_set_foreground(gc, color + 1); + gdk_draw_rectangle(widget->window, gc, TRUE, ose->area.x, ose->area.y, + ose->area.width, ose->area.height); + + gdk_gc_set_foreground(gc, color); + gdk_gc_set_background(gc, color + 1); + gdk_draw_layout(widget->window, gc, 0, 0, layout); + + gdk_gc_unref(gc); + g_free(str); + pango_attr_list_unref(attrs); + g_object_unref(layout); + return TRUE; +} + +void ScintillaGTK::Commit(GtkIMContext *, char *str, ScintillaGTK *sciThis) { + sciThis->CommitThis(str); +} + +void ScintillaGTK::CommitThis(char *utfVal) { + //~ fprintf(stderr, "Commit '%s'\n", utfVal); + if (IsUnicodeMode()) { + AddCharUTF(utfVal,strlen(utfVal)); + } else { + const char *source = CharacterSetID(); + if (*source) { + Converter conv(source, "UTF-8", true); + if (conv) { + char localeVal[4]="\0\0\0"; + char *pin = utfVal; + size_t inLeft = strlen(utfVal); + char *pout = localeVal; + size_t outLeft = sizeof(localeVal); + size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft); + if (conversions != ((size_t)(-1))) { + *pout = '\0'; + for (int i=0; localeVal[i]; i++) { + AddChar(localeVal[i]); + } + } else { + fprintf(stderr, "Conversion failed '%s'\n", utfVal); + } + } + } + } +} + +void ScintillaGTK::PreeditChanged(GtkIMContext *, ScintillaGTK *sciThis) { + sciThis->PreeditChangedThis(); +} + +void ScintillaGTK::PreeditChangedThis() { + gchar *str; + PangoAttrList *attrs; + gint cursor_pos; + gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); + if (strlen(str) > 0){ + PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); + pango_layout_set_attributes(layout, attrs); + + gint w, h; + pango_layout_get_pixel_size(layout, &w, &h); + g_object_unref(layout); + + gint x, y; + gdk_window_get_origin((PWidget(wText))->window, &x, &y); + + Point pt = LocationFromPosition(currentPos); + if (pt.x < 0) + pt.x = 0; + if (pt.y < 0) + pt.y = 0; + + gtk_window_move(GTK_WINDOW(PWidget(wPreedit)), x+pt.x, y+pt.y); + gtk_window_resize(GTK_WINDOW(PWidget(wPreedit)), w, h); + gtk_widget_show(PWidget(wPreedit)); + gtk_widget_queue_draw_area(PWidget(wPreeditDraw), 0, 0, w, h); + } else { + gtk_widget_hide(PWidget(wPreedit)); + } + g_free(str); + pango_attr_list_unref(attrs); +} +#endif + +gint ScintillaGTK::StyleSetText(GtkWidget *widget, GtkStyle *, void*) { + if (widget->window != NULL) + gdk_window_set_back_pixmap(widget->window, NULL, FALSE); + return FALSE; +} + +gint ScintillaGTK::RealizeText(GtkWidget *widget, void*) { + if (widget->window != NULL) + gdk_window_set_back_pixmap(widget->window, NULL, FALSE); + return FALSE; +} + +#if GLIB_MAJOR_VERSION < 2 +void ScintillaGTK::Destroy(GtkObject *object) +#else +void ScintillaGTK::Destroy(GObject *object) +#endif +{ + ScintillaObject *scio = reinterpret_cast(object); + // This avoids a double destruction + if (!scio->pscin) + return; + ScintillaGTK *sciThis = reinterpret_cast(scio->pscin); + //Platform::DebugPrintf("Destroying %x %x\n", sciThis, object); + sciThis->Finalise(); + +#if GLIB_MAJOR_VERSION < 2 + if (GTK_OBJECT_CLASS(parent_class)->destroy) + (* GTK_OBJECT_CLASS(parent_class)->destroy)(object); +#else + // IS ANYTHING NEEDED ? +#endif + + delete sciThis; + scio->pscin = 0; +} + +static void DrawChild(GtkWidget *widget, GdkRectangle *area) { + GdkRectangle areaIntersect; + if (widget && + GTK_WIDGET_DRAWABLE(widget) && + gtk_widget_intersect(widget, area, &areaIntersect)) { + gtk_widget_draw(widget, &areaIntersect); + } +} + +void ScintillaGTK::Draw(GtkWidget *widget, GdkRectangle *area) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Draw %p %0d,%0d %0d,%0d\n", widget, area->x, area->y, area->width, area->height); + PRectangle rcPaint(area->x, area->y, area->x + area->width, area->y + area->height); + sciThis->SyncPaint(rcPaint); + if (GTK_WIDGET_DRAWABLE(PWidget(sciThis->wMain))) { + DrawChild(PWidget(sciThis->scrollbarh), area); + DrawChild(PWidget(sciThis->scrollbarv), area); + } + +#ifdef INTERNATIONAL_INPUT + Point pt = sciThis->LocationFromPosition(sciThis->currentPos); + pt.y += sciThis->vs.lineHeight - 2; + if (pt.x < 0) pt.x = 0; + if (pt.y < 0) pt.y = 0; + CursorMoved(widget, pt.x, pt.y, sciThis); +#endif +} + +gint ScintillaGTK::ExposeTextThis(GtkWidget * /*widget*/, GdkEventExpose *ose) { + paintState = painting; + + rcPaint.left = ose->area.x; + rcPaint.top = ose->area.y; + rcPaint.right = ose->area.x + ose->area.width; + rcPaint.bottom = ose->area.y + ose->area.height; + + PLATFORM_ASSERT(rgnUpdate == NULL); +#if GTK_MAJOR_VERSION >= 2 + rgnUpdate = gdk_region_copy(ose->region); +#endif + PRectangle rcClient = GetClientRectangle(); + paintingAllText = rcPaint.Contains(rcClient); + Surface *surfaceWindow = Surface::Allocate(); + if (surfaceWindow) { + surfaceWindow->Init(PWidget(wText)->window, PWidget(wText)); + Paint(surfaceWindow, rcPaint); + surfaceWindow->Release(); + delete surfaceWindow; + } + if (paintState == paintAbandoned) { + // Painting area was insufficient to cover new styling or brace highlight positions + FullPaint(); + } + paintState = notPainting; + + if (rgnUpdate) { + gdk_region_destroy(rgnUpdate); + } + rgnUpdate = 0; + + return FALSE; +} + +gint ScintillaGTK::ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis) { + return sciThis->ExposeTextThis(widget, ose); +} + +gint ScintillaGTK::ExposeMain(GtkWidget *widget, GdkEventExpose *ose) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Expose Main %0d,%0d %0d,%0d\n", + //ose->area.x, ose->area.y, ose->area.width, ose->area.height); + return sciThis->Expose(widget, ose); +} + +gint ScintillaGTK::Expose(GtkWidget *, GdkEventExpose *ose) { + //fprintf(stderr, "Expose %0d,%0d %0d,%0d\n", + //ose->area.x, ose->area.y, ose->area.width, ose->area.height); + +#if GTK_MAJOR_VERSION < 2 + + paintState = painting; + + rcPaint.left = ose->area.x; + rcPaint.top = ose->area.y; + rcPaint.right = ose->area.x + ose->area.width; + rcPaint.bottom = ose->area.y + ose->area.height; + + PRectangle rcClient = GetClientRectangle(); + paintingAllText = rcPaint.Contains(rcClient); + Surface *surfaceWindow = Surface::Allocate(); + if (surfaceWindow) { + surfaceWindow->Init(PWidget(wMain)->window, PWidget(wMain)); + + // Fill the corner between the scrollbars + if (verticalScrollBarVisible) { + if (horizontalScrollBarVisible && (wrapState == eWrapNone)) { + PRectangle rcCorner = wMain.GetClientPosition(); + rcCorner.left = rcCorner.right - scrollBarWidth + 1; + rcCorner.top = rcCorner.bottom - scrollBarHeight + 1; + //fprintf(stderr, "Corner %0d,%0d %0d,%0d\n", + //rcCorner.left, rcCorner.top, rcCorner.right, rcCorner.bottom); + surfaceWindow->FillRectangle(rcCorner, + vs.styles[STYLE_LINENUMBER].back.allocated); + } + } + + //Paint(surfaceWindow, rcPaint); + surfaceWindow->Release(); + delete surfaceWindow; + } + if (paintState == paintAbandoned) { + // Painting area was insufficient to cover new styling or brace highlight positions + FullPaint(); + } + paintState = notPainting; + +#else + // For GTK+ 2, the text is painted in ExposeText + gtk_container_propagate_expose( + GTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarh), ose); + gtk_container_propagate_expose( + GTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarv), ose); +#endif + + return FALSE; +} + +void ScintillaGTK::ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) { + sciThis->ScrollTo(static_cast(adj->value), false); +} + +void ScintillaGTK::ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) { + sciThis->HorizontalScrollTo(static_cast(adj->value * 2)); +} + +void ScintillaGTK::SelectionReceived(GtkWidget *widget, + GtkSelectionData *selection_data, guint) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Selection received\n"); + sciThis->ReceivedSelection(selection_data); +} + +void ScintillaGTK::SelectionGet(GtkWidget *widget, + GtkSelectionData *selection_data, guint info, guint) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Selection get\n"); + if (selection_data->selection == GDK_SELECTION_PRIMARY) { + if (sciThis->primary.s == NULL) { + sciThis->CopySelectionRange(&sciThis->primary); + } + sciThis->GetSelection(selection_data, info, &sciThis->primary); + } +#ifndef USE_GTK_CLIPBOARD + else { + sciThis->GetSelection(selection_data, info, &sciThis->copyText); + } +#endif +} + +gint ScintillaGTK::SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Selection clear\n"); + sciThis->UnclaimSelection(selection_event); + return gtk_selection_clear(widget, selection_event); +} + +#if GTK_MAJOR_VERSION < 2 +gint ScintillaGTK::SelectionNotify(GtkWidget *widget, GdkEventSelection *selection_event) { + //Platform::DebugPrintf("Selection notify\n"); + return gtk_selection_notify(widget, selection_event); +} +#endif + +void ScintillaGTK::DragBegin(GtkWidget *, GdkDragContext *) { + //Platform::DebugPrintf("DragBegin\n"); +} + +gboolean ScintillaGTK::DragMotion(GtkWidget *widget, GdkDragContext *context, + gint x, gint y, guint dragtime) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + Point npt(x, y); + sciThis->inDragDrop = true; + sciThis->SetDragPosition(sciThis->PositionFromLocation(npt)); + GdkDragAction preferredAction = context->suggested_action; + if (context->actions == static_cast + (GDK_ACTION_COPY | GDK_ACTION_MOVE)) { + preferredAction = GDK_ACTION_MOVE; + } + gdk_drag_status(context, preferredAction, dragtime); + return FALSE; +} + +void ScintillaGTK::DragLeave(GtkWidget *widget, GdkDragContext * /*context*/, guint) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + sciThis->SetDragPosition(invalidPosition); + //Platform::DebugPrintf("DragLeave %x\n", sciThis); +} + +void ScintillaGTK::DragEnd(GtkWidget *widget, GdkDragContext * /*context*/) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + // If drag did not result in drop here or elsewhere + if (!sciThis->dragWasDropped) + sciThis->SetEmptySelection(sciThis->posDrag); + sciThis->SetDragPosition(invalidPosition); + //Platform::DebugPrintf("DragEnd %x %d\n", sciThis, sciThis->dragWasDropped); +} + +gboolean ScintillaGTK::Drop(GtkWidget *widget, GdkDragContext * /*context*/, + gint, gint, guint) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + //Platform::DebugPrintf("Drop %x\n", sciThis); + sciThis->SetDragPosition(invalidPosition); + return FALSE; +} + +void ScintillaGTK::DragDataReceived(GtkWidget *widget, GdkDragContext * /*context*/, + gint, gint, GtkSelectionData *selection_data, guint /*info*/, guint) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + sciThis->ReceivedDrop(selection_data); + sciThis->SetDragPosition(invalidPosition); +} + +void ScintillaGTK::DragDataGet(GtkWidget *widget, GdkDragContext *context, + GtkSelectionData *selection_data, guint info, guint) { + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + sciThis->dragWasDropped = true; + if (sciThis->currentPos != sciThis->anchor) { + sciThis->GetSelection(selection_data, info, &sciThis->drag); + } + if (context->action == GDK_ACTION_MOVE) { + int selStart = sciThis->SelectionStart(); + int selEnd = sciThis->SelectionEnd(); + if (sciThis->posDrop > selStart) { + if (sciThis->posDrop > selEnd) + sciThis->posDrop = sciThis->posDrop - (selEnd - selStart); + else + sciThis->posDrop = selStart; + sciThis->posDrop = sciThis->pdoc->ClampPositionIntoDocument(sciThis->posDrop); + } + sciThis->ClearSelection(); + } + sciThis->SetDragPosition(invalidPosition); +} + +int ScintillaGTK::TimeOut(ScintillaGTK *sciThis) { + sciThis->Tick(); + return 1; +} + +int ScintillaGTK::IdleCallback(ScintillaGTK *sciThis) { + // Idler will be automatically stoped, if there is nothing + // to do while idle. + bool ret = sciThis->Idle(); + if (ret == false) { + // FIXME: This will remove the idler from GTK, we don't want to + // remove it as it is removed automatically when this function + // returns false (although, it should be harmless). + sciThis->SetIdle(false); + } + return ret; +} + +void ScintillaGTK::PopUpCB(ScintillaGTK *sciThis, guint action, GtkWidget *) { + if (action) { + sciThis->Command(action); + } +} + +gint ScintillaGTK::PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis) { + if (event->window != widget->window) + return FALSE; + if (event->type != GDK_BUTTON_PRESS) + return FALSE; + Point pt; + pt.x = int(event->x); + pt.y = int(event->y); + sciThis->ct.MouseClick(pt); + sciThis->CallTipClick(); +#if GTK_MAJOR_VERSION >= 2 + return TRUE; +#else + return FALSE; +#endif +} + +gint ScintillaGTK::ExposeCT(GtkWidget *widget, GdkEventExpose * /*ose*/, CallTip *ctip) { + Surface *surfaceWindow = Surface::Allocate(); + if (surfaceWindow) { + surfaceWindow->Init(widget->window, widget); + ctip->PaintCT(surfaceWindow); + surfaceWindow->Release(); + delete surfaceWindow; + } + return TRUE; +} + +sptr_t ScintillaGTK::DirectFunction( + ScintillaGTK *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + return sciThis->WndProc(iMessage, wParam, lParam); +} + +sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + ScintillaGTK *psci = reinterpret_cast(sci->pscin); + return psci->WndProc(iMessage, wParam, lParam); +} + +static void scintilla_class_init(ScintillaClass *klass); +static void scintilla_init(ScintillaObject *sci); + +extern void Platform_Initialise(); +extern void Platform_Finalise(); + +#if GLIB_MAJOR_VERSION < 2 +GtkType scintilla_get_type() { + static GtkType scintilla_type = 0; + + if (!scintilla_type) { + Platform_Initialise(); + static GtkTypeInfo scintilla_info = { + "Scintilla", + sizeof (ScintillaObject), + sizeof (ScintillaClass), + (GtkClassInitFunc) scintilla_class_init, + (GtkObjectInitFunc) scintilla_init, + (gpointer) NULL, + (gpointer) NULL, + 0 + }; + + scintilla_type = gtk_type_unique(gtk_container_get_type(), &scintilla_info); + } + + return scintilla_type; +} +#else +GType scintilla_get_type() { + static GType scintilla_type = 0; + + if (!scintilla_type) { + scintilla_type = g_type_from_name("Scintilla"); + if (!scintilla_type) { + static GTypeInfo scintilla_info = { + (guint16) sizeof (ScintillaClass), + NULL, //(GBaseInitFunc) + NULL, //(GBaseFinalizeFunc) + (GClassInitFunc) scintilla_class_init, + NULL, //(GClassFinalizeFunc) + NULL, //gconstpointer data + (guint16) sizeof (ScintillaObject), + 0, //n_preallocs + (GInstanceInitFunc) scintilla_init, + NULL //(GTypeValueTable*) + }; + + scintilla_type = g_type_register_static( + GTK_TYPE_CONTAINER, "Scintilla", &scintilla_info, (GTypeFlags) 0); + } + } + + return scintilla_type; +} +#endif + +void ScintillaGTK::ClassInit(OBJECT_CLASS* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class) { +#if GLIB_MAJOR_VERSION >= 2 + Platform_Initialise(); +#endif + atomClipboard = gdk_atom_intern("CLIPBOARD", FALSE); + atomUTF8 = gdk_atom_intern("UTF8_STRING", FALSE); + atomString = GDK_SELECTION_TYPE_STRING; + atomUriList = gdk_atom_intern("text/uri-list", FALSE); + atomDROPFILES_DND = gdk_atom_intern("DROPFILES_DND", FALSE); + + // Define default signal handlers for the class: Could move more + // of the signal handlers here (those that currently attached to wDraw + // in Initialise() may require coordinate translation?) + +#if GLIB_MAJOR_VERSION < 2 + object_class->destroy = Destroy; +#else + object_class->finalize = Destroy; +#endif + widget_class->size_request = SizeRequest; + widget_class->size_allocate = SizeAllocate; + widget_class->expose_event = ExposeMain; +#if GTK_MAJOR_VERSION < 2 + widget_class->draw = Draw; +#endif + widget_class->motion_notify_event = Motion; + widget_class->button_press_event = Press; + widget_class->button_release_event = MouseRelease; +#if PLAT_GTK_WIN32 || (GTK_MAJOR_VERSION >= 2) + widget_class->scroll_event = ScrollEvent; +#endif + widget_class->key_press_event = KeyPress; + widget_class->key_release_event = KeyRelease; + widget_class->focus_in_event = FocusIn; + widget_class->focus_out_event = FocusOut; + widget_class->selection_received = SelectionReceived; + widget_class->selection_get = SelectionGet; + widget_class->selection_clear_event = SelectionClear; +#if GTK_MAJOR_VERSION < 2 + widget_class->selection_notify_event = SelectionNotify; +#endif + + widget_class->drag_data_received = DragDataReceived; + widget_class->drag_motion = DragMotion; + widget_class->drag_leave = DragLeave; + widget_class->drag_end = DragEnd; + widget_class->drag_drop = Drop; + widget_class->drag_data_get = DragDataGet; + + widget_class->realize = Realize; + widget_class->unrealize = UnRealize; + widget_class->map = Map; + widget_class->unmap = UnMap; + + container_class->forall = MainForAll; +} + +#if GLIB_MAJOR_VERSION < 2 +#define GTK_CLASS_TYPE(c) (c->type) +#define SIG_MARSHAL gtk_marshal_NONE__INT_POINTER +#define MARSHAL_ARGUMENTS GTK_TYPE_INT, GTK_TYPE_POINTER +#else +#define SIG_MARSHAL scintilla_marshal_NONE__INT_POINTER +#define MARSHAL_ARGUMENTS G_TYPE_INT, G_TYPE_POINTER +#endif + +static void scintilla_class_init(ScintillaClass *klass) { + OBJECT_CLASS *object_class = (OBJECT_CLASS*) klass; + GtkWidgetClass *widget_class = (GtkWidgetClass*) klass; + GtkContainerClass *container_class = (GtkContainerClass*) klass; + +#if GLIB_MAJOR_VERSION < 2 + parent_class = (GtkWidgetClass*) gtk_type_class(gtk_container_get_type()); + + scintilla_signals[COMMAND_SIGNAL] = gtk_signal_new( + "command", + GTK_RUN_LAST, + GTK_CLASS_TYPE(object_class), + GTK_SIGNAL_OFFSET(ScintillaClass, command), + SIG_MARSHAL, + GTK_TYPE_NONE, + 2, MARSHAL_ARGUMENTS); + + scintilla_signals[NOTIFY_SIGNAL] = gtk_signal_new( + SCINTILLA_NOTIFY, + GTK_RUN_LAST, + GTK_CLASS_TYPE(object_class), + GTK_SIGNAL_OFFSET(ScintillaClass, notify), + SIG_MARSHAL, + GTK_TYPE_NONE, + 2, MARSHAL_ARGUMENTS); + gtk_object_class_add_signals(object_class, + reinterpret_cast(scintilla_signals), LAST_SIGNAL); +#else + GSignalFlags sigflags = GSignalFlags(G_SIGNAL_ACTION | G_SIGNAL_RUN_LAST); + scintilla_signals[COMMAND_SIGNAL] = g_signal_new( + "command", + G_TYPE_FROM_CLASS(object_class), + sigflags, + G_STRUCT_OFFSET(ScintillaClass, command), + NULL, //(GSignalAccumulator) + NULL, //(gpointer) + SIG_MARSHAL, + G_TYPE_NONE, + 2, MARSHAL_ARGUMENTS); + + scintilla_signals[NOTIFY_SIGNAL] = g_signal_new( + SCINTILLA_NOTIFY, + G_TYPE_FROM_CLASS(object_class), + sigflags, + G_STRUCT_OFFSET(ScintillaClass, notify), + NULL, + NULL, + SIG_MARSHAL, + G_TYPE_NONE, + 2, MARSHAL_ARGUMENTS); +#endif + klass->command = NULL; + klass->notify = NULL; + + ScintillaGTK::ClassInit(object_class, widget_class, container_class); +} + +static void scintilla_init(ScintillaObject *sci) { + GTK_WIDGET_SET_FLAGS(sci, GTK_CAN_FOCUS); + sci->pscin = new ScintillaGTK(sci); +} + +GtkWidget* scintilla_new() { +#if GLIB_MAJOR_VERSION < 2 + return GTK_WIDGET(gtk_type_new(scintilla_get_type())); +#else + return GTK_WIDGET(g_object_new(scintilla_get_type(), NULL)); +#endif +} + +void scintilla_set_id(ScintillaObject *sci, uptr_t id) { + ScintillaGTK *psci = reinterpret_cast(sci->pscin); + psci->ctrlID = id; +} + +void scintilla_release_resources(void) { + Platform_Finalise(); +} diff --git a/scintilla/gtk/deps.mak b/scintilla/gtk/deps.mak new file mode 100644 index 00000000..288404d5 --- /dev/null +++ b/scintilla/gtk/deps.mak @@ -0,0 +1,191 @@ +PlatGTK.o: PlatGTK.cxx Converter.h \ + ../include/Platform.h \ + ../include/Scintilla.h ../include/ScintillaWidget.h \ + ../src/UniConversion.h ../src/XPM.h +ScintillaGTK.o: ScintillaGTK.cxx Converter.h \ + ../include/Platform.h \ + ../include/Scintilla.h ../include/ScintillaWidget.h \ + ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ + ../include/Accessor.h ../include/KeyWords.h ../src/ContractionState.h \ + ../src/SVector.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ + ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ + ../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h ../src/Document.h \ + ../src/Editor.h ../src/ScintillaBase.h ../src/UniConversion.h \ + ../src/ExternalLexer.h +AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h +CallTip.o: ../src/CallTip.cxx ../include/Platform.h \ + ../include/Scintilla.h ../src/CallTip.h +CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \ + ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h +CharClassify.o: ../src/CharClassify.cxx ../src/CharClassify.h +ContractionState.o: ../src/ContractionState.cxx ../include/Platform.h \ + ../src/ContractionState.h +DocumentAccessor.o: ../src/DocumentAccessor.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../src/SVector.h \ + ../include/Accessor.h ../src/DocumentAccessor.h ../src/CellBuffer.h \ + ../include/Scintilla.h ../src/CharClassify.h ../src/Document.h +Document.o: ../src/Document.cxx ../include/Platform.h \ + ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h \ + ../src/CharClassify.h ../src/Document.h ../src/RESearch.h +Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \ + ../src/ContractionState.h ../src/SVector.h ../src/CellBuffer.h \ + ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ + ../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h ../src/Document.h ../src/Editor.h +ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \ + ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ + ../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \ + ../src/ExternalLexer.h +Indicator.o: ../src/Indicator.cxx ../include/Platform.h \ + ../include/Scintilla.h ../src/Indicator.h +KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \ + ../src/KeyMap.h +KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexAda.o: ../src/LexAda.cxx ../include/Platform.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/PropSet.h ../include/SString.h \ + ../include/KeyWords.h ../include/SciLexer.h +LexAsm.o: ../src/LexAsm.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexAVE.o: ../src/LexAVE.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexBaan.o: ../src/LexBaan.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexBullant.o: ../src/LexBullant.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexCLW.o: ../src/LexCLW.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexConf.o: ../src/LexConf.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h +LexCPP.o: ../src/LexCPP.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexCrontab.o: ../src/LexCrontab.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexCSS.o: ../src/LexCSS.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexEiffel.o: ../src/LexEiffel.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ + ../include/SciLexer.h +LexErlang.o: ../src/LexErlang.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ + ../include/SciLexer.h +LexEScript.o: ../src/LexEScript.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ + ../include/SciLexer.h +LexForth.o: ../src/LexForth.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexFortran.o: ../src/LexFortran.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ + ../include/SciLexer.h +LexHTML.o: ../src/LexHTML.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexLisp.o: ../src/LexLisp.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h +LexLout.o: ../src/LexLout.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexLua.o: ../src/LexLua.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexMatlab.o: ../src/LexMatlab.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ + ../include/SciLexer.h +LexMetapost.o: ../src/LexMetapost.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \ + ../src/StyleContext.h +LexMMIXAL.o: ../src/LexMMIXAL.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ + ../include/SciLexer.h +LexMPT.o: ../src/LexMPT.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h +LexNsis.o: ../src/LexNsis.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h +LexOthers.o: ../src/LexOthers.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexPascal.o: ../src/LexPascal.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \ + ../src/StyleContext.h +LexPB.o: ../src/LexPB.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexPerl.o: ../src/LexPerl.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h +LexPOV.o: ../src/LexPOV.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexPS.o: ../src/LexPS.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexPython.o: ../src/LexPython.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \ + ../include/SciLexer.h +LexRuby.o: ../src/LexRuby.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h +LexScriptol.o: ../src/LexScriptol.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexSQL.o: ../src/LexSQL.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h +LexTeX.o: ../src/LexTeX.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../include/KeyWords.h \ + ../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h +LexVB.o: ../src/LexVB.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LexYAML.o: ../src/LexYAML.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h ../include/Accessor.h ../src/StyleContext.h \ + ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h +LineMarker.o: ../src/LineMarker.cxx ../include/Platform.h \ + ../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h +PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \ + ../include/SString.h +RESearch.o: ../src/RESearch.cxx ../src/RESearch.h +ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \ + ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ + ../include/SciLexer.h ../include/Accessor.h ../src/DocumentAccessor.h \ + ../include/KeyWords.h ../src/ContractionState.h ../src/SVector.h \ + ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \ + ../src/XPM.h ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ + ../src/AutoComplete.h ../src/CharClassify.h ../src/Document.h ../src/Editor.h \ + ../src/ScintillaBase.h +StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../src/StyleContext.h +Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ + ../src/Style.h +UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h +ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \ + ../include/Scintilla.h ../src/Indicator.h ../src/XPM.h \ + ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h +WindowAccessor.o: ../src/WindowAccessor.cxx ../include/Platform.h \ + ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ + ../include/WindowAccessor.h ../include/Scintilla.h +XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h diff --git a/scintilla/gtk/makefile b/scintilla/gtk/makefile new file mode 100644 index 00000000..e48a8470 --- /dev/null +++ b/scintilla/gtk/makefile @@ -0,0 +1,95 @@ +# Make file for Scintilla on Linux or compatible OS +# Copyright 1998-2001 by Neil Hodgson +# The License.txt file describes the conditions under which this software may be distributed. +# This makefile assumes GCC 3.1 is used and changes will be needed to use other compilers. +# GNU make does not like \r\n line endings so should be saved to CVS in binary form. +# Builds for GTK+ 2 if available else GTK+ 1. +# To force GTK+ 2 build, define GTK2 on the make command line. +# To force GTK+ 1 build, define GTK1 on the make command line. + +.SUFFIXES: .cxx .c .o .h .a +CC = g++ +CCOMP = gcc +AR = ar +RANLIB = touch + +ifeq ($(shell uname),Darwin) +RANLIB = ranlib +endif + +COMPLIB=../bin/scintilla.a + +vpath %.h ../src ../include +vpath %.cxx ../src + +INCLUDEDIRS=-I ../include -I ../src +CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -Os -DGTK -DSCI_LEXER $(INCLUDEDIRS) + +ifdef NOTHREADS +THREADFLAGS=-DG_THREADS_IMPL_NONE +else +THREADFLAGS= +endif + +ifdef DEBUG +CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS) +else +CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS) +endif + +# If explicit setting of GTK1 or GTK2 then use that else look for +# pkg-config which is an OK indication that GTK2 is available +ifdef GTK2 +CONFIGFLAGS=pkg-config --cflags gtk+-2.0 +MARSHALLER=scintilla-marshal.o +else +ifdef GTK1 +CONFIGFLAGS=gtk-config --cflags +else +ifneq (,$(findstring /,$(shell whereis pkg-config))) +CONFIGFLAGS=pkg-config --cflags gtk+-2.0 +MARSHALLER=scintilla-marshal.o +else +CONFIGFLAGS=gtk-config --cflags +endif +endif +endif + +.cxx.o: + $(CC) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $< +.c.o: + $(CCOMP) `$(CONFIGFLAGS)` $(CXXFLAGS) -w -c $< + +#++Autogenerated -- run src/LexGen.py to regenerate +#**LEXOBJS=\\\n\(\*.o \) +LEXOBJS=\ +LexAda.o LexAPDL.o LexAsm.o LexAsn1.o LexAU3.o LexAVE.o LexBaan.o LexBash.o \ +LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o LexConf.o LexCPP.o \ +LexCrontab.o LexCsound.o LexCSS.o LexD.o LexEiffel.o LexErlang.o LexEScript.o \ +LexFlagship.o LexForth.o LexFortran.o LexGui4Cli.o LexHaskell.o LexHTML.o \ +LexInno.o LexKix.o LexLisp.o LexLout.o LexLua.o LexMatlab.o LexMetapost.o \ +LexMMIXAL.o LexMPT.o LexMSSQL.o LexNsis.o LexOpal.o LexOthers.o LexPascal.o \ +LexPB.o LexPerl.o LexPOV.o LexPS.o LexPython.o LexRebol.o LexRuby.o \ +LexScriptol.o LexSmalltalk.o LexSpecman.o LexSpice.o LexSQL.o LexTADS3.o \ +LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o +#--Autogenerated -- end of automatically generated section + +all: $(COMPLIB) + +clean: + rm -f *.o $(COMPLIB) + +deps: + $(CC) -MM `$(CONFIGFLAGS)` $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak + +$(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \ + CharClassify.o Document.o CallTip.o \ + ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatGTK.o \ + KeyMap.o LineMarker.o ScintillaGTK.o CellBuffer.o ViewStyle.o \ + RESearch.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \ + $(MARSHALLER) $(LEXOBJS) + $(AR) rc $@ $^ + $(RANLIB) $@ + +# Automatically generate header dependencies with "make deps" +include deps.mak diff --git a/scintilla/gtk/scintilla-marshal.c b/scintilla/gtk/scintilla-marshal.c new file mode 100644 index 00000000..02da1843 --- /dev/null +++ b/scintilla/gtk/scintilla-marshal.c @@ -0,0 +1,86 @@ + +#include + + +#ifdef G_ENABLE_DEBUG +#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) +#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) +#define g_marshal_value_peek_int(v) g_value_get_int (v) +#define g_marshal_value_peek_uint(v) g_value_get_uint (v) +#define g_marshal_value_peek_long(v) g_value_get_long (v) +#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) +#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) +#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) +#define g_marshal_value_peek_enum(v) g_value_get_enum (v) +#define g_marshal_value_peek_flags(v) g_value_get_flags (v) +#define g_marshal_value_peek_float(v) g_value_get_float (v) +#define g_marshal_value_peek_double(v) g_value_get_double (v) +#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) +#define g_marshal_value_peek_param(v) g_value_get_param (v) +#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) +#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) +#define g_marshal_value_peek_object(v) g_value_get_object (v) +#else /* !G_ENABLE_DEBUG */ +/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. + * Do not access GValues directly in your code. Instead, use the + * g_value_get_*() functions + */ +#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int +#define g_marshal_value_peek_char(v) (v)->data[0].v_int +#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint +#define g_marshal_value_peek_int(v) (v)->data[0].v_int +#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint +#define g_marshal_value_peek_long(v) (v)->data[0].v_long +#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 +#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 +#define g_marshal_value_peek_enum(v) (v)->data[0].v_int +#define g_marshal_value_peek_flags(v) (v)->data[0].v_uint +#define g_marshal_value_peek_float(v) (v)->data[0].v_float +#define g_marshal_value_peek_double(v) (v)->data[0].v_double +#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#endif /* !G_ENABLE_DEBUG */ + + +/* NONE:INT,POINTER (scintilla-marshal.list:1) */ +void +scintilla_marshal_VOID__INT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__INT_POINTER) (gpointer data1, + gint arg_1, + gpointer arg_2, + gpointer data2); + register GMarshalFunc_VOID__INT_POINTER callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__INT_POINTER) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_int (param_values + 1), + g_marshal_value_peek_pointer (param_values + 2), + data2); +} + diff --git a/scintilla/gtk/scintilla-marshal.h b/scintilla/gtk/scintilla-marshal.h new file mode 100644 index 00000000..28e94ccc --- /dev/null +++ b/scintilla/gtk/scintilla-marshal.h @@ -0,0 +1,21 @@ + +#ifndef __scintilla_marshal_MARSHAL_H__ +#define __scintilla_marshal_MARSHAL_H__ + +#include + +G_BEGIN_DECLS + +/* NONE:INT,POINTER (scintilla-marshal.list:1) */ +extern void scintilla_marshal_VOID__INT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +#define scintilla_marshal_NONE__INT_POINTER scintilla_marshal_VOID__INT_POINTER + +G_END_DECLS + +#endif /* __scintilla_marshal_MARSHAL_H__ */ + diff --git a/scintilla/gtk/scintilla-marshal.list b/scintilla/gtk/scintilla-marshal.list new file mode 100644 index 00000000..b3cd2aa8 --- /dev/null +++ b/scintilla/gtk/scintilla-marshal.list @@ -0,0 +1 @@ +NONE:INT,POINTER diff --git a/scintilla/gtk/scintilla.mak b/scintilla/gtk/scintilla.mak new file mode 100644 index 00000000..f8f45425 --- /dev/null +++ b/scintilla/gtk/scintilla.mak @@ -0,0 +1,497 @@ +# Make file for GTK+/Scintilla on Windows Visual C++ +# Borland C++ does not work +# Copyright 1998-2000 by Neil Hodgson +# The License.txt file describes the conditions under which this software may be distributed. +# This makefile is for using Visual C++ with nmake or Borland C++ with make depending on +# the setting of the VENDOR macro. If no VENDOR is defined n the command line then +# the tool used is automatically detected. +# Usage for Microsoft: +# nmake -f scintilla.mak +# Usage for Borland: +# make -f scintilla.mak +# For debug versions define DEBUG on the command line, for Borland: +# make DEBUG=1 -f scintilla.mak +# The main makefile uses mingw32 gcc and may be more current than this file. + +.SUFFIXES: .cxx + +DIR_O=. +DIR_BIN=..\bin + +COMPONENT=$(DIR_BIN)\Scintilla.dll +LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll +STATIC_LIB=$(DIR_BIN)\Scintilla-static.lib + +!IFNDEF VENDOR +!IFDEF _NMAKE_VER +#Microsoft nmake so make default VENDOR MICROSOFT +VENDOR=MICROSOFT +!ELSE +VENDOR=BORLAND +!ENDIF +!ENDIF + +!IF "$(VENDOR)"=="MICROSOFT" + +CC=cl +RC=rc +LD=link + +!IFDEF USE_GTK2 +MARSHALLER=$(DIR_O)\scintilla-marshal.obj +GTK_TOP= ../../gtk2 +TOP = $(GTK_TOP) +!INCLUDE $(TOP)/glib/build/win32/make.msc + +GTK_INCLUDES= -I$(GTK_TOP)/gtk+ \ + -I$(GTK_TOP)/gtk+/gdk \ + -I$(GTK_TOP)/glib/glib \ + -I$(GTK_TOP)/glib/gmodule \ + -I$(GTK_TOP)/glib \ + -I$(GTK_TOP)\libiconv\include \ + -I$(GTK_TOP)\pango \ + -I$(GTK_TOP)\atk +ALL_GTK_LIBS=$(GTK2_LIBS) $(GLIB_LIBS) $(LIBICONV_LIBS) +!ELSE +GTK_TOP= ../../win32gtk +GTK_INCLUDES= -I $(GTK_TOP)/gtk+ -I $(GTK_TOP)/gtk+/gdk -I $(GTK_TOP)/glib -I $(GTK_TOP)/glib/gmodule +ALL_GTK_LIBS=$(GTK_TOP)/gtk+/gtk/gtk-1.3.lib \ + $(GTK_TOP)/gtk+/gdk/gdk-1.3.lib \ + $(GTK_TOP)/glib/gmodule/gmodule-1.3.lib \ + $(GTK_TOP)/glib/glib-1.3.lib +!ENDIF + +INCLUDEDIRS=-I ../include -I ../src $(GTK_INCLUDES) +CXXFLAGS=/TP /W4 -DGTK -D_CRT_SECURE_NO_DEPRECATE=1 +CFLAGS=/W4 -DGTK +# For something scary:/Wp64 +CXXDEBUG=/Zi /Od /MDd -DDEBUG +CXXNDEBUG=/Ox /MD -DNDEBUG +NAMEFLAG=-Fo +LDFLAGS=/opt:nowin98 +LDDEBUG=/DEBUG +#LIBS=KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB +LIBS=$(ALL_GTK_LIBS) + +!IFDEF QUIET +CC=@$(CC) +CXXDEBUG=$(CXXDEBUG) /nologo +CXXNDEBUG=$(CXXNDEBUG) /nologo +LDFLAGS=$(LDFLAGS) /nologo +!ENDIF + +!ELSE +# BORLAND +!error Borland C++ not supported + +CC=bcc32 +RC=brcc32 -r +LD=ilink32 + +INCLUDEDIRS=-I../include -I../src +CXXFLAGS = -v +CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x- +# Above turns off warnings for clarfying parentheses and inlines with for not expanded +CXXDEBUG=-v -DDEBUG +CXXNDEBUG=-O1 -DNDEBUG +NAMEFLAG=-o +LDFLAGS= +LDDEBUG=-v +LIBS=import32 cw32mt + +!ENDIF + +!IFDEF DEBUG +CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG) +LDFLAGS=$(LDDEBUG) $(LDFLAGS) +!ELSE +CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG) +!ENDIF + +#ALL: $(STATIC_LIB) $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj +ALL: $(STATIC_LIB) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj + +clean:: + -del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\*.res $(DIR_BIN)\*.map + +SOBJS=\ + $(DIR_O)\AutoComplete.obj \ + $(DIR_O)\CallTip.obj \ + $(DIR_O)\CellBuffer.obj \ + $(DIR_O)\ContractionState.obj \ + $(DIR_O)\CharClassify.obj \ + $(DIR_O)\Document.obj \ + $(DIR_O)\Editor.obj \ + $(DIR_O)\ExternalLexer.obj \ + $(DIR_O)\Indicator.obj \ + $(DIR_O)\KeyMap.obj \ + $(DIR_O)\LineMarker.obj \ + $(DIR_O)\PlatGTK.obj \ + $(MARSHALLER) \ + $(DIR_O)\RESearch.obj \ + $(DIR_O)\PropSet.obj \ + $(DIR_O)\ScintillaBase.obj \ + $(DIR_O)\ScintillaGTK.obj \ + $(DIR_O)\Style.obj \ + $(DIR_O)\UniConversion.obj \ + $(DIR_O)\ViewStyle.obj \ + $(DIR_O)\XPM.obj + +#++Autogenerated -- run src/LexGen.py to regenerate +#**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\) +LEXOBJS=\ + $(DIR_O)\LexAda.obj \ + $(DIR_O)\LexAPDL.obj \ + $(DIR_O)\LexAsm.obj \ + $(DIR_O)\LexAsn1.obj \ + $(DIR_O)\LexAU3.obj \ + $(DIR_O)\LexAVE.obj \ + $(DIR_O)\LexBaan.obj \ + $(DIR_O)\LexBash.obj \ + $(DIR_O)\LexBasic.obj \ + $(DIR_O)\LexBullant.obj \ + $(DIR_O)\LexCaml.obj \ + $(DIR_O)\LexCLW.obj \ + $(DIR_O)\LexCmake.obj \ + $(DIR_O)\LexConf.obj \ + $(DIR_O)\LexCPP.obj \ + $(DIR_O)\LexCrontab.obj \ + $(DIR_O)\LexCsound.obj \ + $(DIR_O)\LexCSS.obj \ + $(DIR_O)\LexD.obj \ + $(DIR_O)\LexEiffel.obj \ + $(DIR_O)\LexErlang.obj \ + $(DIR_O)\LexEScript.obj \ + $(DIR_O)\LexFlagship.obj \ + $(DIR_O)\LexForth.obj \ + $(DIR_O)\LexFortran.obj \ + $(DIR_O)\LexGui4Cli.obj \ + $(DIR_O)\LexHaskell.obj \ + $(DIR_O)\LexHTML.obj \ + $(DIR_O)\LexInno.obj \ + $(DIR_O)\LexKix.obj \ + $(DIR_O)\LexLisp.obj \ + $(DIR_O)\LexLout.obj \ + $(DIR_O)\LexLua.obj \ + $(DIR_O)\LexMatlab.obj \ + $(DIR_O)\LexMetapost.obj \ + $(DIR_O)\LexMMIXAL.obj \ + $(DIR_O)\LexMPT.obj \ + $(DIR_O)\LexMSSQL.obj \ + $(DIR_O)\LexNsis.obj \ + $(DIR_O)\LexOpal.obj \ + $(DIR_O)\LexOthers.obj \ + $(DIR_O)\LexPascal.obj \ + $(DIR_O)\LexPB.obj \ + $(DIR_O)\LexPerl.obj \ + $(DIR_O)\LexPOV.obj \ + $(DIR_O)\LexPS.obj \ + $(DIR_O)\LexPython.obj \ + $(DIR_O)\LexRebol.obj \ + $(DIR_O)\LexRuby.obj \ + $(DIR_O)\LexScriptol.obj \ + $(DIR_O)\LexSmalltalk.obj \ + $(DIR_O)\LexSpecman.obj \ + $(DIR_O)\LexSpice.obj \ + $(DIR_O)\LexSQL.obj \ + $(DIR_O)\LexTADS3.obj \ + $(DIR_O)\LexTCL.obj \ + $(DIR_O)\LexTeX.obj \ + $(DIR_O)\LexVB.obj \ + $(DIR_O)\LexVerilog.obj \ + $(DIR_O)\LexVHDL.obj \ + $(DIR_O)\LexYAML.obj \ + +#--Autogenerated -- end of automatically generated section + +LOBJS=\ + $(DIR_O)\AutoComplete.obj \ + $(DIR_O)\CallTip.obj \ + $(DIR_O)\CellBuffer.obj \ + $(DIR_O)\ContractionState.obj \ + $(DIR_O)\CharClassify.obj \ + $(DIR_O)\Document.obj \ + $(DIR_O)\DocumentAccessor.obj \ + $(DIR_O)\Editor.obj \ + $(DIR_O)\Indicator.obj \ + $(DIR_O)\KeyMap.obj \ + $(DIR_O)\KeyWords.obj \ + $(DIR_O)\LineMarker.obj \ + $(DIR_O)\PlatGTK.obj \ + $(MARSHALLER) \ + $(DIR_O)\RESearch.obj \ + $(DIR_O)\PropSet.obj \ + $(DIR_O)\ScintillaBaseL.obj \ + $(DIR_O)\ScintillaGTKL.obj \ + $(DIR_O)\Style.obj \ + $(DIR_O)\StyleContext.obj \ + $(DIR_O)\UniConversion.obj \ + $(DIR_O)\ViewStyle.obj \ + $(DIR_O)\XPM.obj \ + $(DIR_O)\ExternalLexer.obj \ + $(LEXOBJS) + +!IF "$(VENDOR)"=="MICROSOFT" + +$(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res + lib.exe /OUT:$@ $(LOBJS) $(LIBS) + +$(COMPONENT): $(SOBJS) #$(DIR_O)\ScintRes.res + $(LD) $(LDFLAGS) /DLL /OUT:$@ $(SOBJS) $(LIBS) + +$(DIR_O)\ScintRes.res : ScintRes.rc + $(RC) /fo$@ $(*B).rc + +$(LEXCOMPONENT): $(LOBJS) #$(DIR_O)\ScintRes.res + $(LD) $(LDFLAGS) /DLL /OUT:$@ $(LOBJS) $(LIBS) + +!ELSE + +$(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res + $(LD) /OUT:$@ $(LOBJS) $(LIBS) + +$(COMPONENT): $(SOBJS) ScintRes.res + $(LD) $(LDFLAGS) -Tpd -c c0d32 $(SOBJS), $@, , $(LIBS), , ScintRes.res + +$(DIR_O)\ScintRes.res: ScintRes.rc + $(RC) $*.rc + +$(LEXCOMPONENT): $(LOBJS) + $(LD) $(LDFLAGS) -Tpd -c c0d32 $(LOBJS), $@, , $(LIBS), , ScintRes.res + +!ENDIF + +# Define how to build all the objects and what they depend on + +# Most of the source is in ..\src with a couple in this directory +{..\src}.cxx{$(DIR_O)}.obj: + $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $< +{.}.cxx{$(DIR_O)}.obj: + $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $< +{.}.c{$(DIR_O)}.obj: + $(CC) $(INCLUDEDIRS) $(CFLAGS) -c $(NAMEFLAG)$@ $< + +# Some source files are compiled into more than one object because of different conditional compilation +$(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx + $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ..\src\ScintillaBase.cxx + +$(DIR_O)\ScintillaGTKL.obj: ScintillaGTK.cxx + $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ScintillaGTK.cxx + +$(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx + $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSTATIC_BUILD -c $(NAMEFLAG)$@ ScintillaGTK.cxx + +# Dependencies + +# All lexers depend on this set of headers +LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \ + ..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h \ + ..\include\Scintilla.h ..\include\SciLexer.h ..\src\StyleContext.h + +$(DIR_O)\AutoComplete.obj: ..\src\AutoComplete.cxx ..\include\Platform.h ..\src\AutoComplete.h + +$(DIR_O)\CallTip.obj: ..\src\CallTip.cxx ..\include\Platform.h ..\src\CallTip.h + +$(DIR_O)\CellBuffer.obj: ..\src\CellBuffer.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\CellBuffer.h + +$(DIR_O)\CharClassify.obj: ..\src\CharClassify.cxx ..\src\CharClassify.h + +$(DIR_O)\ContractionState.obj: ..\src\ContractionState.cxx ..\include\Platform.h ..\src\ContractionState.h + +$(DIR_O)\Document.obj: ..\src\Document.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\RESearch.h \ + ..\src\CellBuffer.h ..\src\CharClassify.h ..\src\Document.h + +$(DIR_O)\DocumentAccessor.obj: ..\src\DocumentAccessor.cxx ..\include\Platform.h ..\include\PropSet.h \ + ..\include\Accessor.h ..\src\DocumentAccessor.h ..\src\CharClassify.h ..\include\Scintilla.h + +$(DIR_O)\Editor.obj: ..\src\Editor.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\ContractionState.h \ + ..\src\CellBuffer.h ..\src\KeyMap.h ..\src\Indicator.h ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h \ + ..\src\CharClassify.h ..\src\Document.h ..\src\Editor.h + +$(DIR_O)\ExternalLexer.obj: ..\src\ExternalLexer.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ + ..\include\PropSet.h ..\include\Accessor.h ..\src\DocumentAccessor.h ..\include\Keywords.h ..\src\ExternalLexer.h + +$(DIR_O)\Indicator.obj: ..\src\Indicator.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\Indicator.h + +$(DIR_O)\KeyMap.obj: ..\src\KeyMap.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\KeyMap.h + +$(DIR_O)\KeyWords.obj: ..\src\KeyWords.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \ + ..\include\Scintilla.h ..\include\SciLexer.h + +#++Autogenerated -- run src/LexGen.py to regenerate +#**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\) + +$(DIR_O)\LexAda.obj: ..\src\LexAda.cxx $(LEX_HEADERS) + +$(DIR_O)\LexAPDL.obj: ..\src\LexAPDL.cxx $(LEX_HEADERS) + +$(DIR_O)\LexAsm.obj: ..\src\LexAsm.cxx $(LEX_HEADERS) + +$(DIR_O)\LexAsn1.obj: ..\src\LexAsn1.cxx $(LEX_HEADERS) + +$(DIR_O)\LexAU3.obj: ..\src\LexAU3.cxx $(LEX_HEADERS) + +$(DIR_O)\LexAVE.obj: ..\src\LexAVE.cxx $(LEX_HEADERS) + +$(DIR_O)\LexBaan.obj: ..\src\LexBaan.cxx $(LEX_HEADERS) + +$(DIR_O)\LexBash.obj: ..\src\LexBash.cxx $(LEX_HEADERS) + +$(DIR_O)\LexBasic.obj: ..\src\LexBasic.cxx $(LEX_HEADERS) + +$(DIR_O)\LexBullant.obj: ..\src\LexBullant.cxx $(LEX_HEADERS) + +$(DIR_O)\LexCaml.obj: ..\src\LexCaml.cxx $(LEX_HEADERS) + +$(DIR_O)\LexCLW.obj: ..\src\LexCLW.cxx $(LEX_HEADERS) + +$(DIR_O)\LexCmake.obj: ..\src\LexCmake.cxx $(LEX_HEADERS) + +$(DIR_O)\LexConf.obj: ..\src\LexConf.cxx $(LEX_HEADERS) + +$(DIR_O)\LexCPP.obj: ..\src\LexCPP.cxx $(LEX_HEADERS) + +$(DIR_O)\LexCrontab.obj: ..\src\LexCrontab.cxx $(LEX_HEADERS) + +$(DIR_O)\LexCsound.obj: ..\src\LexCsound.cxx $(LEX_HEADERS) + +$(DIR_O)\LexCSS.obj: ..\src\LexCSS.cxx $(LEX_HEADERS) + +$(DIR_O)\LexD.obj: ..\src\LexD.cxx $(LEX_HEADERS) + +$(DIR_O)\LexEiffel.obj: ..\src\LexEiffel.cxx $(LEX_HEADERS) + +$(DIR_O)\LexErlang.obj: ..\src\LexErlang.cxx $(LEX_HEADERS) + +$(DIR_O)\LexEScript.obj: ..\src\LexEScript.cxx $(LEX_HEADERS) + +$(DIR_O)\LexFlagship.obj: ..\src\LexFlagship.cxx $(LEX_HEADERS) + +$(DIR_O)\LexForth.obj: ..\src\LexForth.cxx $(LEX_HEADERS) + +$(DIR_O)\LexFortran.obj: ..\src\LexFortran.cxx $(LEX_HEADERS) + +$(DIR_O)\LexGui4Cli.obj: ..\src\LexGui4Cli.cxx $(LEX_HEADERS) + +$(DIR_O)\LexHaskell.obj: ..\src\LexHaskell.cxx $(LEX_HEADERS) + +$(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx $(LEX_HEADERS) + +$(DIR_O)\LexInno.obj: ..\src\LexInno.cxx $(LEX_HEADERS) + +$(DIR_O)\LexKix.obj: ..\src\LexKix.cxx $(LEX_HEADERS) + +$(DIR_O)\LexLisp.obj: ..\src\LexLisp.cxx $(LEX_HEADERS) + +$(DIR_O)\LexLout.obj: ..\src\LexLout.cxx $(LEX_HEADERS) + +$(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS) + +$(DIR_O)\LexMatlab.obj: ..\src\LexMatlab.cxx $(LEX_HEADERS) + +$(DIR_O)\LexMetapost.obj: ..\src\LexMetapost.cxx $(LEX_HEADERS) + +$(DIR_O)\LexMMIXAL.obj: ..\src\LexMMIXAL.cxx $(LEX_HEADERS) + +$(DIR_O)\LexMPT.obj: ..\src\LexMPT.cxx $(LEX_HEADERS) + +$(DIR_O)\LexMSSQL.obj: ..\src\LexMSSQL.cxx $(LEX_HEADERS) + +$(DIR_O)\LexNsis.obj: ..\src\LexNsis.cxx $(LEX_HEADERS) + +$(DIR_O)\LexOpal.obj: ..\src\LexOpal.cxx $(LEX_HEADERS) + +$(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS) + +$(DIR_O)\LexPascal.obj: ..\src\LexPascal.cxx $(LEX_HEADERS) + +$(DIR_O)\LexPB.obj: ..\src\LexPB.cxx $(LEX_HEADERS) + +$(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx $(LEX_HEADERS) + +$(DIR_O)\LexPOV.obj: ..\src\LexPOV.cxx $(LEX_HEADERS) + +$(DIR_O)\LexPS.obj: ..\src\LexPS.cxx $(LEX_HEADERS) + +$(DIR_O)\LexPython.obj: ..\src\LexPython.cxx $(LEX_HEADERS) + +$(DIR_O)\LexRebol.obj: ..\src\LexRebol.cxx $(LEX_HEADERS) + +$(DIR_O)\LexRuby.obj: ..\src\LexRuby.cxx $(LEX_HEADERS) + +$(DIR_O)\LexScriptol.obj: ..\src\LexScriptol.cxx $(LEX_HEADERS) + +$(DIR_O)\LexSmalltalk.obj: ..\src\LexSmalltalk.cxx $(LEX_HEADERS) + +$(DIR_O)\LexSpecman.obj: ..\src\LexSpecman.cxx $(LEX_HEADERS) + +$(DIR_O)\LexSpice.obj: ..\src\LexSpice.cxx $(LEX_HEADERS) + +$(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx $(LEX_HEADERS) + +$(DIR_O)\LexTADS3.obj: ..\src\LexTADS3.cxx $(LEX_HEADERS) + +$(DIR_O)\LexTCL.obj: ..\src\LexTCL.cxx $(LEX_HEADERS) + +$(DIR_O)\LexTeX.obj: ..\src\LexTeX.cxx $(LEX_HEADERS) + +$(DIR_O)\LexVB.obj: ..\src\LexVB.cxx $(LEX_HEADERS) + +$(DIR_O)\LexVerilog.obj: ..\src\LexVerilog.cxx $(LEX_HEADERS) + +$(DIR_O)\LexVHDL.obj: ..\src\LexVHDL.cxx $(LEX_HEADERS) + +$(DIR_O)\LexYAML.obj: ..\src\LexYAML.cxx $(LEX_HEADERS) + + +#--Autogenerated -- end of automatically generated section + +$(DIR_O)\LineMarker.obj: ..\src\LineMarker.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\LineMarker.h + +$(DIR_O)\PlatWin.obj: PlatWin.cxx ..\include\Platform.h PlatformRes.h ..\src\UniConversion.h + +$(DIR_O)\PropSet.obj: ..\src\PropSet.cxx ..\include\Platform.h ..\include\PropSet.h \ + ..\include\SString.h + +$(DIR_O)\RESearch.obj: ..\src\RESearch.cxx ..\src\RESearch.h + +$(DIR_O)\ScintillaBase.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h \ + ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ + ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h ..\src\AutoComplete.h ..\src\CharClassify.h \ + ..\src\Document.h ..\src\Editor.h ..\src\ScintillaBase.h + +$(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ + ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ + ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\CharClassify.h \ + ..\src\Document.h ..\src\Editor.h \ + ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\Accessor.h ..\src\DocumentAccessor.h ..\include\KeyWords.h + +$(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \ + ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ + ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\CharClassify.h \ + ..\src\Document.h ..\src\Editor.h \ + ..\src\ScintillaBase.h ..\src\UniConversion.h + +$(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ + ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ + ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\CharClassify.h \ + ..\src\Document.h ..\src\Editor.h \ + ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h ..\src\UniConversion.h + +$(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \ + ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ + ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\CharClassify.h \ + ..\src\Document.h ..\src\Editor.h \ + ..\src\ScintillaBase.h ..\src\UniConversion.h + +$(DIR_O)\Style.obj: ..\src\Style.cxx ..\include\Platform.h ..\src\Style.h + +$(DIR_O)\StyleContext.obj: ..\src\StyleContext.cxx ..\include\Platform.h ..\include\Accessor.h ..\include\PropSet.h ..\src\StyleContext.h + +$(DIR_O)\ViewStyle.obj: ..\src\ViewStyle.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\Indicator.h \ + ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h + +$(DIR_O)\UniConversion.obj: ..\src\UniConversion.cxx ..\src\UniConversion.h + +$(DIR_O)\WindowAccessor.obj: ..\src\WindowAccessor.cxx ..\include\Platform.h ..\include\PropSet.h \ + ..\include\Accessor.h ..\include\WindowAccessor.h ..\include\Scintilla.h diff --git a/scintilla/include/Accessor.h b/scintilla/include/Accessor.h new file mode 100644 index 00000000..5364b9e3 --- /dev/null +++ b/scintilla/include/Accessor.h @@ -0,0 +1,78 @@ +// Scintilla source code edit control +/** @file Accessor.h + ** Rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; + +class Accessor; + +typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); + +/** + * Interface to data in a Scintilla. + */ +class Accessor { +protected: + enum {extremePosition=0x7FFFFFFF}; + /** @a bufferSize is a trade off between time taken to copy the characters + * and retrieval overhead. + * @a slopSize positions the buffer before the desired position + * in case there is some backtracking. */ + enum {bufferSize=4000, slopSize=bufferSize/8}; + char buf[bufferSize+1]; + int startPos; + int endPos; + int codePage; + + virtual bool InternalIsLeadByte(char ch)=0; + virtual void Fill(int position)=0; + +public: + Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} + virtual ~Accessor() {} + char operator[](int position) { + if (position < startPos || position >= endPos) { + Fill(position); + } + return buf[position - startPos]; + } + /** Safe version of operator[], returning a defined value for invalid position. */ + char SafeGetCharAt(int position, char chDefault=' ') { + if (position < startPos || position >= endPos) { + Fill(position); + if (position < startPos || position >= endPos) { + // Position is outside range of document + return chDefault; + } + } + return buf[position - startPos]; + } + bool IsLeadByte(char ch) { + return codePage && InternalIsLeadByte(ch); + } + void SetCodePage(int codePage_) { codePage = codePage_; } + + virtual bool Match(int pos, const char *s)=0; + virtual char StyleAt(int position)=0; + virtual int GetLine(int position)=0; + virtual int LineStart(int line)=0; + virtual int LevelAt(int line)=0; + virtual int Length()=0; + virtual void Flush()=0; + virtual int GetLineState(int line)=0; + virtual int SetLineState(int line, int state)=0; + virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; + virtual char *GetProperties()=0; + + // Style setting + virtual void StartAt(unsigned int start, char chMask=31)=0; + virtual void SetFlags(char chFlags_, char chWhile_)=0; + virtual unsigned int GetStartSegment()=0; + virtual void StartSegment(unsigned int pos)=0; + virtual void ColourTo(unsigned int pos, int chAttr)=0; + virtual void SetLevel(int line, int level)=0; + virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; +}; diff --git a/scintilla/include/Face.py b/scintilla/include/Face.py new file mode 100644 index 00000000..59ada3dc --- /dev/null +++ b/scintilla/include/Face.py @@ -0,0 +1,107 @@ +# Module for reading and parsing Scintilla.iface file +import string + +def sanitiseLine(line): + if line[-1:] == '\n': line = line[:-1] + if string.find(line, "##") != -1: + line = line[:string.find(line, "##")] + line = string.strip(line) + return line + +def decodeFunction(featureVal): + retType, rest = string.split(featureVal, " ", 1) + nameIdent, params = string.split(rest, "(") + name, value = string.split(nameIdent, "=") + params, rest = string.split(params, ")") + param1, param2 = string.split(params, ",")[0:2] + return retType, name, value, param1, param2 + +def decodeEvent(featureVal): + retType, rest = string.split(featureVal, " ", 1) + nameIdent, params = string.split(rest, "(") + name, value = string.split(nameIdent, "=") + return retType, name, value + +def decodeParam(p): + param = string.strip(p) + type = "" + name = "" + value = "" + if " " in param: + type, nv = string.split(param, " ") + if "=" in nv: + name, value = string.split(nv, "=") + else: + name = nv + return type, name, value + +class Face: + + def __init__(self): + self.order = [] + self.features = {} + self.values = {} + self.events = {} + + def ReadFromFile(self, name): + currentCategory = "" + currentComment = [] + currentCommentFinished = 0 + file = open(name) + for line in file.readlines(): + line = sanitiseLine(line) + if line: + if line[0] == "#": + if line[1] == " ": + if currentCommentFinished: + currentComment = [] + currentCommentFinished = 0 + currentComment.append(line[2:]) + else: + currentCommentFinished = 1 + featureType, featureVal = string.split(line, " ", 1) + if featureType in ["fun", "get", "set"]: + retType, name, value, param1, param2 = decodeFunction(featureVal) + p1 = decodeParam(param1) + p2 = decodeParam(param2) + self.features[name] = { + "FeatureType": featureType, + "ReturnType": retType, + "Value": value, + "Param1Type": p1[0], "Param1Name": p1[1], "Param1Value": p1[2], + "Param2Type": p2[0], "Param2Name": p2[1], "Param2Value": p2[2], + "Category": currentCategory, "Comment": currentComment + } + if self.values.has_key(value): + raise "Duplicate value " + value + " " + name + self.values[value] = 1 + self.order.append(name) + elif featureType == "evt": + retType, name, value = decodeEvent(featureVal) + self.features[name] = { + "FeatureType": featureType, + "ReturnType": retType, + "Value": value, + "Category": currentCategory, "Comment": currentComment + } + if self.events.has_key(value): + raise "Duplicate event " + value + " " + name + self.events[value] = 1 + self.order.append(name) + elif featureType == "cat": + currentCategory = featureVal + elif featureType == "val": + name, value = string.split(featureVal, "=", 1) + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, + "Value": value } + self.order.append(name) + elif featureType == "enu" or featureType == "lex": + name, value = string.split(featureVal, "=", 1) + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, + "Value": value } + self.order.append(name) + diff --git a/scintilla/include/HFacer.py b/scintilla/include/HFacer.py new file mode 100644 index 00000000..5639bcf7 --- /dev/null +++ b/scintilla/include/HFacer.py @@ -0,0 +1,76 @@ +# HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface +# definition file. +# The header files are copied to a temporary file apart from the section between a //++Autogenerated +# comment and a //--Autogenerated comment which is generated by the printHFile and printLexHFile +# functions. After the temporary file is created, it is copied back to the original file name. + +import string +import sys +import os +import Face + +def Contains(s,sub): + return string.find(s, sub) != -1 + +def printLexHFile(f,out): + for name in f.order: + v = f.features[name] + if v["FeatureType"] in ["val"]: + if Contains(name, "SCE_") or Contains(name, "SCLEX_"): + out.write("#define " + name + " " + v["Value"] + "\n") + +def printHFile(f,out): + for name in f.order: + v = f.features[name] + if v["Category"] != "Deprecated": + if v["FeatureType"] in ["fun", "get", "set"]: + featureDefineName = "SCI_" + string.upper(name) + out.write("#define " + featureDefineName + " " + v["Value"] + "\n") + elif v["FeatureType"] in ["evt"]: + featureDefineName = "SCN_" + string.upper(name) + out.write("#define " + featureDefineName + " " + v["Value"] + "\n") + elif v["FeatureType"] in ["val"]: + if not (Contains(name, "SCE_") or Contains(name, "SCLEX_")): + out.write("#define " + name + " " + v["Value"] + "\n") + +def CopyWithInsertion(input, output, genfn, definition): + copying = 1 + for line in input.readlines(): + if copying: + output.write(line) + if Contains(line, "//++Autogenerated"): + copying = 0 + genfn(definition, output) + if Contains(line, "//--Autogenerated"): + copying = 1 + output.write(line) + +def contents(filename): + f = file(filename) + t = f.read() + f.close() + return t + +def Regenerate(filename, genfn, definition): + inText = contents(filename) + tempname = "HFacer.tmp" + out = open(tempname,"w") + hfile = open(filename) + CopyWithInsertion(hfile, out, genfn, definition) + out.close() + hfile.close() + outText = contents(tempname) + if inText == outText: + os.unlink(tempname) + else: + os.unlink(filename) + os.rename(tempname, filename) + +f = Face.Face() +try: + f.ReadFromFile("Scintilla.iface") + Regenerate("Scintilla.h", printHFile, f) + Regenerate("SciLexer.h", printLexHFile, f) + print "Maximum ID is", max(x for x in f.values if int(x) < 3000) +except: + raise diff --git a/scintilla/include/KeyWords.h b/scintilla/include/KeyWords.h new file mode 100644 index 00000000..2f173e0e --- /dev/null +++ b/scintilla/include/KeyWords.h @@ -0,0 +1,82 @@ +// Scintilla source code edit control +/** @file KeyWords.h + ** Colourise for particular languages. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler); + +/** + * A LexerModule is responsible for lexing and folding a particular language. + * The class maintains a list of LexerModules which can be searched to find a + * module appropriate to a particular language. + */ +class LexerModule { +protected: + const LexerModule *next; + int language; + LexerFunction fnLexer; + LexerFunction fnFolder; + const char * const * wordListDescriptions; + int styleBits; + + static const LexerModule *base; + static int nextLanguage; + +public: + const char *languageName; + LexerModule(int language_, + LexerFunction fnLexer_, + const char *languageName_=0, + LexerFunction fnFolder_=0, + const char * const wordListDescriptions_[] = NULL, + int styleBits_=5); + virtual ~LexerModule() { + } + int GetLanguage() const { return language; } + + // -1 is returned if no WordList information is available + int GetNumWordLists() const; + const char *GetWordListDescription(int index) const; + + int GetStyleBitsNeeded() const; + + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + static const LexerModule *Find(int language); + static const LexerModule *Find(const char *languageName); +}; + +/** + * Check if a character is a space. + * This is ASCII specific but is safe with chars >= 0x80. + */ +inline bool isspacechar(unsigned char ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + +inline bool iswordchar(char ch) { + return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +inline bool iswordstart(char ch) { + return isascii(ch) && (isalnum(ch) || ch == '_'); +} + +inline bool isoperator(char ch) { + if (isascii(ch) && isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '.' || ch == '~') + return true; + return false; +} diff --git a/scintilla/include/Platform.h b/scintilla/include/Platform.h new file mode 100644 index 00000000..cd412856 --- /dev/null +++ b/scintilla/include/Platform.h @@ -0,0 +1,526 @@ +// Scintilla source code edit control +/** @file Platform.h + ** Interface to platform facilities. Also includes some basic utilities. + ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS +// PLAT_WX is wxWindows on any supported platform + +//*******************************************************// + +// TODO: add your specific platform header here: + +// Win32 example: +#include + +//*******************************************************// + +#define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 +#define PLAT_WIN 0 +#define PLAT_WX 0 +#define PLAT_FOX 0 + +#if defined(FOX) +#undef PLAT_FOX +#define PLAT_FOX 1 + +#elif defined(__WX__) +#undef PLAT_WX +#define PLAT_WX 1 + +#elif defined(GTK) +#undef PLAT_GTK +#define PLAT_GTK 1 + +#ifdef _MSC_VER +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + +#else +#undef PLAT_WIN +#define PLAT_WIN 1 + +#endif + + +// Underlying the implementation of the platform classes are platform specific types. +// Sometimes these need to be passed around by client code so they are defined here + +typedef void *FontID; +typedef void *SurfaceID; +typedef void *WindowID; +typedef void *MenuID; +typedef void *TickerID; +typedef void *Function; +typedef void *IdlerID; + +/** + * A geometric point class. + * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. + */ +class Point { +public: + int x; + int y; + + explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + static Point FromLong(long lpoint); +}; + +/** + * A geometric rectangle class. + * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. + * PRectangles contain their top and left sides, but not their right and bottom sides. + */ +class PRectangle { +public: + int left; + int top; + int right; + int bottom; + + PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : + left(left_), top(top_), right(right_), bottom(bottom_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + bool operator==(PRectangle &rc) { + return (rc.left == left) && (rc.right == right) && + (rc.top == top) && (rc.bottom == bottom); + } + bool Contains(Point pt) { + return (pt.x >= left) && (pt.x <= right) && + (pt.y >= top) && (pt.y <= bottom); + } + bool Contains(PRectangle rc) { + return (rc.left >= left) && (rc.right <= right) && + (rc.top >= top) && (rc.bottom <= bottom); + } + bool Intersects(PRectangle other) { + return (right > other.left) && (left < other.right) && + (bottom > other.top) && (top < other.bottom); + } + void Move(int xDelta, int yDelta) { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } + int Width() { return right - left; } + int Height() { return bottom - top; } +}; + +/** + * In some circumstances, including Win32 in paletted mode and GTK+, each colour + * must be allocated before use. The desired colours are held in the ColourDesired class, + * and after allocation the allocation entry is stored in the ColourAllocated class. In other + * circumstances, such as Win32 in true colour mode, the allocation process just copies + * the RGB values from the desired to the allocated class. + * As each desired colour requires allocation before it can be used, the ColourPair class + * holds both a ColourDesired and a ColourAllocated + * The Palette class is responsible for managing the palette of colours which contains a + * list of ColourPair objects and performs the allocation. + */ + +/** + * Holds a desired RGB colour. + */ +class ColourDesired { + long co; +public: + ColourDesired(long lcol=0) { + co = lcol; + } + + ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { + Set(red, green, blue); + } + + bool operator==(const ColourDesired &other) const { + return co == other.co; + } + + void Set(long lcol) { + co = lcol; + } + + void Set(unsigned int red, unsigned int green, unsigned int blue) { + co = red | (green << 8) | (blue << 16); + } + + static inline unsigned int ValueOfHex(const char ch) { + if (ch >= '0' && ch <= '9') + return ch - '0'; + else if (ch >= 'A' && ch <= 'F') + return ch - 'A' + 10; + else if (ch >= 'a' && ch <= 'f') + return ch - 'a' + 10; + else + return 0; + } + + void Set(const char *val) { + if (*val == '#') { + val++; + } + unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); + unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); + unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); + Set(r, g, b); + } + + long AsLong() const { + return co; + } + + unsigned int GetRed() { + return co & 0xff; + } + + unsigned int GetGreen() { + return (co >> 8) & 0xff; + } + + unsigned int GetBlue() { + return (co >> 16) & 0xff; + } +}; + +/** + * Holds an allocated RGB colour which may be an approximation to the desired colour. + */ +class ColourAllocated { + long coAllocated; + +public: + + ColourAllocated(long lcol=0) { + coAllocated = lcol; + } + + void Set(long lcol) { + coAllocated = lcol; + } + + long AsLong() const { + return coAllocated; + } +}; + +/** + * Colour pairs hold a desired colour and an allocated colour. + */ +struct ColourPair { + ColourDesired desired; + ColourAllocated allocated; + + ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { + desired = desired_; + allocated.Set(desired.AsLong()); + } + void Copy() { + allocated.Set(desired.AsLong()); + } +}; + +class Window; // Forward declaration for Palette + +/** + * Colour palette management. + */ +class Palette { + int used; + int size; + ColourPair *entries; +#if PLAT_GTK + void *allocatedPalette; // GdkColor * + int allocatedLen; +#endif + // Private so Palette objects can not be copied + Palette(const Palette &) {} + Palette &operator=(const Palette &) { return *this; } +public: +#if PLAT_WIN + void *hpal; +#endif + bool allowRealization; + + Palette(); + ~Palette(); + + void Release(); + + /** + * This method either adds a colour to the list of wanted colours (want==true) + * or retrieves the allocated colour back to the ColourPair. + * This is one method to make it easier to keep the code for wanting and retrieving in sync. + */ + void WantFind(ColourPair &cp, bool want); + + void Allocate(Window &w); +}; + +/** + * Font management. + */ +class Font { +protected: + FontID id; +#if PLAT_WX + int ascent; +#endif + // Private so Font objects can not be copied + Font(const Font &) {} + Font &operator=(const Font &) { id=0; return *this; } +public: + Font(); + virtual ~Font(); + + virtual void Create(const char *faceName, int characterSet, int size, + bool bold, bool italic, bool extraFontFlag=false); + virtual void Release(); + + FontID GetID() { return id; } + // Alias another font - caller guarantees not to Release + void SetID(FontID id_) { id = id_; } + friend class Surface; + friend class SurfaceImpl; +}; + +/** + * A surface abstracts a place to draw. + */ +class Surface { +private: + // Private so Surface objects can not be copied + Surface(const Surface &) {} + Surface &operator=(const Surface &) { return *this; } +public: + Surface() {}; + virtual ~Surface() {}; + static Surface *Allocate(); + + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; + + virtual void Release()=0; + virtual bool Initialised()=0; + virtual void PenColour(ColourAllocated fore)=0; + virtual int LogPixelsY()=0; + virtual int DeviceHeightFont(int points)=0; + virtual void MoveTo(int x_, int y_)=0; + virtual void LineTo(int x_, int y_)=0; + virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; + virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; + virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, + ColourAllocated outline, int alphaOutline, int flags)=0; + virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; + virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; + virtual int WidthText(Font &font_, const char *s, int len)=0; + virtual int WidthChar(Font &font_, char ch)=0; + virtual int Ascent(Font &font_)=0; + virtual int Descent(Font &font_)=0; + virtual int InternalLeading(Font &font_)=0; + virtual int ExternalLeading(Font &font_)=0; + virtual int Height(Font &font_)=0; + virtual int AverageCharWidth(Font &font_)=0; + + virtual int SetPalette(Palette *pal, bool inBackGround)=0; + virtual void SetClip(PRectangle rc)=0; + virtual void FlushCachedState()=0; + + virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; +}; + +/** + * A simple callback action passing one piece of untyped user data. + */ +typedef void (*CallBackAction)(void*); + +/** + * Class to hide the details of window manipulation. + * Does not own the window which will normally have a longer life than this object. + */ +class Window { +protected: + WindowID id; +public: + Window() : id(0), cursorLast(cursorInvalid) {} + Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {} + virtual ~Window(); + Window &operator=(WindowID id_) { + id = id_; + return *this; + } + WindowID GetID() const { return id; } + bool Created() const { return id != 0; } + void Destroy(); + bool HasFocus(); + PRectangle GetPosition(); + void SetPosition(PRectangle rc); + void SetPositionRelative(PRectangle rc, Window relativeTo); + PRectangle GetClientPosition(); + void Show(bool show=true); + void InvalidateAll(); + void InvalidateRectangle(PRectangle rc); + virtual void SetFont(Font &font); + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; + void SetCursor(Cursor curs); + void SetTitle(const char *s); +private: + Cursor cursorLast; +}; + +/** + * Listbox management. + */ + +class ListBox : public Window { +public: + ListBox(); + virtual ~ListBox(); + static ListBox *Allocate(); + + virtual void SetFont(Font &font)=0; + virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; + virtual void SetAverageCharWidth(int width)=0; + virtual void SetVisibleRows(int rows)=0; + virtual int GetVisibleRows() const=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + virtual void RegisterImage(int type, const char *xpm_data)=0; + virtual void ClearRegisteredImages()=0; + virtual void SetDoubleClickAction(CallBackAction, void *)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; +}; + +/** + * Menu management. + */ +class Menu { + MenuID id; +public: + Menu(); + MenuID GetID() { return id; } + void CreatePopUp(); + void Destroy(); + void Show(Point pt, Window &w); +}; + +class ElapsedTime { + long bigBit; + long littleBit; +public: + ElapsedTime(); + double Duration(bool reset=false); +}; + +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() {}; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +/** + * Platform class used to retrieve system wide parameters such as double click speed + * and chrome colour. Not a creatable object, more of a module with several functions. + */ +class Platform { + // Private so Platform objects can not be copied + Platform(const Platform &) {} + Platform &operator=(const Platform &) { return *this; } +public: + // Should be private because no new Platforms are ever created + // but gcc warns about this + Platform() {} + ~Platform() {} + static ColourDesired Chrome(); + static ColourDesired ChromeHighlight(); + static const char *DefaultFont(); + static int DefaultFontSize(); + static unsigned int DoubleClickTime(); + static bool MouseButtonBounce(); + static void DebugDisplay(const char *s); + static bool IsKeyDown(int key); + static long SendScintilla( + WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); + static long SendScintillaPointer( + WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); + static bool IsDBCSLeadByte(int codePage, char ch); + static int DBCSCharLength(int codePage, const char *s); + static int DBCSCharMaxLength(); + + // These are utility functions not really tied to a platform + static int Minimum(int a, int b); + static int Maximum(int a, int b); + // Next three assume 16 bit shorts and 32 bit longs + static long LongFromTwoShorts(short a,short b) { + return (a) | ((b) << 16); + } + static short HighShortFromLong(long x) { + return static_cast(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast(x & 0xffff); + } + static void DebugPrintf(const char *format, ...); + static bool ShowAssertionPopUps(bool assertionPopUps_); + static void Assert(const char *c, const char *file, int line); + static int Clamp(int val, int minVal, int maxVal); +}; + +#ifdef NDEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) +#endif + +// Shut up annoying Visual C++ warnings: +#ifdef _MSC_VER +#pragma warning(disable: 4244 4309 4514 4710) +#endif + +#endif diff --git a/scintilla/include/Platform.h.bak b/scintilla/include/Platform.h.bak new file mode 100644 index 00000000..b713a528 --- /dev/null +++ b/scintilla/include/Platform.h.bak @@ -0,0 +1,517 @@ +// Scintilla source code edit control +/** @file Platform.h + ** Interface to platform facilities. Also includes some basic utilities. + ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS +// PLAT_WX is wxWindows on any supported platform + +#define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 +#define PLAT_WIN 0 +#define PLAT_WX 0 +#define PLAT_FOX 0 + +#if defined(FOX) +#undef PLAT_FOX +#define PLAT_FOX 1 + +#elif defined(__WX__) +#undef PLAT_WX +#define PLAT_WX 1 + +#elif defined(GTK) +#undef PLAT_GTK +#define PLAT_GTK 1 + +#ifdef _MSC_VER +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + +#else +#undef PLAT_WIN +#define PLAT_WIN 1 + +#endif + + +// Underlying the implementation of the platform classes are platform specific types. +// Sometimes these need to be passed around by client code so they are defined here + +typedef void *FontID; +typedef void *SurfaceID; +typedef void *WindowID; +typedef void *MenuID; +typedef void *TickerID; +typedef void *Function; +typedef void *IdlerID; + +/** + * A geometric point class. + * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. + */ +class Point { +public: + int x; + int y; + + explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + static Point FromLong(long lpoint); +}; + +/** + * A geometric rectangle class. + * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. + * PRectangles contain their top and left sides, but not their right and bottom sides. + */ +class PRectangle { +public: + int left; + int top; + int right; + int bottom; + + PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : + left(left_), top(top_), right(right_), bottom(bottom_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + bool operator==(PRectangle &rc) { + return (rc.left == left) && (rc.right == right) && + (rc.top == top) && (rc.bottom == bottom); + } + bool Contains(Point pt) { + return (pt.x >= left) && (pt.x <= right) && + (pt.y >= top) && (pt.y <= bottom); + } + bool Contains(PRectangle rc) { + return (rc.left >= left) && (rc.right <= right) && + (rc.top >= top) && (rc.bottom <= bottom); + } + bool Intersects(PRectangle other) { + return (right > other.left) && (left < other.right) && + (bottom > other.top) && (top < other.bottom); + } + void Move(int xDelta, int yDelta) { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } + int Width() { return right - left; } + int Height() { return bottom - top; } +}; + +/** + * In some circumstances, including Win32 in paletted mode and GTK+, each colour + * must be allocated before use. The desired colours are held in the ColourDesired class, + * and after allocation the allocation entry is stored in the ColourAllocated class. In other + * circumstances, such as Win32 in true colour mode, the allocation process just copies + * the RGB values from the desired to the allocated class. + * As each desired colour requires allocation before it can be used, the ColourPair class + * holds both a ColourDesired and a ColourAllocated + * The Palette class is responsible for managing the palette of colours which contains a + * list of ColourPair objects and performs the allocation. + */ + +/** + * Holds a desired RGB colour. + */ +class ColourDesired { + long co; +public: + ColourDesired(long lcol=0) { + co = lcol; + } + + ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { + Set(red, green, blue); + } + + bool operator==(const ColourDesired &other) const { + return co == other.co; + } + + void Set(long lcol) { + co = lcol; + } + + void Set(unsigned int red, unsigned int green, unsigned int blue) { + co = red | (green << 8) | (blue << 16); + } + + static inline unsigned int ValueOfHex(const char ch) { + if (ch >= '0' && ch <= '9') + return ch - '0'; + else if (ch >= 'A' && ch <= 'F') + return ch - 'A' + 10; + else if (ch >= 'a' && ch <= 'f') + return ch - 'a' + 10; + else + return 0; + } + + void Set(const char *val) { + if (*val == '#') { + val++; + } + unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); + unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); + unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); + Set(r, g, b); + } + + long AsLong() const { + return co; + } + + unsigned int GetRed() { + return co & 0xff; + } + + unsigned int GetGreen() { + return (co >> 8) & 0xff; + } + + unsigned int GetBlue() { + return (co >> 16) & 0xff; + } +}; + +/** + * Holds an allocated RGB colour which may be an approximation to the desired colour. + */ +class ColourAllocated { + long coAllocated; + +public: + + ColourAllocated(long lcol=0) { + coAllocated = lcol; + } + + void Set(long lcol) { + coAllocated = lcol; + } + + long AsLong() const { + return coAllocated; + } +}; + +/** + * Colour pairs hold a desired colour and an allocated colour. + */ +struct ColourPair { + ColourDesired desired; + ColourAllocated allocated; + + ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { + desired = desired_; + allocated.Set(desired.AsLong()); + } + void Copy() { + allocated.Set(desired.AsLong()); + } +}; + +class Window; // Forward declaration for Palette + +/** + * Colour palette management. + */ +class Palette { + int used; + int size; + ColourPair *entries; +#if PLAT_GTK + void *allocatedPalette; // GdkColor * + int allocatedLen; +#endif + // Private so Palette objects can not be copied + Palette(const Palette &) {} + Palette &operator=(const Palette &) { return *this; } +public: +#if PLAT_WIN + void *hpal; +#endif + bool allowRealization; + + Palette(); + ~Palette(); + + void Release(); + + /** + * This method either adds a colour to the list of wanted colours (want==true) + * or retrieves the allocated colour back to the ColourPair. + * This is one method to make it easier to keep the code for wanting and retrieving in sync. + */ + void WantFind(ColourPair &cp, bool want); + + void Allocate(Window &w); +}; + +/** + * Font management. + */ +class Font { +protected: + FontID id; +#if PLAT_WX + int ascent; +#endif + // Private so Font objects can not be copied + Font(const Font &) {} + Font &operator=(const Font &) { id=0; return *this; } +public: + Font(); + virtual ~Font(); + + virtual void Create(const char *faceName, int characterSet, int size, + bool bold, bool italic, bool extraFontFlag=false); + virtual void Release(); + + FontID GetID() { return id; } + // Alias another font - caller guarantees not to Release + void SetID(FontID id_) { id = id_; } + friend class Surface; + friend class SurfaceImpl; +}; + +/** + * A surface abstracts a place to draw. + */ +class Surface { +private: + // Private so Surface objects can not be copied + Surface(const Surface &) {} + Surface &operator=(const Surface &) { return *this; } +public: + Surface() {}; + virtual ~Surface() {}; + static Surface *Allocate(); + + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; + + virtual void Release()=0; + virtual bool Initialised()=0; + virtual void PenColour(ColourAllocated fore)=0; + virtual int LogPixelsY()=0; + virtual int DeviceHeightFont(int points)=0; + virtual void MoveTo(int x_, int y_)=0; + virtual void LineTo(int x_, int y_)=0; + virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; + virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; + virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, + ColourAllocated outline, int alphaOutline, int flags)=0; + virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; + virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; + virtual int WidthText(Font &font_, const char *s, int len)=0; + virtual int WidthChar(Font &font_, char ch)=0; + virtual int Ascent(Font &font_)=0; + virtual int Descent(Font &font_)=0; + virtual int InternalLeading(Font &font_)=0; + virtual int ExternalLeading(Font &font_)=0; + virtual int Height(Font &font_)=0; + virtual int AverageCharWidth(Font &font_)=0; + + virtual int SetPalette(Palette *pal, bool inBackGround)=0; + virtual void SetClip(PRectangle rc)=0; + virtual void FlushCachedState()=0; + + virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; +}; + +/** + * A simple callback action passing one piece of untyped user data. + */ +typedef void (*CallBackAction)(void*); + +/** + * Class to hide the details of window manipulation. + * Does not own the window which will normally have a longer life than this object. + */ +class Window { +protected: + WindowID id; +public: + Window() : id(0), cursorLast(cursorInvalid) {} + Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {} + virtual ~Window(); + Window &operator=(WindowID id_) { + id = id_; + return *this; + } + WindowID GetID() const { return id; } + bool Created() const { return id != 0; } + void Destroy(); + bool HasFocus(); + PRectangle GetPosition(); + void SetPosition(PRectangle rc); + void SetPositionRelative(PRectangle rc, Window relativeTo); + PRectangle GetClientPosition(); + void Show(bool show=true); + void InvalidateAll(); + void InvalidateRectangle(PRectangle rc); + virtual void SetFont(Font &font); + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; + void SetCursor(Cursor curs); + void SetTitle(const char *s); +private: + Cursor cursorLast; +}; + +/** + * Listbox management. + */ + +class ListBox : public Window { +public: + ListBox(); + virtual ~ListBox(); + static ListBox *Allocate(); + + virtual void SetFont(Font &font)=0; + virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; + virtual void SetAverageCharWidth(int width)=0; + virtual void SetVisibleRows(int rows)=0; + virtual int GetVisibleRows() const=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + virtual void RegisterImage(int type, const char *xpm_data)=0; + virtual void ClearRegisteredImages()=0; + virtual void SetDoubleClickAction(CallBackAction, void *)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; +}; + +/** + * Menu management. + */ +class Menu { + MenuID id; +public: + Menu(); + MenuID GetID() { return id; } + void CreatePopUp(); + void Destroy(); + void Show(Point pt, Window &w); +}; + +class ElapsedTime { + long bigBit; + long littleBit; +public: + ElapsedTime(); + double Duration(bool reset=false); +}; + +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() {}; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +/** + * Platform class used to retrieve system wide parameters such as double click speed + * and chrome colour. Not a creatable object, more of a module with several functions. + */ +class Platform { + // Private so Platform objects can not be copied + Platform(const Platform &) {} + Platform &operator=(const Platform &) { return *this; } +public: + // Should be private because no new Platforms are ever created + // but gcc warns about this + Platform() {} + ~Platform() {} + static ColourDesired Chrome(); + static ColourDesired ChromeHighlight(); + static const char *DefaultFont(); + static int DefaultFontSize(); + static unsigned int DoubleClickTime(); + static bool MouseButtonBounce(); + static void DebugDisplay(const char *s); + static bool IsKeyDown(int key); + static long SendScintilla( + WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); + static long SendScintillaPointer( + WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); + static bool IsDBCSLeadByte(int codePage, char ch); + static int DBCSCharLength(int codePage, const char *s); + static int DBCSCharMaxLength(); + + // These are utility functions not really tied to a platform + static int Minimum(int a, int b); + static int Maximum(int a, int b); + // Next three assume 16 bit shorts and 32 bit longs + static long LongFromTwoShorts(short a,short b) { + return (a) | ((b) << 16); + } + static short HighShortFromLong(long x) { + return static_cast(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast(x & 0xffff); + } + static void DebugPrintf(const char *format, ...); + static bool ShowAssertionPopUps(bool assertionPopUps_); + static void Assert(const char *c, const char *file, int line); + static int Clamp(int val, int minVal, int maxVal); +}; + +#ifdef NDEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) +#endif + +// Shut up annoying Visual C++ warnings: +#ifdef _MSC_VER +#pragma warning(disable: 4244 4309 4514 4710) +#endif + +#endif diff --git a/scintilla/include/PropSet.h b/scintilla/include/PropSet.h new file mode 100644 index 00000000..563a3291 --- /dev/null +++ b/scintilla/include/PropSet.h @@ -0,0 +1,114 @@ +// Scintilla source code edit control +/** @file PropSet.h + ** A Java style properties file module. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PROPSET_H +#define PROPSET_H +#include "SString.h" + +bool EqualCaseInsensitive(const char *a, const char *b); + +bool isprefix(const char *target, const char *prefix); + +struct Property { + unsigned int hash; + char *key; + char *val; + Property *next; + Property() : hash(0), key(0), val(0), next(0) {} +}; + +/** + */ +class PropSet { +protected: + enum { hashRoots=31 }; + Property *props[hashRoots]; + Property *enumnext; + int enumhash; + static bool caseSensitiveFilenames; + static unsigned int HashString(const char *s, size_t len) { + unsigned int ret = 0; + while (len--) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; + } + static bool IncludesVar(const char *value, const char *key); + +public: + PropSet *superPS; + PropSet(); + ~PropSet(); + void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); + void Set(const char *keyVal); + void Unset(const char *key, int lenKey=-1); + void SetMultiple(const char *s); + SString Get(const char *key); + SString GetExpanded(const char *key); + SString Expand(const char *withVars, int maxExpands=100); + int GetInt(const char *key, int defaultValue=0); + SString GetWild(const char *keybase, const char *filename); + SString GetNewExpand(const char *keybase, const char *filename=""); + void Clear(); + char *ToString(); // Caller must delete[] the return value + bool GetFirst(char **key, char **val); + bool GetNext(char **key, char **val); + static void SetCaseSensitiveFilenames(bool caseSensitiveFilenames_) { + caseSensitiveFilenames = caseSensitiveFilenames_; + } + +private: + // copy-value semantics not implemented + PropSet(const PropSet ©); + void operator=(const PropSet &assign); +}; + +/** + */ +class WordList { +public: + // Each word contains at least one character - a empty word acts as sentinel at the end. + char **words; + char **wordsNoCase; + char *list; + int len; + bool onlyLineEnds; ///< Delimited by any white space or only line ends + bool sorted; + bool sortedNoCase; + int starts[256]; + WordList(bool onlyLineEnds_ = false) : + words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), + sorted(false), sortedNoCase(false) {} + ~WordList() { Clear(); } + operator bool() { return len ? true : false; } + char *operator[](int ind) { return words[ind]; } + void Clear(); + void Set(const char *s); + char *Allocate(int size); + void SetFromAllocated(); + bool InList(const char *s); + bool InListAbbreviated(const char *s, const char marker); + const char *GetNearestWord(const char *wordStart, int searchLen, + bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); + char *GetNearestWords(const char *wordStart, int searchLen, + bool ignoreCase=false, char otherSeparator='\0', bool exactLen=false); +}; + +inline bool IsAlphabetic(unsigned int ch) { + return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z')); +} + + +#ifdef _MSC_VER +// Visual C++ doesn't like the private copy idiom for disabling +// the default copy constructor and operator=, but it's fine. +#pragma warning(disable: 4511 4512) +#endif + +#endif diff --git a/scintilla/include/SString.h b/scintilla/include/SString.h new file mode 100644 index 00000000..780d1a11 --- /dev/null +++ b/scintilla/include/SString.h @@ -0,0 +1,280 @@ +// SciTE - Scintilla based Text Editor +/** @file SString.h + ** A simple string class. + **/ +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SSTRING_H +#define SSTRING_H + +// These functions are implemented because each platform calls them something different. +int CompareCaseInsensitive(const char *a, const char *b); +int CompareNCaseInsensitive(const char *a, const char *b, size_t len); +bool EqualCaseInsensitive(const char *a, const char *b); + +// Define another string class. +// While it would be 'better' to use std::string, that doubles the executable size. +// An SString may contain embedded nul characters. + +/** + * Base class from which the two other classes (SBuffer & SString) + * are derived. + */ +class SContainer { +public: + /** Type of string lengths (sizes) and positions (indexes). */ + typedef size_t lenpos_t; + /** Out of bounds value indicating that the string argument should be measured. */ + enum { measure_length=0xffffffffU}; + +protected: + char *s; ///< The C string + lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string + + SContainer() : s(0), sSize(0) {} + ~SContainer() { + delete []s; // Suppose it was allocated using StringAllocate + s = 0; + sSize = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + if (s) { + return sSize; + } else { + return 0; + } + } +public: + /** + * Allocate uninitialized memory big enough to fit a string of the given length. + * @return the pointer to the new string + */ + static char *StringAllocate(lenpos_t len); + /** + * Duplicate a buffer/C string. + * Allocate memory of the given size, or big enough to fit the string if length isn't given; + * then copy the given string in the allocated memory. + * @return the pointer to the new string + */ + static char *StringAllocate( + const char *s, ///< The string to duplicate + lenpos_t len=measure_length); ///< The length of memory to allocate. Optional. +}; + + +/** + * @brief A string buffer class. + * + * Main use is to ask an API the length of a string it can provide, + * then to allocate a buffer of the given size, and to provide this buffer + * to the API to put the string. + * This class is intended to be shortlived, to be transformed as SString + * as soon as it holds the string, so it has little members. + * Note: we assume the buffer is filled by the API. If the length can be shorter, + * we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment. + */ +class SBuffer : protected SContainer { +public: + SBuffer(lenpos_t len) { + s = StringAllocate(len); + if (s) { + *s = '\0'; + sSize = len; + } else { + sSize = 0; + } + } +private: + /// Copy constructor + // Here only to be on the safe size, user should avoid returning SBuffer values. + SBuffer(const SBuffer &source) : SContainer() { + s = StringAllocate(source.s, source.sSize); + sSize = (s) ? source.sSize : 0; + } + /// Default assignment operator + // Same here, shouldn't be used + SBuffer &operator=(const SBuffer &source) { + if (this != &source) { + delete []s; + s = StringAllocate(source.s, source.sSize); + sSize = (s) ? source.sSize : 0; + } + return *this; + } +public: + /** Provide direct read/write access to buffer. */ + char *ptr() { + return s; + } + /** Ownership of the buffer have been taken, so release it. */ + void reset() { + s = 0; + sSize = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + return SContainer::size(); + } +}; + + +/** + * @brief A simple string class. + * + * Hold the length of the string for quick operations, + * can have a buffer bigger than the string to avoid too many memory allocations and copies. + * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string + * functions to allow reliable manipulations of these strings, other than simple appends, etc. + */ +class SString : protected SContainer { + lenpos_t sLen; ///< The size of the string in s + lenpos_t sizeGrowth; ///< Minimum growth size when appending strings + enum { sizeGrowthDefault = 64 }; + + bool grow(lenpos_t lenNew); + SString &assign(const char *sOther, lenpos_t sSize_=measure_length); + +public: + SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {} + SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) { + s = StringAllocate(source.s, source.sLen); + sSize = sLen = (s) ? source.sLen : 0; + } + SString(const char *s_) : sizeGrowth(sizeGrowthDefault) { + s = StringAllocate(s_); + sSize = sLen = (s) ? strlen(s) : 0; + } + SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) { + s = buf.ptr(); + sSize = sLen = buf.size(); + // Consumes the given buffer! + buf.reset(); + } + SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) { + // note: expects the "last" argument to point one beyond the range end (a la STL iterators) + s = StringAllocate(s_ + first, last - first); + sSize = sLen = (s) ? last - first : 0; + } + SString(int i); + SString(double d, int precision); + ~SString() { + sLen = 0; + } + void clear() { + if (s) { + *s = '\0'; + } + sLen = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + return SContainer::size(); + } + /** Size of string in buffer. */ + lenpos_t length() const { + return sLen; + } + /** Read access to a character of the string. */ + char operator[](lenpos_t i) const { + return (s && i < sSize) ? s[i] : '\0'; + } + SString &operator=(const char *source) { + return assign(source); + } + SString &operator=(const SString &source) { + if (this != &source) { + assign(source.s, source.sLen); + } + return *this; + } + bool operator==(const SString &sOther) const; + bool operator!=(const SString &sOther) const { + return !operator==(sOther); + } + bool operator==(const char *sOther) const; + bool operator!=(const char *sOther) const { + return !operator==(sOther); + } + bool contains(char ch) const { + return (s && *s) ? strchr(s, ch) != 0 : false; + } + void setsizegrowth(lenpos_t sizeGrowth_) { + sizeGrowth = sizeGrowth_; + } + const char *c_str() const { + return s ? s : ""; + } + /** Give ownership of buffer to caller which must use delete[] to free buffer. */ + char *detach() { + char *sRet = s; + s = 0; + sSize = 0; + sLen = 0; + return sRet; + } + SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const; + SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); + SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); + SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0'); + SString &operator+=(const char *sOther) { + return append(sOther, static_cast(measure_length)); + } + SString &operator+=(const SString &sOther) { + return append(sOther.s, sOther.sLen); + } + SString &operator+=(char ch) { + return append(&ch, 1); + } + SString &appendwithseparator(const char *sOther, char sep) { + return append(sOther, strlen(sOther), sep); + } + SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length); + + /** + * Remove @a len characters from the @a pos position, included. + * Characters at pos + len and beyond replace characters at pos. + * If @a len is 0, or greater than the length of the string + * starting at @a pos, the string is just truncated at @a pos. + */ + void remove(lenpos_t pos, lenpos_t len); + + SString &change(lenpos_t pos, char ch) { + if (pos < sLen) { // character changed must be in string bounds + *(s + pos) = ch; + } + return *this; + } + /** Read an integral numeric value from the string. */ + int value() const { + return s ? atoi(s) : 0; + } + bool startswith(const char *prefix); + bool endswith(const char *suffix); + int search(const char *sFind, lenpos_t start=0) const; + bool contains(const char *sFind) const { + return search(sFind) >= 0; + } + int substitute(char chFind, char chReplace); + int substitute(const char *sFind, const char *sReplace); + int remove(const char *sFind) { + return substitute(sFind, ""); + } +}; + + +/** + * Duplicate a C string. + * Allocate memory of the given size, or big enough to fit the string if length isn't given; + * then copy the given string in the allocated memory. + * @return the pointer to the new string + */ +inline char *StringDup( + const char *s, ///< The string to duplicate + SContainer::lenpos_t len=SContainer::measure_length) ///< The length of memory to allocate. Optional. +{ + return SContainer::StringAllocate(s, len); +} + +#endif diff --git a/scintilla/include/SciLexer.h b/scintilla/include/SciLexer.h new file mode 100644 index 00000000..53e549a2 --- /dev/null +++ b/scintilla/include/SciLexer.h @@ -0,0 +1,1145 @@ +// Scintilla source code edit control +/** @file SciLexer.h + ** Interface to the added lexer functions in the SciLexer version of the edit control. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + +#ifndef SCILEXER_H +#define SCILEXER_H + +// SciLexer features - not in standard Scintilla + +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define SCLEX_CONTAINER 0 +#define SCLEX_NULL 1 +#define SCLEX_PYTHON 2 +#define SCLEX_CPP 3 +#define SCLEX_HTML 4 +#define SCLEX_XML 5 +#define SCLEX_PERL 6 +#define SCLEX_SQL 7 +#define SCLEX_VB 8 +#define SCLEX_PROPERTIES 9 +#define SCLEX_ERRORLIST 10 +#define SCLEX_MAKEFILE 11 +#define SCLEX_BATCH 12 +#define SCLEX_XCODE 13 +#define SCLEX_LATEX 14 +#define SCLEX_LUA 15 +#define SCLEX_DIFF 16 +#define SCLEX_CONF 17 +#define SCLEX_PASCAL 18 +#define SCLEX_AVE 19 +#define SCLEX_ADA 20 +#define SCLEX_LISP 21 +#define SCLEX_RUBY 22 +#define SCLEX_EIFFEL 23 +#define SCLEX_EIFFELKW 24 +#define SCLEX_TCL 25 +#define SCLEX_NNCRONTAB 26 +#define SCLEX_BULLANT 27 +#define SCLEX_VBSCRIPT 28 +#define SCLEX_BAAN 31 +#define SCLEX_MATLAB 32 +#define SCLEX_SCRIPTOL 33 +#define SCLEX_ASM 34 +#define SCLEX_CPPNOCASE 35 +#define SCLEX_FORTRAN 36 +#define SCLEX_F77 37 +#define SCLEX_CSS 38 +#define SCLEX_POV 39 +#define SCLEX_LOUT 40 +#define SCLEX_ESCRIPT 41 +#define SCLEX_PS 42 +#define SCLEX_NSIS 43 +#define SCLEX_MMIXAL 44 +#define SCLEX_CLW 45 +#define SCLEX_CLWNOCASE 46 +#define SCLEX_LOT 47 +#define SCLEX_YAML 48 +#define SCLEX_TEX 49 +#define SCLEX_METAPOST 50 +#define SCLEX_POWERBASIC 51 +#define SCLEX_FORTH 52 +#define SCLEX_ERLANG 53 +#define SCLEX_OCTAVE 54 +#define SCLEX_MSSQL 55 +#define SCLEX_VERILOG 56 +#define SCLEX_KIX 57 +#define SCLEX_GUI4CLI 58 +#define SCLEX_SPECMAN 59 +#define SCLEX_AU3 60 +#define SCLEX_APDL 61 +#define SCLEX_BASH 62 +#define SCLEX_ASN1 63 +#define SCLEX_VHDL 64 +#define SCLEX_CAML 65 +#define SCLEX_BLITZBASIC 66 +#define SCLEX_PUREBASIC 67 +#define SCLEX_HASKELL 68 +#define SCLEX_PHPSCRIPT 69 +#define SCLEX_TADS3 70 +#define SCLEX_REBOL 71 +#define SCLEX_SMALLTALK 72 +#define SCLEX_FLAGSHIP 73 +#define SCLEX_CSOUND 74 +#define SCLEX_FREEBASIC 75 +#define SCLEX_INNOSETUP 76 +#define SCLEX_OPAL 77 +#define SCLEX_SPICE 78 +#define SCLEX_D 79 +#define SCLEX_CMAKE 80 +#define SCLEX_SEARCHRESULT 98 +#define SCLEX_OBJC 99 +#define SCLEX_USER 100 +#define SCLEX_AUTOMATIC 1000 + +//For All lexer +#define SCE_UNIVERSAL_SELECT_STYLE 30 +#define SCE_UNIVERSAL_FOUND_STYLE 31 +#define SCE_P_DEFAULT 0 +#define SCE_P_COMMENTLINE 1 +#define SCE_P_NUMBER 2 +#define SCE_P_STRING 3 +#define SCE_P_CHARACTER 4 +#define SCE_P_WORD 5 +#define SCE_P_TRIPLE 6 +#define SCE_P_TRIPLEDOUBLE 7 +#define SCE_P_CLASSNAME 8 +#define SCE_P_DEFNAME 9 +#define SCE_P_OPERATOR 10 +#define SCE_P_IDENTIFIER 11 +#define SCE_P_COMMENTBLOCK 12 +#define SCE_P_STRINGEOL 13 +#define SCE_P_WORD2 14 +#define SCE_P_DECORATOR 15 +#define SCE_C_DEFAULT 0 +#define SCE_C_COMMENT 1 +#define SCE_C_COMMENTLINE 2 +#define SCE_C_COMMENTDOC 3 +#define SCE_C_NUMBER 4 +#define SCE_C_WORD 5 +#define SCE_C_STRING 6 +#define SCE_C_CHARACTER 7 +#define SCE_C_UUID 8 +#define SCE_C_PREPROCESSOR 9 +#define SCE_C_OPERATOR 10 +#define SCE_C_IDENTIFIER 11 +#define SCE_C_STRINGEOL 12 +#define SCE_C_VERBATIM 13 +#define SCE_C_REGEX 14 +#define SCE_C_COMMENTLINEDOC 15 +#define SCE_C_WORD2 16 +#define SCE_C_COMMENTDOCKEYWORD 17 +#define SCE_C_COMMENTDOCKEYWORDERROR 18 +#define SCE_C_GLOBALCLASS 19 +#define SCE_D_DEFAULT 0 +#define SCE_D_COMMENT 1 +#define SCE_D_COMMENTLINE 2 +#define SCE_D_COMMENTDOC 3 +#define SCE_D_COMMENTNESTED 4 +#define SCE_D_NUMBER 5 +#define SCE_D_WORD 6 +#define SCE_D_WORD2 7 +#define SCE_D_WORD3 8 +#define SCE_D_TYPEDEF 9 +#define SCE_D_STRING 10 +#define SCE_D_STRINGEOL 11 +#define SCE_D_CHARACTER 12 +#define SCE_D_OPERATOR 13 +#define SCE_D_IDENTIFIER 14 +#define SCE_D_COMMENTLINEDOC 15 +#define SCE_D_COMMENTDOCKEYWORD 16 +#define SCE_D_COMMENTDOCKEYWORDERROR 17 + +#define SCE_SEARCHRESULT_DEFAULT 0 +#define SCE_SEARCHRESULT_HEARDER 1 +#define SCE_SEARCHRESULT_NUMBER 2 +#define SCE_SEARCHRESULT_WORD2SEARCH 3 +#define SCE_SEARCHRESULT_KWORD1 4 +#define SCE_SEARCHRESULT_KWORD2 5 +#define SCE_SEARCHRESULT_KWORD3 6 + +#define SCE_OBJC_DIRECTIVE 20 +#define SCE_OBJC_QUALIFIER 21 + +#define SCE_USER_DEFAULT 0 +#define SCE_USER_COMMENT 1 +#define SCE_USER_COMMENTLINE 2 +#define SCE_USER_NUMBER 4 +#define SCE_USER_WORD1 5 +#define SCE_USER_WORD2 6 +#define SCE_USER_WORD3 7 +#define SCE_USER_WORD4 8 +#define SCE_USER_OPERATOR 10 +#define SCE_USER_IDENTIFIER 11 +#define SCE_USER_BLOCK_OPERATOR_OPEN 12 +#define SCE_USER_BLOCK_OPERATOR_CLOSE 13 +#define SCE_USER_DELIMITER1 14 +#define SCE_USER_DELIMITER2 15 +#define SCE_USER_DELIMITER3 16 + +#define SCE_TCL_DEFAULT 0 +#define SCE_TCL_COMMENT 1 +#define SCE_TCL_COMMENTLINE 2 +#define SCE_TCL_NUMBER 3 +#define SCE_TCL_WORD_IN_QUOTE 4 +#define SCE_TCL_IN_QUOTE 5 +#define SCE_TCL_OPERATOR 6 +#define SCE_TCL_IDENTIFIER 7 +#define SCE_TCL_SUBSTITUTION 8 +#define SCE_TCL_SUB_BRACE 9 +#define SCE_TCL_MODIFIER 10 +#define SCE_TCL_EXPAND 11 +#define SCE_TCL_WORD 12 +#define SCE_TCL_WORD2 13 +#define SCE_TCL_WORD3 14 +#define SCE_TCL_WORD4 15 +#define SCE_TCL_WORD5 16 +#define SCE_TCL_WORD6 17 +#define SCE_TCL_WORD7 18 +#define SCE_TCL_WORD8 19 +#define SCE_TCL_COMMENT_BOX 20 +#define SCE_TCL_BLOCK_COMMENT 21 +#define SCE_H_DEFAULT 0 +#define SCE_H_TAG 1 +#define SCE_H_TAGUNKNOWN 2 +#define SCE_H_ATTRIBUTE 3 +#define SCE_H_ATTRIBUTEUNKNOWN 4 +#define SCE_H_NUMBER 5 +#define SCE_H_DOUBLESTRING 6 +#define SCE_H_SINGLESTRING 7 +#define SCE_H_OTHER 8 +#define SCE_H_COMMENT 9 +#define SCE_H_ENTITY 10 +#define SCE_H_TAGEND 11 +#define SCE_H_XMLSTART 12 +#define SCE_H_XMLEND 13 +#define SCE_H_SCRIPT 14 +#define SCE_H_ASP 15 +#define SCE_H_ASPAT 16 +#define SCE_H_CDATA 17 +#define SCE_H_QUESTION 18 +#define SCE_H_VALUE 19 +#define SCE_H_XCCOMMENT 20 +#define SCE_H_SGML_DEFAULT 21 +#define SCE_H_SGML_COMMAND 22 +#define SCE_H_SGML_1ST_PARAM 23 +#define SCE_H_SGML_DOUBLESTRING 24 +#define SCE_H_SGML_SIMPLESTRING 25 +#define SCE_H_SGML_ERROR 26 +#define SCE_H_SGML_SPECIAL 27 +#define SCE_H_SGML_ENTITY 28 +#define SCE_H_SGML_COMMENT 29 +#define SCE_H_SGML_1ST_PARAM_COMMENT 30 +#define SCE_H_SGML_BLOCK_DEFAULT 31 +#define SCE_HJ_START 40 +#define SCE_HJ_DEFAULT 41 +#define SCE_HJ_COMMENT 42 +#define SCE_HJ_COMMENTLINE 43 +#define SCE_HJ_COMMENTDOC 44 +#define SCE_HJ_NUMBER 45 +#define SCE_HJ_WORD 46 +#define SCE_HJ_KEYWORD 47 +#define SCE_HJ_DOUBLESTRING 48 +#define SCE_HJ_SINGLESTRING 49 +#define SCE_HJ_SYMBOLS 50 +#define SCE_HJ_STRINGEOL 51 +#define SCE_HJ_REGEX 52 +#define SCE_HJA_START 55 +#define SCE_HJA_DEFAULT 56 +#define SCE_HJA_COMMENT 57 +#define SCE_HJA_COMMENTLINE 58 +#define SCE_HJA_COMMENTDOC 59 +#define SCE_HJA_NUMBER 60 +#define SCE_HJA_WORD 61 +#define SCE_HJA_KEYWORD 62 +#define SCE_HJA_DOUBLESTRING 63 +#define SCE_HJA_SINGLESTRING 64 +#define SCE_HJA_SYMBOLS 65 +#define SCE_HJA_STRINGEOL 66 +#define SCE_HJA_REGEX 67 +#define SCE_HB_START 70 +#define SCE_HB_DEFAULT 71 +#define SCE_HB_COMMENTLINE 72 +#define SCE_HB_NUMBER 73 +#define SCE_HB_WORD 74 +#define SCE_HB_STRING 75 +#define SCE_HB_IDENTIFIER 76 +#define SCE_HB_STRINGEOL 77 +#define SCE_HBA_START 80 +#define SCE_HBA_DEFAULT 81 +#define SCE_HBA_COMMENTLINE 82 +#define SCE_HBA_NUMBER 83 +#define SCE_HBA_WORD 84 +#define SCE_HBA_STRING 85 +#define SCE_HBA_IDENTIFIER 86 +#define SCE_HBA_STRINGEOL 87 +#define SCE_HP_START 90 +#define SCE_HP_DEFAULT 91 +#define SCE_HP_COMMENTLINE 92 +#define SCE_HP_NUMBER 93 +#define SCE_HP_STRING 94 +#define SCE_HP_CHARACTER 95 +#define SCE_HP_WORD 96 +#define SCE_HP_TRIPLE 97 +#define SCE_HP_TRIPLEDOUBLE 98 +#define SCE_HP_CLASSNAME 99 +#define SCE_HP_DEFNAME 100 +#define SCE_HP_OPERATOR 101 +#define SCE_HP_IDENTIFIER 102 +#define SCE_HPHP_COMPLEX_VARIABLE 104 +#define SCE_HPA_START 105 +#define SCE_HPA_DEFAULT 106 +#define SCE_HPA_COMMENTLINE 107 +#define SCE_HPA_NUMBER 108 +#define SCE_HPA_STRING 109 +#define SCE_HPA_CHARACTER 110 +#define SCE_HPA_WORD 111 +#define SCE_HPA_TRIPLE 112 +#define SCE_HPA_TRIPLEDOUBLE 113 +#define SCE_HPA_CLASSNAME 114 +#define SCE_HPA_DEFNAME 115 +#define SCE_HPA_OPERATOR 116 +#define SCE_HPA_IDENTIFIER 117 +#define SCE_HPHP_DEFAULT 118 +#define SCE_HPHP_HSTRING 119 +#define SCE_HPHP_SIMPLESTRING 120 +#define SCE_HPHP_WORD 121 +#define SCE_HPHP_NUMBER 122 +#define SCE_HPHP_VARIABLE 123 +#define SCE_HPHP_COMMENT 124 +#define SCE_HPHP_COMMENTLINE 125 +#define SCE_HPHP_HSTRING_VARIABLE 126 +#define SCE_HPHP_OPERATOR 127 +#define SCE_PL_DEFAULT 0 +#define SCE_PL_ERROR 1 +#define SCE_PL_COMMENTLINE 2 +#define SCE_PL_POD 3 +#define SCE_PL_NUMBER 4 +#define SCE_PL_WORD 5 +#define SCE_PL_STRING 6 +#define SCE_PL_CHARACTER 7 +#define SCE_PL_PUNCTUATION 8 +#define SCE_PL_PREPROCESSOR 9 +#define SCE_PL_OPERATOR 10 +#define SCE_PL_IDENTIFIER 11 +#define SCE_PL_SCALAR 12 +#define SCE_PL_ARRAY 13 +#define SCE_PL_HASH 14 +#define SCE_PL_SYMBOLTABLE 15 +#define SCE_PL_VARIABLE_INDEXER 16 +#define SCE_PL_REGEX 17 +#define SCE_PL_REGSUBST 18 +#define SCE_PL_LONGQUOTE 19 +#define SCE_PL_BACKTICKS 20 +#define SCE_PL_DATASECTION 21 +#define SCE_PL_HERE_DELIM 22 +#define SCE_PL_HERE_Q 23 +#define SCE_PL_HERE_QQ 24 +#define SCE_PL_HERE_QX 25 +#define SCE_PL_STRING_Q 26 +#define SCE_PL_STRING_QQ 27 +#define SCE_PL_STRING_QX 28 +#define SCE_PL_STRING_QR 29 +#define SCE_PL_STRING_QW 30 +#define SCE_PL_POD_VERB 31 +#define SCE_RB_DEFAULT 0 +#define SCE_RB_ERROR 1 +#define SCE_RB_COMMENTLINE 2 +#define SCE_RB_POD 3 +#define SCE_RB_NUMBER 4 +#define SCE_RB_WORD 5 +#define SCE_RB_STRING 6 +#define SCE_RB_CHARACTER 7 +#define SCE_RB_CLASSNAME 8 +#define SCE_RB_DEFNAME 9 +#define SCE_RB_OPERATOR 10 +#define SCE_RB_IDENTIFIER 11 +#define SCE_RB_REGEX 12 +#define SCE_RB_GLOBAL 13 +#define SCE_RB_SYMBOL 14 +#define SCE_RB_MODULE_NAME 15 +#define SCE_RB_INSTANCE_VAR 16 +#define SCE_RB_CLASS_VAR 17 +#define SCE_RB_BACKTICKS 18 +#define SCE_RB_DATASECTION 19 +#define SCE_RB_HERE_DELIM 20 +#define SCE_RB_HERE_Q 21 +#define SCE_RB_HERE_QQ 22 +#define SCE_RB_HERE_QX 23 +#define SCE_RB_STRING_Q 24 +#define SCE_RB_STRING_QQ 25 +#define SCE_RB_STRING_QX 26 +#define SCE_RB_STRING_QR 27 +#define SCE_RB_STRING_QW 28 +#define SCE_RB_WORD_DEMOTED 29 +#define SCE_RB_STDIN 30 +#define SCE_RB_STDOUT 31 +#define SCE_RB_STDERR 40 +#define SCE_RB_UPPER_BOUND 41 +#define SCE_B_DEFAULT 0 +#define SCE_B_COMMENT 1 +#define SCE_B_NUMBER 2 +#define SCE_B_KEYWORD 3 +#define SCE_B_STRING 4 +#define SCE_B_PREPROCESSOR 5 +#define SCE_B_OPERATOR 6 +#define SCE_B_IDENTIFIER 7 +#define SCE_B_DATE 8 +#define SCE_B_STRINGEOL 9 +#define SCE_B_KEYWORD2 10 +#define SCE_B_KEYWORD3 11 +#define SCE_B_KEYWORD4 12 +#define SCE_B_CONSTANT 13 +#define SCE_B_ASM 14 +#define SCE_B_LABEL 15 +#define SCE_B_ERROR 16 +#define SCE_B_HEXNUMBER 17 +#define SCE_B_BINNUMBER 18 +#define SCE_PROPS_DEFAULT 0 +#define SCE_PROPS_COMMENT 1 +#define SCE_PROPS_SECTION 2 +#define SCE_PROPS_ASSIGNMENT 3 +#define SCE_PROPS_DEFVAL 4 +#define SCE_PROPS_KEY 5 +#define SCE_L_DEFAULT 0 +#define SCE_L_COMMAND 1 +#define SCE_L_TAG 2 +#define SCE_L_MATH 3 +#define SCE_L_COMMENT 4 +#define SCE_LUA_DEFAULT 0 +#define SCE_LUA_COMMENT 1 +#define SCE_LUA_COMMENTLINE 2 +#define SCE_LUA_COMMENTDOC 3 +#define SCE_LUA_NUMBER 4 +#define SCE_LUA_WORD 5 +#define SCE_LUA_STRING 6 +#define SCE_LUA_CHARACTER 7 +#define SCE_LUA_LITERALSTRING 8 +#define SCE_LUA_PREPROCESSOR 9 +#define SCE_LUA_OPERATOR 10 +#define SCE_LUA_IDENTIFIER 11 +#define SCE_LUA_STRINGEOL 12 +#define SCE_LUA_WORD2 13 +#define SCE_LUA_WORD3 14 +#define SCE_LUA_WORD4 15 +#define SCE_LUA_WORD5 16 +#define SCE_LUA_WORD6 17 +#define SCE_LUA_WORD7 18 +#define SCE_LUA_WORD8 19 +#define SCE_ERR_DEFAULT 0 +#define SCE_ERR_PYTHON 1 +#define SCE_ERR_GCC 2 +#define SCE_ERR_MS 3 +#define SCE_ERR_CMD 4 +#define SCE_ERR_BORLAND 5 +#define SCE_ERR_PERL 6 +#define SCE_ERR_NET 7 +#define SCE_ERR_LUA 8 +#define SCE_ERR_CTAG 9 +#define SCE_ERR_DIFF_CHANGED 10 +#define SCE_ERR_DIFF_ADDITION 11 +#define SCE_ERR_DIFF_DELETION 12 +#define SCE_ERR_DIFF_MESSAGE 13 +#define SCE_ERR_PHP 14 +#define SCE_ERR_ELF 15 +#define SCE_ERR_IFC 16 +#define SCE_ERR_IFORT 17 +#define SCE_ERR_ABSF 18 +#define SCE_ERR_TIDY 19 +#define SCE_ERR_JAVA_STACK 20 +#define SCE_BAT_DEFAULT 0 +#define SCE_BAT_COMMENT 1 +#define SCE_BAT_WORD 2 +#define SCE_BAT_LABEL 3 +#define SCE_BAT_HIDE 4 +#define SCE_BAT_COMMAND 5 +#define SCE_BAT_IDENTIFIER 6 +#define SCE_BAT_OPERATOR 7 +#define SCE_MAKE_DEFAULT 0 +#define SCE_MAKE_COMMENT 1 +#define SCE_MAKE_PREPROCESSOR 2 +#define SCE_MAKE_IDENTIFIER 3 +#define SCE_MAKE_OPERATOR 4 +#define SCE_MAKE_TARGET 5 +#define SCE_MAKE_IDEOL 9 +#define SCE_DIFF_DEFAULT 0 +#define SCE_DIFF_COMMENT 1 +#define SCE_DIFF_COMMAND 2 +#define SCE_DIFF_HEADER 3 +#define SCE_DIFF_POSITION 4 +#define SCE_DIFF_DELETED 5 +#define SCE_DIFF_ADDED 6 +#define SCE_CONF_DEFAULT 0 +#define SCE_CONF_COMMENT 1 +#define SCE_CONF_NUMBER 2 +#define SCE_CONF_IDENTIFIER 3 +#define SCE_CONF_EXTENSION 4 +#define SCE_CONF_PARAMETER 5 +#define SCE_CONF_STRING 6 +#define SCE_CONF_OPERATOR 7 +#define SCE_CONF_IP 8 +#define SCE_CONF_DIRECTIVE 9 +#define SCE_AVE_DEFAULT 0 +#define SCE_AVE_COMMENT 1 +#define SCE_AVE_NUMBER 2 +#define SCE_AVE_WORD 3 +#define SCE_AVE_STRING 6 +#define SCE_AVE_ENUM 7 +#define SCE_AVE_STRINGEOL 8 +#define SCE_AVE_IDENTIFIER 9 +#define SCE_AVE_OPERATOR 10 +#define SCE_AVE_WORD1 11 +#define SCE_AVE_WORD2 12 +#define SCE_AVE_WORD3 13 +#define SCE_AVE_WORD4 14 +#define SCE_AVE_WORD5 15 +#define SCE_AVE_WORD6 16 +#define SCE_ADA_DEFAULT 0 +#define SCE_ADA_WORD 1 +#define SCE_ADA_IDENTIFIER 2 +#define SCE_ADA_NUMBER 3 +#define SCE_ADA_DELIMITER 4 +#define SCE_ADA_CHARACTER 5 +#define SCE_ADA_CHARACTEREOL 6 +#define SCE_ADA_STRING 7 +#define SCE_ADA_STRINGEOL 8 +#define SCE_ADA_LABEL 9 +#define SCE_ADA_COMMENTLINE 10 +#define SCE_ADA_ILLEGAL 11 +#define SCE_BAAN_DEFAULT 0 +#define SCE_BAAN_COMMENT 1 +#define SCE_BAAN_COMMENTDOC 2 +#define SCE_BAAN_NUMBER 3 +#define SCE_BAAN_WORD 4 +#define SCE_BAAN_STRING 5 +#define SCE_BAAN_PREPROCESSOR 6 +#define SCE_BAAN_OPERATOR 7 +#define SCE_BAAN_IDENTIFIER 8 +#define SCE_BAAN_STRINGEOL 9 +#define SCE_BAAN_WORD2 10 +#define SCE_LISP_DEFAULT 0 +#define SCE_LISP_COMMENT 1 +#define SCE_LISP_NUMBER 2 +#define SCE_LISP_KEYWORD 3 +#define SCE_LISP_KEYWORD_KW 4 +#define SCE_LISP_SYMBOL 5 +#define SCE_LISP_STRING 6 +#define SCE_LISP_STRINGEOL 8 +#define SCE_LISP_IDENTIFIER 9 +#define SCE_LISP_OPERATOR 10 +#define SCE_LISP_SPECIAL 11 +#define SCE_LISP_MULTI_COMMENT 12 +#define SCE_EIFFEL_DEFAULT 0 +#define SCE_EIFFEL_COMMENTLINE 1 +#define SCE_EIFFEL_NUMBER 2 +#define SCE_EIFFEL_WORD 3 +#define SCE_EIFFEL_STRING 4 +#define SCE_EIFFEL_CHARACTER 5 +#define SCE_EIFFEL_OPERATOR 6 +#define SCE_EIFFEL_IDENTIFIER 7 +#define SCE_EIFFEL_STRINGEOL 8 +#define SCE_NNCRONTAB_DEFAULT 0 +#define SCE_NNCRONTAB_COMMENT 1 +#define SCE_NNCRONTAB_TASK 2 +#define SCE_NNCRONTAB_SECTION 3 +#define SCE_NNCRONTAB_KEYWORD 4 +#define SCE_NNCRONTAB_MODIFIER 5 +#define SCE_NNCRONTAB_ASTERISK 6 +#define SCE_NNCRONTAB_NUMBER 7 +#define SCE_NNCRONTAB_STRING 8 +#define SCE_NNCRONTAB_ENVIRONMENT 9 +#define SCE_NNCRONTAB_IDENTIFIER 10 +#define SCE_FORTH_DEFAULT 0 +#define SCE_FORTH_COMMENT 1 +#define SCE_FORTH_COMMENT_ML 2 +#define SCE_FORTH_IDENTIFIER 3 +#define SCE_FORTH_CONTROL 4 +#define SCE_FORTH_KEYWORD 5 +#define SCE_FORTH_DEFWORD 6 +#define SCE_FORTH_PREWORD1 7 +#define SCE_FORTH_PREWORD2 8 +#define SCE_FORTH_NUMBER 9 +#define SCE_FORTH_STRING 10 +#define SCE_FORTH_LOCALE 11 +#define SCE_MATLAB_DEFAULT 0 +#define SCE_MATLAB_COMMENT 1 +#define SCE_MATLAB_COMMAND 2 +#define SCE_MATLAB_NUMBER 3 +#define SCE_MATLAB_KEYWORD 4 +#define SCE_MATLAB_STRING 5 +#define SCE_MATLAB_OPERATOR 6 +#define SCE_MATLAB_IDENTIFIER 7 +#define SCE_MATLAB_DOUBLEQUOTESTRING 8 +#define SCE_SCRIPTOL_DEFAULT 0 +#define SCE_SCRIPTOL_WHITE 1 +#define SCE_SCRIPTOL_COMMENTLINE 2 +#define SCE_SCRIPTOL_PERSISTENT 3 +#define SCE_SCRIPTOL_CSTYLE 4 +#define SCE_SCRIPTOL_COMMENTBLOCK 5 +#define SCE_SCRIPTOL_NUMBER 6 +#define SCE_SCRIPTOL_STRING 7 +#define SCE_SCRIPTOL_CHARACTER 8 +#define SCE_SCRIPTOL_STRINGEOL 9 +#define SCE_SCRIPTOL_KEYWORD 10 +#define SCE_SCRIPTOL_OPERATOR 11 +#define SCE_SCRIPTOL_IDENTIFIER 12 +#define SCE_SCRIPTOL_TRIPLE 13 +#define SCE_SCRIPTOL_CLASSNAME 14 +#define SCE_SCRIPTOL_PREPROCESSOR 15 +#define SCE_ASM_DEFAULT 0 +#define SCE_ASM_COMMENT 1 +#define SCE_ASM_NUMBER 2 +#define SCE_ASM_STRING 3 +#define SCE_ASM_OPERATOR 4 +#define SCE_ASM_IDENTIFIER 5 +#define SCE_ASM_CPUINSTRUCTION 6 +#define SCE_ASM_MATHINSTRUCTION 7 +#define SCE_ASM_REGISTER 8 +#define SCE_ASM_DIRECTIVE 9 +#define SCE_ASM_DIRECTIVEOPERAND 10 +#define SCE_ASM_COMMENTBLOCK 11 +#define SCE_ASM_CHARACTER 12 +#define SCE_ASM_STRINGEOL 13 +#define SCE_ASM_EXTINSTRUCTION 14 +#define SCE_F_DEFAULT 0 +#define SCE_F_COMMENT 1 +#define SCE_F_NUMBER 2 +#define SCE_F_STRING1 3 +#define SCE_F_STRING2 4 +#define SCE_F_STRINGEOL 5 +#define SCE_F_OPERATOR 6 +#define SCE_F_IDENTIFIER 7 +#define SCE_F_WORD 8 +#define SCE_F_WORD2 9 +#define SCE_F_WORD3 10 +#define SCE_F_PREPROCESSOR 11 +#define SCE_F_OPERATOR2 12 +#define SCE_F_LABEL 13 +#define SCE_F_CONTINUATION 14 +#define SCE_CSS_DEFAULT 0 +#define SCE_CSS_TAG 1 +#define SCE_CSS_CLASS 2 +#define SCE_CSS_PSEUDOCLASS 3 +#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 +#define SCE_CSS_OPERATOR 5 +#define SCE_CSS_IDENTIFIER 6 +#define SCE_CSS_UNKNOWN_IDENTIFIER 7 +#define SCE_CSS_VALUE 8 +#define SCE_CSS_COMMENT 9 +#define SCE_CSS_ID 10 +#define SCE_CSS_IMPORTANT 11 +#define SCE_CSS_DIRECTIVE 12 +#define SCE_CSS_DOUBLESTRING 13 +#define SCE_CSS_SINGLESTRING 14 +#define SCE_CSS_IDENTIFIER2 15 +#define SCE_CSS_ATTRIBUTE 16 +#define SCE_POV_DEFAULT 0 +#define SCE_POV_COMMENT 1 +#define SCE_POV_COMMENTLINE 2 +#define SCE_POV_NUMBER 3 +#define SCE_POV_OPERATOR 4 +#define SCE_POV_IDENTIFIER 5 +#define SCE_POV_STRING 6 +#define SCE_POV_STRINGEOL 7 +#define SCE_POV_DIRECTIVE 8 +#define SCE_POV_BADDIRECTIVE 9 +#define SCE_POV_WORD2 10 +#define SCE_POV_WORD3 11 +#define SCE_POV_WORD4 12 +#define SCE_POV_WORD5 13 +#define SCE_POV_WORD6 14 +#define SCE_POV_WORD7 15 +#define SCE_POV_WORD8 16 +#define SCE_LOUT_DEFAULT 0 +#define SCE_LOUT_COMMENT 1 +#define SCE_LOUT_NUMBER 2 +#define SCE_LOUT_WORD 3 +#define SCE_LOUT_WORD2 4 +#define SCE_LOUT_WORD3 5 +#define SCE_LOUT_WORD4 6 +#define SCE_LOUT_STRING 7 +#define SCE_LOUT_OPERATOR 8 +#define SCE_LOUT_IDENTIFIER 9 +#define SCE_LOUT_STRINGEOL 10 +#define SCE_ESCRIPT_DEFAULT 0 +#define SCE_ESCRIPT_COMMENT 1 +#define SCE_ESCRIPT_COMMENTLINE 2 +#define SCE_ESCRIPT_COMMENTDOC 3 +#define SCE_ESCRIPT_NUMBER 4 +#define SCE_ESCRIPT_WORD 5 +#define SCE_ESCRIPT_STRING 6 +#define SCE_ESCRIPT_OPERATOR 7 +#define SCE_ESCRIPT_IDENTIFIER 8 +#define SCE_ESCRIPT_BRACE 9 +#define SCE_ESCRIPT_WORD2 10 +#define SCE_ESCRIPT_WORD3 11 +#define SCE_PS_DEFAULT 0 +#define SCE_PS_COMMENT 1 +#define SCE_PS_DSC_COMMENT 2 +#define SCE_PS_DSC_VALUE 3 +#define SCE_PS_NUMBER 4 +#define SCE_PS_NAME 5 +#define SCE_PS_KEYWORD 6 +#define SCE_PS_LITERAL 7 +#define SCE_PS_IMMEVAL 8 +#define SCE_PS_PAREN_ARRAY 9 +#define SCE_PS_PAREN_DICT 10 +#define SCE_PS_PAREN_PROC 11 +#define SCE_PS_TEXT 12 +#define SCE_PS_HEXSTRING 13 +#define SCE_PS_BASE85STRING 14 +#define SCE_PS_BADSTRINGCHAR 15 +#define SCE_NSIS_DEFAULT 0 +#define SCE_NSIS_COMMENT 1 +#define SCE_NSIS_STRINGDQ 2 +#define SCE_NSIS_STRINGLQ 3 +#define SCE_NSIS_STRINGRQ 4 +#define SCE_NSIS_FUNCTION 5 +#define SCE_NSIS_VARIABLE 6 +#define SCE_NSIS_LABEL 7 +#define SCE_NSIS_USERDEFINED 8 +#define SCE_NSIS_SECTIONDEF 9 +#define SCE_NSIS_SUBSECTIONDEF 10 +#define SCE_NSIS_IFDEFINEDEF 11 +#define SCE_NSIS_MACRODEF 12 +#define SCE_NSIS_STRINGVAR 13 +#define SCE_NSIS_NUMBER 14 +#define SCE_NSIS_SECTIONGROUP 15 +#define SCE_NSIS_PAGEEX 16 +#define SCE_NSIS_FUNCTIONDEF 17 +#define SCE_NSIS_COMMENTBOX 18 +#define SCE_MMIXAL_LEADWS 0 +#define SCE_MMIXAL_COMMENT 1 +#define SCE_MMIXAL_LABEL 2 +#define SCE_MMIXAL_OPCODE 3 +#define SCE_MMIXAL_OPCODE_PRE 4 +#define SCE_MMIXAL_OPCODE_VALID 5 +#define SCE_MMIXAL_OPCODE_UNKNOWN 6 +#define SCE_MMIXAL_OPCODE_POST 7 +#define SCE_MMIXAL_OPERANDS 8 +#define SCE_MMIXAL_NUMBER 9 +#define SCE_MMIXAL_REF 10 +#define SCE_MMIXAL_CHAR 11 +#define SCE_MMIXAL_STRING 12 +#define SCE_MMIXAL_REGISTER 13 +#define SCE_MMIXAL_HEX 14 +#define SCE_MMIXAL_OPERATOR 15 +#define SCE_MMIXAL_SYMBOL 16 +#define SCE_MMIXAL_INCLUDE 17 +#define SCE_CLW_DEFAULT 0 +#define SCE_CLW_LABEL 1 +#define SCE_CLW_COMMENT 2 +#define SCE_CLW_STRING 3 +#define SCE_CLW_USER_IDENTIFIER 4 +#define SCE_CLW_INTEGER_CONSTANT 5 +#define SCE_CLW_REAL_CONSTANT 6 +#define SCE_CLW_PICTURE_STRING 7 +#define SCE_CLW_KEYWORD 8 +#define SCE_CLW_COMPILER_DIRECTIVE 9 +#define SCE_CLW_RUNTIME_EXPRESSIONS 10 +#define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11 +#define SCE_CLW_STRUCTURE_DATA_TYPE 12 +#define SCE_CLW_ATTRIBUTE 13 +#define SCE_CLW_STANDARD_EQUATE 14 +#define SCE_CLW_ERROR 15 +#define SCE_CLW_DEPRECATED 16 +#define SCE_LOT_DEFAULT 0 +#define SCE_LOT_HEADER 1 +#define SCE_LOT_BREAK 2 +#define SCE_LOT_SET 3 +#define SCE_LOT_PASS 4 +#define SCE_LOT_FAIL 5 +#define SCE_LOT_ABORT 6 +#define SCE_YAML_DEFAULT 0 +#define SCE_YAML_COMMENT 1 +#define SCE_YAML_IDENTIFIER 2 +#define SCE_YAML_KEYWORD 3 +#define SCE_YAML_NUMBER 4 +#define SCE_YAML_REFERENCE 5 +#define SCE_YAML_DOCUMENT 6 +#define SCE_YAML_TEXT 7 +#define SCE_YAML_ERROR 8 +#define SCE_TEX_DEFAULT 0 +#define SCE_TEX_SPECIAL 1 +#define SCE_TEX_GROUP 2 +#define SCE_TEX_SYMBOL 3 +#define SCE_TEX_COMMAND 4 +#define SCE_TEX_TEXT 5 +#define SCE_METAPOST_DEFAULT 0 +#define SCE_METAPOST_SPECIAL 1 +#define SCE_METAPOST_GROUP 2 +#define SCE_METAPOST_SYMBOL 3 +#define SCE_METAPOST_COMMAND 4 +#define SCE_METAPOST_TEXT 5 +#define SCE_METAPOST_EXTRA 6 +#define SCE_ERLANG_DEFAULT 0 +#define SCE_ERLANG_COMMENT 1 +#define SCE_ERLANG_VARIABLE 2 +#define SCE_ERLANG_NUMBER 3 +#define SCE_ERLANG_KEYWORD 4 +#define SCE_ERLANG_STRING 5 +#define SCE_ERLANG_OPERATOR 6 +#define SCE_ERLANG_ATOM 7 +#define SCE_ERLANG_FUNCTION_NAME 8 +#define SCE_ERLANG_CHARACTER 9 +#define SCE_ERLANG_MACRO 10 +#define SCE_ERLANG_RECORD 11 +#define SCE_ERLANG_SEPARATOR 12 +#define SCE_ERLANG_NODE_NAME 13 +#define SCE_ERLANG_UNKNOWN 31 +#define SCE_MSSQL_DEFAULT 0 +#define SCE_MSSQL_COMMENT 1 +#define SCE_MSSQL_LINE_COMMENT 2 +#define SCE_MSSQL_NUMBER 3 +#define SCE_MSSQL_STRING 4 +#define SCE_MSSQL_OPERATOR 5 +#define SCE_MSSQL_IDENTIFIER 6 +#define SCE_MSSQL_VARIABLE 7 +#define SCE_MSSQL_COLUMN_NAME 8 +#define SCE_MSSQL_STATEMENT 9 +#define SCE_MSSQL_DATATYPE 10 +#define SCE_MSSQL_SYSTABLE 11 +#define SCE_MSSQL_GLOBAL_VARIABLE 12 +#define SCE_MSSQL_FUNCTION 13 +#define SCE_MSSQL_STORED_PROCEDURE 14 +#define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15 +#define SCE_MSSQL_COLUMN_NAME_2 16 +#define SCE_V_DEFAULT 0 +#define SCE_V_COMMENT 1 +#define SCE_V_COMMENTLINE 2 +#define SCE_V_COMMENTLINEBANG 3 +#define SCE_V_NUMBER 4 +#define SCE_V_WORD 5 +#define SCE_V_STRING 6 +#define SCE_V_WORD2 7 +#define SCE_V_WORD3 8 +#define SCE_V_PREPROCESSOR 9 +#define SCE_V_OPERATOR 10 +#define SCE_V_IDENTIFIER 11 +#define SCE_V_STRINGEOL 12 +#define SCE_V_USER 19 +#define SCE_KIX_DEFAULT 0 +#define SCE_KIX_COMMENT 1 +#define SCE_KIX_STRING1 2 +#define SCE_KIX_STRING2 3 +#define SCE_KIX_NUMBER 4 +#define SCE_KIX_VAR 5 +#define SCE_KIX_MACRO 6 +#define SCE_KIX_KEYWORD 7 +#define SCE_KIX_FUNCTIONS 8 +#define SCE_KIX_OPERATOR 9 +#define SCE_KIX_IDENTIFIER 31 +#define SCE_GC_DEFAULT 0 +#define SCE_GC_COMMENTLINE 1 +#define SCE_GC_COMMENTBLOCK 2 +#define SCE_GC_GLOBAL 3 +#define SCE_GC_EVENT 4 +#define SCE_GC_ATTRIBUTE 5 +#define SCE_GC_CONTROL 6 +#define SCE_GC_COMMAND 7 +#define SCE_GC_STRING 8 +#define SCE_GC_OPERATOR 9 +#define SCE_SN_DEFAULT 0 +#define SCE_SN_CODE 1 +#define SCE_SN_COMMENTLINE 2 +#define SCE_SN_COMMENTLINEBANG 3 +#define SCE_SN_NUMBER 4 +#define SCE_SN_WORD 5 +#define SCE_SN_STRING 6 +#define SCE_SN_WORD2 7 +#define SCE_SN_WORD3 8 +#define SCE_SN_PREPROCESSOR 9 +#define SCE_SN_OPERATOR 10 +#define SCE_SN_IDENTIFIER 11 +#define SCE_SN_STRINGEOL 12 +#define SCE_SN_REGEXTAG 13 +#define SCE_SN_SIGNAL 14 +#define SCE_SN_USER 19 +#define SCE_AU3_DEFAULT 0 +#define SCE_AU3_COMMENT 1 +#define SCE_AU3_COMMENTBLOCK 2 +#define SCE_AU3_NUMBER 3 +#define SCE_AU3_FUNCTION 4 +#define SCE_AU3_KEYWORD 5 +#define SCE_AU3_MACRO 6 +#define SCE_AU3_STRING 7 +#define SCE_AU3_OPERATOR 8 +#define SCE_AU3_VARIABLE 9 +#define SCE_AU3_SENT 10 +#define SCE_AU3_PREPROCESSOR 11 +#define SCE_AU3_SPECIAL 12 +#define SCE_AU3_EXPAND 13 +#define SCE_AU3_COMOBJ 14 +#define SCE_AU3_UDF 15 +#define SCE_APDL_DEFAULT 0 +#define SCE_APDL_COMMENT 1 +#define SCE_APDL_COMMENTBLOCK 2 +#define SCE_APDL_NUMBER 3 +#define SCE_APDL_STRING 4 +#define SCE_APDL_OPERATOR 5 +#define SCE_APDL_WORD 6 +#define SCE_APDL_PROCESSOR 7 +#define SCE_APDL_COMMAND 8 +#define SCE_APDL_SLASHCOMMAND 9 +#define SCE_APDL_STARCOMMAND 10 +#define SCE_APDL_ARGUMENT 11 +#define SCE_APDL_FUNCTION 12 +#define SCE_SH_DEFAULT 0 +#define SCE_SH_ERROR 1 +#define SCE_SH_COMMENTLINE 2 +#define SCE_SH_NUMBER 3 +#define SCE_SH_WORD 4 +#define SCE_SH_STRING 5 +#define SCE_SH_CHARACTER 6 +#define SCE_SH_OPERATOR 7 +#define SCE_SH_IDENTIFIER 8 +#define SCE_SH_SCALAR 9 +#define SCE_SH_PARAM 10 +#define SCE_SH_BACKTICKS 11 +#define SCE_SH_HERE_DELIM 12 +#define SCE_SH_HERE_Q 13 +#define SCE_ASN1_DEFAULT 0 +#define SCE_ASN1_COMMENT 1 +#define SCE_ASN1_IDENTIFIER 2 +#define SCE_ASN1_STRING 3 +#define SCE_ASN1_OID 4 +#define SCE_ASN1_SCALAR 5 +#define SCE_ASN1_KEYWORD 6 +#define SCE_ASN1_ATTRIBUTE 7 +#define SCE_ASN1_DESCRIPTOR 8 +#define SCE_ASN1_TYPE 9 +#define SCE_ASN1_OPERATOR 10 +#define SCE_VHDL_DEFAULT 0 +#define SCE_VHDL_COMMENT 1 +#define SCE_VHDL_COMMENTLINEBANG 2 +#define SCE_VHDL_NUMBER 3 +#define SCE_VHDL_STRING 4 +#define SCE_VHDL_OPERATOR 5 +#define SCE_VHDL_IDENTIFIER 6 +#define SCE_VHDL_STRINGEOL 7 +#define SCE_VHDL_KEYWORD 8 +#define SCE_VHDL_STDOPERATOR 9 +#define SCE_VHDL_ATTRIBUTE 10 +#define SCE_VHDL_STDFUNCTION 11 +#define SCE_VHDL_STDPACKAGE 12 +#define SCE_VHDL_STDTYPE 13 +#define SCE_VHDL_USERWORD 14 +#define SCE_CAML_DEFAULT 0 +#define SCE_CAML_IDENTIFIER 1 +#define SCE_CAML_TAGNAME 2 +#define SCE_CAML_KEYWORD 3 +#define SCE_CAML_KEYWORD2 4 +#define SCE_CAML_KEYWORD3 5 +#define SCE_CAML_LINENUM 6 +#define SCE_CAML_OPERATOR 7 +#define SCE_CAML_NUMBER 8 +#define SCE_CAML_CHAR 9 +#define SCE_CAML_STRING 11 +#define SCE_CAML_COMMENT 12 +#define SCE_CAML_COMMENT1 13 +#define SCE_CAML_COMMENT2 14 +#define SCE_CAML_COMMENT3 15 +#define SCE_HA_DEFAULT 0 +#define SCE_HA_IDENTIFIER 1 +#define SCE_HA_KEYWORD 2 +#define SCE_HA_NUMBER 3 +#define SCE_HA_STRING 4 +#define SCE_HA_CHARACTER 5 +#define SCE_HA_CLASS 6 +#define SCE_HA_MODULE 7 +#define SCE_HA_CAPITAL 8 +#define SCE_HA_DATA 9 +#define SCE_HA_IMPORT 10 +#define SCE_HA_OPERATOR 11 +#define SCE_HA_INSTANCE 12 +#define SCE_HA_COMMENTLINE 13 +#define SCE_HA_COMMENTBLOCK 14 +#define SCE_HA_COMMENTBLOCK2 15 +#define SCE_HA_COMMENTBLOCK3 16 +#define SCE_T3_DEFAULT 0 +#define SCE_T3_X_DEFAULT 1 +#define SCE_T3_PREPROCESSOR 2 +#define SCE_T3_BLOCK_COMMENT 3 +#define SCE_T3_LINE_COMMENT 4 +#define SCE_T3_OPERATOR 5 +#define SCE_T3_KEYWORD 6 +#define SCE_T3_NUMBER 7 +#define SCE_T3_IDENTIFIER 8 +#define SCE_T3_S_STRING 9 +#define SCE_T3_D_STRING 10 +#define SCE_T3_X_STRING 11 +#define SCE_T3_LIB_DIRECTIVE 12 +#define SCE_T3_MSG_PARAM 13 +#define SCE_T3_HTML_TAG 14 +#define SCE_T3_HTML_DEFAULT 15 +#define SCE_T3_HTML_STRING 16 +#define SCE_T3_USER1 17 +#define SCE_T3_USER2 18 +#define SCE_T3_USER3 19 +#define SCE_T3_BRACE 20 +#define SCE_REBOL_DEFAULT 0 +#define SCE_REBOL_COMMENTLINE 1 +#define SCE_REBOL_COMMENTBLOCK 2 +#define SCE_REBOL_PREFACE 3 +#define SCE_REBOL_OPERATOR 4 +#define SCE_REBOL_CHARACTER 5 +#define SCE_REBOL_QUOTEDSTRING 6 +#define SCE_REBOL_BRACEDSTRING 7 +#define SCE_REBOL_NUMBER 8 +#define SCE_REBOL_PAIR 9 +#define SCE_REBOL_TUPLE 10 +#define SCE_REBOL_BINARY 11 +#define SCE_REBOL_MONEY 12 +#define SCE_REBOL_ISSUE 13 +#define SCE_REBOL_TAG 14 +#define SCE_REBOL_FILE 15 +#define SCE_REBOL_EMAIL 16 +#define SCE_REBOL_URL 17 +#define SCE_REBOL_DATE 18 +#define SCE_REBOL_TIME 19 +#define SCE_REBOL_IDENTIFIER 20 +#define SCE_REBOL_WORD 21 +#define SCE_REBOL_WORD2 22 +#define SCE_REBOL_WORD3 23 +#define SCE_REBOL_WORD4 24 +#define SCE_REBOL_WORD5 25 +#define SCE_REBOL_WORD6 26 +#define SCE_REBOL_WORD7 27 +#define SCE_REBOL_WORD8 28 +#define SCE_SQL_DEFAULT 0 +#define SCE_SQL_COMMENT 1 +#define SCE_SQL_COMMENTLINE 2 +#define SCE_SQL_COMMENTDOC 3 +#define SCE_SQL_NUMBER 4 +#define SCE_SQL_WORD 5 +#define SCE_SQL_STRING 6 +#define SCE_SQL_CHARACTER 7 +#define SCE_SQL_SQLPLUS 8 +#define SCE_SQL_SQLPLUS_PROMPT 9 +#define SCE_SQL_OPERATOR 10 +#define SCE_SQL_IDENTIFIER 11 +#define SCE_SQL_SQLPLUS_COMMENT 13 +#define SCE_SQL_COMMENTLINEDOC 15 +#define SCE_SQL_WORD2 16 +#define SCE_SQL_COMMENTDOCKEYWORD 17 +#define SCE_SQL_COMMENTDOCKEYWORDERROR 18 +#define SCE_SQL_USER1 19 +#define SCE_SQL_USER2 20 +#define SCE_SQL_USER3 21 +#define SCE_SQL_USER4 22 +#define SCE_SQL_QUOTEDIDENTIFIER 23 +#define SCE_ST_DEFAULT 0 +#define SCE_ST_STRING 1 +#define SCE_ST_NUMBER 2 +#define SCE_ST_COMMENT 3 +#define SCE_ST_SYMBOL 4 +#define SCE_ST_BINARY 5 +#define SCE_ST_BOOL 6 +#define SCE_ST_SELF 7 +#define SCE_ST_SUPER 8 +#define SCE_ST_NIL 9 +#define SCE_ST_GLOBAL 10 +#define SCE_ST_RETURN 11 +#define SCE_ST_SPECIAL 12 +#define SCE_ST_KWSEND 13 +#define SCE_ST_ASSIGN 14 +#define SCE_ST_CHARACTER 15 +#define SCE_ST_SPEC_SEL 16 +#define SCE_FS_DEFAULT 0 +#define SCE_FS_COMMENT 1 +#define SCE_FS_COMMENTLINE 2 +#define SCE_FS_COMMENTDOC 3 +#define SCE_FS_COMMENTLINEDOC 4 +#define SCE_FS_COMMENTDOCKEYWORD 5 +#define SCE_FS_COMMENTDOCKEYWORDERROR 6 +#define SCE_FS_KEYWORD 7 +#define SCE_FS_KEYWORD2 8 +#define SCE_FS_KEYWORD3 9 +#define SCE_FS_KEYWORD4 10 +#define SCE_FS_NUMBER 11 +#define SCE_FS_STRING 12 +#define SCE_FS_PREPROCESSOR 13 +#define SCE_FS_OPERATOR 14 +#define SCE_FS_IDENTIFIER 15 +#define SCE_FS_DATE 16 +#define SCE_FS_STRINGEOL 17 +#define SCE_FS_CONSTANT 18 +#define SCE_FS_ASM 19 +#define SCE_FS_LABEL 20 +#define SCE_FS_ERROR 21 +#define SCE_FS_HEXNUMBER 22 +#define SCE_FS_BINNUMBER 23 +#define SCE_CSOUND_DEFAULT 0 +#define SCE_CSOUND_COMMENT 1 +#define SCE_CSOUND_NUMBER 2 +#define SCE_CSOUND_OPERATOR 3 +#define SCE_CSOUND_INSTR 4 +#define SCE_CSOUND_IDENTIFIER 5 +#define SCE_CSOUND_OPCODE 6 +#define SCE_CSOUND_HEADERSTMT 7 +#define SCE_CSOUND_USERKEYWORD 8 +#define SCE_CSOUND_COMMENTBLOCK 9 +#define SCE_CSOUND_PARAM 10 +#define SCE_CSOUND_ARATE_VAR 11 +#define SCE_CSOUND_KRATE_VAR 12 +#define SCE_CSOUND_IRATE_VAR 13 +#define SCE_CSOUND_GLOBAL_VAR 14 +#define SCE_CSOUND_STRINGEOL 15 +#define SCE_INNO_DEFAULT 0 +#define SCE_INNO_COMMENT 1 +#define SCE_INNO_KEYWORD 2 +#define SCE_INNO_PARAMETER 3 +#define SCE_INNO_SECTION 4 +#define SCE_INNO_PREPROC 5 +#define SCE_INNO_PREPROC_INLINE 6 +#define SCE_INNO_COMMENT_PASCAL 7 +#define SCE_INNO_KEYWORD_PASCAL 8 +#define SCE_INNO_KEYWORD_USER 9 +#define SCE_INNO_STRING_DOUBLE 10 +#define SCE_INNO_STRING_SINGLE 11 +#define SCE_INNO_IDENTIFIER 12 +#define SCE_OPAL_SPACE 0 +#define SCE_OPAL_COMMENT_BLOCK 1 +#define SCE_OPAL_COMMENT_LINE 2 +#define SCE_OPAL_INTEGER 3 +#define SCE_OPAL_KEYWORD 4 +#define SCE_OPAL_SORT 5 +#define SCE_OPAL_STRING 6 +#define SCE_OPAL_PAR 7 +#define SCE_OPAL_BOOL_CONST 8 +#define SCE_OPAL_DEFAULT 32 +#define SCE_SPICE_DEFAULT 0 +#define SCE_SPICE_IDENTIFIER 1 +#define SCE_SPICE_KEYWORD 2 +#define SCE_SPICE_KEYWORD2 3 +#define SCE_SPICE_KEYWORD3 4 +#define SCE_SPICE_NUMBER 5 +#define SCE_SPICE_DELIMITER 6 +#define SCE_SPICE_VALUE 7 +#define SCE_SPICE_COMMENTLINE 8 +#define SCE_CMAKE_DEFAULT 0 +#define SCE_CMAKE_COMMENT 1 +#define SCE_CMAKE_STRINGDQ 2 +#define SCE_CMAKE_STRINGLQ 3 +#define SCE_CMAKE_STRINGRQ 4 +#define SCE_CMAKE_COMMANDS 5 +#define SCE_CMAKE_PARAMETERS 6 +#define SCE_CMAKE_VARIABLE 7 +#define SCE_CMAKE_USERDEFINED 8 +#define SCE_CMAKE_WHILEDEF 9 +#define SCE_CMAKE_FOREACHDEF 10 +#define SCE_CMAKE_IFDEFINEDEF 11 +#define SCE_CMAKE_MACRODEF 12 +#define SCE_CMAKE_STRINGVAR 13 +#define SCE_CMAKE_NUMBER 14 +#define SCLEX_ASP 29 +#define SCLEX_PHP 30 +//--Autogenerated -- end of section automatically generated from Scintilla.iface + +#endif diff --git a/scintilla/include/SciLexer.h.bak b/scintilla/include/SciLexer.h.bak new file mode 100644 index 00000000..6c064ca4 --- /dev/null +++ b/scintilla/include/SciLexer.h.bak @@ -0,0 +1,1141 @@ +// Scintilla source code edit control +/** @file SciLexer.h + ** Interface to the added lexer functions in the SciLexer version of the edit control. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + +#ifndef SCILEXER_H +#define SCILEXER_H + +// SciLexer features - not in standard Scintilla + +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define SCLEX_CONTAINER 0 +#define SCLEX_NULL 1 +#define SCLEX_PYTHON 2 +#define SCLEX_CPP 3 +#define SCLEX_HTML 4 +#define SCLEX_XML 5 +#define SCLEX_PERL 6 +#define SCLEX_SQL 7 +#define SCLEX_VB 8 +#define SCLEX_PROPERTIES 9 +#define SCLEX_ERRORLIST 10 +#define SCLEX_MAKEFILE 11 +#define SCLEX_BATCH 12 +#define SCLEX_XCODE 13 +#define SCLEX_LATEX 14 +#define SCLEX_LUA 15 +#define SCLEX_DIFF 16 +#define SCLEX_CONF 17 +#define SCLEX_PASCAL 18 +#define SCLEX_AVE 19 +#define SCLEX_ADA 20 +#define SCLEX_LISP 21 +#define SCLEX_RUBY 22 +#define SCLEX_EIFFEL 23 +#define SCLEX_EIFFELKW 24 +#define SCLEX_TCL 25 +#define SCLEX_NNCRONTAB 26 +#define SCLEX_BULLANT 27 +#define SCLEX_VBSCRIPT 28 +#define SCLEX_BAAN 31 +#define SCLEX_MATLAB 32 +#define SCLEX_SCRIPTOL 33 +#define SCLEX_ASM 34 +#define SCLEX_CPPNOCASE 35 +#define SCLEX_FORTRAN 36 +#define SCLEX_F77 37 +#define SCLEX_CSS 38 +#define SCLEX_POV 39 +#define SCLEX_LOUT 40 +#define SCLEX_ESCRIPT 41 +#define SCLEX_PS 42 +#define SCLEX_NSIS 43 +#define SCLEX_MMIXAL 44 +#define SCLEX_CLW 45 +#define SCLEX_CLWNOCASE 46 +#define SCLEX_LOT 47 +#define SCLEX_YAML 48 +#define SCLEX_TEX 49 +#define SCLEX_METAPOST 50 +#define SCLEX_POWERBASIC 51 +#define SCLEX_FORTH 52 +#define SCLEX_ERLANG 53 +#define SCLEX_OCTAVE 54 +#define SCLEX_MSSQL 55 +#define SCLEX_VERILOG 56 +#define SCLEX_KIX 57 +#define SCLEX_GUI4CLI 58 +#define SCLEX_SPECMAN 59 +#define SCLEX_AU3 60 +#define SCLEX_APDL 61 +#define SCLEX_BASH 62 +#define SCLEX_ASN1 63 +#define SCLEX_VHDL 64 +#define SCLEX_CAML 65 +#define SCLEX_BLITZBASIC 66 +#define SCLEX_PUREBASIC 67 +#define SCLEX_HASKELL 68 +#define SCLEX_PHPSCRIPT 69 +#define SCLEX_TADS3 70 +#define SCLEX_REBOL 71 +#define SCLEX_SMALLTALK 72 +#define SCLEX_FLAGSHIP 73 +#define SCLEX_CSOUND 74 +#define SCLEX_FREEBASIC 75 +#define SCLEX_INNOSETUP 76 +#define SCLEX_OPAL 77 +#define SCLEX_SPICE 78 +#define SCLEX_D 79 +#define SCLEX_CMAKE 80 +#define SCLEX_SEARCHRESULT 98 +#define SCLEX_OBJC 99 +#define SCLEX_USER 100 +#define SCLEX_AUTOMATIC 1000 +#define SCE_P_DEFAULT 0 +#define SCE_P_COMMENTLINE 1 +#define SCE_P_NUMBER 2 +#define SCE_P_STRING 3 +#define SCE_P_CHARACTER 4 +#define SCE_P_WORD 5 +#define SCE_P_TRIPLE 6 +#define SCE_P_TRIPLEDOUBLE 7 +#define SCE_P_CLASSNAME 8 +#define SCE_P_DEFNAME 9 +#define SCE_P_OPERATOR 10 +#define SCE_P_IDENTIFIER 11 +#define SCE_P_COMMENTBLOCK 12 +#define SCE_P_STRINGEOL 13 +#define SCE_P_WORD2 14 +#define SCE_P_DECORATOR 15 +#define SCE_C_DEFAULT 0 +#define SCE_C_COMMENT 1 +#define SCE_C_COMMENTLINE 2 +#define SCE_C_COMMENTDOC 3 +#define SCE_C_NUMBER 4 +#define SCE_C_WORD 5 +#define SCE_C_STRING 6 +#define SCE_C_CHARACTER 7 +#define SCE_C_UUID 8 +#define SCE_C_PREPROCESSOR 9 +#define SCE_C_OPERATOR 10 +#define SCE_C_IDENTIFIER 11 +#define SCE_C_STRINGEOL 12 +#define SCE_C_VERBATIM 13 +#define SCE_C_REGEX 14 +#define SCE_C_COMMENTLINEDOC 15 +#define SCE_C_WORD2 16 +#define SCE_C_COMMENTDOCKEYWORD 17 +#define SCE_C_COMMENTDOCKEYWORDERROR 18 +#define SCE_C_GLOBALCLASS 19 +#define SCE_D_DEFAULT 0 +#define SCE_D_COMMENT 1 +#define SCE_D_COMMENTLINE 2 +#define SCE_D_COMMENTDOC 3 +#define SCE_D_COMMENTNESTED 4 +#define SCE_D_NUMBER 5 +#define SCE_D_WORD 6 +#define SCE_D_WORD2 7 +#define SCE_D_WORD3 8 +#define SCE_D_TYPEDEF 9 +#define SCE_D_STRING 10 +#define SCE_D_STRINGEOL 11 +#define SCE_D_CHARACTER 12 +#define SCE_D_OPERATOR 13 +#define SCE_D_IDENTIFIER 14 +#define SCE_D_COMMENTLINEDOC 15 +#define SCE_D_COMMENTDOCKEYWORD 16 +#define SCE_D_COMMENTDOCKEYWORDERROR 17 + +#define SCE_SEARCHRESULT_DEFAULT 0 +#define SCE_SEARCHRESULT_HEARDER 1 +#define SCE_SEARCHRESULT_NUMBER 2 +#define SCE_SEARCHRESULT_WORD2SEARCH 3 +#define SCE_SEARCHRESULT_KWORD1 4 +#define SCE_SEARCHRESULT_KWORD2 5 +#define SCE_SEARCHRESULT_KWORD3 6 + +#define SCE_OBJC_DIRECTIVE 20 +#define SCE_OBJC_QUALIFIER 21 + +#define SCE_USER_DEFAULT 0 +#define SCE_USER_COMMENT 1 +#define SCE_USER_COMMENTLINE 2 +#define SCE_USER_NUMBER 4 +#define SCE_USER_WORD1 5 +#define SCE_USER_WORD2 6 +#define SCE_USER_WORD3 7 +#define SCE_USER_WORD4 8 +#define SCE_USER_OPERATOR 10 +#define SCE_USER_IDENTIFIER 11 +#define SCE_USER_BLOCK_OPERATOR_OPEN 12 +#define SCE_USER_BLOCK_OPERATOR_CLOSE 13 +#define SCE_USER_DELIMITER1 14 +#define SCE_USER_DELIMITER2 15 +#define SCE_USER_DELIMITER3 16 + +#define SCE_TCL_DEFAULT 0 +#define SCE_TCL_COMMENT 1 +#define SCE_TCL_COMMENTLINE 2 +#define SCE_TCL_NUMBER 3 +#define SCE_TCL_WORD_IN_QUOTE 4 +#define SCE_TCL_IN_QUOTE 5 +#define SCE_TCL_OPERATOR 6 +#define SCE_TCL_IDENTIFIER 7 +#define SCE_TCL_SUBSTITUTION 8 +#define SCE_TCL_SUB_BRACE 9 +#define SCE_TCL_MODIFIER 10 +#define SCE_TCL_EXPAND 11 +#define SCE_TCL_WORD 12 +#define SCE_TCL_WORD2 13 +#define SCE_TCL_WORD3 14 +#define SCE_TCL_WORD4 15 +#define SCE_TCL_WORD5 16 +#define SCE_TCL_WORD6 17 +#define SCE_TCL_WORD7 18 +#define SCE_TCL_WORD8 19 +#define SCE_TCL_COMMENT_BOX 20 +#define SCE_TCL_BLOCK_COMMENT 21 +#define SCE_H_DEFAULT 0 +#define SCE_H_TAG 1 +#define SCE_H_TAGUNKNOWN 2 +#define SCE_H_ATTRIBUTE 3 +#define SCE_H_ATTRIBUTEUNKNOWN 4 +#define SCE_H_NUMBER 5 +#define SCE_H_DOUBLESTRING 6 +#define SCE_H_SINGLESTRING 7 +#define SCE_H_OTHER 8 +#define SCE_H_COMMENT 9 +#define SCE_H_ENTITY 10 +#define SCE_H_TAGEND 11 +#define SCE_H_XMLSTART 12 +#define SCE_H_XMLEND 13 +#define SCE_H_SCRIPT 14 +#define SCE_H_ASP 15 +#define SCE_H_ASPAT 16 +#define SCE_H_CDATA 17 +#define SCE_H_QUESTION 18 +#define SCE_H_VALUE 19 +#define SCE_H_XCCOMMENT 20 +#define SCE_H_SGML_DEFAULT 21 +#define SCE_H_SGML_COMMAND 22 +#define SCE_H_SGML_1ST_PARAM 23 +#define SCE_H_SGML_DOUBLESTRING 24 +#define SCE_H_SGML_SIMPLESTRING 25 +#define SCE_H_SGML_ERROR 26 +#define SCE_H_SGML_SPECIAL 27 +#define SCE_H_SGML_ENTITY 28 +#define SCE_H_SGML_COMMENT 29 +#define SCE_H_SGML_1ST_PARAM_COMMENT 30 +#define SCE_H_SGML_BLOCK_DEFAULT 31 +#define SCE_HJ_START 40 +#define SCE_HJ_DEFAULT 41 +#define SCE_HJ_COMMENT 42 +#define SCE_HJ_COMMENTLINE 43 +#define SCE_HJ_COMMENTDOC 44 +#define SCE_HJ_NUMBER 45 +#define SCE_HJ_WORD 46 +#define SCE_HJ_KEYWORD 47 +#define SCE_HJ_DOUBLESTRING 48 +#define SCE_HJ_SINGLESTRING 49 +#define SCE_HJ_SYMBOLS 50 +#define SCE_HJ_STRINGEOL 51 +#define SCE_HJ_REGEX 52 +#define SCE_HJA_START 55 +#define SCE_HJA_DEFAULT 56 +#define SCE_HJA_COMMENT 57 +#define SCE_HJA_COMMENTLINE 58 +#define SCE_HJA_COMMENTDOC 59 +#define SCE_HJA_NUMBER 60 +#define SCE_HJA_WORD 61 +#define SCE_HJA_KEYWORD 62 +#define SCE_HJA_DOUBLESTRING 63 +#define SCE_HJA_SINGLESTRING 64 +#define SCE_HJA_SYMBOLS 65 +#define SCE_HJA_STRINGEOL 66 +#define SCE_HJA_REGEX 67 +#define SCE_HB_START 70 +#define SCE_HB_DEFAULT 71 +#define SCE_HB_COMMENTLINE 72 +#define SCE_HB_NUMBER 73 +#define SCE_HB_WORD 74 +#define SCE_HB_STRING 75 +#define SCE_HB_IDENTIFIER 76 +#define SCE_HB_STRINGEOL 77 +#define SCE_HBA_START 80 +#define SCE_HBA_DEFAULT 81 +#define SCE_HBA_COMMENTLINE 82 +#define SCE_HBA_NUMBER 83 +#define SCE_HBA_WORD 84 +#define SCE_HBA_STRING 85 +#define SCE_HBA_IDENTIFIER 86 +#define SCE_HBA_STRINGEOL 87 +#define SCE_HP_START 90 +#define SCE_HP_DEFAULT 91 +#define SCE_HP_COMMENTLINE 92 +#define SCE_HP_NUMBER 93 +#define SCE_HP_STRING 94 +#define SCE_HP_CHARACTER 95 +#define SCE_HP_WORD 96 +#define SCE_HP_TRIPLE 97 +#define SCE_HP_TRIPLEDOUBLE 98 +#define SCE_HP_CLASSNAME 99 +#define SCE_HP_DEFNAME 100 +#define SCE_HP_OPERATOR 101 +#define SCE_HP_IDENTIFIER 102 +#define SCE_HPHP_COMPLEX_VARIABLE 104 +#define SCE_HPA_START 105 +#define SCE_HPA_DEFAULT 106 +#define SCE_HPA_COMMENTLINE 107 +#define SCE_HPA_NUMBER 108 +#define SCE_HPA_STRING 109 +#define SCE_HPA_CHARACTER 110 +#define SCE_HPA_WORD 111 +#define SCE_HPA_TRIPLE 112 +#define SCE_HPA_TRIPLEDOUBLE 113 +#define SCE_HPA_CLASSNAME 114 +#define SCE_HPA_DEFNAME 115 +#define SCE_HPA_OPERATOR 116 +#define SCE_HPA_IDENTIFIER 117 +#define SCE_HPHP_DEFAULT 118 +#define SCE_HPHP_HSTRING 119 +#define SCE_HPHP_SIMPLESTRING 120 +#define SCE_HPHP_WORD 121 +#define SCE_HPHP_NUMBER 122 +#define SCE_HPHP_VARIABLE 123 +#define SCE_HPHP_COMMENT 124 +#define SCE_HPHP_COMMENTLINE 125 +#define SCE_HPHP_HSTRING_VARIABLE 126 +#define SCE_HPHP_OPERATOR 127 +#define SCE_PL_DEFAULT 0 +#define SCE_PL_ERROR 1 +#define SCE_PL_COMMENTLINE 2 +#define SCE_PL_POD 3 +#define SCE_PL_NUMBER 4 +#define SCE_PL_WORD 5 +#define SCE_PL_STRING 6 +#define SCE_PL_CHARACTER 7 +#define SCE_PL_PUNCTUATION 8 +#define SCE_PL_PREPROCESSOR 9 +#define SCE_PL_OPERATOR 10 +#define SCE_PL_IDENTIFIER 11 +#define SCE_PL_SCALAR 12 +#define SCE_PL_ARRAY 13 +#define SCE_PL_HASH 14 +#define SCE_PL_SYMBOLTABLE 15 +#define SCE_PL_VARIABLE_INDEXER 16 +#define SCE_PL_REGEX 17 +#define SCE_PL_REGSUBST 18 +#define SCE_PL_LONGQUOTE 19 +#define SCE_PL_BACKTICKS 20 +#define SCE_PL_DATASECTION 21 +#define SCE_PL_HERE_DELIM 22 +#define SCE_PL_HERE_Q 23 +#define SCE_PL_HERE_QQ 24 +#define SCE_PL_HERE_QX 25 +#define SCE_PL_STRING_Q 26 +#define SCE_PL_STRING_QQ 27 +#define SCE_PL_STRING_QX 28 +#define SCE_PL_STRING_QR 29 +#define SCE_PL_STRING_QW 30 +#define SCE_PL_POD_VERB 31 +#define SCE_RB_DEFAULT 0 +#define SCE_RB_ERROR 1 +#define SCE_RB_COMMENTLINE 2 +#define SCE_RB_POD 3 +#define SCE_RB_NUMBER 4 +#define SCE_RB_WORD 5 +#define SCE_RB_STRING 6 +#define SCE_RB_CHARACTER 7 +#define SCE_RB_CLASSNAME 8 +#define SCE_RB_DEFNAME 9 +#define SCE_RB_OPERATOR 10 +#define SCE_RB_IDENTIFIER 11 +#define SCE_RB_REGEX 12 +#define SCE_RB_GLOBAL 13 +#define SCE_RB_SYMBOL 14 +#define SCE_RB_MODULE_NAME 15 +#define SCE_RB_INSTANCE_VAR 16 +#define SCE_RB_CLASS_VAR 17 +#define SCE_RB_BACKTICKS 18 +#define SCE_RB_DATASECTION 19 +#define SCE_RB_HERE_DELIM 20 +#define SCE_RB_HERE_Q 21 +#define SCE_RB_HERE_QQ 22 +#define SCE_RB_HERE_QX 23 +#define SCE_RB_STRING_Q 24 +#define SCE_RB_STRING_QQ 25 +#define SCE_RB_STRING_QX 26 +#define SCE_RB_STRING_QR 27 +#define SCE_RB_STRING_QW 28 +#define SCE_RB_WORD_DEMOTED 29 +#define SCE_RB_STDIN 30 +#define SCE_RB_STDOUT 31 +#define SCE_RB_STDERR 40 +#define SCE_RB_UPPER_BOUND 41 +#define SCE_B_DEFAULT 0 +#define SCE_B_COMMENT 1 +#define SCE_B_NUMBER 2 +#define SCE_B_KEYWORD 3 +#define SCE_B_STRING 4 +#define SCE_B_PREPROCESSOR 5 +#define SCE_B_OPERATOR 6 +#define SCE_B_IDENTIFIER 7 +#define SCE_B_DATE 8 +#define SCE_B_STRINGEOL 9 +#define SCE_B_KEYWORD2 10 +#define SCE_B_KEYWORD3 11 +#define SCE_B_KEYWORD4 12 +#define SCE_B_CONSTANT 13 +#define SCE_B_ASM 14 +#define SCE_B_LABEL 15 +#define SCE_B_ERROR 16 +#define SCE_B_HEXNUMBER 17 +#define SCE_B_BINNUMBER 18 +#define SCE_PROPS_DEFAULT 0 +#define SCE_PROPS_COMMENT 1 +#define SCE_PROPS_SECTION 2 +#define SCE_PROPS_ASSIGNMENT 3 +#define SCE_PROPS_DEFVAL 4 +#define SCE_PROPS_KEY 5 +#define SCE_L_DEFAULT 0 +#define SCE_L_COMMAND 1 +#define SCE_L_TAG 2 +#define SCE_L_MATH 3 +#define SCE_L_COMMENT 4 +#define SCE_LUA_DEFAULT 0 +#define SCE_LUA_COMMENT 1 +#define SCE_LUA_COMMENTLINE 2 +#define SCE_LUA_COMMENTDOC 3 +#define SCE_LUA_NUMBER 4 +#define SCE_LUA_WORD 5 +#define SCE_LUA_STRING 6 +#define SCE_LUA_CHARACTER 7 +#define SCE_LUA_LITERALSTRING 8 +#define SCE_LUA_PREPROCESSOR 9 +#define SCE_LUA_OPERATOR 10 +#define SCE_LUA_IDENTIFIER 11 +#define SCE_LUA_STRINGEOL 12 +#define SCE_LUA_WORD2 13 +#define SCE_LUA_WORD3 14 +#define SCE_LUA_WORD4 15 +#define SCE_LUA_WORD5 16 +#define SCE_LUA_WORD6 17 +#define SCE_LUA_WORD7 18 +#define SCE_LUA_WORD8 19 +#define SCE_ERR_DEFAULT 0 +#define SCE_ERR_PYTHON 1 +#define SCE_ERR_GCC 2 +#define SCE_ERR_MS 3 +#define SCE_ERR_CMD 4 +#define SCE_ERR_BORLAND 5 +#define SCE_ERR_PERL 6 +#define SCE_ERR_NET 7 +#define SCE_ERR_LUA 8 +#define SCE_ERR_CTAG 9 +#define SCE_ERR_DIFF_CHANGED 10 +#define SCE_ERR_DIFF_ADDITION 11 +#define SCE_ERR_DIFF_DELETION 12 +#define SCE_ERR_DIFF_MESSAGE 13 +#define SCE_ERR_PHP 14 +#define SCE_ERR_ELF 15 +#define SCE_ERR_IFC 16 +#define SCE_ERR_IFORT 17 +#define SCE_ERR_ABSF 18 +#define SCE_ERR_TIDY 19 +#define SCE_ERR_JAVA_STACK 20 +#define SCE_BAT_DEFAULT 0 +#define SCE_BAT_COMMENT 1 +#define SCE_BAT_WORD 2 +#define SCE_BAT_LABEL 3 +#define SCE_BAT_HIDE 4 +#define SCE_BAT_COMMAND 5 +#define SCE_BAT_IDENTIFIER 6 +#define SCE_BAT_OPERATOR 7 +#define SCE_MAKE_DEFAULT 0 +#define SCE_MAKE_COMMENT 1 +#define SCE_MAKE_PREPROCESSOR 2 +#define SCE_MAKE_IDENTIFIER 3 +#define SCE_MAKE_OPERATOR 4 +#define SCE_MAKE_TARGET 5 +#define SCE_MAKE_IDEOL 9 +#define SCE_DIFF_DEFAULT 0 +#define SCE_DIFF_COMMENT 1 +#define SCE_DIFF_COMMAND 2 +#define SCE_DIFF_HEADER 3 +#define SCE_DIFF_POSITION 4 +#define SCE_DIFF_DELETED 5 +#define SCE_DIFF_ADDED 6 +#define SCE_CONF_DEFAULT 0 +#define SCE_CONF_COMMENT 1 +#define SCE_CONF_NUMBER 2 +#define SCE_CONF_IDENTIFIER 3 +#define SCE_CONF_EXTENSION 4 +#define SCE_CONF_PARAMETER 5 +#define SCE_CONF_STRING 6 +#define SCE_CONF_OPERATOR 7 +#define SCE_CONF_IP 8 +#define SCE_CONF_DIRECTIVE 9 +#define SCE_AVE_DEFAULT 0 +#define SCE_AVE_COMMENT 1 +#define SCE_AVE_NUMBER 2 +#define SCE_AVE_WORD 3 +#define SCE_AVE_STRING 6 +#define SCE_AVE_ENUM 7 +#define SCE_AVE_STRINGEOL 8 +#define SCE_AVE_IDENTIFIER 9 +#define SCE_AVE_OPERATOR 10 +#define SCE_AVE_WORD1 11 +#define SCE_AVE_WORD2 12 +#define SCE_AVE_WORD3 13 +#define SCE_AVE_WORD4 14 +#define SCE_AVE_WORD5 15 +#define SCE_AVE_WORD6 16 +#define SCE_ADA_DEFAULT 0 +#define SCE_ADA_WORD 1 +#define SCE_ADA_IDENTIFIER 2 +#define SCE_ADA_NUMBER 3 +#define SCE_ADA_DELIMITER 4 +#define SCE_ADA_CHARACTER 5 +#define SCE_ADA_CHARACTEREOL 6 +#define SCE_ADA_STRING 7 +#define SCE_ADA_STRINGEOL 8 +#define SCE_ADA_LABEL 9 +#define SCE_ADA_COMMENTLINE 10 +#define SCE_ADA_ILLEGAL 11 +#define SCE_BAAN_DEFAULT 0 +#define SCE_BAAN_COMMENT 1 +#define SCE_BAAN_COMMENTDOC 2 +#define SCE_BAAN_NUMBER 3 +#define SCE_BAAN_WORD 4 +#define SCE_BAAN_STRING 5 +#define SCE_BAAN_PREPROCESSOR 6 +#define SCE_BAAN_OPERATOR 7 +#define SCE_BAAN_IDENTIFIER 8 +#define SCE_BAAN_STRINGEOL 9 +#define SCE_BAAN_WORD2 10 +#define SCE_LISP_DEFAULT 0 +#define SCE_LISP_COMMENT 1 +#define SCE_LISP_NUMBER 2 +#define SCE_LISP_KEYWORD 3 +#define SCE_LISP_KEYWORD_KW 4 +#define SCE_LISP_SYMBOL 5 +#define SCE_LISP_STRING 6 +#define SCE_LISP_STRINGEOL 8 +#define SCE_LISP_IDENTIFIER 9 +#define SCE_LISP_OPERATOR 10 +#define SCE_LISP_SPECIAL 11 +#define SCE_LISP_MULTI_COMMENT 12 +#define SCE_EIFFEL_DEFAULT 0 +#define SCE_EIFFEL_COMMENTLINE 1 +#define SCE_EIFFEL_NUMBER 2 +#define SCE_EIFFEL_WORD 3 +#define SCE_EIFFEL_STRING 4 +#define SCE_EIFFEL_CHARACTER 5 +#define SCE_EIFFEL_OPERATOR 6 +#define SCE_EIFFEL_IDENTIFIER 7 +#define SCE_EIFFEL_STRINGEOL 8 +#define SCE_NNCRONTAB_DEFAULT 0 +#define SCE_NNCRONTAB_COMMENT 1 +#define SCE_NNCRONTAB_TASK 2 +#define SCE_NNCRONTAB_SECTION 3 +#define SCE_NNCRONTAB_KEYWORD 4 +#define SCE_NNCRONTAB_MODIFIER 5 +#define SCE_NNCRONTAB_ASTERISK 6 +#define SCE_NNCRONTAB_NUMBER 7 +#define SCE_NNCRONTAB_STRING 8 +#define SCE_NNCRONTAB_ENVIRONMENT 9 +#define SCE_NNCRONTAB_IDENTIFIER 10 +#define SCE_FORTH_DEFAULT 0 +#define SCE_FORTH_COMMENT 1 +#define SCE_FORTH_COMMENT_ML 2 +#define SCE_FORTH_IDENTIFIER 3 +#define SCE_FORTH_CONTROL 4 +#define SCE_FORTH_KEYWORD 5 +#define SCE_FORTH_DEFWORD 6 +#define SCE_FORTH_PREWORD1 7 +#define SCE_FORTH_PREWORD2 8 +#define SCE_FORTH_NUMBER 9 +#define SCE_FORTH_STRING 10 +#define SCE_FORTH_LOCALE 11 +#define SCE_MATLAB_DEFAULT 0 +#define SCE_MATLAB_COMMENT 1 +#define SCE_MATLAB_COMMAND 2 +#define SCE_MATLAB_NUMBER 3 +#define SCE_MATLAB_KEYWORD 4 +#define SCE_MATLAB_STRING 5 +#define SCE_MATLAB_OPERATOR 6 +#define SCE_MATLAB_IDENTIFIER 7 +#define SCE_MATLAB_DOUBLEQUOTESTRING 8 +#define SCE_SCRIPTOL_DEFAULT 0 +#define SCE_SCRIPTOL_WHITE 1 +#define SCE_SCRIPTOL_COMMENTLINE 2 +#define SCE_SCRIPTOL_PERSISTENT 3 +#define SCE_SCRIPTOL_CSTYLE 4 +#define SCE_SCRIPTOL_COMMENTBLOCK 5 +#define SCE_SCRIPTOL_NUMBER 6 +#define SCE_SCRIPTOL_STRING 7 +#define SCE_SCRIPTOL_CHARACTER 8 +#define SCE_SCRIPTOL_STRINGEOL 9 +#define SCE_SCRIPTOL_KEYWORD 10 +#define SCE_SCRIPTOL_OPERATOR 11 +#define SCE_SCRIPTOL_IDENTIFIER 12 +#define SCE_SCRIPTOL_TRIPLE 13 +#define SCE_SCRIPTOL_CLASSNAME 14 +#define SCE_SCRIPTOL_PREPROCESSOR 15 +#define SCE_ASM_DEFAULT 0 +#define SCE_ASM_COMMENT 1 +#define SCE_ASM_NUMBER 2 +#define SCE_ASM_STRING 3 +#define SCE_ASM_OPERATOR 4 +#define SCE_ASM_IDENTIFIER 5 +#define SCE_ASM_CPUINSTRUCTION 6 +#define SCE_ASM_MATHINSTRUCTION 7 +#define SCE_ASM_REGISTER 8 +#define SCE_ASM_DIRECTIVE 9 +#define SCE_ASM_DIRECTIVEOPERAND 10 +#define SCE_ASM_COMMENTBLOCK 11 +#define SCE_ASM_CHARACTER 12 +#define SCE_ASM_STRINGEOL 13 +#define SCE_ASM_EXTINSTRUCTION 14 +#define SCE_F_DEFAULT 0 +#define SCE_F_COMMENT 1 +#define SCE_F_NUMBER 2 +#define SCE_F_STRING1 3 +#define SCE_F_STRING2 4 +#define SCE_F_STRINGEOL 5 +#define SCE_F_OPERATOR 6 +#define SCE_F_IDENTIFIER 7 +#define SCE_F_WORD 8 +#define SCE_F_WORD2 9 +#define SCE_F_WORD3 10 +#define SCE_F_PREPROCESSOR 11 +#define SCE_F_OPERATOR2 12 +#define SCE_F_LABEL 13 +#define SCE_F_CONTINUATION 14 +#define SCE_CSS_DEFAULT 0 +#define SCE_CSS_TAG 1 +#define SCE_CSS_CLASS 2 +#define SCE_CSS_PSEUDOCLASS 3 +#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 +#define SCE_CSS_OPERATOR 5 +#define SCE_CSS_IDENTIFIER 6 +#define SCE_CSS_UNKNOWN_IDENTIFIER 7 +#define SCE_CSS_VALUE 8 +#define SCE_CSS_COMMENT 9 +#define SCE_CSS_ID 10 +#define SCE_CSS_IMPORTANT 11 +#define SCE_CSS_DIRECTIVE 12 +#define SCE_CSS_DOUBLESTRING 13 +#define SCE_CSS_SINGLESTRING 14 +#define SCE_CSS_IDENTIFIER2 15 +#define SCE_CSS_ATTRIBUTE 16 +#define SCE_POV_DEFAULT 0 +#define SCE_POV_COMMENT 1 +#define SCE_POV_COMMENTLINE 2 +#define SCE_POV_NUMBER 3 +#define SCE_POV_OPERATOR 4 +#define SCE_POV_IDENTIFIER 5 +#define SCE_POV_STRING 6 +#define SCE_POV_STRINGEOL 7 +#define SCE_POV_DIRECTIVE 8 +#define SCE_POV_BADDIRECTIVE 9 +#define SCE_POV_WORD2 10 +#define SCE_POV_WORD3 11 +#define SCE_POV_WORD4 12 +#define SCE_POV_WORD5 13 +#define SCE_POV_WORD6 14 +#define SCE_POV_WORD7 15 +#define SCE_POV_WORD8 16 +#define SCE_LOUT_DEFAULT 0 +#define SCE_LOUT_COMMENT 1 +#define SCE_LOUT_NUMBER 2 +#define SCE_LOUT_WORD 3 +#define SCE_LOUT_WORD2 4 +#define SCE_LOUT_WORD3 5 +#define SCE_LOUT_WORD4 6 +#define SCE_LOUT_STRING 7 +#define SCE_LOUT_OPERATOR 8 +#define SCE_LOUT_IDENTIFIER 9 +#define SCE_LOUT_STRINGEOL 10 +#define SCE_ESCRIPT_DEFAULT 0 +#define SCE_ESCRIPT_COMMENT 1 +#define SCE_ESCRIPT_COMMENTLINE 2 +#define SCE_ESCRIPT_COMMENTDOC 3 +#define SCE_ESCRIPT_NUMBER 4 +#define SCE_ESCRIPT_WORD 5 +#define SCE_ESCRIPT_STRING 6 +#define SCE_ESCRIPT_OPERATOR 7 +#define SCE_ESCRIPT_IDENTIFIER 8 +#define SCE_ESCRIPT_BRACE 9 +#define SCE_ESCRIPT_WORD2 10 +#define SCE_ESCRIPT_WORD3 11 +#define SCE_PS_DEFAULT 0 +#define SCE_PS_COMMENT 1 +#define SCE_PS_DSC_COMMENT 2 +#define SCE_PS_DSC_VALUE 3 +#define SCE_PS_NUMBER 4 +#define SCE_PS_NAME 5 +#define SCE_PS_KEYWORD 6 +#define SCE_PS_LITERAL 7 +#define SCE_PS_IMMEVAL 8 +#define SCE_PS_PAREN_ARRAY 9 +#define SCE_PS_PAREN_DICT 10 +#define SCE_PS_PAREN_PROC 11 +#define SCE_PS_TEXT 12 +#define SCE_PS_HEXSTRING 13 +#define SCE_PS_BASE85STRING 14 +#define SCE_PS_BADSTRINGCHAR 15 +#define SCE_NSIS_DEFAULT 0 +#define SCE_NSIS_COMMENT 1 +#define SCE_NSIS_STRINGDQ 2 +#define SCE_NSIS_STRINGLQ 3 +#define SCE_NSIS_STRINGRQ 4 +#define SCE_NSIS_FUNCTION 5 +#define SCE_NSIS_VARIABLE 6 +#define SCE_NSIS_LABEL 7 +#define SCE_NSIS_USERDEFINED 8 +#define SCE_NSIS_SECTIONDEF 9 +#define SCE_NSIS_SUBSECTIONDEF 10 +#define SCE_NSIS_IFDEFINEDEF 11 +#define SCE_NSIS_MACRODEF 12 +#define SCE_NSIS_STRINGVAR 13 +#define SCE_NSIS_NUMBER 14 +#define SCE_NSIS_SECTIONGROUP 15 +#define SCE_NSIS_PAGEEX 16 +#define SCE_NSIS_FUNCTIONDEF 17 +#define SCE_NSIS_COMMENTBOX 18 +#define SCE_MMIXAL_LEADWS 0 +#define SCE_MMIXAL_COMMENT 1 +#define SCE_MMIXAL_LABEL 2 +#define SCE_MMIXAL_OPCODE 3 +#define SCE_MMIXAL_OPCODE_PRE 4 +#define SCE_MMIXAL_OPCODE_VALID 5 +#define SCE_MMIXAL_OPCODE_UNKNOWN 6 +#define SCE_MMIXAL_OPCODE_POST 7 +#define SCE_MMIXAL_OPERANDS 8 +#define SCE_MMIXAL_NUMBER 9 +#define SCE_MMIXAL_REF 10 +#define SCE_MMIXAL_CHAR 11 +#define SCE_MMIXAL_STRING 12 +#define SCE_MMIXAL_REGISTER 13 +#define SCE_MMIXAL_HEX 14 +#define SCE_MMIXAL_OPERATOR 15 +#define SCE_MMIXAL_SYMBOL 16 +#define SCE_MMIXAL_INCLUDE 17 +#define SCE_CLW_DEFAULT 0 +#define SCE_CLW_LABEL 1 +#define SCE_CLW_COMMENT 2 +#define SCE_CLW_STRING 3 +#define SCE_CLW_USER_IDENTIFIER 4 +#define SCE_CLW_INTEGER_CONSTANT 5 +#define SCE_CLW_REAL_CONSTANT 6 +#define SCE_CLW_PICTURE_STRING 7 +#define SCE_CLW_KEYWORD 8 +#define SCE_CLW_COMPILER_DIRECTIVE 9 +#define SCE_CLW_RUNTIME_EXPRESSIONS 10 +#define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11 +#define SCE_CLW_STRUCTURE_DATA_TYPE 12 +#define SCE_CLW_ATTRIBUTE 13 +#define SCE_CLW_STANDARD_EQUATE 14 +#define SCE_CLW_ERROR 15 +#define SCE_CLW_DEPRECATED 16 +#define SCE_LOT_DEFAULT 0 +#define SCE_LOT_HEADER 1 +#define SCE_LOT_BREAK 2 +#define SCE_LOT_SET 3 +#define SCE_LOT_PASS 4 +#define SCE_LOT_FAIL 5 +#define SCE_LOT_ABORT 6 +#define SCE_YAML_DEFAULT 0 +#define SCE_YAML_COMMENT 1 +#define SCE_YAML_IDENTIFIER 2 +#define SCE_YAML_KEYWORD 3 +#define SCE_YAML_NUMBER 4 +#define SCE_YAML_REFERENCE 5 +#define SCE_YAML_DOCUMENT 6 +#define SCE_YAML_TEXT 7 +#define SCE_YAML_ERROR 8 +#define SCE_TEX_DEFAULT 0 +#define SCE_TEX_SPECIAL 1 +#define SCE_TEX_GROUP 2 +#define SCE_TEX_SYMBOL 3 +#define SCE_TEX_COMMAND 4 +#define SCE_TEX_TEXT 5 +#define SCE_METAPOST_DEFAULT 0 +#define SCE_METAPOST_SPECIAL 1 +#define SCE_METAPOST_GROUP 2 +#define SCE_METAPOST_SYMBOL 3 +#define SCE_METAPOST_COMMAND 4 +#define SCE_METAPOST_TEXT 5 +#define SCE_METAPOST_EXTRA 6 +#define SCE_ERLANG_DEFAULT 0 +#define SCE_ERLANG_COMMENT 1 +#define SCE_ERLANG_VARIABLE 2 +#define SCE_ERLANG_NUMBER 3 +#define SCE_ERLANG_KEYWORD 4 +#define SCE_ERLANG_STRING 5 +#define SCE_ERLANG_OPERATOR 6 +#define SCE_ERLANG_ATOM 7 +#define SCE_ERLANG_FUNCTION_NAME 8 +#define SCE_ERLANG_CHARACTER 9 +#define SCE_ERLANG_MACRO 10 +#define SCE_ERLANG_RECORD 11 +#define SCE_ERLANG_SEPARATOR 12 +#define SCE_ERLANG_NODE_NAME 13 +#define SCE_ERLANG_UNKNOWN 31 +#define SCE_MSSQL_DEFAULT 0 +#define SCE_MSSQL_COMMENT 1 +#define SCE_MSSQL_LINE_COMMENT 2 +#define SCE_MSSQL_NUMBER 3 +#define SCE_MSSQL_STRING 4 +#define SCE_MSSQL_OPERATOR 5 +#define SCE_MSSQL_IDENTIFIER 6 +#define SCE_MSSQL_VARIABLE 7 +#define SCE_MSSQL_COLUMN_NAME 8 +#define SCE_MSSQL_STATEMENT 9 +#define SCE_MSSQL_DATATYPE 10 +#define SCE_MSSQL_SYSTABLE 11 +#define SCE_MSSQL_GLOBAL_VARIABLE 12 +#define SCE_MSSQL_FUNCTION 13 +#define SCE_MSSQL_STORED_PROCEDURE 14 +#define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15 +#define SCE_MSSQL_COLUMN_NAME_2 16 +#define SCE_V_DEFAULT 0 +#define SCE_V_COMMENT 1 +#define SCE_V_COMMENTLINE 2 +#define SCE_V_COMMENTLINEBANG 3 +#define SCE_V_NUMBER 4 +#define SCE_V_WORD 5 +#define SCE_V_STRING 6 +#define SCE_V_WORD2 7 +#define SCE_V_WORD3 8 +#define SCE_V_PREPROCESSOR 9 +#define SCE_V_OPERATOR 10 +#define SCE_V_IDENTIFIER 11 +#define SCE_V_STRINGEOL 12 +#define SCE_V_USER 19 +#define SCE_KIX_DEFAULT 0 +#define SCE_KIX_COMMENT 1 +#define SCE_KIX_STRING1 2 +#define SCE_KIX_STRING2 3 +#define SCE_KIX_NUMBER 4 +#define SCE_KIX_VAR 5 +#define SCE_KIX_MACRO 6 +#define SCE_KIX_KEYWORD 7 +#define SCE_KIX_FUNCTIONS 8 +#define SCE_KIX_OPERATOR 9 +#define SCE_KIX_IDENTIFIER 31 +#define SCE_GC_DEFAULT 0 +#define SCE_GC_COMMENTLINE 1 +#define SCE_GC_COMMENTBLOCK 2 +#define SCE_GC_GLOBAL 3 +#define SCE_GC_EVENT 4 +#define SCE_GC_ATTRIBUTE 5 +#define SCE_GC_CONTROL 6 +#define SCE_GC_COMMAND 7 +#define SCE_GC_STRING 8 +#define SCE_GC_OPERATOR 9 +#define SCE_SN_DEFAULT 0 +#define SCE_SN_CODE 1 +#define SCE_SN_COMMENTLINE 2 +#define SCE_SN_COMMENTLINEBANG 3 +#define SCE_SN_NUMBER 4 +#define SCE_SN_WORD 5 +#define SCE_SN_STRING 6 +#define SCE_SN_WORD2 7 +#define SCE_SN_WORD3 8 +#define SCE_SN_PREPROCESSOR 9 +#define SCE_SN_OPERATOR 10 +#define SCE_SN_IDENTIFIER 11 +#define SCE_SN_STRINGEOL 12 +#define SCE_SN_REGEXTAG 13 +#define SCE_SN_SIGNAL 14 +#define SCE_SN_USER 19 +#define SCE_AU3_DEFAULT 0 +#define SCE_AU3_COMMENT 1 +#define SCE_AU3_COMMENTBLOCK 2 +#define SCE_AU3_NUMBER 3 +#define SCE_AU3_FUNCTION 4 +#define SCE_AU3_KEYWORD 5 +#define SCE_AU3_MACRO 6 +#define SCE_AU3_STRING 7 +#define SCE_AU3_OPERATOR 8 +#define SCE_AU3_VARIABLE 9 +#define SCE_AU3_SENT 10 +#define SCE_AU3_PREPROCESSOR 11 +#define SCE_AU3_SPECIAL 12 +#define SCE_AU3_EXPAND 13 +#define SCE_AU3_COMOBJ 14 +#define SCE_AU3_UDF 15 +#define SCE_APDL_DEFAULT 0 +#define SCE_APDL_COMMENT 1 +#define SCE_APDL_COMMENTBLOCK 2 +#define SCE_APDL_NUMBER 3 +#define SCE_APDL_STRING 4 +#define SCE_APDL_OPERATOR 5 +#define SCE_APDL_WORD 6 +#define SCE_APDL_PROCESSOR 7 +#define SCE_APDL_COMMAND 8 +#define SCE_APDL_SLASHCOMMAND 9 +#define SCE_APDL_STARCOMMAND 10 +#define SCE_APDL_ARGUMENT 11 +#define SCE_APDL_FUNCTION 12 +#define SCE_SH_DEFAULT 0 +#define SCE_SH_ERROR 1 +#define SCE_SH_COMMENTLINE 2 +#define SCE_SH_NUMBER 3 +#define SCE_SH_WORD 4 +#define SCE_SH_STRING 5 +#define SCE_SH_CHARACTER 6 +#define SCE_SH_OPERATOR 7 +#define SCE_SH_IDENTIFIER 8 +#define SCE_SH_SCALAR 9 +#define SCE_SH_PARAM 10 +#define SCE_SH_BACKTICKS 11 +#define SCE_SH_HERE_DELIM 12 +#define SCE_SH_HERE_Q 13 +#define SCE_ASN1_DEFAULT 0 +#define SCE_ASN1_COMMENT 1 +#define SCE_ASN1_IDENTIFIER 2 +#define SCE_ASN1_STRING 3 +#define SCE_ASN1_OID 4 +#define SCE_ASN1_SCALAR 5 +#define SCE_ASN1_KEYWORD 6 +#define SCE_ASN1_ATTRIBUTE 7 +#define SCE_ASN1_DESCRIPTOR 8 +#define SCE_ASN1_TYPE 9 +#define SCE_ASN1_OPERATOR 10 +#define SCE_VHDL_DEFAULT 0 +#define SCE_VHDL_COMMENT 1 +#define SCE_VHDL_COMMENTLINEBANG 2 +#define SCE_VHDL_NUMBER 3 +#define SCE_VHDL_STRING 4 +#define SCE_VHDL_OPERATOR 5 +#define SCE_VHDL_IDENTIFIER 6 +#define SCE_VHDL_STRINGEOL 7 +#define SCE_VHDL_KEYWORD 8 +#define SCE_VHDL_STDOPERATOR 9 +#define SCE_VHDL_ATTRIBUTE 10 +#define SCE_VHDL_STDFUNCTION 11 +#define SCE_VHDL_STDPACKAGE 12 +#define SCE_VHDL_STDTYPE 13 +#define SCE_VHDL_USERWORD 14 +#define SCE_CAML_DEFAULT 0 +#define SCE_CAML_IDENTIFIER 1 +#define SCE_CAML_TAGNAME 2 +#define SCE_CAML_KEYWORD 3 +#define SCE_CAML_KEYWORD2 4 +#define SCE_CAML_KEYWORD3 5 +#define SCE_CAML_LINENUM 6 +#define SCE_CAML_OPERATOR 7 +#define SCE_CAML_NUMBER 8 +#define SCE_CAML_CHAR 9 +#define SCE_CAML_STRING 11 +#define SCE_CAML_COMMENT 12 +#define SCE_CAML_COMMENT1 13 +#define SCE_CAML_COMMENT2 14 +#define SCE_CAML_COMMENT3 15 +#define SCE_HA_DEFAULT 0 +#define SCE_HA_IDENTIFIER 1 +#define SCE_HA_KEYWORD 2 +#define SCE_HA_NUMBER 3 +#define SCE_HA_STRING 4 +#define SCE_HA_CHARACTER 5 +#define SCE_HA_CLASS 6 +#define SCE_HA_MODULE 7 +#define SCE_HA_CAPITAL 8 +#define SCE_HA_DATA 9 +#define SCE_HA_IMPORT 10 +#define SCE_HA_OPERATOR 11 +#define SCE_HA_INSTANCE 12 +#define SCE_HA_COMMENTLINE 13 +#define SCE_HA_COMMENTBLOCK 14 +#define SCE_HA_COMMENTBLOCK2 15 +#define SCE_HA_COMMENTBLOCK3 16 +#define SCE_T3_DEFAULT 0 +#define SCE_T3_X_DEFAULT 1 +#define SCE_T3_PREPROCESSOR 2 +#define SCE_T3_BLOCK_COMMENT 3 +#define SCE_T3_LINE_COMMENT 4 +#define SCE_T3_OPERATOR 5 +#define SCE_T3_KEYWORD 6 +#define SCE_T3_NUMBER 7 +#define SCE_T3_IDENTIFIER 8 +#define SCE_T3_S_STRING 9 +#define SCE_T3_D_STRING 10 +#define SCE_T3_X_STRING 11 +#define SCE_T3_LIB_DIRECTIVE 12 +#define SCE_T3_MSG_PARAM 13 +#define SCE_T3_HTML_TAG 14 +#define SCE_T3_HTML_DEFAULT 15 +#define SCE_T3_HTML_STRING 16 +#define SCE_T3_USER1 17 +#define SCE_T3_USER2 18 +#define SCE_T3_USER3 19 +#define SCE_T3_BRACE 20 +#define SCE_REBOL_DEFAULT 0 +#define SCE_REBOL_COMMENTLINE 1 +#define SCE_REBOL_COMMENTBLOCK 2 +#define SCE_REBOL_PREFACE 3 +#define SCE_REBOL_OPERATOR 4 +#define SCE_REBOL_CHARACTER 5 +#define SCE_REBOL_QUOTEDSTRING 6 +#define SCE_REBOL_BRACEDSTRING 7 +#define SCE_REBOL_NUMBER 8 +#define SCE_REBOL_PAIR 9 +#define SCE_REBOL_TUPLE 10 +#define SCE_REBOL_BINARY 11 +#define SCE_REBOL_MONEY 12 +#define SCE_REBOL_ISSUE 13 +#define SCE_REBOL_TAG 14 +#define SCE_REBOL_FILE 15 +#define SCE_REBOL_EMAIL 16 +#define SCE_REBOL_URL 17 +#define SCE_REBOL_DATE 18 +#define SCE_REBOL_TIME 19 +#define SCE_REBOL_IDENTIFIER 20 +#define SCE_REBOL_WORD 21 +#define SCE_REBOL_WORD2 22 +#define SCE_REBOL_WORD3 23 +#define SCE_REBOL_WORD4 24 +#define SCE_REBOL_WORD5 25 +#define SCE_REBOL_WORD6 26 +#define SCE_REBOL_WORD7 27 +#define SCE_REBOL_WORD8 28 +#define SCE_SQL_DEFAULT 0 +#define SCE_SQL_COMMENT 1 +#define SCE_SQL_COMMENTLINE 2 +#define SCE_SQL_COMMENTDOC 3 +#define SCE_SQL_NUMBER 4 +#define SCE_SQL_WORD 5 +#define SCE_SQL_STRING 6 +#define SCE_SQL_CHARACTER 7 +#define SCE_SQL_SQLPLUS 8 +#define SCE_SQL_SQLPLUS_PROMPT 9 +#define SCE_SQL_OPERATOR 10 +#define SCE_SQL_IDENTIFIER 11 +#define SCE_SQL_SQLPLUS_COMMENT 13 +#define SCE_SQL_COMMENTLINEDOC 15 +#define SCE_SQL_WORD2 16 +#define SCE_SQL_COMMENTDOCKEYWORD 17 +#define SCE_SQL_COMMENTDOCKEYWORDERROR 18 +#define SCE_SQL_USER1 19 +#define SCE_SQL_USER2 20 +#define SCE_SQL_USER3 21 +#define SCE_SQL_USER4 22 +#define SCE_SQL_QUOTEDIDENTIFIER 23 +#define SCE_ST_DEFAULT 0 +#define SCE_ST_STRING 1 +#define SCE_ST_NUMBER 2 +#define SCE_ST_COMMENT 3 +#define SCE_ST_SYMBOL 4 +#define SCE_ST_BINARY 5 +#define SCE_ST_BOOL 6 +#define SCE_ST_SELF 7 +#define SCE_ST_SUPER 8 +#define SCE_ST_NIL 9 +#define SCE_ST_GLOBAL 10 +#define SCE_ST_RETURN 11 +#define SCE_ST_SPECIAL 12 +#define SCE_ST_KWSEND 13 +#define SCE_ST_ASSIGN 14 +#define SCE_ST_CHARACTER 15 +#define SCE_ST_SPEC_SEL 16 +#define SCE_FS_DEFAULT 0 +#define SCE_FS_COMMENT 1 +#define SCE_FS_COMMENTLINE 2 +#define SCE_FS_COMMENTDOC 3 +#define SCE_FS_COMMENTLINEDOC 4 +#define SCE_FS_COMMENTDOCKEYWORD 5 +#define SCE_FS_COMMENTDOCKEYWORDERROR 6 +#define SCE_FS_KEYWORD 7 +#define SCE_FS_KEYWORD2 8 +#define SCE_FS_KEYWORD3 9 +#define SCE_FS_KEYWORD4 10 +#define SCE_FS_NUMBER 11 +#define SCE_FS_STRING 12 +#define SCE_FS_PREPROCESSOR 13 +#define SCE_FS_OPERATOR 14 +#define SCE_FS_IDENTIFIER 15 +#define SCE_FS_DATE 16 +#define SCE_FS_STRINGEOL 17 +#define SCE_FS_CONSTANT 18 +#define SCE_FS_ASM 19 +#define SCE_FS_LABEL 20 +#define SCE_FS_ERROR 21 +#define SCE_FS_HEXNUMBER 22 +#define SCE_FS_BINNUMBER 23 +#define SCE_CSOUND_DEFAULT 0 +#define SCE_CSOUND_COMMENT 1 +#define SCE_CSOUND_NUMBER 2 +#define SCE_CSOUND_OPERATOR 3 +#define SCE_CSOUND_INSTR 4 +#define SCE_CSOUND_IDENTIFIER 5 +#define SCE_CSOUND_OPCODE 6 +#define SCE_CSOUND_HEADERSTMT 7 +#define SCE_CSOUND_USERKEYWORD 8 +#define SCE_CSOUND_COMMENTBLOCK 9 +#define SCE_CSOUND_PARAM 10 +#define SCE_CSOUND_ARATE_VAR 11 +#define SCE_CSOUND_KRATE_VAR 12 +#define SCE_CSOUND_IRATE_VAR 13 +#define SCE_CSOUND_GLOBAL_VAR 14 +#define SCE_CSOUND_STRINGEOL 15 +#define SCE_INNO_DEFAULT 0 +#define SCE_INNO_COMMENT 1 +#define SCE_INNO_KEYWORD 2 +#define SCE_INNO_PARAMETER 3 +#define SCE_INNO_SECTION 4 +#define SCE_INNO_PREPROC 5 +#define SCE_INNO_PREPROC_INLINE 6 +#define SCE_INNO_COMMENT_PASCAL 7 +#define SCE_INNO_KEYWORD_PASCAL 8 +#define SCE_INNO_KEYWORD_USER 9 +#define SCE_INNO_STRING_DOUBLE 10 +#define SCE_INNO_STRING_SINGLE 11 +#define SCE_INNO_IDENTIFIER 12 +#define SCE_OPAL_SPACE 0 +#define SCE_OPAL_COMMENT_BLOCK 1 +#define SCE_OPAL_COMMENT_LINE 2 +#define SCE_OPAL_INTEGER 3 +#define SCE_OPAL_KEYWORD 4 +#define SCE_OPAL_SORT 5 +#define SCE_OPAL_STRING 6 +#define SCE_OPAL_PAR 7 +#define SCE_OPAL_BOOL_CONST 8 +#define SCE_OPAL_DEFAULT 32 +#define SCE_SPICE_DEFAULT 0 +#define SCE_SPICE_IDENTIFIER 1 +#define SCE_SPICE_KEYWORD 2 +#define SCE_SPICE_KEYWORD2 3 +#define SCE_SPICE_KEYWORD3 4 +#define SCE_SPICE_NUMBER 5 +#define SCE_SPICE_DELIMITER 6 +#define SCE_SPICE_VALUE 7 +#define SCE_SPICE_COMMENTLINE 8 +#define SCE_CMAKE_DEFAULT 0 +#define SCE_CMAKE_COMMENT 1 +#define SCE_CMAKE_STRINGDQ 2 +#define SCE_CMAKE_STRINGLQ 3 +#define SCE_CMAKE_STRINGRQ 4 +#define SCE_CMAKE_COMMANDS 5 +#define SCE_CMAKE_PARAMETERS 6 +#define SCE_CMAKE_VARIABLE 7 +#define SCE_CMAKE_USERDEFINED 8 +#define SCE_CMAKE_WHILEDEF 9 +#define SCE_CMAKE_FOREACHDEF 10 +#define SCE_CMAKE_IFDEFINEDEF 11 +#define SCE_CMAKE_MACRODEF 12 +#define SCE_CMAKE_STRINGVAR 13 +#define SCE_CMAKE_NUMBER 14 +#define SCLEX_ASP 29 +#define SCLEX_PHP 30 +//--Autogenerated -- end of section automatically generated from Scintilla.iface + +#endif diff --git a/scintilla/include/Scintilla.h b/scintilla/include/Scintilla.h new file mode 100644 index 00000000..f2765577 --- /dev/null +++ b/scintilla/include/Scintilla.h @@ -0,0 +1,803 @@ +// Scintilla source code edit control +/** @file Scintilla.h + ** Interface to the edit control. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + +#ifndef SCINTILLA_H +#define SCINTILLA_H + +#if LCCWIN +typedef BOOL bool; +#endif + +#if PLAT_WIN +// Return false on failure: +bool Scintilla_RegisterClasses(void *hInstance); +bool Scintilla_ReleaseResources(); +#endif +int Scintilla_LinkLexers(); + +// Here should be placed typedefs for uptr_t, an unsigned integer type large enough to +// hold a pointer and sptr_t, a signed integer large enough to hold a pointer. +// May need to be changed for 64 bit platforms. +#if _MSC_VER >= 1300 +#include +#endif +#ifdef MAXULONG_PTR +typedef ULONG_PTR uptr_t; +typedef LONG_PTR sptr_t; +#else +typedef unsigned long uptr_t; +typedef long sptr_t; +#endif + +typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); + +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define INVALID_POSITION -1 +#define SCI_START 2000 +#define SCI_OPTIONAL_START 3000 +#define SCI_LEXER_START 4000 +#define SCI_ADDTEXT 2001 +#define SCI_ADDSTYLEDTEXT 2002 +#define SCI_INSERTTEXT 2003 +#define SCI_CLEARALL 2004 +#define SCI_CLEARDOCUMENTSTYLE 2005 +#define SCI_GETLENGTH 2006 +#define SCI_GETCHARAT 2007 +#define SCI_GETCURRENTPOS 2008 +#define SCI_GETANCHOR 2009 +#define SCI_GETSTYLEAT 2010 +#define SCI_REDO 2011 +#define SCI_SETUNDOCOLLECTION 2012 +#define SCI_SELECTALL 2013 +#define SCI_SETSAVEPOINT 2014 +#define SCI_GETSTYLEDTEXT 2015 +#define SCI_CANREDO 2016 +#define SCI_MARKERLINEFROMHANDLE 2017 +#define SCI_MARKERDELETEHANDLE 2018 +#define SCI_GETUNDOCOLLECTION 2019 +#define SCWS_INVISIBLE 0 +#define SCWS_VISIBLEALWAYS 1 +#define SCWS_VISIBLEAFTERINDENT 2 +#define SCI_GETVIEWWS 2020 +#define SCI_SETVIEWWS 2021 +#define SCI_POSITIONFROMPOINT 2022 +#define SCI_POSITIONFROMPOINTCLOSE 2023 +#define SCI_GOTOLINE 2024 +#define SCI_GOTOPOS 2025 +#define SCI_SETANCHOR 2026 +#define SCI_GETCURLINE 2027 +#define SCI_GETENDSTYLED 2028 +#define SC_EOL_CRLF 0 +#define SC_EOL_CR 1 +#define SC_EOL_LF 2 +#define SCI_CONVERTEOLS 2029 +#define SCI_GETEOLMODE 2030 +#define SCI_SETEOLMODE 2031 +#define SCI_STARTSTYLING 2032 +#define SCI_SETSTYLING 2033 +#define SCI_GETBUFFEREDDRAW 2034 +#define SCI_SETBUFFEREDDRAW 2035 +#define SCI_SETTABWIDTH 2036 +#define SCI_GETTABWIDTH 2121 +#define SC_CP_UTF8 65001 +#define SC_CP_DBCS 1 +#define SCI_SETCODEPAGE 2037 +#define SCI_SETUSEPALETTE 2039 +#define MARKER_MAX 31 +#define SC_MARK_CIRCLE 0 +#define SC_MARK_ROUNDRECT 1 +#define SC_MARK_ARROW 2 +#define SC_MARK_SMALLRECT 3 +#define SC_MARK_SHORTARROW 4 +#define SC_MARK_EMPTY 5 +#define SC_MARK_ARROWDOWN 6 +#define SC_MARK_MINUS 7 +#define SC_MARK_PLUS 8 +#define SC_MARK_VLINE 9 +#define SC_MARK_LCORNER 10 +#define SC_MARK_TCORNER 11 +#define SC_MARK_BOXPLUS 12 +#define SC_MARK_BOXPLUSCONNECTED 13 +#define SC_MARK_BOXMINUS 14 +#define SC_MARK_BOXMINUSCONNECTED 15 +#define SC_MARK_LCORNERCURVE 16 +#define SC_MARK_TCORNERCURVE 17 +#define SC_MARK_CIRCLEPLUS 18 +#define SC_MARK_CIRCLEPLUSCONNECTED 19 +#define SC_MARK_CIRCLEMINUS 20 +#define SC_MARK_CIRCLEMINUSCONNECTED 21 +#define SC_MARK_BACKGROUND 22 +#define SC_MARK_DOTDOTDOT 23 +#define SC_MARK_ARROWS 24 +#define SC_MARK_PIXMAP 25 +#define SC_MARK_FULLRECT 26 +#define SC_MARK_CHARACTER 10000 +#define SC_MARKNUM_FOLDEREND 25 +#define SC_MARKNUM_FOLDEROPENMID 26 +#define SC_MARKNUM_FOLDERMIDTAIL 27 +#define SC_MARKNUM_FOLDERTAIL 28 +#define SC_MARKNUM_FOLDERSUB 29 +#define SC_MARKNUM_FOLDER 30 +#define SC_MARKNUM_FOLDEROPEN 31 +#define SC_MASK_FOLDERS 0xFE000000 +#define SCI_MARKERDEFINE 2040 +#define SCI_MARKERSETFORE 2041 +#define SCI_MARKERSETBACK 2042 +#define SCI_MARKERADD 2043 +#define SCI_MARKERDELETE 2044 +#define SCI_MARKERDELETEALL 2045 +#define SCI_MARKERGET 2046 +#define SCI_MARKERNEXT 2047 +#define SCI_MARKERPREVIOUS 2048 +#define SCI_MARKERDEFINEPIXMAP 2049 +#define SCI_MARKERADDSET 2466 +#define SCI_MARKERSETALPHA 2476 +#define SC_MARGIN_SYMBOL 0 +#define SC_MARGIN_NUMBER 1 +#define SC_MARGIN_BACK 2 +#define SC_MARGIN_FORE 3 +#define SCI_SETMARGINTYPEN 2240 +#define SCI_GETMARGINTYPEN 2241 +#define SCI_SETMARGINWIDTHN 2242 +#define SCI_GETMARGINWIDTHN 2243 +#define SCI_SETMARGINMASKN 2244 +#define SCI_GETMARGINMASKN 2245 +#define SCI_SETMARGINSENSITIVEN 2246 +#define SCI_GETMARGINSENSITIVEN 2247 +#define STYLE_DEFAULT 32 +#define STYLE_LINENUMBER 33 +#define STYLE_BRACELIGHT 34 +#define STYLE_BRACEBAD 35 +#define STYLE_CONTROLCHAR 36 +#define STYLE_INDENTGUIDE 37 +#define STYLE_CALLTIP 38 +#define STYLE_LASTPREDEFINED 39 +#define STYLE_MAX 127 +#define SC_CHARSET_ANSI 0 +#define SC_CHARSET_DEFAULT 1 +#define SC_CHARSET_BALTIC 186 +#define SC_CHARSET_CHINESEBIG5 136 +#define SC_CHARSET_EASTEUROPE 238 +#define SC_CHARSET_GB2312 134 +#define SC_CHARSET_GREEK 161 +#define SC_CHARSET_HANGUL 129 +#define SC_CHARSET_MAC 77 +#define SC_CHARSET_OEM 255 +#define SC_CHARSET_RUSSIAN 204 +#define SC_CHARSET_CYRILLIC 1251 +#define SC_CHARSET_SHIFTJIS 128 +#define SC_CHARSET_SYMBOL 2 +#define SC_CHARSET_TURKISH 162 +#define SC_CHARSET_JOHAB 130 +#define SC_CHARSET_HEBREW 177 +#define SC_CHARSET_ARABIC 178 +#define SC_CHARSET_VIETNAMESE 163 +#define SC_CHARSET_THAI 222 +#define SC_CHARSET_8859_15 1000 +#define SCI_STYLECLEARALL 2050 +#define SCI_STYLESETFORE 2051 +#define SCI_STYLESETBACK 2052 +#define SCI_STYLESETBOLD 2053 +#define SCI_STYLESETITALIC 2054 +#define SCI_STYLESETSIZE 2055 +#define SCI_STYLESETFONT 2056 +#define SCI_STYLESETEOLFILLED 2057 +#define SCI_STYLERESETDEFAULT 2058 +#define SCI_STYLESETUNDERLINE 2059 +#define SC_CASE_MIXED 0 +#define SC_CASE_UPPER 1 +#define SC_CASE_LOWER 2 +#define SCI_STYLEGETFORE 2481 +#define SCI_STYLEGETBACK 2482 +#define SCI_STYLEGETBOLD 2483 +#define SCI_STYLEGETITALIC 2484 +#define SCI_STYLEGETSIZE 2485 +#define SCI_STYLEGETFONT 2486 +#define SCI_STYLEGETEOLFILLED 2487 +#define SCI_STYLEGETUNDERLINE 2488 +#define SCI_STYLEGETCASE 2489 +#define SCI_STYLEGETCHARACTERSET 2490 +#define SCI_STYLEGETVISIBLE 2491 +#define SCI_STYLEGETCHANGEABLE 2492 +#define SCI_STYLEGETHOTSPOT 2493 +#define SCI_STYLESETCASE 2060 +#define SCI_STYLESETCHARACTERSET 2066 +#define SCI_STYLESETHOTSPOT 2409 +#define SCI_SETSELFORE 2067 +#define SCI_SETSELBACK 2068 +#define SCI_GETSELALPHA 2477 +#define SCI_SETSELALPHA 2478 +#define SCI_GETSELEOLFILLED 2479 +#define SCI_SETSELEOLFILLED 2480 +#define SCI_SETCARETFORE 2069 +#define SCI_ASSIGNCMDKEY 2070 +#define SCI_CLEARCMDKEY 2071 +#define SCI_CLEARALLCMDKEYS 2072 +#define SCI_SETSTYLINGEX 2073 +#define SCI_STYLESETVISIBLE 2074 +#define SCI_GETCARETPERIOD 2075 +#define SCI_SETCARETPERIOD 2076 +#define SCI_SETWORDCHARS 2077 +#define SCI_BEGINUNDOACTION 2078 +#define SCI_ENDUNDOACTION 2079 +#define INDIC_MAX 7 +#define INDIC_PLAIN 0 +#define INDIC_SQUIGGLE 1 +#define INDIC_TT 2 +#define INDIC_DIAGONAL 3 +#define INDIC_STRIKE 4 +#define INDIC_HIDDEN 5 +#define INDIC_BOX 6 +#define INDIC_ROUNDBOX 7 +#define INDIC0_MASK 0x20 +#define INDIC1_MASK 0x40 +#define INDIC2_MASK 0x80 +#define INDICS_MASK 0xE0 +#define SCI_INDICSETSTYLE 2080 +#define SCI_INDICGETSTYLE 2081 +#define SCI_INDICSETFORE 2082 +#define SCI_INDICGETFORE 2083 +#define SCI_SETWHITESPACEFORE 2084 +#define SCI_SETWHITESPACEBACK 2085 +#define SCI_SETSTYLEBITS 2090 +#define SCI_GETSTYLEBITS 2091 +#define SCI_SETLINESTATE 2092 +#define SCI_GETLINESTATE 2093 +#define SCI_GETMAXLINESTATE 2094 +#define SCI_GETCARETLINEVISIBLE 2095 +#define SCI_SETCARETLINEVISIBLE 2096 +#define SCI_GETCARETLINEBACK 2097 +#define SCI_SETCARETLINEBACK 2098 +#define SCI_STYLESETCHANGEABLE 2099 +#define SCI_AUTOCSHOW 2100 +#define SCI_AUTOCCANCEL 2101 +#define SCI_AUTOCACTIVE 2102 +#define SCI_AUTOCPOSSTART 2103 +#define SCI_AUTOCCOMPLETE 2104 +#define SCI_AUTOCSTOPS 2105 +#define SCI_AUTOCSETSEPARATOR 2106 +#define SCI_AUTOCGETSEPARATOR 2107 +#define SCI_AUTOCSELECT 2108 +#define SCI_AUTOCSETCANCELATSTART 2110 +#define SCI_AUTOCGETCANCELATSTART 2111 +#define SCI_AUTOCSETFILLUPS 2112 +#define SCI_AUTOCSETCHOOSESINGLE 2113 +#define SCI_AUTOCGETCHOOSESINGLE 2114 +#define SCI_AUTOCSETIGNORECASE 2115 +#define SCI_AUTOCGETIGNORECASE 2116 +#define SCI_USERLISTSHOW 2117 +#define SCI_AUTOCSETAUTOHIDE 2118 +#define SCI_AUTOCGETAUTOHIDE 2119 +#define SCI_AUTOCSETDROPRESTOFWORD 2270 +#define SCI_AUTOCGETDROPRESTOFWORD 2271 +#define SCI_REGISTERIMAGE 2405 +#define SCI_CLEARREGISTEREDIMAGES 2408 +#define SCI_AUTOCGETTYPESEPARATOR 2285 +#define SCI_AUTOCSETTYPESEPARATOR 2286 +#define SCI_AUTOCSETMAXWIDTH 2208 +#define SCI_AUTOCGETMAXWIDTH 2209 +#define SCI_AUTOCSETMAXHEIGHT 2210 +#define SCI_AUTOCGETMAXHEIGHT 2211 +#define SCI_SETINDENT 2122 +#define SCI_GETINDENT 2123 +#define SCI_SETUSETABS 2124 +#define SCI_GETUSETABS 2125 +#define SCI_SETLINEINDENTATION 2126 +#define SCI_GETLINEINDENTATION 2127 +#define SCI_GETLINEINDENTPOSITION 2128 +#define SCI_GETCOLUMN 2129 +#define SCI_SETHSCROLLBAR 2130 +#define SCI_GETHSCROLLBAR 2131 +#define SCI_SETINDENTATIONGUIDES 2132 +#define SCI_GETINDENTATIONGUIDES 2133 +#define SCI_SETHIGHLIGHTGUIDE 2134 +#define SCI_GETHIGHLIGHTGUIDE 2135 +#define SCI_GETLINEENDPOSITION 2136 +#define SCI_GETCODEPAGE 2137 +#define SCI_GETCARETFORE 2138 +#define SCI_GETUSEPALETTE 2139 +#define SCI_GETREADONLY 2140 +#define SCI_SETCURRENTPOS 2141 +#define SCI_SETSELECTIONSTART 2142 +#define SCI_GETSELECTIONSTART 2143 +#define SCI_SETSELECTIONEND 2144 +#define SCI_GETSELECTIONEND 2145 +#define SCI_SETPRINTMAGNIFICATION 2146 +#define SCI_GETPRINTMAGNIFICATION 2147 +#define SC_PRINT_NORMAL 0 +#define SC_PRINT_INVERTLIGHT 1 +#define SC_PRINT_BLACKONWHITE 2 +#define SC_PRINT_COLOURONWHITE 3 +#define SC_PRINT_COLOURONWHITEDEFAULTBG 4 +#define SCI_SETPRINTCOLOURMODE 2148 +#define SCI_GETPRINTCOLOURMODE 2149 +#define SCFIND_WHOLEWORD 2 +#define SCFIND_MATCHCASE 4 +#define SCFIND_WORDSTART 0x00100000 +#define SCFIND_REGEXP 0x00200000 +#define SCFIND_POSIX 0x00400000 +#define SCI_FINDTEXT 2150 +#define SCI_FORMATRANGE 2151 +#define SCI_GETFIRSTVISIBLELINE 2152 +#define SCI_GETLINE 2153 +#define SCI_GETLINECOUNT 2154 +#define SCI_SETMARGINLEFT 2155 +#define SCI_GETMARGINLEFT 2156 +#define SCI_SETMARGINRIGHT 2157 +#define SCI_GETMARGINRIGHT 2158 +#define SCI_GETMODIFY 2159 +#define SCI_SETSEL 2160 +#define SCI_GETSELTEXT 2161 +#define SCI_GETTEXTRANGE 2162 +#define SCI_HIDESELECTION 2163 +#define SCI_POINTXFROMPOSITION 2164 +#define SCI_POINTYFROMPOSITION 2165 +#define SCI_LINEFROMPOSITION 2166 +#define SCI_POSITIONFROMLINE 2167 +#define SCI_LINESCROLL 2168 +#define SCI_SCROLLCARET 2169 +#define SCI_REPLACESEL 2170 +#define SCI_SETREADONLY 2171 +#define SCI_NULL 2172 +#define SCI_CANPASTE 2173 +#define SCI_CANUNDO 2174 +#define SCI_EMPTYUNDOBUFFER 2175 +#define SCI_UNDO 2176 +#define SCI_CUT 2177 +#define SCI_COPY 2178 +#define SCI_PASTE 2179 +#define SCI_CLEAR 2180 +#define SCI_SETTEXT 2181 +#define SCI_GETTEXT 2182 +#define SCI_GETTEXTLENGTH 2183 +#define SCI_GETDIRECTFUNCTION 2184 +#define SCI_GETDIRECTPOINTER 2185 +#define SCI_SETOVERTYPE 2186 +#define SCI_GETOVERTYPE 2187 +#define SCI_SETCARETWIDTH 2188 +#define SCI_GETCARETWIDTH 2189 +#define SCI_SETTARGETSTART 2190 +#define SCI_GETTARGETSTART 2191 +#define SCI_SETTARGETEND 2192 +#define SCI_GETTARGETEND 2193 +#define SCI_REPLACETARGET 2194 +#define SCI_REPLACETARGETRE 2195 +#define SCI_SEARCHINTARGET 2197 +#define SCI_SETSEARCHFLAGS 2198 +#define SCI_GETSEARCHFLAGS 2199 +#define SCI_CALLTIPSHOW 2200 +#define SCI_CALLTIPCANCEL 2201 +#define SCI_CALLTIPACTIVE 2202 +#define SCI_CALLTIPPOSSTART 2203 +#define SCI_CALLTIPSETHLT 2204 +#define SCI_CALLTIPSETBACK 2205 +#define SCI_CALLTIPSETFORE 2206 +#define SCI_CALLTIPSETFOREHLT 2207 +#define SCI_CALLTIPUSESTYLE 2212 +#define SCI_VISIBLEFROMDOCLINE 2220 +#define SCI_DOCLINEFROMVISIBLE 2221 +#define SCI_WRAPCOUNT 2235 +#define SC_FOLDLEVELBASE 0x400 +#define SC_FOLDLEVELWHITEFLAG 0x1000 +#define SC_FOLDLEVELHEADERFLAG 0x2000 +#define SC_FOLDLEVELBOXHEADERFLAG 0x4000 +#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000 +#define SC_FOLDLEVELCONTRACTED 0x10000 +#define SC_FOLDLEVELUNINDENT 0x20000 +#define SC_FOLDLEVELNUMBERMASK 0x0FFF +#define SCI_SETFOLDLEVEL 2222 +#define SCI_GETFOLDLEVEL 2223 +#define SCI_GETLASTCHILD 2224 +#define SCI_GETFOLDPARENT 2225 +#define SCI_SHOWLINES 2226 +#define SCI_HIDELINES 2227 +#define SCI_GETLINEVISIBLE 2228 +#define SCI_SETFOLDEXPANDED 2229 +#define SCI_GETFOLDEXPANDED 2230 +#define SCI_TOGGLEFOLD 2231 +#define SCI_ENSUREVISIBLE 2232 +#define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 +#define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 +#define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 +#define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 +#define SC_FOLDFLAG_LEVELNUMBERS 0x0040 +#define SC_FOLDFLAG_BOX 0x0001 +#define SCI_SETFOLDFLAGS 2233 +#define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 +#define SCI_SETTABINDENTS 2260 +#define SCI_GETTABINDENTS 2261 +#define SCI_SETBACKSPACEUNINDENTS 2262 +#define SCI_GETBACKSPACEUNINDENTS 2263 +#define SC_TIME_FOREVER 10000000 +#define SCI_SETMOUSEDWELLTIME 2264 +#define SCI_GETMOUSEDWELLTIME 2265 +#define SCI_WORDSTARTPOSITION 2266 +#define SCI_WORDENDPOSITION 2267 +#define SC_WRAP_NONE 0 +#define SC_WRAP_WORD 1 +#define SC_WRAP_CHAR 2 +#define SCI_SETWRAPMODE 2268 +#define SCI_GETWRAPMODE 2269 +#define SC_WRAPVISUALFLAG_NONE 0x0000 +#define SC_WRAPVISUALFLAG_END 0x0001 +#define SC_WRAPVISUALFLAG_START 0x0002 +#define SCI_SETWRAPVISUALFLAGS 2460 +#define SCI_GETWRAPVISUALFLAGS 2461 +#define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 +#define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 +#define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 +#define SCI_SETWRAPVISUALFLAGSLOCATION 2462 +#define SCI_GETWRAPVISUALFLAGSLOCATION 2463 +#define SCI_SETWRAPSTARTINDENT 2464 +#define SCI_GETWRAPSTARTINDENT 2465 +#define SC_CACHE_NONE 0 +#define SC_CACHE_CARET 1 +#define SC_CACHE_PAGE 2 +#define SC_CACHE_DOCUMENT 3 +#define SCI_SETLAYOUTCACHE 2272 +#define SCI_GETLAYOUTCACHE 2273 +#define SCI_SETSCROLLWIDTH 2274 +#define SCI_GETSCROLLWIDTH 2275 +#define SCI_TEXTWIDTH 2276 +#define SCI_SETENDATLASTLINE 2277 +#define SCI_GETENDATLASTLINE 2278 +#define SCI_TEXTHEIGHT 2279 +#define SCI_SETVSCROLLBAR 2280 +#define SCI_GETVSCROLLBAR 2281 +#define SCI_APPENDTEXT 2282 +#define SCI_GETTWOPHASEDRAW 2283 +#define SCI_SETTWOPHASEDRAW 2284 +#define SCI_TARGETFROMSELECTION 2287 +#define SCI_LINESJOIN 2288 +#define SCI_LINESSPLIT 2289 +#define SCI_SETFOLDMARGINCOLOUR 2290 +#define SCI_SETFOLDMARGINHICOLOUR 2291 +#define SCI_LINEDOWN 2300 +#define SCI_LINEDOWNEXTEND 2301 +#define SCI_LINEUP 2302 +#define SCI_LINEUPEXTEND 2303 +#define SCI_CHARLEFT 2304 +#define SCI_CHARLEFTEXTEND 2305 +#define SCI_CHARRIGHT 2306 +#define SCI_CHARRIGHTEXTEND 2307 +#define SCI_WORDLEFT 2308 +#define SCI_WORDLEFTEXTEND 2309 +#define SCI_WORDRIGHT 2310 +#define SCI_WORDRIGHTEXTEND 2311 +#define SCI_HOME 2312 +#define SCI_HOMEEXTEND 2313 +#define SCI_LINEEND 2314 +#define SCI_LINEENDEXTEND 2315 +#define SCI_DOCUMENTSTART 2316 +#define SCI_DOCUMENTSTARTEXTEND 2317 +#define SCI_DOCUMENTEND 2318 +#define SCI_DOCUMENTENDEXTEND 2319 +#define SCI_PAGEUP 2320 +#define SCI_PAGEUPEXTEND 2321 +#define SCI_PAGEDOWN 2322 +#define SCI_PAGEDOWNEXTEND 2323 +#define SCI_EDITTOGGLEOVERTYPE 2324 +#define SCI_CANCEL 2325 +#define SCI_DELETEBACK 2326 +#define SCI_TAB 2327 +#define SCI_BACKTAB 2328 +#define SCI_NEWLINE 2329 +#define SCI_FORMFEED 2330 +#define SCI_VCHOME 2331 +#define SCI_VCHOMEEXTEND 2332 +#define SCI_ZOOMIN 2333 +#define SCI_ZOOMOUT 2334 +#define SCI_DELWORDLEFT 2335 +#define SCI_DELWORDRIGHT 2336 +#define SCI_LINECUT 2337 +#define SCI_LINEDELETE 2338 +#define SCI_LINETRANSPOSE 2339 +#define SCI_LINEDUPLICATE 2404 +#define SCI_LOWERCASE 2340 +#define SCI_UPPERCASE 2341 +#define SCI_LINESCROLLDOWN 2342 +#define SCI_LINESCROLLUP 2343 +#define SCI_DELETEBACKNOTLINE 2344 +#define SCI_HOMEDISPLAY 2345 +#define SCI_HOMEDISPLAYEXTEND 2346 +#define SCI_LINEENDDISPLAY 2347 +#define SCI_LINEENDDISPLAYEXTEND 2348 +#define SCI_HOMEWRAP 2349 +#define SCI_HOMEWRAPEXTEND 2450 +#define SCI_LINEENDWRAP 2451 +#define SCI_LINEENDWRAPEXTEND 2452 +#define SCI_VCHOMEWRAP 2453 +#define SCI_VCHOMEWRAPEXTEND 2454 +#define SCI_LINECOPY 2455 +#define SCI_MOVECARETINSIDEVIEW 2401 +#define SCI_LINELENGTH 2350 +#define SCI_BRACEHIGHLIGHT 2351 +#define SCI_BRACEBADLIGHT 2352 +#define SCI_BRACEMATCH 2353 +#define SCI_GETVIEWEOL 2355 +#define SCI_SETVIEWEOL 2356 +#define SCI_GETDOCPOINTER 2357 +#define SCI_SETDOCPOINTER 2358 +#define SCI_SETMODEVENTMASK 2359 +#define EDGE_NONE 0 +#define EDGE_LINE 1 +#define EDGE_BACKGROUND 2 +#define SCI_GETEDGECOLUMN 2360 +#define SCI_SETEDGECOLUMN 2361 +#define SCI_GETEDGEMODE 2362 +#define SCI_SETEDGEMODE 2363 +#define SCI_GETEDGECOLOUR 2364 +#define SCI_SETEDGECOLOUR 2365 +#define SCI_SEARCHANCHOR 2366 +#define SCI_SEARCHNEXT 2367 +#define SCI_SEARCHPREV 2368 +#define SCI_LINESONSCREEN 2370 +#define SCI_USEPOPUP 2371 +#define SCI_SELECTIONISRECTANGLE 2372 +#define SCI_SETZOOM 2373 +#define SCI_GETZOOM 2374 +#define SCI_CREATEDOCUMENT 2375 +#define SCI_ADDREFDOCUMENT 2376 +#define SCI_RELEASEDOCUMENT 2377 +#define SCI_GETMODEVENTMASK 2378 +#define SCI_SETFOCUS 2380 +#define SCI_GETFOCUS 2381 +#define SCI_SETSTATUS 2382 +#define SCI_GETSTATUS 2383 +#define SCI_SETMOUSEDOWNCAPTURES 2384 +#define SCI_GETMOUSEDOWNCAPTURES 2385 +#define SC_CURSORNORMAL -1 +#define SC_CURSORWAIT 4 +#define SCI_SETCURSOR 2386 +#define SCI_GETCURSOR 2387 +#define SCI_SETCONTROLCHARSYMBOL 2388 +#define SCI_GETCONTROLCHARSYMBOL 2389 +#define SCI_WORDPARTLEFT 2390 +#define SCI_WORDPARTLEFTEXTEND 2391 +#define SCI_WORDPARTRIGHT 2392 +#define SCI_WORDPARTRIGHTEXTEND 2393 +#define VISIBLE_SLOP 0x01 +#define VISIBLE_STRICT 0x04 +#define SCI_SETVISIBLEPOLICY 2394 +#define SCI_DELLINELEFT 2395 +#define SCI_DELLINERIGHT 2396 +#define SCI_SETXOFFSET 2397 +#define SCI_GETXOFFSET 2398 +#define SCI_CHOOSECARETX 2399 +#define SCI_GRABFOCUS 2400 +#define CARET_SLOP 0x01 +#define CARET_STRICT 0x04 +#define CARET_JUMPS 0x10 +#define CARET_EVEN 0x08 +#define SCI_SETXCARETPOLICY 2402 +#define SCI_SETYCARETPOLICY 2403 +#define SCI_SETPRINTWRAPMODE 2406 +#define SCI_GETPRINTWRAPMODE 2407 +#define SCI_SETHOTSPOTACTIVEFORE 2410 +#define SCI_GETHOTSPOTACTIVEFORE 2494 +#define SCI_SETHOTSPOTACTIVEBACK 2411 +#define SCI_GETHOTSPOTACTIVEBACK 2495 +#define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 +#define SCI_GETHOTSPOTACTIVEUNDERLINE 2496 +#define SCI_SETHOTSPOTSINGLELINE 2421 +#define SCI_GETHOTSPOTSINGLELINE 2497 +#define SCI_PARADOWN 2413 +#define SCI_PARADOWNEXTEND 2414 +#define SCI_PARAUP 2415 +#define SCI_PARAUPEXTEND 2416 +#define SCI_POSITIONBEFORE 2417 +#define SCI_POSITIONAFTER 2418 +#define SCI_COPYRANGE 2419 +#define SCI_COPYTEXT 2420 +#define SC_SEL_STREAM 0 +#define SC_SEL_RECTANGLE 1 +#define SC_SEL_LINES 2 +#define SCI_SETSELECTIONMODE 2422 +#define SCI_GETSELECTIONMODE 2423 +#define SCI_GETLINESELSTARTPOSITION 2424 +#define SCI_GETLINESELENDPOSITION 2425 +#define SCI_LINEDOWNRECTEXTEND 2426 +#define SCI_LINEUPRECTEXTEND 2427 +#define SCI_CHARLEFTRECTEXTEND 2428 +#define SCI_CHARRIGHTRECTEXTEND 2429 +#define SCI_HOMERECTEXTEND 2430 +#define SCI_VCHOMERECTEXTEND 2431 +#define SCI_LINEENDRECTEXTEND 2432 +#define SCI_PAGEUPRECTEXTEND 2433 +#define SCI_PAGEDOWNRECTEXTEND 2434 +#define SCI_STUTTEREDPAGEUP 2435 +#define SCI_STUTTEREDPAGEUPEXTEND 2436 +#define SCI_STUTTEREDPAGEDOWN 2437 +#define SCI_STUTTEREDPAGEDOWNEXTEND 2438 +#define SCI_WORDLEFTEND 2439 +#define SCI_WORDLEFTENDEXTEND 2440 +#define SCI_WORDRIGHTEND 2441 +#define SCI_WORDRIGHTENDEXTEND 2442 +#define SCI_SETWHITESPACECHARS 2443 +#define SCI_SETCHARSDEFAULT 2444 +#define SCI_AUTOCGETCURRENT 2445 +#define SCI_ALLOCATE 2446 +#define SCI_TARGETASUTF8 2447 +#define SCI_SETLENGTHFORENCODE 2448 +#define SCI_ENCODEDFROMUTF8 2449 +#define SCI_FINDCOLUMN 2456 +#define SCI_GETCARETSTICKY 2457 +#define SCI_SETCARETSTICKY 2458 +#define SCI_TOGGLECARETSTICKY 2459 +#define SCI_SETPASTECONVERTENDINGS 2467 +#define SCI_GETPASTECONVERTENDINGS 2468 +#define SCI_SELECTIONDUPLICATE 2469 +#define SC_ALPHA_TRANSPARENT 0 +#define SC_ALPHA_OPAQUE 255 +#define SC_ALPHA_NOALPHA 256 +#define SCI_SETCARETLINEBACKALPHA 2470 +#define SCI_GETCARETLINEBACKALPHA 2471 +#define SCI_STARTRECORD 3001 +#define SCI_STOPRECORD 3002 +#define SCI_SETLEXER 4001 +#define SCI_GETLEXER 4002 +#define SCI_COLOURISE 4003 +#define SCI_SETPROPERTY 4004 +#define KEYWORDSET_MAX 8 +#define SCI_SETKEYWORDS 4005 +#define SCI_SETLEXERLANGUAGE 4006 +#define SCI_LOADLEXERLIBRARY 4007 +#define SCI_GETPROPERTY 4008 +#define SCI_GETPROPERTYEXPANDED 4009 +#define SCI_GETPROPERTYINT 4010 +#define SCI_GETSTYLEBITSNEEDED 4011 +#define SC_MOD_INSERTTEXT 0x1 +#define SC_MOD_DELETETEXT 0x2 +#define SC_MOD_CHANGESTYLE 0x4 +#define SC_MOD_CHANGEFOLD 0x8 +#define SC_PERFORMED_USER 0x10 +#define SC_PERFORMED_UNDO 0x20 +#define SC_PERFORMED_REDO 0x40 +#define SC_MULTISTEPUNDOREDO 0x80 +#define SC_LASTSTEPINUNDOREDO 0x100 +#define SC_MOD_CHANGEMARKER 0x200 +#define SC_MOD_BEFOREINSERT 0x400 +#define SC_MOD_BEFOREDELETE 0x800 +#define SC_MULTILINEUNDOREDO 0x1000 +#define SC_STARTACTION 0x2000 +#define SC_MODEVENTMASKALL 0x2FFF +#define SCEN_CHANGE 768 +#define SCEN_SETFOCUS 512 +#define SCEN_KILLFOCUS 256 +#define SCK_DOWN 300 +#define SCK_UP 301 +#define SCK_LEFT 302 +#define SCK_RIGHT 303 +#define SCK_HOME 304 +#define SCK_END 305 +#define SCK_PRIOR 306 +#define SCK_NEXT 307 +#define SCK_DELETE 308 +#define SCK_INSERT 309 +#define SCK_ESCAPE 7 +#define SCK_BACK 8 +#define SCK_TAB 9 +#define SCK_RETURN 13 +#define SCK_ADD 310 +#define SCK_SUBTRACT 311 +#define SCK_DIVIDE 312 +#define SCK_WIN 313 +#define SCK_RWIN 314 +#define SCK_MENU 315 +#define SCMOD_NORM 0 +#define SCMOD_SHIFT 1 +#define SCMOD_CTRL 2 +#define SCMOD_ALT 4 +#define SCN_STYLENEEDED 2000 +#define SCN_CHARADDED 2001 +#define SCN_SAVEPOINTREACHED 2002 +#define SCN_SAVEPOINTLEFT 2003 +#define SCN_MODIFYATTEMPTRO 2004 +#define SCN_KEY 2005 +#define SCN_DOUBLECLICK 2006 +#define SCN_UPDATEUI 2007 +#define SCN_MODIFIED 2008 +#define SCN_MACRORECORD 2009 +#define SCN_MARGINCLICK 2010 +#define SCN_NEEDSHOWN 2011 +#define SCN_PAINTED 2013 +#define SCN_USERLISTSELECTION 2014 +#define SCN_URIDROPPED 2015 +#define SCN_DWELLSTART 2016 +#define SCN_DWELLEND 2017 +#define SCN_ZOOM 2018 +#define SCN_HOTSPOTCLICK 2019 +#define SCN_HOTSPOTDOUBLECLICK 2020 +#define SCN_CALLTIPCLICK 2021 +#define SCN_AUTOCSELECTION 2022 +//--Autogenerated -- end of section automatically generated from Scintilla.iface + +// These structures are defined to be exactly the same shape as the Win32 +// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. +// So older code that treats Scintilla as a RichEdit will work. + +struct CharacterRange { + long cpMin; + long cpMax; +}; + +struct TextRange { + struct CharacterRange chrg; + char *lpstrText; +}; + +struct TextToFind { + struct CharacterRange chrg; + char *lpstrText; + struct CharacterRange chrgText; +}; + +#ifdef PLATFORM_H + +// This structure is used in printing and requires some of the graphics types +// from Platform.h. Not needed by most client code. + +struct RangeToFormat { + SurfaceID hdc; + SurfaceID hdcTarget; + PRectangle rc; + PRectangle rcPage; + CharacterRange chrg; +}; + +#endif + +struct NotifyHeader { + // Compatible with Windows NMHDR. + // hwndFrom is really an environment specific window handle or pointer + // but most clients of Scintilla.h do not have this type visible. + void *hwndFrom; + uptr_t idFrom; + unsigned int code; +}; + +struct SCNotification { + struct NotifyHeader nmhdr; + int position; // SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND + int ch; // SCN_CHARADDED, SCN_KEY + int modifiers; // SCN_KEY + int modificationType; // SCN_MODIFIED + const char *text; // SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION + int length; // SCN_MODIFIED + int linesAdded; // SCN_MODIFIED + int message; // SCN_MACRORECORD + uptr_t wParam; // SCN_MACRORECORD + sptr_t lParam; // SCN_MACRORECORD + int line; // SCN_MODIFIED + int foldLevelNow; // SCN_MODIFIED + int foldLevelPrev; // SCN_MODIFIED + int margin; // SCN_MARGINCLICK + int listType; // SCN_USERLISTSELECTION + int x; // SCN_DWELLSTART, SCN_DWELLEND + int y; // SCN_DWELLSTART, SCN_DWELLEND +}; + +// Deprecation section listing all API features that are deprecated and will +// will be removed completely in a future version. +// To enable these features define INCLUDE_DEPRECATED_FEATURES + +#ifdef INCLUDE_DEPRECATED_FEATURES + +#define SCI_SETCARETPOLICY 2369 +#define CARET_CENTER 0x02 +#define CARET_XEVEN 0x08 +#define CARET_XJUMPS 0x10 + +#define SCN_POSCHANGED 2012 +#define SCN_CHECKBRACE 2007 + +#endif + +#endif diff --git a/scintilla/include/Scintilla.iface b/scintilla/include/Scintilla.iface new file mode 100644 index 00000000..fb856652 --- /dev/null +++ b/scintilla/include/Scintilla.iface @@ -0,0 +1,3116 @@ +## First line may be used for shbang + +## This file defines the interface to Scintilla + +## Copyright 2000-2003 by Neil Hodgson +## The License.txt file describes the conditions under which this software may be distributed. + +## A line starting with ## is a pure comment and should be stripped by readers. +## A line starting with #! is for future shbang use +## A line starting with # followed by a space is a documentation comment and refers +## to the next feature definition. + +## Each feature is defined by a line starting with fun, get, set, val or evt. +## cat -> start a category +## fun -> a function +## get -> a property get function +## set -> a property set function +## val -> definition of a constant +## evt -> an event +## enu -> associate an enumeration with a set of vals with a prefix +## lex -> associate a lexer with the lexical classes it produces +## +## All other feature names should be ignored. They may be defined in the future. +## A property may have a set function, a get function or both. Each will have +## "Get" or "Set" in their names and the corresponding name will have the obvious switch. +## A property may be subscripted, in which case the first parameter is the subscript. +## fun, get, and set features have a strict syntax: +## [=,) +## where stands for white space. +## param may be empty (null value) or is [=] +## Additional white space is allowed between elements. +## The syntax for evt is [=[,]*]) +## Feature names that contain an underscore are defined by Windows, so in these +## cases, using the Windows definition is preferred where available. +## The feature numbers are stable so features will not be renumbered. +## Features may be removed but they will go through a period of deprecation +## before removal which is signalled by moving them into the Deprecated category. +## +## enu has the syntax enu=[]* where all the val +## features in this file starting with a given are considered part of the +## enumeration. +## +## lex has the syntax lex=[]* +## where name is a reasonably capitalised (Python, XML) identifier or UI name, +## lexerVal is the val used to specify the lexer, and the list of prefixes is similar +## to enu. The name may not be the same as that used within the lexer so the lexerVal +## should be used to tie these entities together. + +## Types: +## void +## int +## bool -> integer, 1=true, 0=false +## position -> integer position in a document +## colour -> colour integer containing red, green and blue bytes. +## string -> pointer to const character +## stringresult -> pointer to character, NULL-> return size of result +## cells -> pointer to array of cells, each cell containing a style byte and character byte +## textrange -> range of a min and a max position with an output string +## findtext -> searchrange, text -> foundposition +## keymod -> integer containing key in low half and modifiers in high half +## formatrange +## Types no longer used: +## findtextex -> searchrange +## charrange -> range of a min and a max position +## charrangeresult -> like charrange, but output param +## countedstring +## point -> x,y +## pointresult -> like point, but output param +## rectangle -> left,top,right,bottom +## Client code should ignore definitions containing types it does not understand, except +## for possibly #defining the constants + +## Line numbers and positions start at 0. +## String arguments may contain NUL ('\0') characters where the calls provide a length +## argument and retrieve NUL characters. All retrieved strings except for those retrieved +## by GetLine also have a NUL appended but client code should calculate the size that +## will be returned rather than relying upon the NUL whenever possible. Allow for the +## extra NUL character when allocating buffers. The size to allocate for a stringresult +## can be determined by calling with a NULL (0) pointer. + +cat Basics + +################################################ +## For Scintilla.h +val INVALID_POSITION=-1 +# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages +# as many EM_ messages can be used although that use is deprecated. +val SCI_START=2000 +val SCI_OPTIONAL_START=3000 +val SCI_LEXER_START=4000 + +# Add text to the document at current position. +fun void AddText=2001(int length, string text) + +# Add array of cells to document. +fun void AddStyledText=2002(int length, cells c) + +# Insert string at a position. +fun void InsertText=2003(position pos, string text) + +# Delete all text in the document. +fun void ClearAll=2004(,) + +# Set all style bytes to 0, remove all folding information. +fun void ClearDocumentStyle=2005(,) + +# Returns the number of characters in the document. +get int GetLength=2006(,) + +# Returns the character byte at the position. +get int GetCharAt=2007(position pos,) + +# Returns the position of the caret. +get position GetCurrentPos=2008(,) + +# Returns the position of the opposite end of the selection to the caret. +get position GetAnchor=2009(,) + +# Returns the style byte at the position. +get int GetStyleAt=2010(position pos,) + +# Redoes the next action on the undo history. +fun void Redo=2011(,) + +# Choose between collecting actions into the undo +# history and discarding them. +set void SetUndoCollection=2012(bool collectUndo,) + +# Select all the text in the document. +fun void SelectAll=2013(,) + +# Remember the current position in the undo history as the position +# at which the document was saved. +fun void SetSavePoint=2014(,) + +# Retrieve a buffer of cells. +# Returns the number of bytes in the buffer not including terminating NULs. +fun int GetStyledText=2015(, textrange tr) + +# Are there any redoable actions in the undo history? +fun bool CanRedo=2016(,) + +# Retrieve the line number at which a particular marker is located. +fun int MarkerLineFromHandle=2017(int handle,) + +# Delete a marker. +fun void MarkerDeleteHandle=2018(int handle,) + +# Is undo history being collected? +get bool GetUndoCollection=2019(,) + +enu WhiteSpace=SCWS_ +val SCWS_INVISIBLE=0 +val SCWS_VISIBLEALWAYS=1 +val SCWS_VISIBLEAFTERINDENT=2 + +# Are white space characters currently visible? +# Returns one of SCWS_* constants. +get int GetViewWS=2020(,) + +# Make white space characters invisible, always visible or visible outside indentation. +set void SetViewWS=2021(int viewWS,) + +# Find the position from a point within the window. +fun position PositionFromPoint=2022(int x, int y) + +# Find the position from a point within the window but return +# INVALID_POSITION if not close to text. +fun position PositionFromPointClose=2023(int x, int y) + +# Set caret to start of a line and ensure it is visible. +fun void GotoLine=2024(int line,) + +# Set caret to a position and ensure it is visible. +fun void GotoPos=2025(position pos,) + +# Set the selection anchor to a position. The anchor is the opposite +# end of the selection from the caret. +set void SetAnchor=2026(position posAnchor,) + +# Retrieve the text of the line containing the caret. +# Returns the index of the caret on the line. +fun int GetCurLine=2027(int length, stringresult text) + +# Retrieve the position of the last correctly styled character. +get position GetEndStyled=2028(,) + +enu EndOfLine=SC_EOL_ +val SC_EOL_CRLF=0 +val SC_EOL_CR=1 +val SC_EOL_LF=2 + +# Convert all line endings in the document to one mode. +fun void ConvertEOLs=2029(int eolMode,) + +# Retrieve the current end of line mode - one of CRLF, CR, or LF. +get int GetEOLMode=2030(,) + +# Set the current end of line mode. +set void SetEOLMode=2031(int eolMode,) + +# Set the current styling position to pos and the styling mask to mask. +# The styling mask can be used to protect some bits in each styling byte from modification. +fun void StartStyling=2032(position pos, int mask) + +# Change style from current styling position for length characters to a style +# and move the current styling position to after this newly styled segment. +fun void SetStyling=2033(int length, int style) + +# Is drawing done first into a buffer or direct to the screen? +get bool GetBufferedDraw=2034(,) + +# If drawing is buffered then each line of text is drawn into a bitmap buffer +# before drawing it to the screen to avoid flicker. +set void SetBufferedDraw=2035(bool buffered,) + +# Change the visible size of a tab to be a multiple of the width of a space character. +set void SetTabWidth=2036(int tabWidth,) + +# Retrieve the visible size of a tab. +get int GetTabWidth=2121(,) + +# The SC_CP_UTF8 value can be used to enter Unicode mode. +# This is the same value as CP_UTF8 in Windows +val SC_CP_UTF8=65001 + +# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. +val SC_CP_DBCS=1 + +# Set the code page used to interpret the bytes of the document as characters. +# The SC_CP_UTF8 value can be used to enter Unicode mode. +set void SetCodePage=2037(int codePage,) + +# In palette mode, Scintilla uses the environment's palette calls to display +# more colours. This may lead to ugly displays. +set void SetUsePalette=2039(bool usePalette,) + +enu MarkerSymbol=SC_MARK_ +val MARKER_MAX=31 +val SC_MARK_CIRCLE=0 +val SC_MARK_ROUNDRECT=1 +val SC_MARK_ARROW=2 +val SC_MARK_SMALLRECT=3 +val SC_MARK_SHORTARROW=4 +val SC_MARK_EMPTY=5 +val SC_MARK_ARROWDOWN=6 +val SC_MARK_MINUS=7 +val SC_MARK_PLUS=8 + +# Shapes used for outlining column. +val SC_MARK_VLINE=9 +val SC_MARK_LCORNER=10 +val SC_MARK_TCORNER=11 +val SC_MARK_BOXPLUS=12 +val SC_MARK_BOXPLUSCONNECTED=13 +val SC_MARK_BOXMINUS=14 +val SC_MARK_BOXMINUSCONNECTED=15 +val SC_MARK_LCORNERCURVE=16 +val SC_MARK_TCORNERCURVE=17 +val SC_MARK_CIRCLEPLUS=18 +val SC_MARK_CIRCLEPLUSCONNECTED=19 +val SC_MARK_CIRCLEMINUS=20 +val SC_MARK_CIRCLEMINUSCONNECTED=21 + +# Invisible mark that only sets the line background color. +val SC_MARK_BACKGROUND=22 +val SC_MARK_DOTDOTDOT=23 +val SC_MARK_ARROWS=24 +val SC_MARK_PIXMAP=25 +val SC_MARK_FULLRECT=26 + +val SC_MARK_CHARACTER=10000 + +enu MarkerOutline=SC_MARKNUM_ +# Markers used for outlining column. +val SC_MARKNUM_FOLDEREND=25 +val SC_MARKNUM_FOLDEROPENMID=26 +val SC_MARKNUM_FOLDERMIDTAIL=27 +val SC_MARKNUM_FOLDERTAIL=28 +val SC_MARKNUM_FOLDERSUB=29 +val SC_MARKNUM_FOLDER=30 +val SC_MARKNUM_FOLDEROPEN=31 + +val SC_MASK_FOLDERS=0xFE000000 + +# Set the symbol used for a particular marker number. +fun void MarkerDefine=2040(int markerNumber, int markerSymbol) + +# Set the foreground colour used for a particular marker number. +fun void MarkerSetFore=2041(int markerNumber, colour fore) + +# Set the background colour used for a particular marker number. +fun void MarkerSetBack=2042(int markerNumber, colour back) + +# Add a marker to a line, returning an ID which can be used to find or delete the marker. +fun int MarkerAdd=2043(int line, int markerNumber) + +# Delete a marker from a line. +fun void MarkerDelete=2044(int line, int markerNumber) + +# Delete all markers with a particular number from all lines. +fun void MarkerDeleteAll=2045(int markerNumber,) + +# Get a bit mask of all the markers set on a line. +fun int MarkerGet=2046(int line,) + +# Find the next line after lineStart that includes a marker in mask. +fun int MarkerNext=2047(int lineStart, int markerMask) + +# Find the previous line before lineStart that includes a marker in mask. +fun int MarkerPrevious=2048(int lineStart, int markerMask) + +# Define a marker from a pixmap. +fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap) + +# Add a set of markers to a line. +fun void MarkerAddSet=2466(int line, int set) + +# Set the alpha used for a marker that is drawn in the text area, not the margin. +fun void MarkerSetAlpha=2476(int markerNumber, int alpha) + +enu MarginType=SC_MARGIN_ +val SC_MARGIN_SYMBOL=0 +val SC_MARGIN_NUMBER=1 +val SC_MARGIN_BACK=2 +val SC_MARGIN_FORE=3 + +# Set a margin to be either numeric or symbolic. +set void SetMarginTypeN=2240(int margin, int marginType) + +# Retrieve the type of a margin. +get int GetMarginTypeN=2241(int margin,) + +# Set the width of a margin to a width expressed in pixels. +set void SetMarginWidthN=2242(int margin, int pixelWidth) + +# Retrieve the width of a margin in pixels. +get int GetMarginWidthN=2243(int margin,) + +# Set a mask that determines which markers are displayed in a margin. +set void SetMarginMaskN=2244(int margin, int mask) + +# Retrieve the marker mask of a margin. +get int GetMarginMaskN=2245(int margin,) + +# Make a margin sensitive or insensitive to mouse clicks. +set void SetMarginSensitiveN=2246(int margin, bool sensitive) + +# Retrieve the mouse click sensitivity of a margin. +get bool GetMarginSensitiveN=2247(int margin,) + +# Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles. +# Style 39 is for future use. +enu StylesCommon=STYLE_ +val STYLE_DEFAULT=32 +val STYLE_LINENUMBER=33 +val STYLE_BRACELIGHT=34 +val STYLE_BRACEBAD=35 +val STYLE_CONTROLCHAR=36 +val STYLE_INDENTGUIDE=37 +val STYLE_CALLTIP=38 +val STYLE_LASTPREDEFINED=39 +val STYLE_MAX=127 + +# Character set identifiers are used in StyleSetCharacterSet. +# The values are the same as the Windows *_CHARSET values. +enu CharacterSet=SC_CHARSET_ +val SC_CHARSET_ANSI=0 +val SC_CHARSET_DEFAULT=1 +val SC_CHARSET_BALTIC=186 +val SC_CHARSET_CHINESEBIG5=136 +val SC_CHARSET_EASTEUROPE=238 +val SC_CHARSET_GB2312=134 +val SC_CHARSET_GREEK=161 +val SC_CHARSET_HANGUL=129 +val SC_CHARSET_MAC=77 +val SC_CHARSET_OEM=255 +val SC_CHARSET_RUSSIAN=204 +val SC_CHARSET_CYRILLIC=1251 +val SC_CHARSET_SHIFTJIS=128 +val SC_CHARSET_SYMBOL=2 +val SC_CHARSET_TURKISH=162 +val SC_CHARSET_JOHAB=130 +val SC_CHARSET_HEBREW=177 +val SC_CHARSET_ARABIC=178 +val SC_CHARSET_VIETNAMESE=163 +val SC_CHARSET_THAI=222 +val SC_CHARSET_8859_15=1000 + +# Clear all the styles and make equivalent to the global default style. +set void StyleClearAll=2050(,) + +# Set the foreground colour of a style. +set void StyleSetFore=2051(int style, colour fore) + +# Set the background colour of a style. +set void StyleSetBack=2052(int style, colour back) + +# Set a style to be bold or not. +set void StyleSetBold=2053(int style, bool bold) + +# Set a style to be italic or not. +set void StyleSetItalic=2054(int style, bool italic) + +# Set the size of characters of a style. +set void StyleSetSize=2055(int style, int sizePoints) + +# Set the font of a style. +set void StyleSetFont=2056(int style, string fontName) + +# Set a style to have its end of line filled or not. +set void StyleSetEOLFilled=2057(int style, bool filled) + +# Reset the default style to its state at startup +fun void StyleResetDefault=2058(,) + +# Set a style to be underlined or not. +set void StyleSetUnderline=2059(int style, bool underline) + +enu CaseVisible=SC_CASE_ +val SC_CASE_MIXED=0 +val SC_CASE_UPPER=1 +val SC_CASE_LOWER=2 + +# Get the foreground colour of a style. +get colour StyleGetFore=2481(int style,) + +# Get the background colour of a style. +get colour StyleGetBack=2482(int style,) + +# Get is a style bold or not. +get bool StyleGetBold=2483(int style,) + +# Get is a style italic or not. +get bool StyleGetItalic=2484(int style,) + +# Get the size of characters of a style. +get int StyleGetSize=2485(int style,) + +# Get the font of a style. +# Returns the length of the fontName +fun int StyleGetFont=2486(int style, stringresult fontName) + +# Get is a style to have its end of line filled or not. +get bool StyleGetEOLFilled=2487(int style,) + +# Get is a style underlined or not. +get bool StyleGetUnderline=2488(int style,) + +# Get is a style mixed case, or to force upper or lower case. +get int StyleGetCase=2489(int style,) + +# Get the character get of the font in a style. +get int StyleGetCharacterSet=2490(int style,) + +# Get is a style visible or not. +get bool StyleGetVisible=2491(int style,) + +# Get is a style changeable or not (read only). +# Experimental feature, currently buggy. +get bool StyleGetChangeable=2492(int style,) + +# Get is a style a hotspot or not. +get bool StyleGetHotSpot=2493(int style,) + +# Set a style to be mixed case, or to force upper or lower case. +set void StyleSetCase=2060(int style, int caseForce) + +# Set the character set of the font in a style. +set void StyleSetCharacterSet=2066(int style, int characterSet) + +# Set a style to be a hotspot or not. +set void StyleSetHotSpot=2409(int style, bool hotspot) + +# Set the foreground colour of the selection and whether to use this setting. +fun void SetSelFore=2067(bool useSetting, colour fore) + +# Set the background colour of the selection and whether to use this setting. +fun void SetSelBack=2068(bool useSetting, colour back) + +# Get the alpha of the selection. +get int GetSelAlpha=2477(,) + +# Set the alpha of the selection. +set void SetSelAlpha=2478(int alpha,) + +# Is the selection end of line filled? +get bool GetSelEOLFilled=2479(,) + +# Set the selection to have its end of line filled or not. +set void SetSelEOLFilled=2480(bool filled,) + +# Set the foreground colour of the caret. +set void SetCaretFore=2069(colour fore,) + +# When key+modifier combination km is pressed perform msg. +fun void AssignCmdKey=2070(keymod km, int msg) + +# When key+modifier combination km is pressed do nothing. +fun void ClearCmdKey=2071(keymod km,) + +# Drop all key mappings. +fun void ClearAllCmdKeys=2072(,) + +# Set the styles for a segment of the document. +fun void SetStylingEx=2073(int length, string styles) + +# Set a style to be visible or not. +set void StyleSetVisible=2074(int style, bool visible) + +# Get the time in milliseconds that the caret is on and off. +get int GetCaretPeriod=2075(,) + +# Get the time in milliseconds that the caret is on and off. 0 = steady on. +set void SetCaretPeriod=2076(int periodMilliseconds,) + +# Set the set of characters making up words for when moving or selecting by word. +# First sets deaults like SetCharsDefault. +set void SetWordChars=2077(, string characters) + +# Start a sequence of actions that is undone and redone as a unit. +# May be nested. +fun void BeginUndoAction=2078(,) + +# End a sequence of actions that is undone and redone as a unit. +fun void EndUndoAction=2079(,) + +enu IndicatorStyle=INDIC_ +val INDIC_MAX=7 +val INDIC_PLAIN=0 +val INDIC_SQUIGGLE=1 +val INDIC_TT=2 +val INDIC_DIAGONAL=3 +val INDIC_STRIKE=4 +val INDIC_HIDDEN=5 +val INDIC_BOX=6 +val INDIC_ROUNDBOX=7 +val INDIC0_MASK=0x20 +val INDIC1_MASK=0x40 +val INDIC2_MASK=0x80 +val INDICS_MASK=0xE0 + +# Set an indicator to plain, squiggle or TT. +set void IndicSetStyle=2080(int indic, int style) + +# Retrieve the style of an indicator. +get int IndicGetStyle=2081(int indic,) + +# Set the foreground colour of an indicator. +set void IndicSetFore=2082(int indic, colour fore) + +# Retrieve the foreground colour of an indicator. +get colour IndicGetFore=2083(int indic,) + +# Set the foreground colour of all whitespace and whether to use this setting. +fun void SetWhitespaceFore=2084(bool useSetting, colour fore) + +# Set the background colour of all whitespace and whether to use this setting. +fun void SetWhitespaceBack=2085(bool useSetting, colour back) + +# Divide each styling byte into lexical class bits (default: 5) and indicator +# bits (default: 3). If a lexer requires more than 32 lexical states, then this +# is used to expand the possible states. +set void SetStyleBits=2090(int bits,) + +# Retrieve number of bits in style bytes used to hold the lexical state. +get int GetStyleBits=2091(,) + +# Used to hold extra styling information for each line. +set void SetLineState=2092(int line, int state) + +# Retrieve the extra styling information for a line. +get int GetLineState=2093(int line,) + +# Retrieve the last line number that has line state. +get int GetMaxLineState=2094(,) + +# Is the background of the line containing the caret in a different colour? +get bool GetCaretLineVisible=2095(,) + +# Display the background of the line containing the caret in a different colour. +set void SetCaretLineVisible=2096(bool show,) + +# Get the colour of the background of the line containing the caret. +get colour GetCaretLineBack=2097(,) + +# Set the colour of the background of the line containing the caret. +set void SetCaretLineBack=2098(colour back,) + +# Set a style to be changeable or not (read only). +# Experimental feature, currently buggy. +set void StyleSetChangeable=2099(int style, bool changeable) + +# Display a auto-completion list. +# The lenEntered parameter indicates how many characters before +# the caret should be used to provide context. +fun void AutoCShow=2100(int lenEntered, string itemList) + +# Remove the auto-completion list from the screen. +fun void AutoCCancel=2101(,) + +# Is there an auto-completion list visible? +fun bool AutoCActive=2102(,) + +# Retrieve the position of the caret when the auto-completion list was displayed. +fun position AutoCPosStart=2103(,) + +# User has selected an item so remove the list and insert the selection. +fun void AutoCComplete=2104(,) + +# Define a set of character that when typed cancel the auto-completion list. +fun void AutoCStops=2105(, string characterSet) + +# Change the separator character in the string setting up an auto-completion list. +# Default is space but can be changed if items contain space. +set void AutoCSetSeparator=2106(int separatorCharacter,) + +# Retrieve the auto-completion list separator character. +get int AutoCGetSeparator=2107(,) + +# Select the item in the auto-completion list that starts with a string. +fun void AutoCSelect=2108(, string text) + +# Should the auto-completion list be cancelled if the user backspaces to a +# position before where the box was created. +set void AutoCSetCancelAtStart=2110(bool cancel,) + +# Retrieve whether auto-completion cancelled by backspacing before start. +get bool AutoCGetCancelAtStart=2111(,) + +# Define a set of characters that when typed will cause the autocompletion to +# choose the selected item. +set void AutoCSetFillUps=2112(, string characterSet) + +# Should a single item auto-completion list automatically choose the item. +set void AutoCSetChooseSingle=2113(bool chooseSingle,) + +# Retrieve whether a single item auto-completion list automatically choose the item. +get bool AutoCGetChooseSingle=2114(,) + +# Set whether case is significant when performing auto-completion searches. +set void AutoCSetIgnoreCase=2115(bool ignoreCase,) + +# Retrieve state of ignore case flag. +get bool AutoCGetIgnoreCase=2116(,) + +# Display a list of strings and send notification when user chooses one. +fun void UserListShow=2117(int listType, string itemList) + +# Set whether or not autocompletion is hidden automatically when nothing matches. +set void AutoCSetAutoHide=2118(bool autoHide,) + +# Retrieve whether or not autocompletion is hidden automatically when nothing matches. +get bool AutoCGetAutoHide=2119(,) + +# Set whether or not autocompletion deletes any word characters +# after the inserted text upon completion. +set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,) + +# Retrieve whether or not autocompletion deletes any word characters +# after the inserted text upon completion. +get bool AutoCGetDropRestOfWord=2271(,) + +# Register an XPM image for use in autocompletion lists. +fun void RegisterImage=2405(int type, string xpmData) + +# Clear all the registered XPM images. +fun void ClearRegisteredImages=2408(,) + +# Retrieve the auto-completion list type-separator character. +get int AutoCGetTypeSeparator=2285(,) + +# Change the type-separator character in the string setting up an auto-completion list. +# Default is '?' but can be changed if items contain '?'. +set void AutoCSetTypeSeparator=2286(int separatorCharacter,) + +# Set the maximum width, in characters, of auto-completion and user lists. +# Set to 0 to autosize to fit longest item, which is the default. +set void AutoCSetMaxWidth=2208(int characterCount,) + +# Get the maximum width, in characters, of auto-completion and user lists. +get int AutoCGetMaxWidth=2209(,) + +# Set the maximum height, in rows, of auto-completion and user lists. +# The default is 5 rows. +set void AutoCSetMaxHeight=2210(int rowCount,) + +# Set the maximum height, in rows, of auto-completion and user lists. +get int AutoCGetMaxHeight=2211(,) + +# Set the number of spaces used for one level of indentation. +set void SetIndent=2122(int indentSize,) + +# Retrieve indentation size. +get int GetIndent=2123(,) + +# Indentation will only use space characters if useTabs is false, otherwise +# it will use a combination of tabs and spaces. +set void SetUseTabs=2124(bool useTabs,) + +# Retrieve whether tabs will be used in indentation. +get bool GetUseTabs=2125(,) + +# Change the indentation of a line to a number of columns. +set void SetLineIndentation=2126(int line, int indentSize) + +# Retrieve the number of columns that a line is indented. +get int GetLineIndentation=2127(int line,) + +# Retrieve the position before the first non indentation character on a line. +get position GetLineIndentPosition=2128(int line,) + +# Retrieve the column number of a position, taking tab width into account. +get int GetColumn=2129(position pos,) + +# Show or hide the horizontal scroll bar. +set void SetHScrollBar=2130(bool show,) + +# Is the horizontal scroll bar visible? +get bool GetHScrollBar=2131(,) + +# Show or hide indentation guides. +set void SetIndentationGuides=2132(bool show,) + +# Are the indentation guides visible? +get bool GetIndentationGuides=2133(,) + +# Set the highlighted indentation guide column. +# 0 = no highlighted guide. +set void SetHighlightGuide=2134(int column,) + +# Get the highlighted indentation guide column. +get int GetHighlightGuide=2135(,) + +# Get the position after the last visible characters on a line. +get int GetLineEndPosition=2136(int line,) + +# Get the code page used to interpret the bytes of the document as characters. +get int GetCodePage=2137(,) + +# Get the foreground colour of the caret. +get colour GetCaretFore=2138(,) + +# In palette mode? +get bool GetUsePalette=2139(,) + +# In read-only mode? +get bool GetReadOnly=2140(,) + +# Sets the position of the caret. +set void SetCurrentPos=2141(position pos,) + +# Sets the position that starts the selection - this becomes the anchor. +set void SetSelectionStart=2142(position pos,) + +# Returns the position at the start of the selection. +get position GetSelectionStart=2143(,) + +# Sets the position that ends the selection - this becomes the currentPosition. +set void SetSelectionEnd=2144(position pos,) + +# Returns the position at the end of the selection. +get position GetSelectionEnd=2145(,) + +# Sets the print magnification added to the point size of each style for printing. +set void SetPrintMagnification=2146(int magnification,) + +# Returns the print magnification. +get int GetPrintMagnification=2147(,) + +enu PrintOption=SC_PRINT_ +# PrintColourMode - use same colours as screen. +val SC_PRINT_NORMAL=0 +# PrintColourMode - invert the light value of each style for printing. +val SC_PRINT_INVERTLIGHT=1 +# PrintColourMode - force black text on white background for printing. +val SC_PRINT_BLACKONWHITE=2 +# PrintColourMode - text stays coloured, but all background is forced to be white for printing. +val SC_PRINT_COLOURONWHITE=3 +# PrintColourMode - only the default-background is forced to be white for printing. +val SC_PRINT_COLOURONWHITEDEFAULTBG=4 + +# Modify colours when printing for clearer printed text. +set void SetPrintColourMode=2148(int mode,) + +# Returns the print colour mode. +get int GetPrintColourMode=2149(,) + +enu FindOption=SCFIND_ +val SCFIND_WHOLEWORD=2 +val SCFIND_MATCHCASE=4 +val SCFIND_WORDSTART=0x00100000 +val SCFIND_REGEXP=0x00200000 +val SCFIND_POSIX=0x00400000 + +# Find some text in the document. +fun position FindText=2150(int flags, findtext ft) + +# On Windows, will draw the document into a display context such as a printer. +fun position FormatRange=2151(bool draw, formatrange fr) + +# Retrieve the display line at the top of the display. +get int GetFirstVisibleLine=2152(,) + +# Retrieve the contents of a line. +# Returns the length of the line. +fun int GetLine=2153(int line, stringresult text) + +# Returns the number of lines in the document. There is always at least one. +get int GetLineCount=2154(,) + +# Sets the size in pixels of the left margin. +set void SetMarginLeft=2155(, int pixelWidth) + +# Returns the size in pixels of the left margin. +get int GetMarginLeft=2156(,) + +# Sets the size in pixels of the right margin. +set void SetMarginRight=2157(, int pixelWidth) + +# Returns the size in pixels of the right margin. +get int GetMarginRight=2158(,) + +# Is the document different from when it was last saved? +get bool GetModify=2159(,) + +# Select a range of text. +fun void SetSel=2160(position start, position end) + +# Retrieve the selected text. +# Return the length of the text. +fun int GetSelText=2161(, stringresult text) + +# Retrieve a range of text. +# Return the length of the text. +fun int GetTextRange=2162(, textrange tr) + +# Draw the selection in normal style or with selection highlighted. +fun void HideSelection=2163(bool normal,) + +# Retrieve the x value of the point in the window where a position is displayed. +fun int PointXFromPosition=2164(, position pos) + +# Retrieve the y value of the point in the window where a position is displayed. +fun int PointYFromPosition=2165(, position pos) + +# Retrieve the line containing a position. +fun int LineFromPosition=2166(position pos,) + +# Retrieve the position at the start of a line. +fun position PositionFromLine=2167(int line,) + +# Scroll horizontally and vertically. +fun void LineScroll=2168(int columns, int lines) + +# Ensure the caret is visible. +fun void ScrollCaret=2169(,) + +# Replace the selected text with the argument text. +fun void ReplaceSel=2170(, string text) + +# Set to read only or read write. +set void SetReadOnly=2171(bool readOnly,) + +# Null operation. +fun void Null=2172(,) + +# Will a paste succeed? +fun bool CanPaste=2173(,) + +# Are there any undoable actions in the undo history? +fun bool CanUndo=2174(,) + +# Delete the undo history. +fun void EmptyUndoBuffer=2175(,) + +# Undo one action in the undo history. +fun void Undo=2176(,) + +# Cut the selection to the clipboard. +fun void Cut=2177(,) + +# Copy the selection to the clipboard. +fun void Copy=2178(,) + +# Paste the contents of the clipboard into the document replacing the selection. +fun void Paste=2179(,) + +# Clear the selection. +fun void Clear=2180(,) + +# Replace the contents of the document with the argument text. +fun void SetText=2181(, string text) + +# Retrieve all the text in the document. +# Returns number of characters retrieved. +fun int GetText=2182(int length, stringresult text) + +# Retrieve the number of characters in the document. +get int GetTextLength=2183(,) + +# Retrieve a pointer to a function that processes messages for this Scintilla. +get int GetDirectFunction=2184(,) + +# Retrieve a pointer value to use as the first argument when calling +# the function returned by GetDirectFunction. +get int GetDirectPointer=2185(,) + +# Set to overtype (true) or insert mode. +set void SetOvertype=2186(bool overtype,) + +# Returns true if overtype mode is active otherwise false is returned. +get bool GetOvertype=2187(,) + +# Set the width of the insert mode caret. +set void SetCaretWidth=2188(int pixelWidth,) + +# Returns the width of the insert mode caret. +get int GetCaretWidth=2189(,) + +# Sets the position that starts the target which is used for updating the +# document without affecting the scroll position. +set void SetTargetStart=2190(position pos,) + +# Get the position that starts the target. +get position GetTargetStart=2191(,) + +# Sets the position that ends the target which is used for updating the +# document without affecting the scroll position. +set void SetTargetEnd=2192(position pos,) + +# Get the position that ends the target. +get position GetTargetEnd=2193(,) + +# Replace the target text with the argument text. +# Text is counted so it can contain NULs. +# Returns the length of the replacement text. +fun int ReplaceTarget=2194(int length, string text) + +# Replace the target text with the argument text after \d processing. +# Text is counted so it can contain NULs. +# Looks for \d where d is between 1 and 9 and replaces these with the strings +# matched in the last search operation which were surrounded by \( and \). +# Returns the length of the replacement text including any change +# caused by processing the \d patterns. +fun int ReplaceTargetRE=2195(int length, string text) + +# Search for a counted string in the target and set the target to the found +# range. Text is counted so it can contain NULs. +# Returns length of range or -1 for failure in which case target is not moved. +fun int SearchInTarget=2197(int length, string text) + +# Set the search flags used by SearchInTarget. +set void SetSearchFlags=2198(int flags,) + +# Get the search flags used by SearchInTarget. +get int GetSearchFlags=2199(,) + +# Show a call tip containing a definition near position pos. +fun void CallTipShow=2200(position pos, string definition) + +# Remove the call tip from the screen. +fun void CallTipCancel=2201(,) + +# Is there an active call tip? +fun bool CallTipActive=2202(,) + +# Retrieve the position where the caret was before displaying the call tip. +fun position CallTipPosStart=2203(,) + +# Highlight a segment of the definition. +fun void CallTipSetHlt=2204(int start, int end) + +# Set the background colour for the call tip. +set void CallTipSetBack=2205(colour back,) + +# Set the foreground colour for the call tip. +set void CallTipSetFore=2206(colour fore,) + +# Set the foreground colour for the highlighted part of the call tip. +set void CallTipSetForeHlt=2207(colour fore,) + +# Enable use of STYLE_CALLTIP and set call tip tab size in pixels. +set void CallTipUseStyle=2212(int tabSize,) + +# Find the display line of a document line taking hidden lines into account. +fun int VisibleFromDocLine=2220(int line,) + +# Find the document line of a display line taking hidden lines into account. +fun int DocLineFromVisible=2221(int lineDisplay,) + +# The number of display lines needed to wrap a document line +fun int WrapCount=2235(int line,) + +enu FoldLevel=SC_FOLDLEVEL +val SC_FOLDLEVELBASE=0x400 +val SC_FOLDLEVELWHITEFLAG=0x1000 +val SC_FOLDLEVELHEADERFLAG=0x2000 +val SC_FOLDLEVELBOXHEADERFLAG=0x4000 +val SC_FOLDLEVELBOXFOOTERFLAG=0x8000 +val SC_FOLDLEVELCONTRACTED=0x10000 +val SC_FOLDLEVELUNINDENT=0x20000 +val SC_FOLDLEVELNUMBERMASK=0x0FFF + +# Set the fold level of a line. +# This encodes an integer level along with flags indicating whether the +# line is a header and whether it is effectively white space. +set void SetFoldLevel=2222(int line, int level) + +# Retrieve the fold level of a line. +get int GetFoldLevel=2223(int line,) + +# Find the last child line of a header line. +get int GetLastChild=2224(int line, int level) + +# Find the parent line of a child line. +get int GetFoldParent=2225(int line,) + +# Make a range of lines visible. +fun void ShowLines=2226(int lineStart, int lineEnd) + +# Make a range of lines invisible. +fun void HideLines=2227(int lineStart, int lineEnd) + +# Is a line visible? +get bool GetLineVisible=2228(int line,) + +# Show the children of a header line. +set void SetFoldExpanded=2229(int line, bool expanded) + +# Is a header line expanded? +get bool GetFoldExpanded=2230(int line,) + +# Switch a header line between expanded and contracted. +fun void ToggleFold=2231(int line,) + +# Ensure a particular line is visible by expanding any header line hiding it. +fun void EnsureVisible=2232(int line,) + +enu FoldFlag=SC_FOLDFLAG_ +val SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002 +val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004 +val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008 +val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010 +val SC_FOLDFLAG_LEVELNUMBERS=0x0040 +val SC_FOLDFLAG_BOX=0x0001 + +# Set some style options for folding. +fun void SetFoldFlags=2233(int flags,) + +# Ensure a particular line is visible by expanding any header line hiding it. +# Use the currently set visibility policy to determine which range to display. +fun void EnsureVisibleEnforcePolicy=2234(int line,) + +# Sets whether a tab pressed when caret is within indentation indents. +set void SetTabIndents=2260(bool tabIndents,) + +# Does a tab pressed when caret is within indentation indent? +get bool GetTabIndents=2261(,) + +# Sets whether a backspace pressed when caret is within indentation unindents. +set void SetBackSpaceUnIndents=2262(bool bsUnIndents,) + +# Does a backspace pressed when caret is within indentation unindent? +get bool GetBackSpaceUnIndents=2263(,) + +val SC_TIME_FOREVER=10000000 + +# Sets the time the mouse must sit still to generate a mouse dwell event. +set void SetMouseDwellTime=2264(int periodMilliseconds,) + +# Retrieve the time the mouse must sit still to generate a mouse dwell event. +get int GetMouseDwellTime=2265(,) + +# Get position of start of word. +fun int WordStartPosition=2266(position pos, bool onlyWordCharacters) + +# Get position of end of word. +fun int WordEndPosition=2267(position pos, bool onlyWordCharacters) + +enu Wrap=SC_WRAP_ +val SC_WRAP_NONE=0 +val SC_WRAP_WORD=1 +val SC_WRAP_CHAR=2 + +# Sets whether text is word wrapped. +set void SetWrapMode=2268(int mode,) + +# Retrieve whether text is word wrapped. +get int GetWrapMode=2269(,) + +enu WrapVisualFlag=SC_WRAPVISUALFLAG_ +val SC_WRAPVISUALFLAG_NONE=0x0000 +val SC_WRAPVISUALFLAG_END=0x0001 +val SC_WRAPVISUALFLAG_START=0x0002 + +# Set the display mode of visual flags for wrapped lines. +set void SetWrapVisualFlags=2460(int wrapVisualFlags,) + +# Retrive the display mode of visual flags for wrapped lines. +get int GetWrapVisualFlags=2461(,) + +enu WrapVisualLocation=SC_WRAPVISUALFLAGLOC_ +val SC_WRAPVISUALFLAGLOC_DEFAULT=0x0000 +val SC_WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001 +val SC_WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002 + +# Set the location of visual flags for wrapped lines. +set void SetWrapVisualFlagsLocation=2462(int wrapVisualFlagsLocation,) + +# Retrive the location of visual flags for wrapped lines. +get int GetWrapVisualFlagsLocation=2463(,) + +# Set the start indent for wrapped lines. +set void SetWrapStartIndent=2464(int indent,) + +# Retrive the start indent for wrapped lines. +get int GetWrapStartIndent=2465(,) + +enu LineCache=SC_CACHE_ +val SC_CACHE_NONE=0 +val SC_CACHE_CARET=1 +val SC_CACHE_PAGE=2 +val SC_CACHE_DOCUMENT=3 + +# Sets the degree of caching of layout information. +set void SetLayoutCache=2272(int mode,) + +# Retrieve the degree of caching of layout information. +get int GetLayoutCache=2273(,) + +# Sets the document width assumed for scrolling. +set void SetScrollWidth=2274(int pixelWidth,) + +# Retrieve the document width assumed for scrolling. +get int GetScrollWidth=2275(,) + +# Measure the pixel width of some text in a particular style. +# NUL terminated text argument. +# Does not handle tab or control characters. +fun int TextWidth=2276(int style, string text) + +# Sets the scroll range so that maximum scroll position has +# the last line at the bottom of the view (default). +# Setting this to false allows scrolling one page below the last line. +set void SetEndAtLastLine=2277(bool endAtLastLine,) + +# Retrieve whether the maximum scroll position has the last +# line at the bottom of the view. +get bool GetEndAtLastLine=2278(,) + +# Retrieve the height of a particular line of text in pixels. +fun int TextHeight=2279(int line,) + +# Show or hide the vertical scroll bar. +set void SetVScrollBar=2280(bool show,) + +# Is the vertical scroll bar visible? +get bool GetVScrollBar=2281(,) + +# Append a string to the end of the document without changing the selection. +fun void AppendText=2282(int length, string text) + +# Is drawing done in two phases with backgrounds drawn before faoregrounds? +get bool GetTwoPhaseDraw=2283(,) + +# In twoPhaseDraw mode, drawing is performed in two phases, first the background +# and then the foreground. This avoids chopping off characters that overlap the next run. +set void SetTwoPhaseDraw=2284(bool twoPhase,) + +# Make the target range start and end be the same as the selection range start and end. +fun void TargetFromSelection=2287(,) + +# Join the lines in the target. +fun void LinesJoin=2288(,) + +# Split the lines in the target into lines that are less wide than pixelWidth +# where possible. +fun void LinesSplit=2289(int pixelWidth,) + +# Set the colours used as a chequerboard pattern in the fold margin +fun void SetFoldMarginColour=2290(bool useSetting, colour back) +fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore) + +## New messages go here + +## Start of key messages +# Move caret down one line. +fun void LineDown=2300(,) + +# Move caret down one line extending selection to new caret position. +fun void LineDownExtend=2301(,) + +# Move caret up one line. +fun void LineUp=2302(,) + +# Move caret up one line extending selection to new caret position. +fun void LineUpExtend=2303(,) + +# Move caret left one character. +fun void CharLeft=2304(,) + +# Move caret left one character extending selection to new caret position. +fun void CharLeftExtend=2305(,) + +# Move caret right one character. +fun void CharRight=2306(,) + +# Move caret right one character extending selection to new caret position. +fun void CharRightExtend=2307(,) + +# Move caret left one word. +fun void WordLeft=2308(,) + +# Move caret left one word extending selection to new caret position. +fun void WordLeftExtend=2309(,) + +# Move caret right one word. +fun void WordRight=2310(,) + +# Move caret right one word extending selection to new caret position. +fun void WordRightExtend=2311(,) + +# Move caret to first position on line. +fun void Home=2312(,) + +# Move caret to first position on line extending selection to new caret position. +fun void HomeExtend=2313(,) + +# Move caret to last position on line. +fun void LineEnd=2314(,) + +# Move caret to last position on line extending selection to new caret position. +fun void LineEndExtend=2315(,) + +# Move caret to first position in document. +fun void DocumentStart=2316(,) + +# Move caret to first position in document extending selection to new caret position. +fun void DocumentStartExtend=2317(,) + +# Move caret to last position in document. +fun void DocumentEnd=2318(,) + +# Move caret to last position in document extending selection to new caret position. +fun void DocumentEndExtend=2319(,) + +# Move caret one page up. +fun void PageUp=2320(,) + +# Move caret one page up extending selection to new caret position. +fun void PageUpExtend=2321(,) + +# Move caret one page down. +fun void PageDown=2322(,) + +# Move caret one page down extending selection to new caret position. +fun void PageDownExtend=2323(,) + +# Switch from insert to overtype mode or the reverse. +fun void EditToggleOvertype=2324(,) + +# Cancel any modes such as call tip or auto-completion list display. +fun void Cancel=2325(,) + +# Delete the selection or if no selection, the character before the caret. +fun void DeleteBack=2326(,) + +# If selection is empty or all on one line replace the selection with a tab character. +# If more than one line selected, indent the lines. +fun void Tab=2327(,) + +# Dedent the selected lines. +fun void BackTab=2328(,) + +# Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +fun void NewLine=2329(,) + +# Insert a Form Feed character. +fun void FormFeed=2330(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +fun void VCHome=2331(,) + +# Like VCHome but extending selection to new caret position. +fun void VCHomeExtend=2332(,) + +# Magnify the displayed text by increasing the sizes by 1 point. +fun void ZoomIn=2333(,) + +# Make the displayed text smaller by decreasing the sizes by 1 point. +fun void ZoomOut=2334(,) + +# Delete the word to the left of the caret. +fun void DelWordLeft=2335(,) + +# Delete the word to the right of the caret. +fun void DelWordRight=2336(,) + +# Cut the line containing the caret. +fun void LineCut=2337(,) + +# Delete the line containing the caret. +fun void LineDelete=2338(,) + +# Switch the current line with the previous. +fun void LineTranspose=2339(,) + +# Duplicate the current line. +fun void LineDuplicate=2404(,) + +# Transform the selection to lower case. +fun void LowerCase=2340(,) + +# Transform the selection to upper case. +fun void UpperCase=2341(,) + +# Scroll the document down, keeping the caret visible. +fun void LineScrollDown=2342(,) + +# Scroll the document up, keeping the caret visible. +fun void LineScrollUp=2343(,) + +# Delete the selection or if no selection, the character before the caret. +# Will not delete the character before at the start of a line. +fun void DeleteBackNotLine=2344(,) + +# Move caret to first position on display line. +fun void HomeDisplay=2345(,) + +# Move caret to first position on display line extending selection to +# new caret position. +fun void HomeDisplayExtend=2346(,) + +# Move caret to last position on display line. +fun void LineEndDisplay=2347(,) + +# Move caret to last position on display line extending selection to new +# caret position. +fun void LineEndDisplayExtend=2348(,) + +# These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? +# except they behave differently when word-wrap is enabled: +# They go first to the start / end of the display line, like (Home|LineEnd)Display +# The difference is that, the cursor is already at the point, it goes on to the start +# or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. + +fun void HomeWrap=2349(,) +fun void HomeWrapExtend=2450(,) +fun void LineEndWrap=2451(,) +fun void LineEndWrapExtend=2452(,) +fun void VCHomeWrap=2453(,) +fun void VCHomeWrapExtend=2454(,) + +# Copy the line containing the caret. +fun void LineCopy=2455(,) + +# Move the caret inside current view if it's not there already. +fun void MoveCaretInsideView=2401(,) + +# How many characters are on a line, including end of line characters? +fun int LineLength=2350(int line,) + +# Highlight the characters at two positions. +fun void BraceHighlight=2351(position pos1, position pos2) + +# Highlight the character at a position indicating there is no matching brace. +fun void BraceBadLight=2352(position pos,) + +# Find the position of a matching brace or INVALID_POSITION if no match. +fun position BraceMatch=2353(position pos,) + +# Are the end of line characters visible? +get bool GetViewEOL=2355(,) + +# Make the end of line characters visible or invisible. +set void SetViewEOL=2356(bool visible,) + +# Retrieve a pointer to the document object. +get int GetDocPointer=2357(,) + +# Change the document object used. +set void SetDocPointer=2358(, int pointer) + +# Set which document modification events are sent to the container. +set void SetModEventMask=2359(int mask,) + +enu EdgeVisualStyle=EDGE_ +val EDGE_NONE=0 +val EDGE_LINE=1 +val EDGE_BACKGROUND=2 + +# Retrieve the column number which text should be kept within. +get int GetEdgeColumn=2360(,) + +# Set the column number of the edge. +# If text goes past the edge then it is highlighted. +set void SetEdgeColumn=2361(int column,) + +# Retrieve the edge highlight mode. +get int GetEdgeMode=2362(,) + +# The edge may be displayed by a line (EDGE_LINE) or by highlighting text that +# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +set void SetEdgeMode=2363(int mode,) + +# Retrieve the colour used in edge indication. +get colour GetEdgeColour=2364(,) + +# Change the colour used in edge indication. +set void SetEdgeColour=2365(colour edgeColour,) + +# Sets the current caret position to be the search anchor. +fun void SearchAnchor=2366(,) + +# Find some text starting at the search anchor. +# Does not ensure the selection is visible. +fun int SearchNext=2367(int flags, string text) + +# Find some text starting at the search anchor and moving backwards. +# Does not ensure the selection is visible. +fun int SearchPrev=2368(int flags, string text) + +# Retrieves the number of lines completely visible. +get int LinesOnScreen=2370(,) + +# Set whether a pop up menu is displayed automatically when the user presses +# the wrong mouse button. +fun void UsePopUp=2371(bool allowPopUp,) + +# Is the selection rectangular? The alternative is the more common stream selection. +get bool SelectionIsRectangle=2372(,) + +# Set the zoom level. This number of points is added to the size of all fonts. +# It may be positive to magnify or negative to reduce. +set void SetZoom=2373(int zoom,) +# Retrieve the zoom level. +get int GetZoom=2374(,) + +# Create a new document object. +# Starts with reference count of 1 and not selected into editor. +fun int CreateDocument=2375(,) +# Extend life of document. +fun void AddRefDocument=2376(, int doc) +# Release a reference to the document, deleting document if it fades to black. +fun void ReleaseDocument=2377(, int doc) + +# Get which document modification events are sent to the container. +get int GetModEventMask=2378(,) + +# Change internal focus flag. +set void SetFocus=2380(bool focus,) +# Get internal focus flag. +get bool GetFocus=2381(,) + +# Change error status - 0 = OK. +set void SetStatus=2382(int statusCode,) +# Get error status. +get int GetStatus=2383(,) + +# Set whether the mouse is captured when its button is pressed. +set void SetMouseDownCaptures=2384(bool captures,) +# Get whether mouse gets captured. +get bool GetMouseDownCaptures=2385(,) + +enu CursorShape=SC_CURSOR +val SC_CURSORNORMAL=-1 +val SC_CURSORWAIT=4 +# Sets the cursor to one of the SC_CURSOR* values. +set void SetCursor=2386(int cursorType,) +# Get cursor type. +get int GetCursor=2387(,) + +# Change the way control characters are displayed: +# If symbol is < 32, keep the drawn way, else, use the given character. +set void SetControlCharSymbol=2388(int symbol,) +# Get the way control characters are displayed. +get int GetControlCharSymbol=2389(,) + +# Move to the previous change in capitalisation. +fun void WordPartLeft=2390(,) +# Move to the previous change in capitalisation extending selection +# to new caret position. +fun void WordPartLeftExtend=2391(,) +# Move to the change next in capitalisation. +fun void WordPartRight=2392(,) +# Move to the next change in capitalisation extending selection +# to new caret position. +fun void WordPartRightExtend=2393(,) + +# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. +val VISIBLE_SLOP=0x01 +val VISIBLE_STRICT=0x04 +# Set the way the display area is determined when a particular line +# is to be moved to by Find, FindNext, GotoLine, etc. +fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop) + +# Delete back from the current position to the start of the line. +fun void DelLineLeft=2395(,) + +# Delete forwards from the current position to the end of the line. +fun void DelLineRight=2396(,) + +# Get and Set the xOffset (ie, horizonal scroll position). +set void SetXOffset=2397(int newOffset,) +get int GetXOffset=2398(,) + +# Set the last x chosen value to be the caret x position. +fun void ChooseCaretX=2399(,) + +# Set the focus to this Scintilla widget. +fun void GrabFocus=2400(,) + +enu CaretPolicy = CARET_ +# Caret policy, used by SetXCaretPolicy and SetYCaretPolicy. +# If CARET_SLOP is set, we can define a slop value: caretSlop. +# This value defines an unwanted zone (UZ) where the caret is... unwanted. +# This zone is defined as a number of pixels near the vertical margins, +# and as a number of lines near the horizontal margins. +# By keeping the caret away from the edges, it is seen within its context, +# so it is likely that the identifier that the caret is on can be completely seen, +# and that the current line is seen with some of the lines following it which are +# often dependent on that line. +val CARET_SLOP=0x01 +# If CARET_STRICT is set, the policy is enforced... strictly. +# The caret is centred on the display if slop is not set, +# and cannot go in the UZ if slop is set. +val CARET_STRICT=0x04 +# If CARET_JUMPS is set, the display is moved more energetically +# so the caret can move in the same direction longer before the policy is applied again. +val CARET_JUMPS=0x10 +# If CARET_EVEN is not set, instead of having symmetrical UZs, +# the left and bottom UZs are extended up to right and top UZs respectively. +# This way, we favour the displaying of useful information: the begining of lines, +# where most code reside, and the lines after the caret, eg. the body of a function. +val CARET_EVEN=0x08 + +# Set the way the caret is kept visible when going sideway. +# The exclusion zone is given in pixels. +fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop) + +# Set the way the line the caret is on is kept visible. +# The exclusion zone is given in lines. +fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop) + +# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). +set void SetPrintWrapMode=2406(int mode,) + +# Is printing line wrapped? +get int GetPrintWrapMode=2407(,) + +# Set a fore colour for active hotspots. +set void SetHotspotActiveFore=2410(bool useSetting, colour fore) + +# Get the fore colour for active hotspots. +get colour GetHotspotActiveFore=2494(,) + +# Set a back colour for active hotspots. +set void SetHotspotActiveBack=2411(bool useSetting, colour back) + +# Get the back colour for active hotspots. +get colour GetHotspotActiveBack=2495(,) + +# Enable / Disable underlining active hotspots. +set void SetHotspotActiveUnderline=2412(bool underline,) + +# Get whether underlining for active hotspots. +get bool GetHotspotActiveUnderline=2496(,) + +# Limit hotspots to single line so hotspots on two lines don't merge. +set void SetHotspotSingleLine=2421(bool singleLine,) + +# Get the HotspotSingleLine property +get bool GetHotspotSingleLine=2497(,) + +# Move caret between paragraphs (delimited by empty lines). +fun void ParaDown=2413(,) +fun void ParaDownExtend=2414(,) +fun void ParaUp=2415(,) +fun void ParaUpExtend=2416(,) + +# Given a valid document position, return the previous position taking code +# page into account. Returns 0 if passed 0. +fun position PositionBefore=2417(position pos,) + +# Given a valid document position, return the next position taking code +# page into account. Maximum value returned is the last position in the document. +fun position PositionAfter=2418(position pos,) + +# Copy a range of text to the clipboard. Positions are clipped into the document. +fun void CopyRange=2419(position start, position end) + +# Copy argument text to the clipboard. +fun void CopyText=2420(int length, string text) + +enu SelectionMode=SC_SEL_ +val SC_SEL_STREAM=0 +val SC_SEL_RECTANGLE=1 +val SC_SEL_LINES=2 + +# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or +# by lines (SC_SEL_LINES). +set void SetSelectionMode=2422(int mode,) + +# Get the mode of the current selection. +get int GetSelectionMode=2423(,) + +# Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). +fun position GetLineSelStartPosition=2424(int line,) + +# Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). +fun position GetLineSelEndPosition=2425(int line,) + +## RectExtended rectangular selection moves +# Move caret down one line, extending rectangular selection to new caret position. +fun void LineDownRectExtend=2426(,) + +# Move caret up one line, extending rectangular selection to new caret position. +fun void LineUpRectExtend=2427(,) + +# Move caret left one character, extending rectangular selection to new caret position. +fun void CharLeftRectExtend=2428(,) + +# Move caret right one character, extending rectangular selection to new caret position. +fun void CharRightRectExtend=2429(,) + +# Move caret to first position on line, extending rectangular selection to new caret position. +fun void HomeRectExtend=2430(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +# In either case, extend rectangular selection to new caret position. +fun void VCHomeRectExtend=2431(,) + +# Move caret to last position on line, extending rectangular selection to new caret position. +fun void LineEndRectExtend=2432(,) + +# Move caret one page up, extending rectangular selection to new caret position. +fun void PageUpRectExtend=2433(,) + +# Move caret one page down, extending rectangular selection to new caret position. +fun void PageDownRectExtend=2434(,) + + +# Move caret to top of page, or one page up if already at top of page. +fun void StutteredPageUp=2435(,) + +# Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. +fun void StutteredPageUpExtend=2436(,) + +# Move caret to bottom of page, or one page down if already at bottom of page. +fun void StutteredPageDown=2437(,) + +# Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. +fun void StutteredPageDownExtend=2438(,) + + +# Move caret left one word, position cursor at end of word. +fun void WordLeftEnd=2439(,) + +# Move caret left one word, position cursor at end of word, extending selection to new caret position. +fun void WordLeftEndExtend=2440(,) + +# Move caret right one word, position cursor at end of word. +fun void WordRightEnd=2441(,) + +# Move caret right one word, position cursor at end of word, extending selection to new caret position. +fun void WordRightEndExtend=2442(,) + +# Set the set of characters making up whitespace for when moving or selecting by word. +# Should be called after SetWordChars. +set void SetWhitespaceChars=2443(, string characters) + +# Reset the set of characters for whitespace and word characters to the defaults. +fun void SetCharsDefault=2444(,) + +# Get currently selected item position in the auto-completion list +fun int AutoCGetCurrent=2445(,) + +# Enlarge the document to a particular size of text bytes. +fun void Allocate=2446(int bytes,) + +# Returns the target converted to UTF8. +# Return the length in bytes. +fun int TargetAsUTF8=2447(, stringresult s) + +# Set the length of the utf8 argument for calling EncodedFromUTF8. +# Set to -1 and the string will be measured to the first nul. +fun void SetLengthForEncode=2448(int bytes,) + +# Translates a UTF8 string into the document encoding. +# Return the length of the result in bytes. +# On error return 0. +fun int EncodedFromUTF8=2449(string utf8, stringresult encoded) + +# Find the position of a column on a line taking into account tabs and +# multi-byte characters. If beyond end of line, return line end position. +fun int FindColumn=2456(int line, int column) + +# Can the caret preferred x position only be changed by explicit movement commands? +get bool GetCaretSticky=2457(,) + +# Stop the caret preferred x position changing when the user types. +set void SetCaretSticky=2458(bool useCaretStickyBehaviour,) + +# Switch between sticky and non-sticky: meant to be bound to a key. +fun void ToggleCaretSticky=2459(,) + +# Enable/Disable convert-on-paste for line endings +set void SetPasteConvertEndings=2467(bool convert,) + +# Get convert-on-paste setting +get bool GetPasteConvertEndings=2468(,) + +# Duplicate the selection. If selection empty duplicate the line containing the caret. +fun void SelectionDuplicate=2469(,) + +val SC_ALPHA_TRANSPARENT=0 +val SC_ALPHA_OPAQUE=255 +val SC_ALPHA_NOALPHA=256 + +# Set background alpha of the caret line. +set void SetCaretLineBackAlpha=2470(int alpha,) + +# Get the background alpha of the caret line. +get int GetCaretLineBackAlpha=2471(,) + +# Start notifying the container of all key presses and commands. +fun void StartRecord=3001(,) + +# Stop notifying the container of all key presses and commands. +fun void StopRecord=3002(,) + +# Set the lexing language of the document. +set void SetLexer=4001(int lexer,) + +# Retrieve the lexing language of the document. +get int GetLexer=4002(,) + +# Colourise a segment of the document using the current lexing language. +fun void Colourise=4003(position start, position end) + +# Set up a value that may be used by a lexer for some optional feature. +set void SetProperty=4004(string key, string value) + +# Maximum value of keywordSet parameter of SetKeyWords. +val KEYWORDSET_MAX=8 + +# Set up the key words used by the lexer. +set void SetKeyWords=4005(int keywordSet, string keyWords) + +# Set the lexing language of the document based on string name. +set void SetLexerLanguage=4006(, string language) + +# Load a lexer library (dll / so). +fun void LoadLexerLibrary=4007(, string path) + +# Retrieve a "property" value previously set with SetProperty. +fun int GetProperty=4008(string key, stringresult buf) + +# Retrieve a "property" value previously set with SetProperty, +# with "$()" variable replacement on returned buffer. +fun int GetPropertyExpanded=4009(string key, stringresult buf) + +# Retrieve a "property" value previously set with SetProperty, +# interpreted as an int AFTER any "$()" variable replacement. +get int GetPropertyInt=4010(string key,) + +# Retrieve the number of bits the current lexer needs for styling. +get int GetStyleBitsNeeded=4011(,) + +# Notifications +# Type of modification and the action which caused the modification. +# These are defined as a bit mask to make it easy to specify which notifications are wanted. +# One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_LAST +val SC_MOD_INSERTTEXT=0x1 +val SC_MOD_DELETETEXT=0x2 +val SC_MOD_CHANGESTYLE=0x4 +val SC_MOD_CHANGEFOLD=0x8 +val SC_PERFORMED_USER=0x10 +val SC_PERFORMED_UNDO=0x20 +val SC_PERFORMED_REDO=0x40 +val SC_MULTISTEPUNDOREDO=0x80 +val SC_LASTSTEPINUNDOREDO=0x100 +val SC_MOD_CHANGEMARKER=0x200 +val SC_MOD_BEFOREINSERT=0x400 +val SC_MOD_BEFOREDELETE=0x800 +val SC_MULTILINEUNDOREDO=0x1000 +val SC_STARTACTION=0x2000 +val SC_MODEVENTMASKALL=0x2FFF + +# For compatibility, these go through the COMMAND notification rather than NOTIFY +# and should have had exactly the same values as the EN_* constants. +# Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_* +# As clients depend on these constants, this will not be changed. +val SCEN_CHANGE=768 +val SCEN_SETFOCUS=512 +val SCEN_KILLFOCUS=256 + +# Symbolic key codes and modifier flags. +# ASCII and other printable characters below 256. +# Extended keys above 300. + +enu Keys=SCK_ +val SCK_DOWN=300 +val SCK_UP=301 +val SCK_LEFT=302 +val SCK_RIGHT=303 +val SCK_HOME=304 +val SCK_END=305 +val SCK_PRIOR=306 +val SCK_NEXT=307 +val SCK_DELETE=308 +val SCK_INSERT=309 +val SCK_ESCAPE=7 +val SCK_BACK=8 +val SCK_TAB=9 +val SCK_RETURN=13 +val SCK_ADD=310 +val SCK_SUBTRACT=311 +val SCK_DIVIDE=312 +val SCK_WIN=313 +val SCK_RWIN=314 +val SCK_MENU=315 + +enu KeyMod=SCMOD_ +val SCMOD_NORM=0 +val SCMOD_SHIFT=1 +val SCMOD_CTRL=2 +val SCMOD_ALT=4 + +################################################ +# For SciLexer.h +enu Lexer=SCLEX_ +val SCLEX_CONTAINER=0 +val SCLEX_NULL=1 +val SCLEX_PYTHON=2 +val SCLEX_CPP=3 +val SCLEX_HTML=4 +val SCLEX_XML=5 +val SCLEX_PERL=6 +val SCLEX_SQL=7 +val SCLEX_VB=8 +val SCLEX_PROPERTIES=9 +val SCLEX_ERRORLIST=10 +val SCLEX_MAKEFILE=11 +val SCLEX_BATCH=12 +val SCLEX_XCODE=13 +val SCLEX_LATEX=14 +val SCLEX_LUA=15 +val SCLEX_DIFF=16 +val SCLEX_CONF=17 +val SCLEX_PASCAL=18 +val SCLEX_AVE=19 +val SCLEX_ADA=20 +val SCLEX_LISP=21 +val SCLEX_RUBY=22 +val SCLEX_EIFFEL=23 +val SCLEX_EIFFELKW=24 +val SCLEX_TCL=25 +val SCLEX_NNCRONTAB=26 +val SCLEX_BULLANT=27 +val SCLEX_VBSCRIPT=28 +val SCLEX_BAAN=31 +val SCLEX_MATLAB=32 +val SCLEX_SCRIPTOL=33 +val SCLEX_ASM=34 +val SCLEX_CPPNOCASE=35 +val SCLEX_FORTRAN=36 +val SCLEX_F77=37 +val SCLEX_CSS=38 +val SCLEX_POV=39 +val SCLEX_LOUT=40 +val SCLEX_ESCRIPT=41 +val SCLEX_PS=42 +val SCLEX_NSIS=43 +val SCLEX_MMIXAL=44 +val SCLEX_CLW=45 +val SCLEX_CLWNOCASE=46 +val SCLEX_LOT=47 +val SCLEX_YAML=48 +val SCLEX_TEX=49 +val SCLEX_METAPOST=50 +val SCLEX_POWERBASIC=51 +val SCLEX_FORTH=52 +val SCLEX_ERLANG=53 +val SCLEX_OCTAVE=54 +val SCLEX_MSSQL=55 +val SCLEX_VERILOG=56 +val SCLEX_KIX=57 +val SCLEX_GUI4CLI=58 +val SCLEX_SPECMAN=59 +val SCLEX_AU3=60 +val SCLEX_APDL=61 +val SCLEX_BASH=62 +val SCLEX_ASN1=63 +val SCLEX_VHDL=64 +val SCLEX_CAML=65 +val SCLEX_BLITZBASIC=66 +val SCLEX_PUREBASIC=67 +val SCLEX_HASKELL=68 +val SCLEX_PHPSCRIPT=69 +val SCLEX_TADS3=70 +val SCLEX_REBOL=71 +val SCLEX_SMALLTALK=72 +val SCLEX_FLAGSHIP=73 +val SCLEX_CSOUND=74 +val SCLEX_FREEBASIC=75 +val SCLEX_INNOSETUP=76 +val SCLEX_OPAL=77 +val SCLEX_SPICE=78 +val SCLEX_D=79 +val SCLEX_CMAKE=80 + +# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a +# value assigned in sequence from SCLEX_AUTOMATIC+1. +val SCLEX_AUTOMATIC=1000 +# Lexical states for SCLEX_PYTHON +lex Python=SCLEX_PYTHON SCE_P_ +val SCE_P_DEFAULT=0 +val SCE_P_COMMENTLINE=1 +val SCE_P_NUMBER=2 +val SCE_P_STRING=3 +val SCE_P_CHARACTER=4 +val SCE_P_WORD=5 +val SCE_P_TRIPLE=6 +val SCE_P_TRIPLEDOUBLE=7 +val SCE_P_CLASSNAME=8 +val SCE_P_DEFNAME=9 +val SCE_P_OPERATOR=10 +val SCE_P_IDENTIFIER=11 +val SCE_P_COMMENTBLOCK=12 +val SCE_P_STRINGEOL=13 +val SCE_P_WORD2=14 +val SCE_P_DECORATOR=15 +# Lexical states for SCLEX_CPP +lex Cpp=SCLEX_CPP SCE_C_ +lex Pascal=SCLEX_PASCAL SCE_C_ +lex BullAnt=SCLEX_BULLANT SCE_C_ +val SCE_C_DEFAULT=0 +val SCE_C_COMMENT=1 +val SCE_C_COMMENTLINE=2 +val SCE_C_COMMENTDOC=3 +val SCE_C_NUMBER=4 +val SCE_C_WORD=5 +val SCE_C_STRING=6 +val SCE_C_CHARACTER=7 +val SCE_C_UUID=8 +val SCE_C_PREPROCESSOR=9 +val SCE_C_OPERATOR=10 +val SCE_C_IDENTIFIER=11 +val SCE_C_STRINGEOL=12 +val SCE_C_VERBATIM=13 +val SCE_C_REGEX=14 +val SCE_C_COMMENTLINEDOC=15 +val SCE_C_WORD2=16 +val SCE_C_COMMENTDOCKEYWORD=17 +val SCE_C_COMMENTDOCKEYWORDERROR=18 +val SCE_C_GLOBALCLASS=19 +# Lexical states for SCLEX_D +lex D=SCLEX_D SCE_D_ +val SCE_D_DEFAULT=0 +val SCE_D_COMMENT=1 +val SCE_D_COMMENTLINE=2 +val SCE_D_COMMENTDOC=3 +val SCE_D_COMMENTNESTED=4 +val SCE_D_NUMBER=5 +val SCE_D_WORD=6 +val SCE_D_WORD2=7 +val SCE_D_WORD3=8 +val SCE_D_TYPEDEF=9 +val SCE_D_STRING=10 +val SCE_D_STRINGEOL=11 +val SCE_D_CHARACTER=12 +val SCE_D_OPERATOR=13 +val SCE_D_IDENTIFIER=14 +val SCE_D_COMMENTLINEDOC=15 +val SCE_D_COMMENTDOCKEYWORD=16 +val SCE_D_COMMENTDOCKEYWORDERROR=17 +# Lexical states for SCLEX_TCL +lex TCL=SCLEX_TCL SCE_TCL_ +val SCE_TCL_DEFAULT=0 +val SCE_TCL_COMMENT=1 +val SCE_TCL_COMMENTLINE=2 +val SCE_TCL_NUMBER=3 +val SCE_TCL_WORD_IN_QUOTE=4 +val SCE_TCL_IN_QUOTE=5 +val SCE_TCL_OPERATOR=6 +val SCE_TCL_IDENTIFIER=7 +val SCE_TCL_SUBSTITUTION=8 +val SCE_TCL_SUB_BRACE=9 +val SCE_TCL_MODIFIER=10 +val SCE_TCL_EXPAND=11 +val SCE_TCL_WORD=12 +val SCE_TCL_WORD2=13 +val SCE_TCL_WORD3=14 +val SCE_TCL_WORD4=15 +val SCE_TCL_WORD5=16 +val SCE_TCL_WORD6=17 +val SCE_TCL_WORD7=18 +val SCE_TCL_WORD8=19 +val SCE_TCL_COMMENT_BOX=20 +val SCE_TCL_BLOCK_COMMENT=21 +# Lexical states for SCLEX_HTML, SCLEX_XML +lex HTML=SCLEX_HTML SCE_H +lex XML=SCLEX_XML SCE_H +lex ASP=SCLEX_ASP SCE_H +lex PHP=SCLEX_PHP SCE_H +val SCE_H_DEFAULT=0 +val SCE_H_TAG=1 +val SCE_H_TAGUNKNOWN=2 +val SCE_H_ATTRIBUTE=3 +val SCE_H_ATTRIBUTEUNKNOWN=4 +val SCE_H_NUMBER=5 +val SCE_H_DOUBLESTRING=6 +val SCE_H_SINGLESTRING=7 +val SCE_H_OTHER=8 +val SCE_H_COMMENT=9 +val SCE_H_ENTITY=10 +# XML and ASP +val SCE_H_TAGEND=11 +val SCE_H_XMLSTART=12 +val SCE_H_XMLEND=13 +val SCE_H_SCRIPT=14 +val SCE_H_ASP=15 +val SCE_H_ASPAT=16 +val SCE_H_CDATA=17 +val SCE_H_QUESTION=18 +# More HTML +val SCE_H_VALUE=19 +# X-Code +val SCE_H_XCCOMMENT=20 +# SGML +val SCE_H_SGML_DEFAULT=21 +val SCE_H_SGML_COMMAND=22 +val SCE_H_SGML_1ST_PARAM=23 +val SCE_H_SGML_DOUBLESTRING=24 +val SCE_H_SGML_SIMPLESTRING=25 +val SCE_H_SGML_ERROR=26 +val SCE_H_SGML_SPECIAL=27 +val SCE_H_SGML_ENTITY=28 +val SCE_H_SGML_COMMENT=29 +val SCE_H_SGML_1ST_PARAM_COMMENT=30 +val SCE_H_SGML_BLOCK_DEFAULT=31 +# Embedded Javascript +val SCE_HJ_START=40 +val SCE_HJ_DEFAULT=41 +val SCE_HJ_COMMENT=42 +val SCE_HJ_COMMENTLINE=43 +val SCE_HJ_COMMENTDOC=44 +val SCE_HJ_NUMBER=45 +val SCE_HJ_WORD=46 +val SCE_HJ_KEYWORD=47 +val SCE_HJ_DOUBLESTRING=48 +val SCE_HJ_SINGLESTRING=49 +val SCE_HJ_SYMBOLS=50 +val SCE_HJ_STRINGEOL=51 +val SCE_HJ_REGEX=52 +# ASP Javascript +val SCE_HJA_START=55 +val SCE_HJA_DEFAULT=56 +val SCE_HJA_COMMENT=57 +val SCE_HJA_COMMENTLINE=58 +val SCE_HJA_COMMENTDOC=59 +val SCE_HJA_NUMBER=60 +val SCE_HJA_WORD=61 +val SCE_HJA_KEYWORD=62 +val SCE_HJA_DOUBLESTRING=63 +val SCE_HJA_SINGLESTRING=64 +val SCE_HJA_SYMBOLS=65 +val SCE_HJA_STRINGEOL=66 +val SCE_HJA_REGEX=67 +# Embedded VBScript +val SCE_HB_START=70 +val SCE_HB_DEFAULT=71 +val SCE_HB_COMMENTLINE=72 +val SCE_HB_NUMBER=73 +val SCE_HB_WORD=74 +val SCE_HB_STRING=75 +val SCE_HB_IDENTIFIER=76 +val SCE_HB_STRINGEOL=77 +# ASP VBScript +val SCE_HBA_START=80 +val SCE_HBA_DEFAULT=81 +val SCE_HBA_COMMENTLINE=82 +val SCE_HBA_NUMBER=83 +val SCE_HBA_WORD=84 +val SCE_HBA_STRING=85 +val SCE_HBA_IDENTIFIER=86 +val SCE_HBA_STRINGEOL=87 +# Embedded Python +val SCE_HP_START=90 +val SCE_HP_DEFAULT=91 +val SCE_HP_COMMENTLINE=92 +val SCE_HP_NUMBER=93 +val SCE_HP_STRING=94 +val SCE_HP_CHARACTER=95 +val SCE_HP_WORD=96 +val SCE_HP_TRIPLE=97 +val SCE_HP_TRIPLEDOUBLE=98 +val SCE_HP_CLASSNAME=99 +val SCE_HP_DEFNAME=100 +val SCE_HP_OPERATOR=101 +val SCE_HP_IDENTIFIER=102 +# PHP +val SCE_HPHP_COMPLEX_VARIABLE=104 +# ASP Python +val SCE_HPA_START=105 +val SCE_HPA_DEFAULT=106 +val SCE_HPA_COMMENTLINE=107 +val SCE_HPA_NUMBER=108 +val SCE_HPA_STRING=109 +val SCE_HPA_CHARACTER=110 +val SCE_HPA_WORD=111 +val SCE_HPA_TRIPLE=112 +val SCE_HPA_TRIPLEDOUBLE=113 +val SCE_HPA_CLASSNAME=114 +val SCE_HPA_DEFNAME=115 +val SCE_HPA_OPERATOR=116 +val SCE_HPA_IDENTIFIER=117 +# PHP +val SCE_HPHP_DEFAULT=118 +val SCE_HPHP_HSTRING=119 +val SCE_HPHP_SIMPLESTRING=120 +val SCE_HPHP_WORD=121 +val SCE_HPHP_NUMBER=122 +val SCE_HPHP_VARIABLE=123 +val SCE_HPHP_COMMENT=124 +val SCE_HPHP_COMMENTLINE=125 +val SCE_HPHP_HSTRING_VARIABLE=126 +val SCE_HPHP_OPERATOR=127 +# Lexical states for SCLEX_PERL +lex Perl=SCLEX_PERL SCE_PL_ +val SCE_PL_DEFAULT=0 +val SCE_PL_ERROR=1 +val SCE_PL_COMMENTLINE=2 +val SCE_PL_POD=3 +val SCE_PL_NUMBER=4 +val SCE_PL_WORD=5 +val SCE_PL_STRING=6 +val SCE_PL_CHARACTER=7 +val SCE_PL_PUNCTUATION=8 +val SCE_PL_PREPROCESSOR=9 +val SCE_PL_OPERATOR=10 +val SCE_PL_IDENTIFIER=11 +val SCE_PL_SCALAR=12 +val SCE_PL_ARRAY=13 +val SCE_PL_HASH=14 +val SCE_PL_SYMBOLTABLE=15 +val SCE_PL_VARIABLE_INDEXER=16 +val SCE_PL_REGEX=17 +val SCE_PL_REGSUBST=18 +val SCE_PL_LONGQUOTE=19 +val SCE_PL_BACKTICKS=20 +val SCE_PL_DATASECTION=21 +val SCE_PL_HERE_DELIM=22 +val SCE_PL_HERE_Q=23 +val SCE_PL_HERE_QQ=24 +val SCE_PL_HERE_QX=25 +val SCE_PL_STRING_Q=26 +val SCE_PL_STRING_QQ=27 +val SCE_PL_STRING_QX=28 +val SCE_PL_STRING_QR=29 +val SCE_PL_STRING_QW=30 +val SCE_PL_POD_VERB=31 +# Lexical states for SCLEX_RUBY +lex Ruby=SCLEX_RUBY SCE_RB_ +val SCE_RB_DEFAULT=0 +val SCE_RB_ERROR=1 +val SCE_RB_COMMENTLINE=2 +val SCE_RB_POD=3 +val SCE_RB_NUMBER=4 +val SCE_RB_WORD=5 +val SCE_RB_STRING=6 +val SCE_RB_CHARACTER=7 +val SCE_RB_CLASSNAME=8 +val SCE_RB_DEFNAME=9 +val SCE_RB_OPERATOR=10 +val SCE_RB_IDENTIFIER=11 +val SCE_RB_REGEX=12 +val SCE_RB_GLOBAL=13 +val SCE_RB_SYMBOL=14 +val SCE_RB_MODULE_NAME=15 +val SCE_RB_INSTANCE_VAR=16 +val SCE_RB_CLASS_VAR=17 +val SCE_RB_BACKTICKS=18 +val SCE_RB_DATASECTION=19 +val SCE_RB_HERE_DELIM=20 +val SCE_RB_HERE_Q=21 +val SCE_RB_HERE_QQ=22 +val SCE_RB_HERE_QX=23 +val SCE_RB_STRING_Q=24 +val SCE_RB_STRING_QQ=25 +val SCE_RB_STRING_QX=26 +val SCE_RB_STRING_QR=27 +val SCE_RB_STRING_QW=28 +val SCE_RB_WORD_DEMOTED=29 +val SCE_RB_STDIN=30 +val SCE_RB_STDOUT=31 +val SCE_RB_STDERR=40 +val SCE_RB_UPPER_BOUND=41 +# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC +lex VB=SCLEX_VB SCE_B_ +lex VBScript=SCLEX_VBSCRIPT SCE_B_ +lex PowerBasic=SCLEX_POWERBASIC SCE_B_ +val SCE_B_DEFAULT=0 +val SCE_B_COMMENT=1 +val SCE_B_NUMBER=2 +val SCE_B_KEYWORD=3 +val SCE_B_STRING=4 +val SCE_B_PREPROCESSOR=5 +val SCE_B_OPERATOR=6 +val SCE_B_IDENTIFIER=7 +val SCE_B_DATE=8 +val SCE_B_STRINGEOL=9 +val SCE_B_KEYWORD2=10 +val SCE_B_KEYWORD3=11 +val SCE_B_KEYWORD4=12 +val SCE_B_CONSTANT=13 +val SCE_B_ASM=14 +val SCE_B_LABEL=15 +val SCE_B_ERROR=16 +val SCE_B_HEXNUMBER=17 +val SCE_B_BINNUMBER=18 +# Lexical states for SCLEX_PROPERTIES +lex Properties=SCLEX_PROPERTIES SCE_PROPS_ +val SCE_PROPS_DEFAULT=0 +val SCE_PROPS_COMMENT=1 +val SCE_PROPS_SECTION=2 +val SCE_PROPS_ASSIGNMENT=3 +val SCE_PROPS_DEFVAL=4 +val SCE_PROPS_KEY=5 +# Lexical states for SCLEX_LATEX +lex LaTeX=SCLEX_LATEX SCE_L_ +val SCE_L_DEFAULT=0 +val SCE_L_COMMAND=1 +val SCE_L_TAG=2 +val SCE_L_MATH=3 +val SCE_L_COMMENT=4 +# Lexical states for SCLEX_LUA +lex Lua=SCLEX_LUA SCE_LUA_ +val SCE_LUA_DEFAULT=0 +val SCE_LUA_COMMENT=1 +val SCE_LUA_COMMENTLINE=2 +val SCE_LUA_COMMENTDOC=3 +val SCE_LUA_NUMBER=4 +val SCE_LUA_WORD=5 +val SCE_LUA_STRING=6 +val SCE_LUA_CHARACTER=7 +val SCE_LUA_LITERALSTRING=8 +val SCE_LUA_PREPROCESSOR=9 +val SCE_LUA_OPERATOR=10 +val SCE_LUA_IDENTIFIER=11 +val SCE_LUA_STRINGEOL=12 +val SCE_LUA_WORD2=13 +val SCE_LUA_WORD3=14 +val SCE_LUA_WORD4=15 +val SCE_LUA_WORD5=16 +val SCE_LUA_WORD6=17 +val SCE_LUA_WORD7=18 +val SCE_LUA_WORD8=19 +# Lexical states for SCLEX_ERRORLIST +lex ErrorList=SCLEX_ERRORLIST SCE_ERR_ +val SCE_ERR_DEFAULT=0 +val SCE_ERR_PYTHON=1 +val SCE_ERR_GCC=2 +val SCE_ERR_MS=3 +val SCE_ERR_CMD=4 +val SCE_ERR_BORLAND=5 +val SCE_ERR_PERL=6 +val SCE_ERR_NET=7 +val SCE_ERR_LUA=8 +val SCE_ERR_CTAG=9 +val SCE_ERR_DIFF_CHANGED=10 +val SCE_ERR_DIFF_ADDITION=11 +val SCE_ERR_DIFF_DELETION=12 +val SCE_ERR_DIFF_MESSAGE=13 +val SCE_ERR_PHP=14 +val SCE_ERR_ELF=15 +val SCE_ERR_IFC=16 +val SCE_ERR_IFORT=17 +val SCE_ERR_ABSF=18 +val SCE_ERR_TIDY=19 +val SCE_ERR_JAVA_STACK=20 +# Lexical states for SCLEX_BATCH +lex Batch=SCLEX_BATCH SCE_BAT_ +val SCE_BAT_DEFAULT=0 +val SCE_BAT_COMMENT=1 +val SCE_BAT_WORD=2 +val SCE_BAT_LABEL=3 +val SCE_BAT_HIDE=4 +val SCE_BAT_COMMAND=5 +val SCE_BAT_IDENTIFIER=6 +val SCE_BAT_OPERATOR=7 +# Lexical states for SCLEX_MAKEFILE +lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_ +val SCE_MAKE_DEFAULT=0 +val SCE_MAKE_COMMENT=1 +val SCE_MAKE_PREPROCESSOR=2 +val SCE_MAKE_IDENTIFIER=3 +val SCE_MAKE_OPERATOR=4 +val SCE_MAKE_TARGET=5 +val SCE_MAKE_IDEOL=9 +# Lexical states for SCLEX_DIFF +lex Diff=SCLEX_DIFF SCE_DIFF_ +val SCE_DIFF_DEFAULT=0 +val SCE_DIFF_COMMENT=1 +val SCE_DIFF_COMMAND=2 +val SCE_DIFF_HEADER=3 +val SCE_DIFF_POSITION=4 +val SCE_DIFF_DELETED=5 +val SCE_DIFF_ADDED=6 +# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) +lex Conf=SCLEX_CONF SCE_CONF_ +val SCE_CONF_DEFAULT=0 +val SCE_CONF_COMMENT=1 +val SCE_CONF_NUMBER=2 +val SCE_CONF_IDENTIFIER=3 +val SCE_CONF_EXTENSION=4 +val SCE_CONF_PARAMETER=5 +val SCE_CONF_STRING=6 +val SCE_CONF_OPERATOR=7 +val SCE_CONF_IP=8 +val SCE_CONF_DIRECTIVE=9 +# Lexical states for SCLEX_AVE, Avenue +lex Avenue=SCLEX_AVE SCE_AVE_ +val SCE_AVE_DEFAULT=0 +val SCE_AVE_COMMENT=1 +val SCE_AVE_NUMBER=2 +val SCE_AVE_WORD=3 +val SCE_AVE_STRING=6 +val SCE_AVE_ENUM=7 +val SCE_AVE_STRINGEOL=8 +val SCE_AVE_IDENTIFIER=9 +val SCE_AVE_OPERATOR=10 +val SCE_AVE_WORD1=11 +val SCE_AVE_WORD2=12 +val SCE_AVE_WORD3=13 +val SCE_AVE_WORD4=14 +val SCE_AVE_WORD5=15 +val SCE_AVE_WORD6=16 +# Lexical states for SCLEX_ADA +lex Ada=SCLEX_ADA SCE_ADA_ +val SCE_ADA_DEFAULT=0 +val SCE_ADA_WORD=1 +val SCE_ADA_IDENTIFIER=2 +val SCE_ADA_NUMBER=3 +val SCE_ADA_DELIMITER=4 +val SCE_ADA_CHARACTER=5 +val SCE_ADA_CHARACTEREOL=6 +val SCE_ADA_STRING=7 +val SCE_ADA_STRINGEOL=8 +val SCE_ADA_LABEL=9 +val SCE_ADA_COMMENTLINE=10 +val SCE_ADA_ILLEGAL=11 +# Lexical states for SCLEX_BAAN +lex Baan=SCLEX_BAAN SCE_BAAN_ +val SCE_BAAN_DEFAULT=0 +val SCE_BAAN_COMMENT=1 +val SCE_BAAN_COMMENTDOC=2 +val SCE_BAAN_NUMBER=3 +val SCE_BAAN_WORD=4 +val SCE_BAAN_STRING=5 +val SCE_BAAN_PREPROCESSOR=6 +val SCE_BAAN_OPERATOR=7 +val SCE_BAAN_IDENTIFIER=8 +val SCE_BAAN_STRINGEOL=9 +val SCE_BAAN_WORD2=10 +# Lexical states for SCLEX_LISP +lex Lisp=SCLEX_LISP SCE_LISP_ +val SCE_LISP_DEFAULT=0 +val SCE_LISP_COMMENT=1 +val SCE_LISP_NUMBER=2 +val SCE_LISP_KEYWORD=3 +val SCE_LISP_KEYWORD_KW=4 +val SCE_LISP_SYMBOL=5 +val SCE_LISP_STRING=6 +val SCE_LISP_STRINGEOL=8 +val SCE_LISP_IDENTIFIER=9 +val SCE_LISP_OPERATOR=10 +val SCE_LISP_SPECIAL=11 +val SCE_LISP_MULTI_COMMENT=12 +# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW +lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_ +lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_ +val SCE_EIFFEL_DEFAULT=0 +val SCE_EIFFEL_COMMENTLINE=1 +val SCE_EIFFEL_NUMBER=2 +val SCE_EIFFEL_WORD=3 +val SCE_EIFFEL_STRING=4 +val SCE_EIFFEL_CHARACTER=5 +val SCE_EIFFEL_OPERATOR=6 +val SCE_EIFFEL_IDENTIFIER=7 +val SCE_EIFFEL_STRINGEOL=8 +# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) +lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_ +val SCE_NNCRONTAB_DEFAULT=0 +val SCE_NNCRONTAB_COMMENT=1 +val SCE_NNCRONTAB_TASK=2 +val SCE_NNCRONTAB_SECTION=3 +val SCE_NNCRONTAB_KEYWORD=4 +val SCE_NNCRONTAB_MODIFIER=5 +val SCE_NNCRONTAB_ASTERISK=6 +val SCE_NNCRONTAB_NUMBER=7 +val SCE_NNCRONTAB_STRING=8 +val SCE_NNCRONTAB_ENVIRONMENT=9 +val SCE_NNCRONTAB_IDENTIFIER=10 +# Lexical states for SCLEX_FORTH (Forth Lexer) +lex Forth=SCLEX_FORTH SCE_FORTH_ +val SCE_FORTH_DEFAULT=0 +val SCE_FORTH_COMMENT=1 +val SCE_FORTH_COMMENT_ML=2 +val SCE_FORTH_IDENTIFIER=3 +val SCE_FORTH_CONTROL=4 +val SCE_FORTH_KEYWORD=5 +val SCE_FORTH_DEFWORD=6 +val SCE_FORTH_PREWORD1=7 +val SCE_FORTH_PREWORD2=8 +val SCE_FORTH_NUMBER=9 +val SCE_FORTH_STRING=10 +val SCE_FORTH_LOCALE=11 +# Lexical states for SCLEX_MATLAB +lex MatLab=SCLEX_MATLAB SCE_MATLAB_ +val SCE_MATLAB_DEFAULT=0 +val SCE_MATLAB_COMMENT=1 +val SCE_MATLAB_COMMAND=2 +val SCE_MATLAB_NUMBER=3 +val SCE_MATLAB_KEYWORD=4 +# single quoted string +val SCE_MATLAB_STRING=5 +val SCE_MATLAB_OPERATOR=6 +val SCE_MATLAB_IDENTIFIER=7 +val SCE_MATLAB_DOUBLEQUOTESTRING=8 +# Lexical states for SCLEX_SCRIPTOL +lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_ +val SCE_SCRIPTOL_DEFAULT=0 +val SCE_SCRIPTOL_WHITE=1 +val SCE_SCRIPTOL_COMMENTLINE=2 +val SCE_SCRIPTOL_PERSISTENT=3 +val SCE_SCRIPTOL_CSTYLE=4 +val SCE_SCRIPTOL_COMMENTBLOCK=5 +val SCE_SCRIPTOL_NUMBER=6 +val SCE_SCRIPTOL_STRING=7 +val SCE_SCRIPTOL_CHARACTER=8 +val SCE_SCRIPTOL_STRINGEOL=9 +val SCE_SCRIPTOL_KEYWORD=10 +val SCE_SCRIPTOL_OPERATOR=11 +val SCE_SCRIPTOL_IDENTIFIER=12 +val SCE_SCRIPTOL_TRIPLE=13 +val SCE_SCRIPTOL_CLASSNAME=14 +val SCE_SCRIPTOL_PREPROCESSOR=15 +# Lexical states for SCLEX_ASM +lex Asm=SCLEX_ASM SCE_ASM_ +val SCE_ASM_DEFAULT=0 +val SCE_ASM_COMMENT=1 +val SCE_ASM_NUMBER=2 +val SCE_ASM_STRING=3 +val SCE_ASM_OPERATOR=4 +val SCE_ASM_IDENTIFIER=5 +val SCE_ASM_CPUINSTRUCTION=6 +val SCE_ASM_MATHINSTRUCTION=7 +val SCE_ASM_REGISTER=8 +val SCE_ASM_DIRECTIVE=9 +val SCE_ASM_DIRECTIVEOPERAND=10 +val SCE_ASM_COMMENTBLOCK=11 +val SCE_ASM_CHARACTER=12 +val SCE_ASM_STRINGEOL=13 +val SCE_ASM_EXTINSTRUCTION=14 +# Lexical states for SCLEX_FORTRAN +lex Fortran=SCLEX_FORTRAN SCE_F_ +lex F77=SCLEX_F77 SCE_F_ +val SCE_F_DEFAULT=0 +val SCE_F_COMMENT=1 +val SCE_F_NUMBER=2 +val SCE_F_STRING1=3 +val SCE_F_STRING2=4 +val SCE_F_STRINGEOL=5 +val SCE_F_OPERATOR=6 +val SCE_F_IDENTIFIER=7 +val SCE_F_WORD=8 +val SCE_F_WORD2=9 +val SCE_F_WORD3=10 +val SCE_F_PREPROCESSOR=11 +val SCE_F_OPERATOR2=12 +val SCE_F_LABEL=13 +val SCE_F_CONTINUATION=14 +# Lexical states for SCLEX_CSS +lex CSS=SCLEX_CSS SCE_CSS_ +val SCE_CSS_DEFAULT=0 +val SCE_CSS_TAG=1 +val SCE_CSS_CLASS=2 +val SCE_CSS_PSEUDOCLASS=3 +val SCE_CSS_UNKNOWN_PSEUDOCLASS=4 +val SCE_CSS_OPERATOR=5 +val SCE_CSS_IDENTIFIER=6 +val SCE_CSS_UNKNOWN_IDENTIFIER=7 +val SCE_CSS_VALUE=8 +val SCE_CSS_COMMENT=9 +val SCE_CSS_ID=10 +val SCE_CSS_IMPORTANT=11 +val SCE_CSS_DIRECTIVE=12 +val SCE_CSS_DOUBLESTRING=13 +val SCE_CSS_SINGLESTRING=14 +val SCE_CSS_IDENTIFIER2=15 +val SCE_CSS_ATTRIBUTE=16 +# Lexical states for SCLEX_POV +lex POV=SCLEX_POV SCE_POV_ +val SCE_POV_DEFAULT=0 +val SCE_POV_COMMENT=1 +val SCE_POV_COMMENTLINE=2 +val SCE_POV_NUMBER=3 +val SCE_POV_OPERATOR=4 +val SCE_POV_IDENTIFIER=5 +val SCE_POV_STRING=6 +val SCE_POV_STRINGEOL=7 +val SCE_POV_DIRECTIVE=8 +val SCE_POV_BADDIRECTIVE=9 +val SCE_POV_WORD2=10 +val SCE_POV_WORD3=11 +val SCE_POV_WORD4=12 +val SCE_POV_WORD5=13 +val SCE_POV_WORD6=14 +val SCE_POV_WORD7=15 +val SCE_POV_WORD8=16 +# Lexical states for SCLEX_LOUT +lex LOUT=SCLEX_LOUT SCE_LOUT_ +val SCE_LOUT_DEFAULT=0 +val SCE_LOUT_COMMENT=1 +val SCE_LOUT_NUMBER=2 +val SCE_LOUT_WORD=3 +val SCE_LOUT_WORD2=4 +val SCE_LOUT_WORD3=5 +val SCE_LOUT_WORD4=6 +val SCE_LOUT_STRING=7 +val SCE_LOUT_OPERATOR=8 +val SCE_LOUT_IDENTIFIER=9 +val SCE_LOUT_STRINGEOL=10 +# Lexical states for SCLEX_ESCRIPT +lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_ +val SCE_ESCRIPT_DEFAULT=0 +val SCE_ESCRIPT_COMMENT=1 +val SCE_ESCRIPT_COMMENTLINE=2 +val SCE_ESCRIPT_COMMENTDOC=3 +val SCE_ESCRIPT_NUMBER=4 +val SCE_ESCRIPT_WORD=5 +val SCE_ESCRIPT_STRING=6 +val SCE_ESCRIPT_OPERATOR=7 +val SCE_ESCRIPT_IDENTIFIER=8 +val SCE_ESCRIPT_BRACE=9 +val SCE_ESCRIPT_WORD2=10 +val SCE_ESCRIPT_WORD3=11 +# Lexical states for SCLEX_PS +lex PS=SCLEX_PS SCE_PS_ +val SCE_PS_DEFAULT=0 +val SCE_PS_COMMENT=1 +val SCE_PS_DSC_COMMENT=2 +val SCE_PS_DSC_VALUE=3 +val SCE_PS_NUMBER=4 +val SCE_PS_NAME=5 +val SCE_PS_KEYWORD=6 +val SCE_PS_LITERAL=7 +val SCE_PS_IMMEVAL=8 +val SCE_PS_PAREN_ARRAY=9 +val SCE_PS_PAREN_DICT=10 +val SCE_PS_PAREN_PROC=11 +val SCE_PS_TEXT=12 +val SCE_PS_HEXSTRING=13 +val SCE_PS_BASE85STRING=14 +val SCE_PS_BADSTRINGCHAR=15 +# Lexical states for SCLEX_NSIS +lex NSIS=SCLEX_NSIS SCE_NSIS_ +val SCE_NSIS_DEFAULT=0 +val SCE_NSIS_COMMENT=1 +val SCE_NSIS_STRINGDQ=2 +val SCE_NSIS_STRINGLQ=3 +val SCE_NSIS_STRINGRQ=4 +val SCE_NSIS_FUNCTION=5 +val SCE_NSIS_VARIABLE=6 +val SCE_NSIS_LABEL=7 +val SCE_NSIS_USERDEFINED=8 +val SCE_NSIS_SECTIONDEF=9 +val SCE_NSIS_SUBSECTIONDEF=10 +val SCE_NSIS_IFDEFINEDEF=11 +val SCE_NSIS_MACRODEF=12 +val SCE_NSIS_STRINGVAR=13 +val SCE_NSIS_NUMBER=14 +val SCE_NSIS_SECTIONGROUP=15 +val SCE_NSIS_PAGEEX=16 +val SCE_NSIS_FUNCTIONDEF=17 +val SCE_NSIS_COMMENTBOX=18 +# Lexical states for SCLEX_MMIXAL +lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_ +val SCE_MMIXAL_LEADWS=0 +val SCE_MMIXAL_COMMENT=1 +val SCE_MMIXAL_LABEL=2 +val SCE_MMIXAL_OPCODE=3 +val SCE_MMIXAL_OPCODE_PRE=4 +val SCE_MMIXAL_OPCODE_VALID=5 +val SCE_MMIXAL_OPCODE_UNKNOWN=6 +val SCE_MMIXAL_OPCODE_POST=7 +val SCE_MMIXAL_OPERANDS=8 +val SCE_MMIXAL_NUMBER=9 +val SCE_MMIXAL_REF=10 +val SCE_MMIXAL_CHAR=11 +val SCE_MMIXAL_STRING=12 +val SCE_MMIXAL_REGISTER=13 +val SCE_MMIXAL_HEX=14 +val SCE_MMIXAL_OPERATOR=15 +val SCE_MMIXAL_SYMBOL=16 +val SCE_MMIXAL_INCLUDE=17 +# Lexical states for SCLEX_CLW +lex Clarion=SCLEX_CLW SCE_CLW_ +val SCE_CLW_DEFAULT=0 +val SCE_CLW_LABEL=1 +val SCE_CLW_COMMENT=2 +val SCE_CLW_STRING=3 +val SCE_CLW_USER_IDENTIFIER=4 +val SCE_CLW_INTEGER_CONSTANT=5 +val SCE_CLW_REAL_CONSTANT=6 +val SCE_CLW_PICTURE_STRING=7 +val SCE_CLW_KEYWORD=8 +val SCE_CLW_COMPILER_DIRECTIVE=9 +val SCE_CLW_RUNTIME_EXPRESSIONS=10 +val SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11 +val SCE_CLW_STRUCTURE_DATA_TYPE=12 +val SCE_CLW_ATTRIBUTE=13 +val SCE_CLW_STANDARD_EQUATE=14 +val SCE_CLW_ERROR=15 +val SCE_CLW_DEPRECATED=16 +# Lexical states for SCLEX_LOT +lex LOT=SCLEX_LOT SCE_LOT_ +val SCE_LOT_DEFAULT=0 +val SCE_LOT_HEADER=1 +val SCE_LOT_BREAK=2 +val SCE_LOT_SET=3 +val SCE_LOT_PASS=4 +val SCE_LOT_FAIL=5 +val SCE_LOT_ABORT=6 +# Lexical states for SCLEX_YAML +lex YAML=SCLEX_YAML SCE_YAML_ +val SCE_YAML_DEFAULT=0 +val SCE_YAML_COMMENT=1 +val SCE_YAML_IDENTIFIER=2 +val SCE_YAML_KEYWORD=3 +val SCE_YAML_NUMBER=4 +val SCE_YAML_REFERENCE=5 +val SCE_YAML_DOCUMENT=6 +val SCE_YAML_TEXT=7 +val SCE_YAML_ERROR=8 +# Lexical states for SCLEX_TEX +lex TeX=SCLEX_TEX SCE_TEX_ +val SCE_TEX_DEFAULT=0 +val SCE_TEX_SPECIAL=1 +val SCE_TEX_GROUP=2 +val SCE_TEX_SYMBOL=3 +val SCE_TEX_COMMAND=4 +val SCE_TEX_TEXT=5 +lex Metapost=SCLEX_METAPOST SCE_METAPOST_ +val SCE_METAPOST_DEFAULT=0 +val SCE_METAPOST_SPECIAL=1 +val SCE_METAPOST_GROUP=2 +val SCE_METAPOST_SYMBOL=3 +val SCE_METAPOST_COMMAND=4 +val SCE_METAPOST_TEXT=5 +val SCE_METAPOST_EXTRA=6 +# Lexical states for SCLEX_ERLANG +lex Erlang=SCLEX_ERLANG SCE_ERLANG_ +val SCE_ERLANG_DEFAULT=0 +val SCE_ERLANG_COMMENT=1 +val SCE_ERLANG_VARIABLE=2 +val SCE_ERLANG_NUMBER=3 +val SCE_ERLANG_KEYWORD=4 +val SCE_ERLANG_STRING=5 +val SCE_ERLANG_OPERATOR=6 +val SCE_ERLANG_ATOM=7 +val SCE_ERLANG_FUNCTION_NAME=8 +val SCE_ERLANG_CHARACTER=9 +val SCE_ERLANG_MACRO=10 +val SCE_ERLANG_RECORD=11 +val SCE_ERLANG_SEPARATOR=12 +val SCE_ERLANG_NODE_NAME=13 +val SCE_ERLANG_UNKNOWN=31 +# Lexical states for SCLEX_OCTAVE are identical to MatLab +lex Octave=SCLEX_OCTAVE SCE_MATLAB_ +# Lexical states for SCLEX_MSSQL +lex MSSQL=SCLEX_MSSQL SCE_MSSQL_ +val SCE_MSSQL_DEFAULT=0 +val SCE_MSSQL_COMMENT=1 +val SCE_MSSQL_LINE_COMMENT=2 +val SCE_MSSQL_NUMBER=3 +val SCE_MSSQL_STRING=4 +val SCE_MSSQL_OPERATOR=5 +val SCE_MSSQL_IDENTIFIER=6 +val SCE_MSSQL_VARIABLE=7 +val SCE_MSSQL_COLUMN_NAME=8 +val SCE_MSSQL_STATEMENT=9 +val SCE_MSSQL_DATATYPE=10 +val SCE_MSSQL_SYSTABLE=11 +val SCE_MSSQL_GLOBAL_VARIABLE=12 +val SCE_MSSQL_FUNCTION=13 +val SCE_MSSQL_STORED_PROCEDURE=14 +val SCE_MSSQL_DEFAULT_PREF_DATATYPE=15 +val SCE_MSSQL_COLUMN_NAME_2=16 +# Lexical states for SCLEX_VERILOG +lex Verilog=SCLEX_VERILOG SCE_V_ +val SCE_V_DEFAULT=0 +val SCE_V_COMMENT=1 +val SCE_V_COMMENTLINE=2 +val SCE_V_COMMENTLINEBANG=3 +val SCE_V_NUMBER=4 +val SCE_V_WORD=5 +val SCE_V_STRING=6 +val SCE_V_WORD2=7 +val SCE_V_WORD3=8 +val SCE_V_PREPROCESSOR=9 +val SCE_V_OPERATOR=10 +val SCE_V_IDENTIFIER=11 +val SCE_V_STRINGEOL=12 +val SCE_V_USER=19 +# Lexical states for SCLEX_KIX +lex Kix=SCLEX_KIX SCE_KIX_ +val SCE_KIX_DEFAULT=0 +val SCE_KIX_COMMENT=1 +val SCE_KIX_STRING1=2 +val SCE_KIX_STRING2=3 +val SCE_KIX_NUMBER=4 +val SCE_KIX_VAR=5 +val SCE_KIX_MACRO=6 +val SCE_KIX_KEYWORD=7 +val SCE_KIX_FUNCTIONS=8 +val SCE_KIX_OPERATOR=9 +val SCE_KIX_IDENTIFIER=31 +# Lexical states for SCLEX_GUI4CLI +val SCE_GC_DEFAULT=0 +val SCE_GC_COMMENTLINE=1 +val SCE_GC_COMMENTBLOCK=2 +val SCE_GC_GLOBAL=3 +val SCE_GC_EVENT=4 +val SCE_GC_ATTRIBUTE=5 +val SCE_GC_CONTROL=6 +val SCE_GC_COMMAND=7 +val SCE_GC_STRING=8 +val SCE_GC_OPERATOR=9 +# Lexical states for SCLEX_SPECMAN +lex Specman=SCLEX_SPECMAN SCE_SN_ +val SCE_SN_DEFAULT=0 +val SCE_SN_CODE=1 +val SCE_SN_COMMENTLINE=2 +val SCE_SN_COMMENTLINEBANG=3 +val SCE_SN_NUMBER=4 +val SCE_SN_WORD=5 +val SCE_SN_STRING=6 +val SCE_SN_WORD2=7 +val SCE_SN_WORD3=8 +val SCE_SN_PREPROCESSOR=9 +val SCE_SN_OPERATOR=10 +val SCE_SN_IDENTIFIER=11 +val SCE_SN_STRINGEOL=12 +val SCE_SN_REGEXTAG=13 +val SCE_SN_SIGNAL=14 +val SCE_SN_USER=19 +# Lexical states for SCLEX_AU3 +lex Au3=SCLEX_AU3 SCE_AU3_ +val SCE_AU3_DEFAULT=0 +val SCE_AU3_COMMENT=1 +val SCE_AU3_COMMENTBLOCK=2 +val SCE_AU3_NUMBER=3 +val SCE_AU3_FUNCTION=4 +val SCE_AU3_KEYWORD=5 +val SCE_AU3_MACRO=6 +val SCE_AU3_STRING=7 +val SCE_AU3_OPERATOR=8 +val SCE_AU3_VARIABLE=9 +val SCE_AU3_SENT=10 +val SCE_AU3_PREPROCESSOR=11 +val SCE_AU3_SPECIAL=12 +val SCE_AU3_EXPAND=13 +val SCE_AU3_COMOBJ=14 +val SCE_AU3_UDF=15 +# Lexical states for SCLEX_APDL +lex APDL=SCLEX_APDL SCE_APDL_ +val SCE_APDL_DEFAULT=0 +val SCE_APDL_COMMENT=1 +val SCE_APDL_COMMENTBLOCK=2 +val SCE_APDL_NUMBER=3 +val SCE_APDL_STRING=4 +val SCE_APDL_OPERATOR=5 +val SCE_APDL_WORD=6 +val SCE_APDL_PROCESSOR=7 +val SCE_APDL_COMMAND=8 +val SCE_APDL_SLASHCOMMAND=9 +val SCE_APDL_STARCOMMAND=10 +val SCE_APDL_ARGUMENT=11 +val SCE_APDL_FUNCTION=12 +# Lexical states for SCLEX_BASH +lex Bash=SCLEX_BASH SCE_SH_ +val SCE_SH_DEFAULT=0 +val SCE_SH_ERROR=1 +val SCE_SH_COMMENTLINE=2 +val SCE_SH_NUMBER=3 +val SCE_SH_WORD=4 +val SCE_SH_STRING=5 +val SCE_SH_CHARACTER=6 +val SCE_SH_OPERATOR=7 +val SCE_SH_IDENTIFIER=8 +val SCE_SH_SCALAR=9 +val SCE_SH_PARAM=10 +val SCE_SH_BACKTICKS=11 +val SCE_SH_HERE_DELIM=12 +val SCE_SH_HERE_Q=13 +# Lexical states for SCLEX_ASN1 +lex Asn1=SCLEX_ASN1 SCE_ASN1_ +val SCE_ASN1_DEFAULT=0 +val SCE_ASN1_COMMENT=1 +val SCE_ASN1_IDENTIFIER=2 +val SCE_ASN1_STRING=3 +val SCE_ASN1_OID=4 +val SCE_ASN1_SCALAR=5 +val SCE_ASN1_KEYWORD=6 +val SCE_ASN1_ATTRIBUTE=7 +val SCE_ASN1_DESCRIPTOR=8 +val SCE_ASN1_TYPE=9 +val SCE_ASN1_OPERATOR=10 +# Lexical states for SCLEX_VHDL +lex VHDL=SCLEX_VHDL SCE_VHDL_ +val SCE_VHDL_DEFAULT=0 +val SCE_VHDL_COMMENT=1 +val SCE_VHDL_COMMENTLINEBANG=2 +val SCE_VHDL_NUMBER=3 +val SCE_VHDL_STRING=4 +val SCE_VHDL_OPERATOR=5 +val SCE_VHDL_IDENTIFIER=6 +val SCE_VHDL_STRINGEOL=7 +val SCE_VHDL_KEYWORD=8 +val SCE_VHDL_STDOPERATOR=9 +val SCE_VHDL_ATTRIBUTE=10 +val SCE_VHDL_STDFUNCTION=11 +val SCE_VHDL_STDPACKAGE=12 +val SCE_VHDL_STDTYPE=13 +val SCE_VHDL_USERWORD=14 +# Lexical states for SCLEX_CAML +lex Caml=SCLEX_CAML SCE_CAML_ +val SCE_CAML_DEFAULT=0 +val SCE_CAML_IDENTIFIER=1 +val SCE_CAML_TAGNAME=2 +val SCE_CAML_KEYWORD=3 +val SCE_CAML_KEYWORD2=4 +val SCE_CAML_KEYWORD3=5 +val SCE_CAML_LINENUM=6 +val SCE_CAML_OPERATOR=7 +val SCE_CAML_NUMBER=8 +val SCE_CAML_CHAR=9 +val SCE_CAML_STRING=11 +val SCE_CAML_COMMENT=12 +val SCE_CAML_COMMENT1=13 +val SCE_CAML_COMMENT2=14 +val SCE_CAML_COMMENT3=15 +# Lexical states for SCLEX_HASKELL +lex Haskell=SCLEX_HASKELL SCE_HA_ +val SCE_HA_DEFAULT=0 +val SCE_HA_IDENTIFIER=1 +val SCE_HA_KEYWORD=2 +val SCE_HA_NUMBER=3 +val SCE_HA_STRING=4 +val SCE_HA_CHARACTER=5 +val SCE_HA_CLASS=6 +val SCE_HA_MODULE=7 +val SCE_HA_CAPITAL=8 +val SCE_HA_DATA=9 +val SCE_HA_IMPORT=10 +val SCE_HA_OPERATOR=11 +val SCE_HA_INSTANCE=12 +val SCE_HA_COMMENTLINE=13 +val SCE_HA_COMMENTBLOCK=14 +val SCE_HA_COMMENTBLOCK2=15 +val SCE_HA_COMMENTBLOCK3=16 +# Lexical states of SCLEX_TADS3 +lex TADS3=SCLEX_TADS3 SCE_T3_ +val SCE_T3_DEFAULT=0 +val SCE_T3_X_DEFAULT=1 +val SCE_T3_PREPROCESSOR=2 +val SCE_T3_BLOCK_COMMENT=3 +val SCE_T3_LINE_COMMENT=4 +val SCE_T3_OPERATOR=5 +val SCE_T3_KEYWORD=6 +val SCE_T3_NUMBER=7 +val SCE_T3_IDENTIFIER=8 +val SCE_T3_S_STRING=9 +val SCE_T3_D_STRING=10 +val SCE_T3_X_STRING=11 +val SCE_T3_LIB_DIRECTIVE=12 +val SCE_T3_MSG_PARAM=13 +val SCE_T3_HTML_TAG=14 +val SCE_T3_HTML_DEFAULT=15 +val SCE_T3_HTML_STRING=16 +val SCE_T3_USER1=17 +val SCE_T3_USER2=18 +val SCE_T3_USER3=19 +val SCE_T3_BRACE=20 +# Lexical states for SCLEX_REBOL +lex Rebol=SCLEX_REBOL SCE_REBOL_ +val SCE_REBOL_DEFAULT=0 +val SCE_REBOL_COMMENTLINE=1 +val SCE_REBOL_COMMENTBLOCK=2 +val SCE_REBOL_PREFACE=3 +val SCE_REBOL_OPERATOR=4 +val SCE_REBOL_CHARACTER=5 +val SCE_REBOL_QUOTEDSTRING=6 +val SCE_REBOL_BRACEDSTRING=7 +val SCE_REBOL_NUMBER=8 +val SCE_REBOL_PAIR=9 +val SCE_REBOL_TUPLE=10 +val SCE_REBOL_BINARY=11 +val SCE_REBOL_MONEY=12 +val SCE_REBOL_ISSUE=13 +val SCE_REBOL_TAG=14 +val SCE_REBOL_FILE=15 +val SCE_REBOL_EMAIL=16 +val SCE_REBOL_URL=17 +val SCE_REBOL_DATE=18 +val SCE_REBOL_TIME=19 +val SCE_REBOL_IDENTIFIER=20 +val SCE_REBOL_WORD=21 +val SCE_REBOL_WORD2=22 +val SCE_REBOL_WORD3=23 +val SCE_REBOL_WORD4=24 +val SCE_REBOL_WORD5=25 +val SCE_REBOL_WORD6=26 +val SCE_REBOL_WORD7=27 +val SCE_REBOL_WORD8=28 +# Lexical states for SCLEX_SQL +lex SQL=SCLEX_SQL SCE_SQL_ +val SCE_SQL_DEFAULT=0 +val SCE_SQL_COMMENT=1 +val SCE_SQL_COMMENTLINE=2 +val SCE_SQL_COMMENTDOC=3 +val SCE_SQL_NUMBER=4 +val SCE_SQL_WORD=5 +val SCE_SQL_STRING=6 +val SCE_SQL_CHARACTER=7 +val SCE_SQL_SQLPLUS=8 +val SCE_SQL_SQLPLUS_PROMPT=9 +val SCE_SQL_OPERATOR=10 +val SCE_SQL_IDENTIFIER=11 +val SCE_SQL_SQLPLUS_COMMENT=13 +val SCE_SQL_COMMENTLINEDOC=15 +val SCE_SQL_WORD2=16 +val SCE_SQL_COMMENTDOCKEYWORD=17 +val SCE_SQL_COMMENTDOCKEYWORDERROR=18 +val SCE_SQL_USER1=19 +val SCE_SQL_USER2=20 +val SCE_SQL_USER3=21 +val SCE_SQL_USER4=22 +val SCE_SQL_QUOTEDIDENTIFIER=23 +# Lexical states for SCLEX_SMALLTALK +lex Smalltalk=SCLEX_SMALLTALK SCE_ST_ +val SCE_ST_DEFAULT=0 +val SCE_ST_STRING=1 +val SCE_ST_NUMBER=2 +val SCE_ST_COMMENT=3 +val SCE_ST_SYMBOL=4 +val SCE_ST_BINARY=5 +val SCE_ST_BOOL=6 +val SCE_ST_SELF=7 +val SCE_ST_SUPER=8 +val SCE_ST_NIL=9 +val SCE_ST_GLOBAL=10 +val SCE_ST_RETURN=11 +val SCE_ST_SPECIAL=12 +val SCE_ST_KWSEND=13 +val SCE_ST_ASSIGN=14 +val SCE_ST_CHARACTER=15 +val SCE_ST_SPEC_SEL=16 +# Lexical states for SCLEX_FLAGSHIP (clipper) +lex FlagShip=SCLEX_FLAGSHIP SCE_B_ +val SCE_FS_DEFAULT=0 +val SCE_FS_COMMENT=1 +val SCE_FS_COMMENTLINE=2 +val SCE_FS_COMMENTDOC=3 +val SCE_FS_COMMENTLINEDOC=4 +val SCE_FS_COMMENTDOCKEYWORD=5 +val SCE_FS_COMMENTDOCKEYWORDERROR=6 +val SCE_FS_KEYWORD=7 +val SCE_FS_KEYWORD2=8 +val SCE_FS_KEYWORD3=9 +val SCE_FS_KEYWORD4=10 +val SCE_FS_NUMBER=11 +val SCE_FS_STRING=12 +val SCE_FS_PREPROCESSOR=13 +val SCE_FS_OPERATOR=14 +val SCE_FS_IDENTIFIER=15 +val SCE_FS_DATE=16 +val SCE_FS_STRINGEOL=17 +val SCE_FS_CONSTANT=18 +val SCE_FS_ASM=19 +val SCE_FS_LABEL=20 +val SCE_FS_ERROR=21 +val SCE_FS_HEXNUMBER=22 +val SCE_FS_BINNUMBER=23 +# Lexical states for SCLEX_CSOUND +lex Csound=SCLEX_CSOUND SCE_CSOUND_ +val SCE_CSOUND_DEFAULT=0 +val SCE_CSOUND_COMMENT=1 +val SCE_CSOUND_NUMBER=2 +val SCE_CSOUND_OPERATOR=3 +val SCE_CSOUND_INSTR=4 +val SCE_CSOUND_IDENTIFIER=5 +val SCE_CSOUND_OPCODE=6 +val SCE_CSOUND_HEADERSTMT=7 +val SCE_CSOUND_USERKEYWORD=8 +val SCE_CSOUND_COMMENTBLOCK=9 +val SCE_CSOUND_PARAM=10 +val SCE_CSOUND_ARATE_VAR=11 +val SCE_CSOUND_KRATE_VAR=12 +val SCE_CSOUND_IRATE_VAR=13 +val SCE_CSOUND_GLOBAL_VAR=14 +val SCE_CSOUND_STRINGEOL=15 +# Lexical states for SCLEX_INNOSETUP +lex Inno=SCLEX_INNOSETUP SCE_INNO_ +val SCE_INNO_DEFAULT=0 +val SCE_INNO_COMMENT=1 +val SCE_INNO_KEYWORD=2 +val SCE_INNO_PARAMETER=3 +val SCE_INNO_SECTION=4 +val SCE_INNO_PREPROC=5 +val SCE_INNO_PREPROC_INLINE=6 +val SCE_INNO_COMMENT_PASCAL=7 +val SCE_INNO_KEYWORD_PASCAL=8 +val SCE_INNO_KEYWORD_USER=9 +val SCE_INNO_STRING_DOUBLE=10 +val SCE_INNO_STRING_SINGLE=11 +val SCE_INNO_IDENTIFIER=12 +# Lexical states for SCLEX_OPAL +lex Opal=SCLEX_OPAL SCE_OPAL_ +val SCE_OPAL_SPACE=0 +val SCE_OPAL_COMMENT_BLOCK=1 +val SCE_OPAL_COMMENT_LINE=2 +val SCE_OPAL_INTEGER=3 +val SCE_OPAL_KEYWORD=4 +val SCE_OPAL_SORT=5 +val SCE_OPAL_STRING=6 +val SCE_OPAL_PAR=7 +val SCE_OPAL_BOOL_CONST=8 +val SCE_OPAL_DEFAULT=32 +# Lexical states for SCLEX_SPICE +lex Spice=SCLEX_SPICE SCE_SPICE_ +val SCE_SPICE_DEFAULT=0 +val SCE_SPICE_IDENTIFIER=1 +val SCE_SPICE_KEYWORD=2 +val SCE_SPICE_KEYWORD2=3 +val SCE_SPICE_KEYWORD3=4 +val SCE_SPICE_NUMBER=5 +val SCE_SPICE_DELIMITER=6 +val SCE_SPICE_VALUE=7 +val SCE_SPICE_COMMENTLINE=8 +# Lexical states for SCLEX_CMAKE +lex CMAKE=SCLEX_CMAKE SCE_CMAKE_ +val SCE_CMAKE_DEFAULT=0 +val SCE_CMAKE_COMMENT=1 +val SCE_CMAKE_STRINGDQ=2 +val SCE_CMAKE_STRINGLQ=3 +val SCE_CMAKE_STRINGRQ=4 +val SCE_CMAKE_COMMANDS=5 +val SCE_CMAKE_PARAMETERS=6 +val SCE_CMAKE_VARIABLE=7 +val SCE_CMAKE_USERDEFINED=8 +val SCE_CMAKE_WHILEDEF=9 +val SCE_CMAKE_FOREACHDEF=10 +val SCE_CMAKE_IFDEFINEDEF=11 +val SCE_CMAKE_MACRODEF=12 +val SCE_CMAKE_STRINGVAR=13 +val SCE_CMAKE_NUMBER=14 + +# Events + +evt void StyleNeeded=2000(int position) +evt void CharAdded=2001(int ch) +evt void SavePointReached=2002(void) +evt void SavePointLeft=2003(void) +evt void ModifyAttemptRO=2004(void) +# GTK+ Specific to work around focus and accelerator problems: +evt void Key=2005(int ch, int modifiers) +evt void DoubleClick=2006(void) +evt void UpdateUI=2007(void) +evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) +evt void MacroRecord=2009(int message, int wParam, int lParam) +evt void MarginClick=2010(int modifiers, int position, int margin) +evt void NeedShown=2011(int position, int length) +evt void Painted=2013(void) +evt void UserListSelection=2014(int listType, string text) +evt void URIDropped=2015(string text) +evt void DwellStart=2016(int position) +evt void DwellEnd=2017(int position) +evt void Zoom=2018(void) +evt void HotSpotClick=2019(int modifiers, int position) +evt void HotSpotDoubleClick=2020(int modifiers, int position) +evt void CallTipClick=2021(int position) +evt void AutoCSelection=2022(string text) + +cat Deprecated + +# CARET_POLICY changed in 1.47 +fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop) +val CARET_CENTER=0x02 +val CARET_XEVEN=0x08 +val CARET_XJUMPS=0x10 + +# The old name for SCN_UPDATEUI +val SCN_CHECKBRACE=2007 +evt void PosChanged=2012(int position) + +# SCLEX_HTML should be used in preference to these. +val SCLEX_ASP=29 +val SCLEX_PHP=30 diff --git a/scintilla/include/ScintillaWidget.h b/scintilla/include/ScintillaWidget.h new file mode 100644 index 00000000..d9909524 --- /dev/null +++ b/scintilla/include/ScintillaWidget.h @@ -0,0 +1,59 @@ +// Scintilla source code edit control +/** @file ScintillaWidget.h + ** Definition of Scintilla widget for GTK+. + ** Only needed by GTK+ code but is harmless on other platforms. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SCINTILLAWIDGET_H +#define SCINTILLAWIDGET_H + +#if PLAT_GTK + +#ifdef __cplusplus +extern "C" { +#endif + +#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) +#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) +#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) + +typedef struct _ScintillaObject ScintillaObject; +typedef struct _ScintillaClass ScintillaClass; + +struct _ScintillaObject { + GtkContainer cont; + void *pscin; +}; + +struct _ScintillaClass { + GtkContainerClass parent_class; + + void (* command) (ScintillaObject *ttt); + void (* notify) (ScintillaObject *ttt); +}; + +#if GLIB_MAJOR_VERSION < 2 +GtkType scintilla_get_type (void); +#else +GType scintilla_get_type (void); +#endif +GtkWidget* scintilla_new (void); +void scintilla_set_id (ScintillaObject *sci, uptr_t id); +sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); +void scintilla_release_resources(void); + +#if GTK_MAJOR_VERSION < 2 +#define SCINTILLA_NOTIFY "notify" +#else +#define SCINTILLA_NOTIFY "sci-notify" +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +#endif diff --git a/scintilla/include/WindowAccessor.h b/scintilla/include/WindowAccessor.h new file mode 100644 index 00000000..baae30cb --- /dev/null +++ b/scintilla/include/WindowAccessor.h @@ -0,0 +1,57 @@ +// Scintilla source code edit control +/** @file WindowAccessor.h + ** Implementation of BufferAccess and StylingAccess on a Scintilla + ** rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +/** + */ +class WindowAccessor : public Accessor { + // Private so WindowAccessor objects can not be copied + WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {} + WindowAccessor &operator=(const WindowAccessor &) { return *this; } +protected: + WindowID id; + PropSet &props; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + + bool InternalIsLeadByte(char ch); + void Fill(int position); +public: + WindowAccessor(WindowID id_, PropSet &props_) : + Accessor(), id(id_), props(props_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { + } + ~WindowAccessor(); + bool Match(int pos, const char *s); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + char *GetProperties() { + return props.ToString(); + } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); +}; diff --git a/scintilla/src/AutoComplete.cxx b/scintilla/src/AutoComplete.cxx new file mode 100644 index 00000000..83ee0769 --- /dev/null +++ b/scintilla/src/AutoComplete.cxx @@ -0,0 +1,174 @@ +// Scintilla source code edit control +/** @file AutoComplete.cxx + ** Defines the auto completion list box. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "AutoComplete.h" + +AutoComplete::AutoComplete() : + active(false), + separator(' '), + typesep('?'), + ignoreCase(false), + chooseSingle(false), + lb(0), + posStart(0), + startLen(0), + cancelAtStartPos(true), + autoHide(true), + dropRestOfWord(false) { + lb = ListBox::Allocate(); + stopChars[0] = '\0'; + fillUpChars[0] = '\0'; +} + +AutoComplete::~AutoComplete() { + if (lb) { + lb->Destroy(); + delete lb; + lb = 0; + } +} + +bool AutoComplete::Active() { + return active; +} + +void AutoComplete::Start(Window &parent, int ctrlID, + int position, Point location, int startLen_, + int lineHeight, bool unicodeMode) { + if (active) { + Cancel(); + } + lb->Create(parent, ctrlID, location, lineHeight, unicodeMode); + lb->Clear(); + active = true; + startLen = startLen_; + posStart = position; +} + +void AutoComplete::SetStopChars(const char *stopChars_) { + strncpy(stopChars, stopChars_, sizeof(stopChars)); + stopChars[sizeof(stopChars) - 1] = '\0'; +} + +bool AutoComplete::IsStopChar(char ch) { + return ch && strchr(stopChars, ch); +} + +void AutoComplete::SetFillUpChars(const char *fillUpChars_) { + strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars)); + fillUpChars[sizeof(fillUpChars) - 1] = '\0'; +} + +bool AutoComplete::IsFillUpChar(char ch) { + return ch && strchr(fillUpChars, ch); +} + +void AutoComplete::SetSeparator(char separator_) { + separator = separator_; +} + +char AutoComplete::GetSeparator() { + return separator; +} + +void AutoComplete::SetTypesep(char separator_) { + typesep = separator_; +} + +char AutoComplete::GetTypesep() { + return typesep; +} + +void AutoComplete::SetList(const char *list) { + lb->SetList(list, separator, typesep); +} + +void AutoComplete::Show(bool show) { + lb->Show(show); + if (show) + lb->Select(0); +} + +void AutoComplete::Cancel() { + if (lb->Created()) { + lb->Clear(); + lb->Destroy(); + active = false; + } +} + + +void AutoComplete::Move(int delta) { + int count = lb->Length(); + int current = lb->GetSelection(); + current += delta; + if (current >= count) + current = count - 1; + if (current < 0) + current = 0; + lb->Select(current); +} + +void AutoComplete::Select(const char *word) { + size_t lenWord = strlen(word); + int location = -1; + const int maxItemLen=1000; + char item[maxItemLen]; + int start = 0; // lower bound of the api array block to search + int end = lb->Length() - 1; // upper bound of the api array block to search + while ((start <= end) && (location == -1)) { // Binary searching loop + int pivot = (start + end) / 2; + lb->GetValue(pivot, item, maxItemLen); + int cond; + if (ignoreCase) + cond = CompareNCaseInsensitive(word, item, lenWord); + else + cond = strncmp(word, item, lenWord); + if (!cond) { + // Find first match + while (pivot > start) { + lb->GetValue(pivot-1, item, maxItemLen); + if (ignoreCase) + cond = CompareNCaseInsensitive(word, item, lenWord); + else + cond = strncmp(word, item, lenWord); + if (0 != cond) + break; + --pivot; + } + location = pivot; + if (ignoreCase) { + // Check for exact-case match + for (; pivot <= end; pivot++) { + lb->GetValue(pivot, item, maxItemLen); + if (!strncmp(word, item, lenWord)) { + location = pivot; + break; + } + if (CompareNCaseInsensitive(word, item, lenWord)) + break; + } + } + } else if (cond < 0) { + end = pivot - 1; + } else if (cond > 0) { + start = pivot + 1; + } + } + if (location == -1 && autoHide) + Cancel(); + else + lb->Select(location); +} + diff --git a/scintilla/src/AutoComplete.h b/scintilla/src/AutoComplete.h new file mode 100644 index 00000000..eefc6a84 --- /dev/null +++ b/scintilla/src/AutoComplete.h @@ -0,0 +1,70 @@ +// Scintilla source code edit control +/** @file AutoComplete.h + ** Defines the auto completion list box. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef AUTOCOMPLETE_H +#define AUTOCOMPLETE_H + +/** + */ +class AutoComplete { + bool active; + char stopChars[256]; + char fillUpChars[256]; + char separator; + char typesep; // Type seperator + +public: + bool ignoreCase; + bool chooseSingle; + ListBox *lb; + int posStart; + int startLen; + /// Should autocompletion be canceled if editor's currentPos <= startPos? + bool cancelAtStartPos; + bool autoHide; + bool dropRestOfWord; + + AutoComplete(); + ~AutoComplete(); + + /// Is the auto completion list displayed? + bool Active(); + + /// Display the auto completion list positioned to be near a character position + void Start(Window &parent, int ctrlID, int position, Point location, + int startLen_, int lineHeight, bool unicodeMode); + + /// The stop chars are characters which, when typed, cause the auto completion list to disappear + void SetStopChars(const char *stopChars_); + bool IsStopChar(char ch); + + /// The fillup chars are characters which, when typed, fill up the selected word + void SetFillUpChars(const char *fillUpChars_); + bool IsFillUpChar(char ch); + + /// The separator character is used when interpreting the list in SetList + void SetSeparator(char separator_); + char GetSeparator(); + + /// The typesep character is used for seperating the word from the type + void SetTypesep(char separator_); + char GetTypesep(); + + /// The list string contains a sequence of words separated by the separator character + void SetList(const char *list); + + void Show(bool show); + void Cancel(); + + /// Move the current list element by delta, scrolling appropriately + void Move(int delta); + + /// Select a list element that starts with word as the current element + void Select(const char *word); +}; + +#endif diff --git a/scintilla/src/CallTip.cxx b/scintilla/src/CallTip.cxx new file mode 100644 index 00000000..729bf29a --- /dev/null +++ b/scintilla/src/CallTip.cxx @@ -0,0 +1,314 @@ +// Scintilla source code edit control +/** @file CallTip.cxx + ** Code for displaying call tips. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "CallTip.h" + +static const int insetX = 5; // text inset in x from calltip border +static const int widthArrow = 14; + +CallTip::CallTip() { + wCallTip = 0; + inCallTipMode = false; + posStartCallTip = 0; + val = 0; + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + lineHeight = 1; + startHighlight = 0; + endHighlight = 0; + tabSize = 0; + useStyleCallTip = false; // for backwards compatibility + + colourBG.desired = ColourDesired(0xff, 0xff, 0xff); + colourUnSel.desired = ColourDesired(0x80, 0x80, 0x80); + colourSel.desired = ColourDesired(0, 0, 0x80); + colourShade.desired = ColourDesired(0, 0, 0); + colourLight.desired = ColourDesired(0xc0, 0xc0, 0xc0); +} + +CallTip::~CallTip() { + font.Release(); + wCallTip.Destroy(); + delete []val; + val = 0; +} + +void CallTip::RefreshColourPalette(Palette &pal, bool want) { + pal.WantFind(colourBG, want); + pal.WantFind(colourUnSel, want); + pal.WantFind(colourSel, want); + pal.WantFind(colourShade, want); + pal.WantFind(colourLight, want); +} + +// Although this test includes 0, we should never see a \0 character. +static bool IsArrowCharacter(char ch) { + return (ch == 0) || (ch == '\001') || (ch == '\002'); +} + +// We ignore tabs unless a tab width has been set. +bool CallTip::IsTabCharacter(char ch) { + return (tabSize > 0) && (ch == '\t'); +} + +int CallTip::NextTabPos(int x) { + if (tabSize > 0) { // paranoia... not called unless this is true + x -= insetX; // position relative to text + x = (x + tabSize) / tabSize; // tab "number" + return tabSize*x + insetX; // position of next tab + } else { + return x + 1; // arbitrary + } +} + +// Draw a section of the call tip that does not include \n in one colour. +// The text may include up to numEnds tabs or arrow characters. +void CallTip::DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw) { + s += posStart; + int len = posEnd - posStart; + + // Divide the text into sections that are all text, or that are + // single arrows or single tab characters (if tabSize > 0). + int maxEnd = 0; + const int numEnds = 10; + int ends[numEnds + 2]; + for (int i=0;i 0) + ends[maxEnd++] = i; + ends[maxEnd++] = i+1; + } + } + ends[maxEnd++] = len; + int startSeg = 0; + int xEnd; + for (int seg = 0; seg startSeg) { + if (IsArrowCharacter(s[startSeg])) { + bool upArrow = s[startSeg] == '\001'; + rcClient.left = x; + rcClient.right = rcClient.left + widthArrow; + if (draw) { + const int halfWidth = widthArrow / 2 - 3; + const int centreX = rcClient.left + widthArrow / 2 - 1; + const int centreY = (rcClient.top + rcClient.bottom) / 2; + surface->FillRectangle(rcClient, colourBG.allocated); + PRectangle rcClientInner(rcClient.left + 1, rcClient.top + 1, + rcClient.right - 2, rcClient.bottom - 1); + surface->FillRectangle(rcClientInner, colourUnSel.allocated); + + if (upArrow) { // Up arrow + Point pts[] = { + Point(centreX - halfWidth, centreY + halfWidth / 2), + Point(centreX + halfWidth, centreY + halfWidth / 2), + Point(centreX, centreY - halfWidth + halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } else { // Down arrow + Point pts[] = { + Point(centreX - halfWidth, centreY - halfWidth / 2), + Point(centreX + halfWidth, centreY - halfWidth / 2), + Point(centreX, centreY + halfWidth - halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } + } + xEnd = rcClient.right; + offsetMain = xEnd; + if (upArrow) { + rectUp = rcClient; + } else { + rectDown = rcClient; + } + } else if (IsTabCharacter(s[startSeg])) { + xEnd = NextTabPos(x); + } else { + xEnd = x + surface->WidthText(font, s + startSeg, endSeg - startSeg); + if (draw) { + rcClient.left = x; + rcClient.right = xEnd; + surface->DrawTextTransparent(rcClient, font, ytext, + s+startSeg, endSeg - startSeg, + highlight ? colourSel.allocated : colourUnSel.allocated); + } + } + x = xEnd; + startSeg = endSeg; + } + } +} + +int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { + PRectangle rcClientPos = wCallTip.GetClientPosition(); + PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); + + // To make a nice small call tip window, it is only sized to fit most normal characters without accents + int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font); + + // For each line... + // Draw the definition in three parts: before highlight, highlighted, after highlight + int ytext = rcClient.top + ascent + 1; + rcClient.bottom = ytext + surfaceWindow->Descent(font) + 1; + char *chunkVal = val; + bool moreChunks = true; + int maxWidth = 0; + while (moreChunks) { + char *chunkEnd = strchr(chunkVal, '\n'); + if (chunkEnd == NULL) { + chunkEnd = chunkVal + strlen(chunkVal); + moreChunks = false; + } + int chunkOffset = chunkVal - val; + int chunkLength = chunkEnd - chunkVal; + int chunkEndOffset = chunkOffset + chunkLength; + int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset); + thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset); + thisStartHighlight -= chunkOffset; + int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset); + thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset); + thisEndHighlight -= chunkOffset; + rcClient.top = ytext - ascent - 1; + + int x = insetX; // start each line at this inset + + DrawChunk(surfaceWindow, x, chunkVal, 0, thisStartHighlight, + ytext, rcClient, false, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisStartHighlight, thisEndHighlight, + ytext, rcClient, true, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisEndHighlight, chunkLength, + ytext, rcClient, false, draw); + + chunkVal = chunkEnd + 1; + ytext += lineHeight; + rcClient.bottom += lineHeight; + maxWidth = Platform::Maximum(maxWidth, x); + } + return maxWidth; +} + +void CallTip::PaintCT(Surface *surfaceWindow) { + if (!val) + return; + PRectangle rcClientPos = wCallTip.GetClientPosition(); + PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); + + surfaceWindow->FillRectangle(rcClient, colourBG.allocated); + + offsetMain = insetX; // initial alignment assuming no arrows + PaintContents(surfaceWindow, true); + + // Draw a raised border around the edges of the window + surfaceWindow->MoveTo(0, rcClientSize.bottom - 1); + surfaceWindow->PenColour(colourShade.allocated); + surfaceWindow->LineTo(rcClientSize.right - 1, rcClientSize.bottom - 1); + surfaceWindow->LineTo(rcClientSize.right - 1, 0); + surfaceWindow->PenColour(colourLight.allocated); + surfaceWindow->LineTo(0, 0); + surfaceWindow->LineTo(0, rcClientSize.bottom - 1); +} + +void CallTip::MouseClick(Point pt) { + clickPlace = 0; + if (rectUp.Contains(pt)) + clickPlace = 1; + if (rectDown.Contains(pt)) + clickPlace = 2; +} + +PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, + const char *faceName, int size, + int codePage_, int characterSet, Window &wParent) { + clickPlace = 0; + if (val) + delete []val; + val = new char[strlen(defn) + 1]; + if (!val) + return PRectangle(); + strcpy(val, defn); + codePage = codePage_; + Surface *surfaceMeasure = Surface::Allocate(); + if (!surfaceMeasure) + return PRectangle(); + surfaceMeasure->Init(wParent.GetID()); + surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == codePage); + surfaceMeasure->SetDBCSMode(codePage); + startHighlight = 0; + endHighlight = 0; + inCallTipMode = true; + posStartCallTip = pos; + int deviceHeight = surfaceMeasure->DeviceHeightFont(size); + font.Create(faceName, characterSet, deviceHeight, false, false); + // Look for multiple lines in the text + // Only support \n here - simply means container must avoid \r! + int numLines = 1; + const char *newline; + const char *look = val; + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + offsetMain = insetX; // changed to right edge of any arrows + int width = PaintContents(surfaceMeasure, false) + insetX; + while ((newline = strchr(look, '\n')) != NULL) { + look = newline + 1; + numLines++; + } + lineHeight = surfaceMeasure->Height(font); + + // Extra line for border and an empty line at top and bottom. The returned + // rectangle is aligned to the right edge of the last arrow encountered in + // the tip text, else to the tip text left edge. + int height = lineHeight * numLines - surfaceMeasure->InternalLeading(font) + 2 + 2; + delete surfaceMeasure; + return PRectangle(pt.x - offsetMain, pt.y + 1, pt.x + width - offsetMain, pt.y + 1 + height); +} + +void CallTip::CallTipCancel() { + inCallTipMode = false; + if (wCallTip.Created()) { + wCallTip.Destroy(); + } +} + +void CallTip::SetHighlight(int start, int end) { + // Avoid flashing by checking something has really changed + if ((start != startHighlight) || (end != endHighlight)) { + startHighlight = start; + endHighlight = end; + if (wCallTip.Created()) { + wCallTip.InvalidateAll(); + } + } +} + +// Set the tab size (sizes > 0 enable the use of tabs). This also enables the +// use of the STYLE_CALLTIP. +void CallTip::SetTabSize(int tabSz) { + tabSize = tabSz; + useStyleCallTip = true; +} + +// It might be better to have two access functions for this and to use +// them for all settings of colours. +void CallTip::SetForeBack(const ColourPair &fore, const ColourPair &back) { + colourBG = back; + colourUnSel = fore; +} diff --git a/scintilla/src/CallTip.h b/scintilla/src/CallTip.h new file mode 100644 index 00000000..3f7557e4 --- /dev/null +++ b/scintilla/src/CallTip.h @@ -0,0 +1,79 @@ +// Scintilla source code edit control +/** @file CallTip.h + ** Interface to the call tip control. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CALLTIP_H +#define CALLTIP_H + +/** + */ +class CallTip { + int startHighlight; // character offset to start and... + int endHighlight; // ...end of highlighted text + char *val; + Font font; + PRectangle rectUp; // rectangle of last up angle in the tip + PRectangle rectDown; // rectangle of last down arrow in the tip + int lineHeight; // vertical line spacing + int offsetMain; // The alignment point of the call tip + int tabSize; // Tab size in pixels, <=0 no TAB expand + bool useStyleCallTip; // if true, STYLE_CALLTIP should be used + + // Private so CallTip objects can not be copied + CallTip(const CallTip &) {} + CallTip &operator=(const CallTip &) { return *this; } + void DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw); + int PaintContents(Surface *surfaceWindow, bool draw); + bool IsTabCharacter(char c); + int NextTabPos(int x); + +public: + Window wCallTip; + Window wDraw; + bool inCallTipMode; + int posStartCallTip; + ColourPair colourBG; + ColourPair colourUnSel; + ColourPair colourSel; + ColourPair colourShade; + ColourPair colourLight; + int codePage; + int clickPlace; + + CallTip(); + ~CallTip(); + + /// Claim or accept palette entries for the colours required to paint a calltip. + void RefreshColourPalette(Palette &pal, bool want); + + void PaintCT(Surface *surfaceWindow); + + void MouseClick(Point pt); + + /// Setup the calltip and return a rectangle of the area required. + PRectangle CallTipStart(int pos, Point pt, const char *defn, + const char *faceName, int size, int codePage_, + int characterSet, Window &wParent); + + void CallTipCancel(); + + /// Set a range of characters to be displayed in a highlight style. + /// Commonly used to highlight the current parameter. + void SetHighlight(int start, int end); + + /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand. + void SetTabSize(int tabSz); + + /// Used to determine which STYLE_xxxx to use for call tip information + bool UseStyleCallTip() const { return useStyleCallTip;} + + // Modify foreground and background colours + void SetForeBack(const ColourPair &fore, const ColourPair &back); +}; + +#endif diff --git a/scintilla/src/CellBuffer.cxx b/scintilla/src/CellBuffer.cxx new file mode 100644 index 00000000..8416fce1 --- /dev/null +++ b/scintilla/src/CellBuffer.cxx @@ -0,0 +1,914 @@ +// Scintilla source code edit control +/** @file CellBuffer.cxx + ** Manages a buffer of cells. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" + +MarkerHandleSet::MarkerHandleSet() { + root = 0; +} + +MarkerHandleSet::~MarkerHandleSet() { + MarkerHandleNumber *mhn = root; + while (mhn) { + MarkerHandleNumber *mhnToFree = mhn; + mhn = mhn->next; + delete mhnToFree; + } + root = 0; +} + +int MarkerHandleSet::Length() const { + int c = 0; + MarkerHandleNumber *mhn = root; + while (mhn) { + c++; + mhn = mhn->next; + } + return c; +} + +int MarkerHandleSet::NumberFromHandle(int handle) const { + MarkerHandleNumber *mhn = root; + while (mhn) { + if (mhn->handle == handle) { + return mhn->number; + } + mhn = mhn->next; + } + return - 1; +} + +int MarkerHandleSet::MarkValue() const { + unsigned int m = 0; + MarkerHandleNumber *mhn = root; + while (mhn) { + m |= (1 << mhn->number); + mhn = mhn->next; + } + return m; +} + +bool MarkerHandleSet::Contains(int handle) const { + MarkerHandleNumber *mhn = root; + while (mhn) { + if (mhn->handle == handle) { + return true; + } + mhn = mhn->next; + } + return false; +} + +bool MarkerHandleSet::InsertHandle(int handle, int markerNum) { + MarkerHandleNumber *mhn = new MarkerHandleNumber; + if (!mhn) + return false; + mhn->handle = handle; + mhn->number = markerNum; + mhn->next = root; + root = mhn; + return true; +} + +void MarkerHandleSet::RemoveHandle(int handle) { + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + MarkerHandleNumber *mhn = *pmhn; + if (mhn->handle == handle) { + *pmhn = mhn->next; + delete mhn; + return; + } + pmhn = &((*pmhn)->next); + } +} + +bool MarkerHandleSet::RemoveNumber(int markerNum) { + bool performedDeletion = false; + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + MarkerHandleNumber *mhn = *pmhn; + if (mhn->number == markerNum) { + *pmhn = mhn->next; + delete mhn; + performedDeletion = true; + } else { + pmhn = &((*pmhn)->next); + } + } + return performedDeletion; +} + +void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + pmhn = &((*pmhn)->next); + } + *pmhn = other->root; + other->root = 0; +} + +LineVector::LineVector() : starts(256) { + handleCurrent = 1; + + Init(); +} + +LineVector::~LineVector() { + starts.DeleteAll(); + for (int line = 0; line < markers.Length(); line++) { + delete markers[line]; + markers[line] = 0; + } + markers.DeleteAll(); + levels.DeleteAll(); +} + +void LineVector::Init() { + starts.DeleteAll(); + for (int line = 0; line < markers.Length(); line++) { + delete markers[line]; + markers[line] = 0; + } + markers.DeleteAll(); + levels.DeleteAll(); +} + +void LineVector::ExpandLevels(int sizeNew) { + levels.InsertValue(levels.Length(), sizeNew - levels.Length(), SC_FOLDLEVELBASE); +} + +void LineVector::ClearLevels() { + levels.DeleteAll(); +} + +int LineVector::SetLevel(int line, int level) { + int prev = 0; + if ((line >= 0) && (line < Lines())) { + if (!levels.Length()) { + ExpandLevels(Lines() + 1); + } + prev = levels[line]; + if (prev != level) { + levels[line] = level; + } + } + return prev; +} + +int LineVector::GetLevel(int line) { + if (levels.Length() && (line >= 0) && (line < Lines())) { + return levels[line]; + } else { + return SC_FOLDLEVELBASE; + } +} + +void LineVector::InsertText(int line, int delta) { + starts.InsertText(line, delta); +} + +void LineVector::InsertLine(int line, int position) { + starts.InsertPartition(line, position); + if (markers.Length()) { + markers.Insert(line, 0); + } + if (levels.Length()) { + int level = SC_FOLDLEVELBASE; + if ((line > 0) && (line < Lines())) { + level = levels[line-1] & ~SC_FOLDLEVELWHITEFLAG; + } + levels.InsertValue(line, 1, level); + } +} + +void LineVector::SetLineStart(int line, int position) { + starts.SetPartitionStartPosition(line, position); +} + +void LineVector::RemoveLine(int line) { + starts.RemovePartition(line); + // Retain the markers from the deleted line by oring them into the previous line + if (markers.Length()) { + if (line > 0) { + MergeMarkers(line - 1); + } + markers.Delete(line); + } + if (levels.Length()) { + // Move up following lines but merge header flag from this line + // to line before to avoid a temporary disappearence causing expansion. + int firstHeader = levels[line] & SC_FOLDLEVELHEADERFLAG; + levels.Delete(line); + if (line > 0) + levels[line-1] |= firstHeader; + } +} + +int LineVector::LineFromPosition(int pos) { + return starts.PartitionFromPosition(pos); +} + +int LineVector::MarkValue(int line) { + if (markers.Length() && markers[line]) + return markers[line]->MarkValue(); + else + return 0; +} + +int LineVector::AddMark(int line, int markerNum) { + handleCurrent++; + if (!markers.Length()) { + // No existing markers so allocate one element per line + markers.InsertValue(0, Lines(), 0); + } + if (!markers[line]) { + // Need new structure to hold marker handle + markers[line] = new MarkerHandleSet(); + if (!markers[line]) + return - 1; + } + markers[line]->InsertHandle(handleCurrent, markerNum); + + return handleCurrent; +} + +void LineVector::MergeMarkers(int pos) { + if (markers[pos + 1] != NULL) { + if (markers[pos] == NULL) + markers[pos] = new MarkerHandleSet; + markers[pos]->CombineWith(markers[pos + 1]); + delete markers[pos + 1]; + markers[pos + 1] = NULL; + } +} + +void LineVector::DeleteMark(int line, int markerNum, bool all) { + if (markers.Length() && markers[line]) { + if (markerNum == -1) { + delete markers[line]; + markers[line] = NULL; + } else { + bool performedDeletion = markers[line]->RemoveNumber(markerNum); + while (all && performedDeletion) { + performedDeletion = markers[line]->RemoveNumber(markerNum); + } + if (markers[line]->Length() == 0) { + delete markers[line]; + markers[line] = NULL; + } + } + } +} + +void LineVector::DeleteMarkFromHandle(int markerHandle) { + int line = LineFromHandle(markerHandle); + if (line >= 0) { + markers[line]->RemoveHandle(markerHandle); + if (markers[line]->Length() == 0) { + delete markers[line]; + markers[line] = NULL; + } + } +} + +int LineVector::LineFromHandle(int markerHandle) { + if (markers.Length()) { + for (int line = 0; line < Lines(); line++) { + if (markers[line]) { + if (markers[line]->Contains(markerHandle)) { + return line; + } + } + } + } + return -1; +} + +Action::Action() { + at = startAction; + position = 0; + data = 0; + lenData = 0; +} + +Action::~Action() { + Destroy(); +} + +void Action::Create(actionType at_, int position_, char *data_, int lenData_, bool mayCoalesce_) { + delete []data; + position = position_; + at = at_; + data = data_; + lenData = lenData_; + mayCoalesce = mayCoalesce_; +} + +void Action::Destroy() { + delete []data; + data = 0; +} + +void Action::Grab(Action *source) { + delete []data; + + position = source->position; + at = source->at; + data = source->data; + lenData = source->lenData; + mayCoalesce = source->mayCoalesce; + + // Ownership of source data transferred to this + source->position = 0; + source->at = startAction; + source->data = 0; + source->lenData = 0; + source->mayCoalesce = true; +} + +// The undo history stores a sequence of user operations that represent the user's view of the +// commands executed on the text. +// Each user operation contains a sequence of text insertion and text deletion actions. +// All the user operations are stored in a list of individual actions with 'start' actions used +// as delimiters between user operations. +// Initially there is one start action in the history. +// As each action is performed, it is recorded in the history. The action may either become +// part of the current user operation or may start a new user operation. If it is to be part of the +// current operation, then it overwrites the current last action. If it is to be part of a new +// operation, it is appended after the current last action. +// After writing the new action, a new start action is appended at the end of the history. +// The decision of whether to start a new user operation is based upon two factors. If a +// compound operation has been explicitly started by calling BeginUndoAction and no matching +// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current +// operation. If there is no outstanding BeginUndoAction call then a new operation is started +// unless it looks as if the new action is caused by the user typing or deleting a stream of text. +// Sequences that look like typing or deletion are coalesced into a single user operation. + +UndoHistory::UndoHistory() { + + lenActions = 100; + actions = new Action[lenActions]; + maxAction = 0; + currentAction = 0; + undoSequenceDepth = 0; + savePoint = 0; + + actions[currentAction].Create(startAction); +} + +UndoHistory::~UndoHistory() { + delete []actions; + actions = 0; +} + +void UndoHistory::EnsureUndoRoom() { + // Have to test that there is room for 2 more actions in the array + // as two actions may be created by the calling function + if (currentAction >= (lenActions - 2)) { + // Run out of undo nodes so extend the array + int lenActionsNew = lenActions * 2; + Action *actionsNew = new Action[lenActionsNew]; + if (!actionsNew) + return; + for (int act = 0; act <= currentAction; act++) + actionsNew[act].Grab(&actions[act]); + delete []actions; + lenActions = lenActionsNew; + actions = actionsNew; + } +} + +void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData, + bool &startSequence) { + EnsureUndoRoom(); + //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); + //Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, + // actions[currentAction - 1].position, actions[currentAction - 1].lenData); + if (currentAction < savePoint) { + savePoint = -1; + } + int oldCurrentAction = currentAction; + if (currentAction >= 1) { + if (0 == undoSequenceDepth) { + // Top level actions may not always be coalesced + Action &actPrevious = actions[currentAction - 1]; + // See if current action can be coalesced into previous action + // Will work if both are inserts or deletes and position is same + if (at != actPrevious.at) { + currentAction++; + } else if (currentAction == savePoint) { + currentAction++; + } else if ((at == insertAction) && + (position != (actPrevious.position + actPrevious.lenData))) { + // Insertions must be immediately after to coalesce + currentAction++; + } else if (!actions[currentAction].mayCoalesce) { + // Not allowed to coalesce if this set + currentAction++; + } else if (at == removeAction) { + if ((lengthData == 1) || (lengthData == 2)){ + if ((position + lengthData) == actPrevious.position) { + ; // Backspace -> OK + } else if (position == actPrevious.position) { + ; // Delete -> OK + } else { + // Removals must be at same position to coalesce + currentAction++; + } + } else { + // Removals must be of one character to coalesce + currentAction++; + } + } else { + // Action coalesced. + } + + } else { + // Actions not at top level are always coalesced unless this is after return to top level + if (!actions[currentAction].mayCoalesce) + currentAction++; + } + } else { + currentAction++; + } + startSequence = oldCurrentAction != currentAction; + actions[currentAction].Create(at, position, data, lengthData); + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; +} + +void UndoHistory::BeginUndoAction() { + EnsureUndoRoom(); + if (undoSequenceDepth == 0) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } + undoSequenceDepth++; +} + +void UndoHistory::EndUndoAction() { + EnsureUndoRoom(); + undoSequenceDepth--; + if (0 == undoSequenceDepth) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } +} + +void UndoHistory::DropUndoSequence() { + undoSequenceDepth = 0; +} + +void UndoHistory::DeleteUndoHistory() { + for (int i = 1; i < maxAction; i++) + actions[i].Destroy(); + maxAction = 0; + currentAction = 0; + actions[currentAction].Create(startAction); + savePoint = 0; +} + +void UndoHistory::SetSavePoint() { + savePoint = currentAction; +} + +bool UndoHistory::IsSavePoint() const { + return savePoint == currentAction; +} + +bool UndoHistory::CanUndo() const { + return (currentAction > 0) && (maxAction > 0); +} + +int UndoHistory::StartUndo() { + // Drop any trailing startAction + if (actions[currentAction].at == startAction && currentAction > 0) + currentAction--; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act > 0) { + act--; + } + return currentAction - act; +} + +const Action &UndoHistory::GetUndoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedUndoStep() { + currentAction--; +} + +bool UndoHistory::CanRedo() const { + return maxAction > currentAction; +} + +int UndoHistory::StartRedo() { + // Drop any leading startAction + if (actions[currentAction].at == startAction && currentAction < maxAction) + currentAction++; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act < maxAction) { + act++; + } + return act - currentAction; +} + +const Action &UndoHistory::GetRedoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedRedoStep() { + currentAction++; +} + +CellBuffer::CellBuffer() { + readOnly = false; + collectingUndo = true; +} + +CellBuffer::~CellBuffer() { +} + +char CellBuffer::CharAt(int position) { + return substance.ValueAt(position); +} + +void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) { + if (lengthRetrieve < 0) + return; + if (position < 0) + return; + if ((position + lengthRetrieve) > substance.Length()) { + Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", position, + lengthRetrieve, substance.Length()); + return; + } + + for (int i=0; i((curVal & ~mask) | styleValue)); + return true; + } else { + return false; + } +} + +bool CellBuffer::SetStyleFor(int position, int lengthStyle, char styleValue, char mask) { + bool changed = false; + PLATFORM_ASSERT(lengthStyle == 0 || + (lengthStyle > 0 && lengthStyle + position <= style.Length())); + while (lengthStyle--) { + char curVal = style.ValueAt(position); + if ((curVal & mask) != styleValue) { + style.SetValueAt(position, static_cast((curVal & ~mask) | styleValue)); + changed = true; + } + position++; + } + return changed; +} + +// The char* returned is to an allocation owned by the undo history +const char *CellBuffer::DeleteChars(int position, int deleteLength, bool &startSequence) { + // InsertString and DeleteChars are the bottleneck though which all changes occur + PLATFORM_ASSERT(deleteLength > 0); + char *data = 0; + if (!readOnly) { + if (collectingUndo) { + // Save into the undo/redo stack, but only the characters - not the formatting + data = new char[deleteLength]; + for (int i = 0; i < deleteLength; i++) { + data[i] = substance.ValueAt(position + i); + } + uh.AppendAction(removeAction, position, data, deleteLength, startSequence); + } + + BasicDeleteChars(position, deleteLength); + } + return data; +} + +int CellBuffer::Length() { + return substance.Length(); +} + +void CellBuffer::Allocate(int newSize) { + substance.ReAllocate(newSize); + style.ReAllocate(newSize); +} + +int CellBuffer::Lines() { + return lv.Lines(); +} + +int CellBuffer::LineStart(int line) { + if (line < 0) + return 0; + else if (line >= Lines()) + return Length(); + else + return lv.LineStart(line); +} + +bool CellBuffer::IsReadOnly() { + return readOnly; +} + +void CellBuffer::SetReadOnly(bool set) { + readOnly = set; +} + +void CellBuffer::SetSavePoint() { + uh.SetSavePoint(); +} + +bool CellBuffer::IsSavePoint() { + return uh.IsSavePoint(); +} + +int CellBuffer::AddMark(int line, int markerNum) { + if ((line >= 0) && (line < Lines())) { + return lv.AddMark(line, markerNum); + } + return - 1; +} + +void CellBuffer::DeleteMark(int line, int markerNum) { + if ((line >= 0) && (line < Lines())) { + lv.DeleteMark(line, markerNum, false); + } +} + +void CellBuffer::DeleteMarkFromHandle(int markerHandle) { + lv.DeleteMarkFromHandle(markerHandle); +} + +int CellBuffer::GetMark(int line) { + if ((line >= 0) && (line < Lines())) + return lv.MarkValue(line); + return 0; +} + +void CellBuffer::DeleteAllMarks(int markerNum) { + for (int line = 0; line < Lines(); line++) { + lv.DeleteMark(line, markerNum, true); + } +} + +int CellBuffer::LineFromHandle(int markerHandle) { + return lv.LineFromHandle(markerHandle); +} + +// Without undo + +void CellBuffer::BasicInsertString(int position, const char *s, int insertLength) { + if (insertLength == 0) + return; + PLATFORM_ASSERT(insertLength > 0); + + substance.InsertFromArray(position, s, 0, insertLength); + style.InsertValue(position, insertLength, 0); + + int lineInsert = lv.LineFromPosition(position) + 1; + // Point all the lines after the insertion point further along in the buffer + lv.InsertText(lineInsert-1, insertLength); + char chPrev = substance.ValueAt(position - 1); + char chAfter = substance.ValueAt(position + insertLength); + if (chPrev == '\r' && chAfter == '\n') { + // Splitting up a crlf pair at position + lv.InsertLine(lineInsert, position); + lineInsert++; + } + char ch = ' '; + for (int i = 0; i < insertLength; i++) { + ch = s[i]; + if (ch == '\r') { + lv.InsertLine(lineInsert, (position + i) + 1); + lineInsert++; + } else if (ch == '\n') { + if (chPrev == '\r') { + // Patch up what was end of line + lv.SetLineStart(lineInsert - 1, (position + i) + 1); + } else { + lv.InsertLine(lineInsert, (position + i) + 1); + lineInsert++; + } + } + chPrev = ch; + } + // Joining two lines where last insertion is cr and following substance starts with lf + if (chAfter == '\n') { + if (ch == '\r') { + // End of line already in buffer so drop the newly created one + lv.RemoveLine(lineInsert - 1); + } + } +} + +void CellBuffer::BasicDeleteChars(int position, int deleteLength) { + if (deleteLength == 0) + return; + + if ((position == 0) && (deleteLength == substance.Length())) { + // If whole buffer is being deleted, faster to reinitialise lines data + // than to delete each line. + lv.Init(); + } else { + // Have to fix up line positions before doing deletion as looking at text in buffer + // to work out which lines have been removed + + int lineRemove = lv.LineFromPosition(position) + 1; + lv.InsertText(lineRemove-1, - (deleteLength)); + char chPrev = substance.ValueAt(position - 1); + char chBefore = chPrev; + char chNext = substance.ValueAt(position); + bool ignoreNL = false; + if (chPrev == '\r' && chNext == '\n') { + // Move back one + lv.SetLineStart(lineRemove, position); + lineRemove++; + ignoreNL = true; // First \n is not real deletion + } + + char ch = chNext; + for (int i = 0; i < deleteLength; i++) { + chNext = substance.ValueAt(position + i + 1); + if (ch == '\r') { + if (chNext != '\n') { + lv.RemoveLine(lineRemove); + } + } else if (ch == '\n') { + if (ignoreNL) { + ignoreNL = false; // Further \n are real deletions + } else { + lv.RemoveLine(lineRemove); + } + } + + ch = chNext; + } + // May have to fix up end if last deletion causes cr to be next to lf + // or removes one of a crlf pair + char chAfter = substance.ValueAt(position + deleteLength); + if (chBefore == '\r' && chAfter == '\n') { + // Using lineRemove-1 as cr ended line before start of deletion + lv.RemoveLine(lineRemove - 1); + lv.SetLineStart(lineRemove - 1, position + 1); + } + } + substance.DeleteRange(position, deleteLength); + style.DeleteRange(position, deleteLength); +} + +bool CellBuffer::SetUndoCollection(bool collectUndo) { + collectingUndo = collectUndo; + uh.DropUndoSequence(); + return collectingUndo; +} + +bool CellBuffer::IsCollectingUndo() { + return collectingUndo; +} + +void CellBuffer::BeginUndoAction() { + uh.BeginUndoAction(); +} + +void CellBuffer::EndUndoAction() { + uh.EndUndoAction(); +} + +void CellBuffer::DeleteUndoHistory() { + uh.DeleteUndoHistory(); +} + +bool CellBuffer::CanUndo() { + return uh.CanUndo(); +} + +int CellBuffer::StartUndo() { + return uh.StartUndo(); +} + +const Action &CellBuffer::GetUndoStep() const { + return uh.GetUndoStep(); +} + +void CellBuffer::PerformUndoStep() { + const Action &actionStep = uh.GetUndoStep(); + if (actionStep.at == insertAction) { + BasicDeleteChars(actionStep.position, actionStep.lenData); + } else if (actionStep.at == removeAction) { + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); + } + uh.CompletedUndoStep(); +} + +bool CellBuffer::CanRedo() { + return uh.CanRedo(); +} + +int CellBuffer::StartRedo() { + return uh.StartRedo(); +} + +const Action &CellBuffer::GetRedoStep() const { + return uh.GetRedoStep(); +} + +void CellBuffer::PerformRedoStep() { + const Action &actionStep = uh.GetRedoStep(); + if (actionStep.at == insertAction) { + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); + } else if (actionStep.at == removeAction) { + BasicDeleteChars(actionStep.position, actionStep.lenData); + } + uh.CompletedRedoStep(); +} + +int CellBuffer::SetLineState(int line, int state) { + int stateOld = lineStates[line]; + lineStates[line] = state; + return stateOld; +} + +int CellBuffer::GetLineState(int line) { + return lineStates[line]; +} + +int CellBuffer::GetMaxLineState() { + return lineStates.Length(); +} + +int CellBuffer::SetLevel(int line, int level) { + return lv.SetLevel(line, level); +} + +int CellBuffer::GetLevel(int line) { + return lv.GetLevel(line); +} + +void CellBuffer::ClearLevels() { + lv.ClearLevels(); +} diff --git a/scintilla/src/CellBuffer.h b/scintilla/src/CellBuffer.h new file mode 100644 index 00000000..03e537e2 --- /dev/null +++ b/scintilla/src/CellBuffer.h @@ -0,0 +1,231 @@ +// Scintilla source code edit control +/** @file CellBuffer.h + ** Manages the text of the document. + **/ +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CELLBUFFER_H +#define CELLBUFFER_H + +/** + * This holds the marker identifier and the marker type to display. + * MarkerHandleNumbers are members of lists. + */ +struct MarkerHandleNumber { + int handle; + int number; + MarkerHandleNumber *next; +}; + +/** + * A marker handle set contains any number of MarkerHandleNumbers. + */ +class MarkerHandleSet { + MarkerHandleNumber *root; + +public: + MarkerHandleSet(); + ~MarkerHandleSet(); + int Length() const; + int NumberFromHandle(int handle) const; + int MarkValue() const; ///< Bit set of marker numbers. + bool Contains(int handle) const; + bool InsertHandle(int handle, int markerNum); + void RemoveHandle(int handle); + bool RemoveNumber(int markerNum); + void CombineWith(MarkerHandleSet *other); +}; + +/** + * The line vector contains information about each of the lines in a cell buffer. + */ +class LineVector { + + Partitioning starts; + SplitVector markers; + SplitVector levels; + /// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big. + int handleCurrent; + +public: + + LineVector(); + ~LineVector(); + void Init(); + + void ExpandLevels(int sizeNew=-1); + void ClearLevels(); + int SetLevel(int line, int level); + int GetLevel(int line); + + void InsertText(int line, int delta); + void InsertLine(int line, int position); + void SetLineStart(int line, int position); + void RemoveLine(int line); + int Lines() { + return starts.Partitions(); + } + int LineFromPosition(int pos); + int LineStart(int line) { + return starts.PositionFromPartition(line); + } + + int MarkValue(int line); + int AddMark(int line, int marker); + void MergeMarkers(int pos); + void DeleteMark(int line, int markerNum, bool all); + void DeleteMarkFromHandle(int markerHandle); + int LineFromHandle(int markerHandle); +}; + +enum actionType { insertAction, removeAction, startAction }; + +/** + * Actions are used to store all the information required to perform one undo/redo step. + */ +class Action { +public: + actionType at; + int position; + char *data; + int lenData; + bool mayCoalesce; + + Action(); + ~Action(); + void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true); + void Destroy(); + void Grab(Action *source); +}; + +/** + * + */ +class UndoHistory { + Action *actions; + int lenActions; + int maxAction; + int currentAction; + int undoSequenceDepth; + int savePoint; + + void EnsureUndoRoom(); + +public: + UndoHistory(); + ~UndoHistory(); + + void AppendAction(actionType at, int position, char *data, int length, bool &startSequence); + + void BeginUndoAction(); + void EndUndoAction(); + void DropUndoSequence(); + void DeleteUndoHistory(); + + /// The save point is a marker in the undo stack where the container has stated that + /// the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint() const; + + /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + /// called that many times. Similarly for redo. + bool CanUndo() const; + int StartUndo(); + const Action &GetUndoStep() const; + void CompletedUndoStep(); + bool CanRedo() const; + int StartRedo(); + const Action &GetRedoStep() const; + void CompletedRedoStep(); +}; + +/** + * Holder for an expandable array of characters that supports undo and line markers. + * Based on article "Data Structures in a Bit-Mapped Text Editor" + * by Wilfred J. Hansen, Byte January 1987, page 183. + */ +class CellBuffer { +private: + SplitVector substance; + SplitVector style; + bool readOnly; + + bool collectingUndo; + UndoHistory uh; + + LineVector lv; + + SVector lineStates; + +public: + + CellBuffer(); + ~CellBuffer(); + + /// Retrieving positions outside the range of the buffer works and returns 0 + char CharAt(int position); + void GetCharRange(char *buffer, int position, int lengthRetrieve); + char StyleAt(int position); + + int Length(); + void Allocate(int newSize); + int Lines(); + int LineStart(int line); + int LineFromPosition(int pos) { return lv.LineFromPosition(pos); } + const char *InsertString(int position, const char *s, int insertLength, bool &startSequence); + + /// Setting styles for positions outside the range of the buffer is safe and has no effect. + /// @return true if the style of a character is changed. + bool SetStyleAt(int position, char styleValue, char mask='\377'); + bool SetStyleFor(int position, int length, char styleValue, char mask); + + const char *DeleteChars(int position, int deleteLength, bool &startSequence); + + bool IsReadOnly(); + void SetReadOnly(bool set); + + /// The save point is a marker in the undo stack where the container has stated that + /// the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint(); + + /// Line marker functions + int AddMark(int line, int markerNum); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + int GetMark(int line); + void DeleteAllMarks(int markerNum); + int LineFromHandle(int markerHandle); + + /// Actions without undo + void BasicInsertString(int position, const char *s, int insertLength); + void BasicDeleteChars(int position, int deleteLength); + + bool SetUndoCollection(bool collectUndo); + bool IsCollectingUndo(); + void BeginUndoAction(); + void EndUndoAction(); + void DeleteUndoHistory(); + + /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + /// called that many times. Similarly for redo. + bool CanUndo(); + int StartUndo(); + const Action &GetUndoStep() const; + void PerformUndoStep(); + bool CanRedo(); + int StartRedo(); + const Action &GetRedoStep() const; + void PerformRedoStep(); + + int SetLineState(int line, int state); + int GetLineState(int line); + int GetMaxLineState(); + + int SetLevel(int line, int level); + int GetLevel(int line); + void ClearLevels(); +}; + +#endif diff --git a/scintilla/src/CharClassify.cxx b/scintilla/src/CharClassify.cxx new file mode 100644 index 00000000..76eb905c --- /dev/null +++ b/scintilla/src/CharClassify.cxx @@ -0,0 +1,43 @@ +// Scintilla source code edit control +/** @file CharClassify.cxx + ** Character classifications used by Document and RESearch. + **/ +// Copyright 2006 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include + +#include "CharClassify.h" + +// Shut up annoying Visual C++ warnings: +#ifdef _MSC_VER +#pragma warning(disable: 4514) +#endif + +CharClassify::CharClassify() { + SetDefaultCharClasses(true); +} + +void CharClassify::SetDefaultCharClasses(bool includeWordClass) { + // Initialize all char classes to default values + for (int ch = 0; ch < 256; ch++) { + if (ch == '\r' || ch == '\n') + charClass[ch] = ccNewLine; + else if (ch < 0x20 || ch == ' ') + charClass[ch] = ccSpace; + else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) + charClass[ch] = ccWord; + else + charClass[ch] = ccPunctuation; + } +} + +void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) { + // Apply the newCharClass to the specifed chars + if (chars) { + while (*chars) { + charClass[*chars] = static_cast(newCharClass); + chars++; + } + } +} diff --git a/scintilla/src/CharClassify.h b/scintilla/src/CharClassify.h new file mode 100644 index 00000000..d26f4b34 --- /dev/null +++ b/scintilla/src/CharClassify.h @@ -0,0 +1,25 @@ +// Scintilla source code edit control +/** @file CharClassify.h + ** Character classifications used by Document and RESearch. + **/ +// Copyright 2006 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CHARCLASSIFY_H +#define CHARCLASSIFY_H + +class CharClassify { +public: + CharClassify(); + + enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; + void SetDefaultCharClasses(bool includeWordClass); + void SetCharClasses(const unsigned char *chars, cc newCharClass); + cc GetClass(unsigned char ch) const { return static_cast(charClass[ch]);} + bool IsWord(unsigned char ch) const { return static_cast(charClass[ch]) == ccWord;} + +private: + enum { maxChar=256 }; + unsigned char charClass[maxChar]; // not type cc to save space +}; +#endif diff --git a/scintilla/src/ContractionState.cxx b/scintilla/src/ContractionState.cxx new file mode 100644 index 00000000..1f63c9ad --- /dev/null +++ b/scintilla/src/ContractionState.cxx @@ -0,0 +1,289 @@ +// Scintilla source code edit control +/** @file ContractionState.cxx + ** Manages visibility of lines for folding. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include "Platform.h" + +#include "ContractionState.h" + +OneLine::OneLine() { + displayLine = 0; + //docLine = 0; + visible = true; + height = 1; + expanded = true; +} + +ContractionState::ContractionState() { + lines = 0; + size = 0; + linesInDoc = 1; + linesInDisplay = 1; + valid = false; + docLines = 0; + sizeDocLines = 0; +} + +ContractionState::~ContractionState() { + Clear(); +} + +void ContractionState::MakeValid() const { + if (!valid) { + // Could be cleverer by keeping the index of the last still valid entry + // rather than invalidating all. + linesInDisplay = 0; + for (int lineInDoc=0; lineInDoc= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].displayLine; + } + return -1; +} + +int ContractionState::DocFromDisplay(int lineDisplay) const { + if (lineDisplay <= 0) + return 0; + if (lineDisplay >= linesInDisplay) + return linesInDoc; + if (size == 0) + return lineDisplay; + MakeValid(); + if (docLines) { // Valid allocation + return docLines[lineDisplay]; + } else { + return 0; + } +} + +void ContractionState::Grow(int sizeNew) { + OneLine *linesNew = new OneLine[sizeNew]; + if (linesNew) { + int i = 0; + for (; i < size; i++) { + linesNew[i] = lines[i]; + } + for (; i < sizeNew; i++) { + linesNew[i].displayLine = i; + } + delete []lines; + lines = linesNew; + size = sizeNew; + valid = false; + } else { + Platform::DebugPrintf("No memory available\n"); + // TODO: Blow up + } +} + +void ContractionState::InsertLines(int lineDoc, int lineCount) { + if (size == 0) { + linesInDoc += lineCount; + linesInDisplay += lineCount; + return; + } + //Platform::DebugPrintf("InsertLine[%d] = %d\n", lineDoc); + if ((linesInDoc + lineCount + 2) >= size) { + Grow(linesInDoc + lineCount + growSize); + } + linesInDoc += lineCount; + for (int i = linesInDoc; i >= lineDoc + lineCount; i--) { + lines[i].visible = lines[i - lineCount].visible; + lines[i].height = lines[i - lineCount].height; + linesInDisplay += lines[i].height; + lines[i].expanded = lines[i - lineCount].expanded; + } + for (int d=0;d= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].visible; + } else { + return false; + } +} + +bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible) { + if (lineDocStart == 0) + lineDocStart++; + if (lineDocStart > lineDocEnd) + return false; + if (size == 0) { + Grow(linesInDoc + growSize); + } + // TODO: modify docLine members to mirror displayLine + int delta = 0; + // Change lineDocs + if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < linesInDoc)) { + for (int line=lineDocStart; line <= lineDocEnd; line++) { + if (lines[line].visible != visible) { + delta += visible ? lines[line].height : -lines[line].height; + lines[line].visible = visible; + valid = false; + } + } + } + linesInDisplay += delta; + return delta != 0; +} + +bool ContractionState::GetExpanded(int lineDoc) const { + if (size == 0) + return true; + if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].expanded; + } else { + return false; + } +} + +bool ContractionState::SetExpanded(int lineDoc, bool expanded) { + if (size == 0) { + if (expanded) { + // If in completely expanded state then setting + // one line to expanded has no effect. + return false; + } + Grow(linesInDoc + growSize); + } + if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { + if (lines[lineDoc].expanded != expanded) { + lines[lineDoc].expanded = expanded; + return true; + } + } + return false; +} + +int ContractionState::GetHeight(int lineDoc) const { + if (size == 0) + return 1; + if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].height; + } else { + return 1; + } +} + +// Set the number of display lines needed for this line. +// Return true if this is a change. +bool ContractionState::SetHeight(int lineDoc, int height) { + if (lineDoc > linesInDoc) + return false; + if (size == 0) { + if (height == 1) { + // If in completely expanded state then all lines + // assumed to have height of one so no effect here. + return false; + } + Grow(linesInDoc + growSize); + } + if (lines[lineDoc].height != height) { + lines[lineDoc].height = height; + valid = false; + return true; + } else { + return false; + } +} + +void ContractionState::ShowAll() { + delete []lines; + lines = 0; + size = 0; + + delete []docLines; + docLines = 0; + sizeDocLines = 0; + + linesInDisplay = linesInDoc; +} diff --git a/scintilla/src/ContractionState.h b/scintilla/src/ContractionState.h new file mode 100644 index 00000000..735735b0 --- /dev/null +++ b/scintilla/src/ContractionState.h @@ -0,0 +1,65 @@ +// Scintilla source code edit control +/** @file ContractionState.h + ** Manages visibility of lines for folding. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CONTRACTIONSTATE_H +#define CONTRACTIONSTATE_H + +/** + */ +class OneLine { +public: + int displayLine; ///< Position within set of visible lines + //int docLine; ///< Inverse of @a displayLine + int height; ///< Number of display lines needed to show all of the line + bool visible; + bool expanded; + + OneLine(); + virtual ~OneLine() {} +}; + +/** + */ +class ContractionState { + void Grow(int sizeNew); + enum { growSize = 4000 }; + int linesInDoc; + mutable int linesInDisplay; + mutable OneLine *lines; + int size; + mutable int *docLines; + mutable int sizeDocLines; + mutable bool valid; + void MakeValid() const; + +public: + ContractionState(); + virtual ~ContractionState(); + + void Clear(); + + int LinesInDoc() const; + int LinesDisplayed() const; + int DisplayFromDoc(int lineDoc) const; + int DocFromDisplay(int lineDisplay) const; + + void InsertLines(int lineDoc, int lineCount); + void DeleteLines(int lineDoc, int lineCount); + + bool GetVisible(int lineDoc) const; + bool SetVisible(int lineDocStart, int lineDocEnd, bool visible); + + bool GetExpanded(int lineDoc) const; + bool SetExpanded(int lineDoc, bool expanded); + + int GetHeight(int lineDoc) const; + bool SetHeight(int lineDoc, int height); + + void ShowAll(); +}; + +#endif diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx new file mode 100644 index 00000000..06a945f0 --- /dev/null +++ b/scintilla/src/Document.cxx @@ -0,0 +1,1727 @@ +// Scintilla source code edit control +/** @file Document.cxx + ** Text document that handles notifications, DBCS, styling, words and end of line. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" +#include "CharClassify.h" +#include "Document.h" +#include "RESearch.h" + +//Vitaliy +#include "UniConversion.h" + + +static inline void Platform_MakeUpperW(wchar_t* wstr, unsigned int) { + // TODO: Add platform-specific function here + + // Win32 example: + ::CharUpperW(wstr); +} + +static inline char Platform_MakeUpperChar(char ch) { + // TODO: Add platform-specific function here + + // Win32 example: + char str[2] = {ch, 0}; + ::CharUpperA(str); + ch = str[0]; + + // default: no conversion + return ch; +} + +static inline char Platform_MakeLowerChar(char ch) { + // TODO: Add platform-specific function here + + // Win32 example: + char str[2] = {ch, 0}; + ::CharLowerA(str); + ch = str[0]; + + // default: no conversion + return ch; +} +// yilatiV + +// This is ASCII specific but is safe with chars >= 0x80 +static inline bool isspacechar(unsigned char ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + +static inline bool IsPunctuation(char ch) { + return isascii(ch) && ispunct(ch); +} + +static inline bool IsADigit(char ch) { + return isascii(ch) && isdigit(ch); +} + +static inline bool IsLowerCase(char ch) { + return isascii(ch) && islower(ch); +} + +static inline bool IsUpperCase(char ch) { + return isascii(ch) && isupper(ch); +} + +Document::Document() { + refCount = 0; +#ifdef unix + eolMode = SC_EOL_LF; +#else + eolMode = SC_EOL_CRLF; +#endif + dbcsCodePage = 0; + stylingBits = 5; + stylingBitsMask = 0x1F; + stylingMask = 0; + endStyled = 0; + styleClock = 0; + enteredModification = 0; + enteredStyling = 0; + enteredReadOnlyCount = 0; + tabInChars = 8; + indentInChars = 0; + actualIndentInChars = 8; + useTabs = true; + tabIndents = true; + backspaceUnindents = false; + watchers = 0; + lenWatchers = 0; + + matchesValid = false; + pre = 0; + substituted = 0; +} + +Document::~Document() { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyDeleted(this, watchers[i].userData); + } + delete []watchers; + watchers = 0; + lenWatchers = 0; + delete pre; + pre = 0; + delete []substituted; + substituted = 0; +} + +// Increase reference count and return its previous value. +int Document::AddRef() { + return refCount++; +} + +// Decrease reference count and return its previous value. +// Delete the document if reference count reaches zero. +int Document::Release() { + int curRefCount = --refCount; + if (curRefCount == 0) + delete this; + return curRefCount; +} + +void Document::SetSavePoint() { + cb.SetSavePoint(); + NotifySavePoint(true); +} + +int Document::AddMark(int line, int markerNum) { + int prev = cb.AddMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); + return prev; +} + +void Document::AddMarkSet(int line, int valueSet) { + unsigned int m = valueSet; + for (int i = 0; m; i++, m >>= 1) + if (m & 1) + cb.AddMark(line, i); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); +} + +void Document::DeleteMark(int line, int markerNum) { + cb.DeleteMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); +} + +void Document::DeleteMarkFromHandle(int markerHandle) { + cb.DeleteMarkFromHandle(markerHandle); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + mh.line = -1; + NotifyModified(mh); +} + +void Document::DeleteAllMarks(int markerNum) { + cb.DeleteAllMarks(markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + mh.line = -1; + NotifyModified(mh); +} + +int Document::LineStart(int line) { + return cb.LineStart(line); +} + +int Document::LineEnd(int line) { + if (line == LinesTotal() - 1) { + return LineStart(line + 1); + } else { + int position = LineStart(line + 1) - 1; + // When line terminator is CR+LF, may need to go back one more + if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { + position--; + } + return position; + } +} + +int Document::LineFromPosition(int pos) { + return cb.LineFromPosition(pos); +} + +int Document::LineEndPosition(int position) { + return LineEnd(LineFromPosition(position)); +} + +int Document::VCHomePosition(int position) { + int line = LineFromPosition(position); + int startPosition = LineStart(line); + int endLine = LineStart(line + 1) - 1; + int startText = startPosition; + while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t' ) ) + startText++; + if (position == startText) + return startPosition; + else + return startText; +} + +int Document::SetLevel(int line, int level) { + int prev = cb.SetLevel(line, level); + if (prev != level) { + DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, + LineStart(line), 0, 0, 0); + mh.line = line; + mh.foldLevelNow = level; + mh.foldLevelPrev = prev; + NotifyModified(mh); + } + return prev; +} + +static bool IsSubordinate(int levelStart, int levelTry) { + if (levelTry & SC_FOLDLEVELWHITEFLAG) + return true; + else + return (levelStart & SC_FOLDLEVELNUMBERMASK) < (levelTry & SC_FOLDLEVELNUMBERMASK); +} + +int Document::GetLastChild(int lineParent, int level) { + if (level == -1) + level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK; + int maxLine = LinesTotal(); + int lineMaxSubord = lineParent; + while (lineMaxSubord < maxLine - 1) { + EnsureStyledTo(LineStart(lineMaxSubord + 2)); + if (!IsSubordinate(level, GetLevel(lineMaxSubord + 1))) + break; + lineMaxSubord++; + } + if (lineMaxSubord > lineParent) { + if (level > (GetLevel(lineMaxSubord + 1) & SC_FOLDLEVELNUMBERMASK)) { + // Have chewed up some whitespace that belongs to a parent so seek back + if (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG) { + lineMaxSubord--; + } + } + } + return lineMaxSubord; +} + +int Document::GetFoldParent(int line) { + int level = GetLevel(line) & SC_FOLDLEVELNUMBERMASK; + int lineLook = line - 1; + while ((lineLook > 0) && ( + (!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) || + ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) >= level)) + ) { + lineLook--; + } + if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) && + ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) < level)) { + return lineLook; + } else { + return -1; + } +} + +int Document::ClampPositionIntoDocument(int pos) { + return Platform::Clamp(pos, 0, Length()); +} + +bool Document::IsCrLf(int pos) { + if (pos < 0) + return false; + if (pos >= (Length() - 1)) + return false; + return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); +} + +static const int maxBytesInDBCSCharacter=5; + +int Document::LenChar(int pos) { + if (pos < 0) { + return 1; + } else if (IsCrLf(pos)) { + return 2; + } else if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + if (ch < 0x80) + return 1; + int len = 2; + if (ch >= (0x80 + 0x40 + 0x20)) + len = 3; + int lengthDoc = Length(); + if ((pos + len) > lengthDoc) + return lengthDoc -pos; + else + return len; + } else if (dbcsCodePage) { + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for (i=0; i= Length()) + return Length(); + + // PLATFORM_ASSERT(pos > 0 && pos < Length()); + if (checkLineEnd && IsCrLf(pos - 1)) { + if (moveDir > 0) + return pos + 1; + else + return pos - 1; + } + + // Not between CR and LF + + if (dbcsCodePage) { + if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) { + // ch is a trail byte + if (moveDir > 0) + pos++; + else + pos--; + ch = static_cast(cb.CharAt(pos)); + } + } else { + // Anchor DBCS calculations at start of line because start of line can + // not be a DBCS trail byte. + int posCheck = LineStart(LineFromPosition(pos)); + while (posCheck < pos) { + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for(i=0;i pos) { + if (moveDir > 0) { + return posCheck + mbsize; + } else { + return posCheck; + } + } + posCheck += mbsize; + } + } + } + + return pos; +} + +void Document::ModifiedAt(int pos) { + if (endStyled > pos) + endStyled = pos; +} + +void Document::CheckReadOnly() { + if (cb.IsReadOnly() && enteredReadOnlyCount == 0) { + enteredReadOnlyCount++; + NotifyModifyAttempt(); + enteredReadOnlyCount--; + } +} + +// Document only modified by gateways DeleteChars, InsertString, Undo, Redo, and SetStyleAt. +// SetStyleAt does not change the persistent state of a document + +bool Document::DeleteChars(int pos, int len) { + if (len == 0) + return false; + if ((pos + len) > Length()) + return false; + CheckReadOnly(); + if (enteredModification != 0) { + return false; + } else { + enteredModification++; + if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, + pos, len, + 0, 0)); + int prevLinesTotal = LinesTotal(); + bool startSavePoint = cb.IsSavePoint(); + bool startSequence = false; + const char *text = cb.DeleteChars(pos, len, startSequence); + if (startSavePoint && cb.IsCollectingUndo()) + NotifySavePoint(!startSavePoint); + if ((pos < Length()) || (pos == 0)) + ModifiedAt(pos); + else + ModifiedAt(pos-1); + NotifyModified( + DocModification( + SC_MOD_DELETETEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), + pos, len, + LinesTotal() - prevLinesTotal, text)); + } + enteredModification--; + } + return !cb.IsReadOnly(); +} + +/** + * Insert a string with a length. + */ +bool Document::InsertString(int position, const char *s, int insertLength) { + if (insertLength <= 0) { + return false; + } + CheckReadOnly(); + if (enteredModification != 0) { + return false; + } else { + enteredModification++; + if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, + position, insertLength, + 0, s)); + int prevLinesTotal = LinesTotal(); + bool startSavePoint = cb.IsSavePoint(); + bool startSequence = false; + const char *text = cb.InsertString(position, s, insertLength, startSequence); + if (startSavePoint && cb.IsCollectingUndo()) + NotifySavePoint(!startSavePoint); + ModifiedAt(position); + NotifyModified( + DocModification( + SC_MOD_INSERTTEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), + position, insertLength, + LinesTotal() - prevLinesTotal, text)); + } + enteredModification--; + } + return !cb.IsReadOnly(); +} + +int Document::Undo() { + int newPos = -1; + CheckReadOnly(); + if (enteredModification == 0) { + enteredModification++; + if (!cb.IsReadOnly()) { + bool startSavePoint = cb.IsSavePoint(); + bool multiLine = false; + int steps = cb.StartUndo(); + //Platform::DebugPrintf("Steps=%d\n", steps); + for (int step = 0; step < steps; step++) { + const int prevLinesTotal = LinesTotal(); + const Action &action = cb.GetUndoStep(); + if (action.at == removeAction) { + NotifyModified(DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); + } else { + NotifyModified(DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); + } + cb.PerformUndoStep(); + int cellPosition = action.position; + ModifiedAt(cellPosition); + newPos = cellPosition; + + int modFlags = SC_PERFORMED_UNDO; + // With undo, an insertion action becomes a deletion notification + if (action.at == removeAction) { + newPos += action.lenData; + modFlags |= SC_MOD_INSERTTEXT; + } else { + modFlags |= SC_MOD_DELETETEXT; + } + if (steps > 1) + modFlags |= SC_MULTISTEPUNDOREDO; + const int linesAdded = LinesTotal() - prevLinesTotal; + if (linesAdded != 0) + multiLine = true; + if (step == steps - 1) { + modFlags |= SC_LASTSTEPINUNDOREDO; + if (multiLine) + modFlags |= SC_MULTILINEUNDOREDO; + } + NotifyModified(DocModification(modFlags, cellPosition, action.lenData, + linesAdded, action.data)); + } + + bool endSavePoint = cb.IsSavePoint(); + if (startSavePoint != endSavePoint) + NotifySavePoint(endSavePoint); + } + enteredModification--; + } + return newPos; +} + +int Document::Redo() { + int newPos = -1; + CheckReadOnly(); + if (enteredModification == 0) { + enteredModification++; + if (!cb.IsReadOnly()) { + bool startSavePoint = cb.IsSavePoint(); + bool multiLine = false; + int steps = cb.StartRedo(); + for (int step = 0; step < steps; step++) { + const int prevLinesTotal = LinesTotal(); + const Action &action = cb.GetRedoStep(); + if (action.at == insertAction) { + NotifyModified(DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action)); + } else { + NotifyModified(DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action)); + } + cb.PerformRedoStep(); + ModifiedAt(action.position); + newPos = action.position; + + int modFlags = SC_PERFORMED_REDO; + if (action.at == insertAction) { + newPos += action.lenData; + modFlags |= SC_MOD_INSERTTEXT; + } else { + modFlags |= SC_MOD_DELETETEXT; + } + if (steps > 1) + modFlags |= SC_MULTISTEPUNDOREDO; + const int linesAdded = LinesTotal() - prevLinesTotal; + if (linesAdded != 0) + multiLine = true; + if (step == steps - 1) { + modFlags |= SC_LASTSTEPINUNDOREDO; + if (multiLine) + modFlags |= SC_MULTILINEUNDOREDO; + } + NotifyModified( + DocModification(modFlags, action.position, action.lenData, + linesAdded, action.data)); + } + + bool endSavePoint = cb.IsSavePoint(); + if (startSavePoint != endSavePoint) + NotifySavePoint(endSavePoint); + } + enteredModification--; + } + return newPos; +} + +/** + * Insert a single character. + */ +bool Document::InsertChar(int pos, char ch) { + char chs[1]; + chs[0] = ch; + return InsertString(pos, chs, 1); +} + +/** + * Insert a null terminated string. + */ +bool Document::InsertCString(int position, const char *s) { + return InsertString(position, s, strlen(s)); +} + +void Document::ChangeChar(int pos, char ch) { + DeleteChars(pos, 1); + InsertChar(pos, ch); +} + +void Document::DelChar(int pos) { + DeleteChars(pos, LenChar(pos)); +} + +void Document::DelCharBack(int pos) { + if (pos <= 0) { + return; + } else if (IsCrLf(pos - 2)) { + DeleteChars(pos - 2, 2); + } else if (dbcsCodePage) { + int startChar = MovePositionOutsideChar(pos - 1, -1, false); + DeleteChars(startChar, pos - startChar); + } else { + DeleteChars(pos - 1, 1); + } +} + +static bool isindentchar(char ch) { + return (ch == ' ') || (ch == '\t'); +} + +static int NextTab(int pos, int tabSize) { + return ((pos / tabSize) + 1) * tabSize; +} + +static void CreateIndentation(char *linebuf, int length, int indent, int tabSize, bool insertSpaces) { + length--; // ensure space for \0 + if (!insertSpaces) { + while ((indent >= tabSize) && (length > 0)) { + *linebuf++ = '\t'; + indent -= tabSize; + length--; + } + } + while ((indent > 0) && (length > 0)) { + *linebuf++ = ' '; + indent--; + length--; + } + *linebuf = '\0'; +} + +int Document::GetLineIndentation(int line) { + int indent = 0; + if ((line >= 0) && (line < LinesTotal())) { + int lineStart = LineStart(line); + int length = Length(); + for (int i = lineStart;i < length;i++) { + char ch = cb.CharAt(i); + if (ch == ' ') + indent++; + else if (ch == '\t') + indent = NextTab(indent, tabInChars); + else + return indent; + } + } + return indent; +} + +void Document::SetLineIndentation(int line, int indent) { + int indentOfLine = GetLineIndentation(line); + if (indent < 0) + indent = 0; + if (indent != indentOfLine) { + char linebuf[1000]; + CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs); + int thisLineStart = LineStart(line); + int indentPos = GetLineIndentPosition(line); + BeginUndoAction(); + DeleteChars(thisLineStart, indentPos - thisLineStart); + InsertCString(thisLineStart, linebuf); + EndUndoAction(); + } +} + +int Document::GetLineIndentPosition(int line) { + if (line < 0) + return 0; + int pos = LineStart(line); + int length = Length(); + while ((pos < length) && isindentchar(cb.CharAt(pos))) { + pos++; + } + return pos; +} + +int Document::GetColumn(int pos) { + int column = 0; + int line = LineFromPosition(pos); + if ((line >= 0) && (line < LinesTotal())) { + for (int i = LineStart(line);i < pos;) { + char ch = cb.CharAt(i); + if (ch == '\t') { + column = NextTab(column, tabInChars); + i++; + } else if (ch == '\r') { + return column; + } else if (ch == '\n') { + return column; + } else if (i >= Length()) { + return column; + } else { + column++; + i = MovePositionOutsideChar(i + 1, 1, false); + } + } + } + return column; +} + +int Document::FindColumn(int line, int column) { + int position = LineStart(line); + int columnCurrent = 0; + if ((line >= 0) && (line < LinesTotal())) { + while ((columnCurrent < column) && (position < Length())) { + char ch = cb.CharAt(position); + if (ch == '\t') { + columnCurrent = NextTab(columnCurrent, tabInChars); + position++; + } else if (ch == '\r') { + return position; + } else if (ch == '\n') { + return position; + } else { + columnCurrent++; + position = MovePositionOutsideChar(position + 1, 1, false); + } + } + } + return position; +} + +void Document::Indent(bool forwards, int lineBottom, int lineTop) { + // Dedent - suck white space off the front of the line to dedent by equivalent of a tab + for (int line = lineBottom; line >= lineTop; line--) { + int indentOfLine = GetLineIndentation(line); + if (forwards) { + if (LineStart(line) < LineEnd(line)) { + SetLineIndentation(line, indentOfLine + IndentSize()); + } + } else { + SetLineIndentation(line, indentOfLine - IndentSize()); + } + } +} + +// Convert line endings for a piece of text to a particular mode. +// Stop at len or when a NUL is found. +// Caller must delete the returned pointer. +char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode) { + char *dest = new char[2 * len + 1]; + const char *sptr = s; + char *dptr = dest; + for (size_t i = 0; (i < len) && (*sptr != '\0'); i++) { + if (*sptr == '\n' || *sptr == '\r') { + if (eolMode == SC_EOL_CR) { + *dptr++ = '\r'; + } else if (eolMode == SC_EOL_LF) { + *dptr++ = '\n'; + } else { // eolMode == SC_EOL_CRLF + *dptr++ = '\r'; + *dptr++ = '\n'; + } + if ((*sptr == '\r') && (i+1 < len) && (*(sptr+1) == '\n')) { + i++; + sptr++; + } + sptr++; + } else { + *dptr++ = *sptr++; + } + } + *dptr++ = '\0'; + *pLenOut = (dptr - dest) - 1; + return dest; +} + +void Document::ConvertLineEnds(int eolModeSet) { + BeginUndoAction(); + + for (int pos = 0; pos < Length(); pos++) { + if (cb.CharAt(pos) == '\r') { + if (cb.CharAt(pos + 1) == '\n') { + // CRLF + if (eolModeSet == SC_EOL_CR) { + DeleteChars(pos + 1, 1); // Delete the LF + } else if (eolModeSet == SC_EOL_LF) { + DeleteChars(pos, 1); // Delete the CR + } else { + pos++; + } + } else { + // CR + if (eolModeSet == SC_EOL_CRLF) { + InsertString(pos + 1, "\n", 1); // Insert LF + pos++; + } else if (eolModeSet == SC_EOL_LF) { + InsertString(pos, "\n", 1); // Insert LF + DeleteChars(pos + 1, 1); // Delete CR + } + } + } else if (cb.CharAt(pos) == '\n') { + // LF + if (eolModeSet == SC_EOL_CRLF) { + InsertString(pos, "\r", 1); // Insert CR + pos++; + } else if (eolModeSet == SC_EOL_CR) { + InsertString(pos, "\r", 1); // Insert CR + DeleteChars(pos + 1, 1); // Delete LF + } + } + } + + EndUndoAction(); +} + +bool Document::IsWhiteLine(int line) { + int currentChar = LineStart(line); + int endLine = LineEnd(line); + while (currentChar < endLine) { + if (cb.CharAt(currentChar) != ' ' && cb.CharAt(currentChar) != '\t') { + return false; + } + ++currentChar; + } + return true; +} + +int Document::ParaUp(int pos) { + int line = LineFromPosition(pos); + line--; + while (line >= 0 && IsWhiteLine(line)) { // skip empty lines + line--; + } + while (line >= 0 && !IsWhiteLine(line)) { // skip non-empty lines + line--; + } + line++; + return LineStart(line); +} + +int Document::ParaDown(int pos) { + int line = LineFromPosition(pos); + while (line < LinesTotal() && !IsWhiteLine(line)) { // skip non-empty lines + line++; + } + while (line < LinesTotal() && IsWhiteLine(line)) { // skip empty lines + line++; + } + if (line < LinesTotal()) + return LineStart(line); + else // end of a document + return LineEnd(line-1); +} + +CharClassify::cc Document::WordCharClass(unsigned char ch) { + if ((SC_CP_UTF8 == dbcsCodePage) && (ch >= 0x80)) + return CharClassify::ccWord; + return charClass.GetClass(ch); +} + +/** + * Used by commmands that want to select whole words. + * Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0. + */ +int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) { + CharClassify::cc ccStart = CharClassify::ccWord; + if (delta < 0) { + if (!onlyWordCharacters) + ccStart = WordCharClass(cb.CharAt(pos-1)); + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) + pos--; + } else { + if (!onlyWordCharacters && pos < Length()) + ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) + pos++; + } + return MovePositionOutsideChar(pos, delta); +} + +/** + * Find the start of the next word in either a forward (delta >= 0) or backwards direction + * (delta < 0). + * This is looking for a transition between character classes although there is also some + * additional movement to transit white space. + * Used by cursor movement by word commands. + */ +int Document::NextWordStart(int pos, int delta) { + if (delta < 0) { + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace)) + pos--; + if (pos > 0) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1)); + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) { + pos--; + } + } + } else { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) + pos++; + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace)) + pos++; + } + return pos; +} + +/** + * Find the end of the next word in either a forward (delta >= 0) or backwards direction + * (delta < 0). + * This is looking for a transition between character classes although there is also some + * additional movement to transit white space. + * Used by cursor movement by word commands. + */ +int Document::NextWordEnd(int pos, int delta) { + if (delta < 0) { + if (pos > 0) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1)); + if (ccStart != CharClassify::ccSpace) { + while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == ccStart) { + pos--; + } + } + while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace) { + pos--; + } + } + } else { + while (pos < Length() && WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace) { + pos++; + } + if (pos < Length()) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < Length() && WordCharClass(cb.CharAt(pos)) == ccStart) { + pos++; + } + } + } + return pos; +} + +/** + * Check that the character at the given position is a word or punctuation character and that + * the previous character is of a different character class. + */ +bool Document::IsWordStartAt(int pos) { + if (pos > 0) { + CharClassify::cc ccPos = WordCharClass(CharAt(pos)); + return (ccPos == CharClassify::ccWord || ccPos == CharClassify::ccPunctuation) && + (ccPos != WordCharClass(CharAt(pos - 1))); + } + return true; +} + +/** + * Check that the character at the given position is a word or punctuation character and that + * the next character is of a different character class. + */ +bool Document::IsWordEndAt(int pos) { + if (pos < Length()) { + CharClassify::cc ccPrev = WordCharClass(CharAt(pos-1)); + return (ccPrev == CharClassify::ccWord || ccPrev == CharClassify::ccPunctuation) && + (ccPrev != WordCharClass(CharAt(pos))); + } + return true; +} + +/** + * Check that the given range is has transitions between character classes at both + * ends and where the characters on the inside are word or punctuation characters. + */ +bool Document::IsWordAt(int start, int end) { + return IsWordStartAt(start) && IsWordEndAt(end); +} + +// The comparison and case changing functions here assume ASCII +// or extended ASCII such as the normal Windows code page. + +//Vitaliy +// NOTE: this function is called for non-Unicode characters only! +// ( i.e. when (!dbcsCodePage || isascii(ch)) ) +static inline char MakeUpperCase(char ch) { + if (ch >= 'A' && ch <= 'Z') + return ch; + else if (ch >= 'a' && ch <= 'z') + return static_cast(ch - 'a' + 'A'); + else + return Platform_MakeUpperChar(ch); +} + + + +// NOTE: this function is called for non-Unicode characters only! +// ( i.e. when (!dbcsCodePage || isascii(ch)) ) +static inline char MakeLowerCase(char ch) { + if (ch >= 'a' && ch <= 'z') + return ch; + else if (ch >= 'A' && ch <= 'Z') + return static_cast(ch - 'A' + 'a'); + else + return Platform_MakeLowerChar(ch); +} +//yilatiV + +// Define a way for the Regular Expression code to access the document +class DocumentIndexer : public CharacterIndexer { + Document *pdoc; + int end; +public: + DocumentIndexer(Document *pdoc_, int end_) : + pdoc(pdoc_), end(end_) { + } + + virtual ~DocumentIndexer() { + } + + virtual char CharAt(int index) { + if (index < 0 || index >= end) + return 0; + else + return pdoc->CharAt(index); + } +}; + +/** + * Find text in document, supporting both forward and backward + * searches (just pass minPos > maxPos to do a backward search) + * Has not been tested with backwards DBCS searches yet. + */ +long Document::FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, + int *length) { + if (regExp) { + if (!pre) + pre = new RESearch(&charClass); + if (!pre) + return -1; + + int increment = (minPos <= maxPos) ? 1 : -1; + + int startPos = minPos; + int endPos = maxPos; + + // Range endpoints should not be inside DBCS characters, but just in case, move them. + startPos = MovePositionOutsideChar(startPos, 1, false); + endPos = MovePositionOutsideChar(endPos, 1, false); + + const char *errmsg = pre->Compile(s, *length, caseSensitive, posix); + if (errmsg) { + return -1; + } + // Find a variable in a property file: \$(\([A-Za-z0-9_.]+\)) + // Replace first '.' with '-' in each property file variable reference: + // Search: \$(\([A-Za-z0-9_-]+\)\.\([A-Za-z0-9_.]+\)) + // Replace: $(\1-\2) + int lineRangeStart = LineFromPosition(startPos); + int lineRangeEnd = LineFromPosition(endPos); + if ((increment == 1) && + (startPos >= LineEnd(lineRangeStart)) && + (lineRangeStart < lineRangeEnd)) { + // the start position is at end of line or between line end characters. + lineRangeStart++; + startPos = LineStart(lineRangeStart); + } + int pos = -1; + int lenRet = 0; + char searchEnd = s[*length - 1]; + int lineRangeBreak = lineRangeEnd + increment; + for (int line = lineRangeStart; line != lineRangeBreak; line += increment) { + int startOfLine = LineStart(line); + int endOfLine = LineEnd(line); + if (increment == 1) { + if (line == lineRangeStart) { + if ((startPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if start position after start of line + startOfLine = startPos; + } + if (line == lineRangeEnd) { + if ((endPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if end position before end of line + endOfLine = endPos; + } + } else { + if (line == lineRangeEnd) { + if ((endPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if end position after start of line + startOfLine = endPos; + } + if (line == lineRangeStart) { + if ((startPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if start position before end of line + endOfLine = startPos; + } + } + + DocumentIndexer di(this, endOfLine); + int success = pre->Execute(di, startOfLine, endOfLine); + if (success) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + if (increment == -1) { + // Check for the last match on this line. + int repetitions = 1000; // Break out of infinite loop + while (success && (pre->eopat[0] <= endOfLine) && (repetitions--)) { + success = pre->Execute(di, pos+1, endOfLine); + if (success) { + if (pre->eopat[0] <= minPos) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + } else { + success = 0; + } + } + } + } + break; + } + } + *length = lenRet; + return pos; + + } else { + + bool forward = minPos <= maxPos; + int increment = forward ? 1 : -1; + + // Range endpoints should not be inside DBCS characters, but just in case, move them. + int startPos = MovePositionOutsideChar(minPos, increment, false); + int endPos = MovePositionOutsideChar(maxPos, increment, false); + + // Compute actual search ranges needed + int lengthFind = *length; + if (lengthFind == -1) + lengthFind = static_cast(strlen(s)); + int endSearch = endPos; + if (startPos <= endPos) { + endSearch = endPos - lengthFind + 1; + } + //Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind); + char firstChar = s[0]; + wchar_t* ws_upr = NULL; + int ws_len = 0; + char str[8]; + wchar_t wstr[4]; + if (!caseSensitive && !dbcsCodePage) + firstChar = static_cast(MakeUpperCase(firstChar)); + int pos = forward ? startPos : (startPos - 1); + if (dbcsCodePage) { + if (!caseSensitive && dbcsCodePage == SC_CP_UTF8) { + ws_len = (int) UCS2Length(s, lengthFind); + if (ws_len != lengthFind) { + int ws_size = (((ws_len + 1) >> 4) + 1) << 4; // 16-chars alignment + ws_upr = new wchar_t[ws_size]; + if (ws_upr != NULL) { + UCS2FromUTF8(s, lengthFind, ws_upr, ws_size); + ws_upr[ws_len] = 0; + Platform_MakeUpperW(ws_upr, ws_len); + // now ws_upr is UCS2 s in upper-case + } + } + } + if (!caseSensitive && ws_upr == NULL) { + // the text is Latin i.e. one character is one byte + // ws_upr is NULL + // BUT !!! ws_upr can be NULL if dbcsCodePage != SC_CP_UTF8 + // (also ws_upr = new wchar_t[ws_size] can be NULL) + + // for latin characters in non-UTF8 Unicode text + // (thanks to Airix Z) + if (isascii(firstChar)) + firstChar = static_cast(MakeUpperCase(firstChar)); + } + if (pos >= 0) + pos = MovePositionOutsideChar(pos, increment, false); + } + while (forward ? (pos < endSearch) : (pos >= endSearch)) { + char ch = CharAt(pos); + if (caseSensitive) { + if (ch == firstChar) { + bool found = true; + if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; + for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { + ch = CharAt(pos + posMatch); + if (ch != s[posMatch]) + found = false; + } + if (found) { + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; + } + } + } else { + bool bMatch = false; + int charLen = 0; + + if (!dbcsCodePage) { + bMatch = (MakeUpperCase(ch) == firstChar); + } + else if (ws_upr == NULL) { + // for latin characters in non-UTF8 Unicode text + // (thanks to Airix Z) + + if (isascii(ch)) + bMatch = (MakeUpperCase(ch) == firstChar); + else + bMatch = (ch == firstChar); + } + else { + // LenChar returns 2 for "\r\n" + // this is wrong for UTF8 because "\r\n" + // is not one character with length=2 + charLen = IsCrLf(pos) ? 1 : LenChar(pos); + for (int i = 0; i < charLen; i++) { + str[i] = CharAt(pos+i); + } + str[charLen] = 0; + UCS2FromUTF8(str, charLen, wstr, 2); + wstr[1] = 0; + Platform_MakeUpperW(wstr, 1); + bMatch = (ws_upr[0] == wstr[0]); + + /* + if (bMatch) + MessageBoxA(NULL, "MatchCaseInsensitive is true!!!", "", 0); + // OK + */ + } + if (bMatch) { + bool found = true; + if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; + if (!dbcsCodePage || ws_upr == NULL) { + /* + MessageBoxA(NULL, "Text is Latin (ws_upr == NULL)", "First character matched", 0); + */ + for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { + ch = CharAt(pos + posMatch); + char ch2 = s[posMatch]; + // for latin characters in non-UTF8 Unicode text + // (thanks to Airix Z) + if (!dbcsCodePage || (isascii(ch) && isascii(ch2))) { + if (MakeUpperCase(ch) != MakeUpperCase(ch2)) + found = false; + } else { + if (ch != ch2) + found = false; + } + } + } + else { + int i1, i2; + + /* + MessageBoxA(NULL, "first matched!!!", "", 0); + // OK + */ + i1 = 1; + i2 = pos + charLen; + while (found && i1 < ws_len) { + // LenChar returns 2 for "\r\n" + // this is wrong for UTF8 because "\r\n" + // is not one character with length=2 + charLen = IsCrLf(i2) ? 1 : LenChar(i2); + for (int i = 0; i < charLen; i++) { + str[i] = CharAt(i2+i); + } + str[charLen] = 0; + UCS2FromUTF8(str, charLen, wstr, 2); + wstr[1] = 0; + Platform_MakeUpperW(wstr, 1); + found = (ws_upr[i1] == wstr[0]); + i1++; + i2 += charLen; + } + } + if (found) { + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) { + if (ws_upr != NULL) { + delete [] ws_upr; + ws_upr = NULL; + } + return pos; + } + } + } + } + pos += increment; + if (dbcsCodePage && (pos >= 0)) { + // Ensure trying to match from start of character + pos = MovePositionOutsideChar(pos, increment, false); + } + } + if (ws_upr != NULL) { + delete [] ws_upr; + ws_upr = NULL; + } + } + //Platform::DebugPrintf("Not found\n"); + return -1; +} + +const char *Document::SubstituteByPosition(const char *text, int *length) { + if (!pre) + return 0; + delete []substituted; + substituted = 0; + DocumentIndexer di(this, Length()); + if (!pre->GrabMatches(di)) + return 0; + unsigned int lenResult = 0; + for (int i = 0; i < *length; i++) { + if (text[i] == '\\') { + if (text[i + 1] >= '1' && text[i + 1] <= '9') { + unsigned int patNum = text[i + 1] - '0'; + lenResult += pre->eopat[patNum] - pre->bopat[patNum]; + i++; + } else { + switch (text[i + 1]) { + case 'a': + case 'b': + case 'f': + case 'n': + case 'r': + case 't': + case 'v': + i++; + } + lenResult++; + } + } else { + lenResult++; + } + } + substituted = new char[lenResult + 1]; + if (!substituted) + return 0; + char *o = substituted; + for (int j = 0; j < *length; j++) { + if (text[j] == '\\') { + if (text[j + 1] >= '1' && text[j + 1] <= '9') { + unsigned int patNum = text[j + 1] - '0'; + unsigned int len = pre->eopat[patNum] - pre->bopat[patNum]; + if (pre->pat[patNum]) // Will be null if try for a match that did not occur + memcpy(o, pre->pat[patNum], len); + o += len; + j++; + } else { + j++; + switch (text[j]) { + case 'a': + *o++ = '\a'; + break; + case 'b': + *o++ = '\b'; + break; + case 'f': + *o++ = '\f'; + break; + case 'n': + *o++ = '\n'; + break; + case 'r': + *o++ = '\r'; + break; + case 't': + *o++ = '\t'; + break; + case 'v': + *o++ = '\v'; + break; + default: + *o++ = '\\'; + j--; + } + } + } else { + *o++ = text[j]; + } + } + *o = '\0'; + *length = lenResult; + return substituted; +} + +int Document::LinesTotal() { + return cb.Lines(); +} + +void Document::ChangeCase(Range r, bool makeUpperCase) { + for (int pos = r.start; pos < r.end;) { + int len = LenChar(pos); + if (len == 1) { + char ch = CharAt(pos); + if (makeUpperCase) { + if (IsLowerCase(ch)) { + ChangeChar(pos, static_cast(MakeUpperCase(ch))); + } + } else { + if (IsUpperCase(ch)) { + ChangeChar(pos, static_cast(MakeLowerCase(ch))); + } + } + } + pos += len; + } +} + +void Document::SetDefaultCharClasses(bool includeWordClass) { + charClass.SetDefaultCharClasses(includeWordClass); +} + +void Document::SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass) { + charClass.SetCharClasses(chars, newCharClass); +} + +void Document::SetStylingBits(int bits) { + stylingBits = bits; + stylingBitsMask = 0; + for (int bit = 0; bit < stylingBits; bit++) { + stylingBitsMask <<= 1; + stylingBitsMask |= 1; + } +} + +void Document::StartStyling(int position, char mask) { + stylingMask = mask; + endStyled = position; +} + +bool Document::SetStyleFor(int length, char style) { + if (enteredStyling != 0) { + return false; + } else { + enteredStyling++; + style &= stylingMask; + int prevEndStyled = endStyled; + if (cb.SetStyleFor(endStyled, length, style, stylingMask)) { + DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, + prevEndStyled, length); + NotifyModified(mh); + } + endStyled += length; + enteredStyling--; + return true; + } +} + +bool Document::SetStyles(int length, char *styles) { + if (enteredStyling != 0) { + return false; + } else { + enteredStyling++; + bool didChange = false; + int startMod = 0; + int endMod = 0; + for (int iPos = 0; iPos < length; iPos++, endStyled++) { + PLATFORM_ASSERT(endStyled < Length()); + if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) { + if (!didChange) { + startMod = endStyled; + } + didChange = true; + endMod = endStyled; + } + } + if (didChange) { + DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, + startMod, endMod - startMod + 1); + NotifyModified(mh); + } + enteredStyling--; + return true; + } +} + +void Document::EnsureStyledTo(int pos) { + if ((enteredStyling == 0) && (pos > GetEndStyled())) { + IncrementStyleClock(); + // Ask the watchers to style, and stop as soon as one responds. + for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) { + watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos); + } + } +} + +void Document::IncrementStyleClock() { + styleClock++; + if (styleClock > 0x100000) { + styleClock = 0; + } +} + +bool Document::AddWatcher(DocWatcher *watcher, void *userData) { + for (int i = 0; i < lenWatchers; i++) { + if ((watchers[i].watcher == watcher) && + (watchers[i].userData == userData)) + return false; + } + WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers + 1]; + if (!pwNew) + return false; + for (int j = 0; j < lenWatchers; j++) + pwNew[j] = watchers[j]; + pwNew[lenWatchers].watcher = watcher; + pwNew[lenWatchers].userData = userData; + delete []watchers; + watchers = pwNew; + lenWatchers++; + return true; +} + +bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) { + for (int i = 0; i < lenWatchers; i++) { + if ((watchers[i].watcher == watcher) && + (watchers[i].userData == userData)) { + if (lenWatchers == 1) { + delete []watchers; + watchers = 0; + lenWatchers = 0; + } else { + WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers]; + if (!pwNew) + return false; + for (int j = 0; j < lenWatchers - 1; j++) { + pwNew[j] = (j < i) ? watchers[j] : watchers[j + 1]; + } + delete []watchers; + watchers = pwNew; + lenWatchers--; + } + return true; + } + } + return false; +} + +void Document::NotifyModifyAttempt() { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyModifyAttempt(this, watchers[i].userData); + } +} + +void Document::NotifySavePoint(bool atSavePoint) { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifySavePoint(this, watchers[i].userData, atSavePoint); + } +} + +void Document::NotifyModified(DocModification mh) { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyModified(this, mh, watchers[i].userData); + } +} + +bool Document::IsWordPartSeparator(char ch) { + return (WordCharClass(ch) == CharClassify::ccWord) && IsPunctuation(ch); +} + +int Document::WordPartLeft(int pos) { + if (pos > 0) { + --pos; + char startChar = cb.CharAt(pos); + if (IsWordPartSeparator(startChar)) { + while (pos > 0 && IsWordPartSeparator(cb.CharAt(pos))) { + --pos; + } + } + if (pos > 0) { + startChar = cb.CharAt(pos); + --pos; + if (IsLowerCase(startChar)) { + while (pos > 0 && IsLowerCase(cb.CharAt(pos))) + --pos; + if (!IsUpperCase(cb.CharAt(pos)) && !IsLowerCase(cb.CharAt(pos))) + ++pos; + } else if (IsUpperCase(startChar)) { + while (pos > 0 && IsUpperCase(cb.CharAt(pos))) + --pos; + if (!IsUpperCase(cb.CharAt(pos))) + ++pos; + } else if (IsADigit(startChar)) { + while (pos > 0 && IsADigit(cb.CharAt(pos))) + --pos; + if (!IsADigit(cb.CharAt(pos))) + ++pos; + } else if (IsPunctuation(startChar)) { + while (pos > 0 && IsPunctuation(cb.CharAt(pos))) + --pos; + if (!IsPunctuation(cb.CharAt(pos))) + ++pos; + } else if (isspacechar(startChar)) { + while (pos > 0 && isspacechar(cb.CharAt(pos))) + --pos; + if (!isspacechar(cb.CharAt(pos))) + ++pos; + } else if (!isascii(startChar)) { + while (pos > 0 && !isascii(cb.CharAt(pos))) + --pos; + if (isascii(cb.CharAt(pos))) + ++pos; + } else { + ++pos; + } + } + } + return pos; +} + +int Document::WordPartRight(int pos) { + char startChar = cb.CharAt(pos); + int length = Length(); + if (IsWordPartSeparator(startChar)) { + while (pos < length && IsWordPartSeparator(cb.CharAt(pos))) + ++pos; + startChar = cb.CharAt(pos); + } + if (!isascii(startChar)) { + while (pos < length && !isascii(cb.CharAt(pos))) + ++pos; + } else if (IsLowerCase(startChar)) { + while (pos < length && IsLowerCase(cb.CharAt(pos))) + ++pos; + } else if (IsUpperCase(startChar)) { + if (IsLowerCase(cb.CharAt(pos + 1))) { + ++pos; + while (pos < length && IsLowerCase(cb.CharAt(pos))) + ++pos; + } else { + while (pos < length && IsUpperCase(cb.CharAt(pos))) + ++pos; + } + if (IsLowerCase(cb.CharAt(pos)) && IsUpperCase(cb.CharAt(pos - 1))) + --pos; + } else if (IsADigit(startChar)) { + while (pos < length && IsADigit(cb.CharAt(pos))) + ++pos; + } else if (IsPunctuation(startChar)) { + while (pos < length && IsPunctuation(cb.CharAt(pos))) + ++pos; + } else if (isspacechar(startChar)) { + while (pos < length && isspacechar(cb.CharAt(pos))) + ++pos; + } else { + ++pos; + } + return pos; +} + +bool IsLineEndChar(char c) { + return (c == '\n' || c == '\r'); +} + +int Document::ExtendStyleRange(int pos, int delta, bool singleLine) { + int sStart = cb.StyleAt(pos); + if (delta < 0) { + while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) + pos--; + pos++; + } else { + while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) + pos++; + } + return pos; +} + +static char BraceOpposite(char ch) { + switch (ch) { + case '(': + return ')'; + case ')': + return '('; + case '[': + return ']'; + case ']': + return '['; + case '{': + return '}'; + case '}': + return '{'; + case '<': + return '>'; + case '>': + return '<'; + default: + return '\0'; + } +} + +// TODO: should be able to extend styled region to find matching brace +int Document::BraceMatch(int position, int /*maxReStyle*/) { + char chBrace = CharAt(position); + char chSeek = BraceOpposite(chBrace); + if (chSeek == '\0') + return - 1; + char styBrace = static_cast(StyleAt(position) & stylingBitsMask); + int direction = -1; + if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') + direction = 1; + int depth = 1; + position = position + direction; + while ((position >= 0) && (position < Length())) { + position = MovePositionOutsideChar(position, direction); + char chAtPos = CharAt(position); + char styAtPos = static_cast(StyleAt(position) & stylingBitsMask); + if ((position > GetEndStyled()) || (styAtPos == styBrace)) { + if (chAtPos == chBrace) + depth++; + if (chAtPos == chSeek) + depth--; + if (depth == 0) + return position; + } + position = position + direction; + } + return - 1; +} diff --git a/scintilla/src/Document.cxx.bak b/scintilla/src/Document.cxx.bak new file mode 100644 index 00000000..23552cab --- /dev/null +++ b/scintilla/src/Document.cxx.bak @@ -0,0 +1,1612 @@ +// Scintilla source code edit control +/** @file Document.cxx + ** Text document that handles notifications, DBCS, styling, words and end of line. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" +#include "CharClassify.h" +#include "Document.h" +#include "RESearch.h" + +//Vitaliy +#include "UniConversion.h" + + +static inline void Platform_MakeUpperW(wchar_t* wstr, unsigned int) { + // TODO: Add platform-specific function here + + // Win32 example: + ::CharUpperW(wstr); +} + +static inline char Platform_MakeUpperChar(char ch) { + // TODO: Add platform-specific function here + + // Win32 example: + char str[2] = {ch, 0}; + ::CharUpperA(str); + ch = str[0]; + + // default: no conversion + return ch; +} + +static inline char Platform_MakeLowerChar(char ch) { + // TODO: Add platform-specific function here + + // Win32 example: + char str[2] = {ch, 0}; + ::CharLowerA(str); + ch = str[0]; + + // default: no conversion + return ch; +} +// yilatiV + +// This is ASCII specific but is safe with chars >= 0x80 +static inline bool isspacechar(unsigned char ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + +static inline bool IsPunctuation(char ch) { + return isascii(ch) && ispunct(ch); +} + +static inline bool IsADigit(char ch) { + return isascii(ch) && isdigit(ch); +} + +static inline bool IsLowerCase(char ch) { + return isascii(ch) && islower(ch); +} + +static inline bool IsUpperCase(char ch) { + return isascii(ch) && isupper(ch); +} + +Document::Document() { + refCount = 0; +#ifdef unix + eolMode = SC_EOL_LF; +#else + eolMode = SC_EOL_CRLF; +#endif + dbcsCodePage = 0; + stylingBits = 5; + stylingBitsMask = 0x1F; + stylingMask = 0; + endStyled = 0; + styleClock = 0; + enteredModification = 0; + enteredStyling = 0; + enteredReadOnlyCount = 0; + tabInChars = 8; + indentInChars = 0; + actualIndentInChars = 8; + useTabs = true; + tabIndents = true; + backspaceUnindents = false; + watchers = 0; + lenWatchers = 0; + + matchesValid = false; + pre = 0; + substituted = 0; +} + +Document::~Document() { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyDeleted(this, watchers[i].userData); + } + delete []watchers; + watchers = 0; + lenWatchers = 0; + delete pre; + pre = 0; + delete []substituted; + substituted = 0; +} + +// Increase reference count and return its previous value. +int Document::AddRef() { + return refCount++; +} + +// Decrease reference count and return its previous value. +// Delete the document if reference count reaches zero. +int Document::Release() { + int curRefCount = --refCount; + if (curRefCount == 0) + delete this; + return curRefCount; +} + +void Document::SetSavePoint() { + cb.SetSavePoint(); + NotifySavePoint(true); +} + +int Document::AddMark(int line, int markerNum) { + int prev = cb.AddMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); + return prev; +} + +void Document::AddMarkSet(int line, int valueSet) { + unsigned int m = valueSet; + for (int i = 0; m; i++, m >>= 1) + if (m & 1) + cb.AddMark(line, i); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); +} + +void Document::DeleteMark(int line, int markerNum) { + cb.DeleteMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); +} + +void Document::DeleteMarkFromHandle(int markerHandle) { + cb.DeleteMarkFromHandle(markerHandle); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + mh.line = -1; + NotifyModified(mh); +} + +void Document::DeleteAllMarks(int markerNum) { + cb.DeleteAllMarks(markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + mh.line = -1; + NotifyModified(mh); +} + +int Document::LineStart(int line) { + return cb.LineStart(line); +} + +int Document::LineEnd(int line) { + if (line == LinesTotal() - 1) { + return LineStart(line + 1); + } else { + int position = LineStart(line + 1) - 1; + // When line terminator is CR+LF, may need to go back one more + if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { + position--; + } + return position; + } +} + +int Document::LineFromPosition(int pos) { + return cb.LineFromPosition(pos); +} + +int Document::LineEndPosition(int position) { + return LineEnd(LineFromPosition(position)); +} + +int Document::VCHomePosition(int position) { + int line = LineFromPosition(position); + int startPosition = LineStart(line); + int endLine = LineStart(line + 1) - 1; + int startText = startPosition; + while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t' ) ) + startText++; + if (position == startText) + return startPosition; + else + return startText; +} + +int Document::SetLevel(int line, int level) { + int prev = cb.SetLevel(line, level); + if (prev != level) { + DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, + LineStart(line), 0, 0, 0); + mh.line = line; + mh.foldLevelNow = level; + mh.foldLevelPrev = prev; + NotifyModified(mh); + } + return prev; +} + +static bool IsSubordinate(int levelStart, int levelTry) { + if (levelTry & SC_FOLDLEVELWHITEFLAG) + return true; + else + return (levelStart & SC_FOLDLEVELNUMBERMASK) < (levelTry & SC_FOLDLEVELNUMBERMASK); +} + +int Document::GetLastChild(int lineParent, int level) { + if (level == -1) + level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK; + int maxLine = LinesTotal(); + int lineMaxSubord = lineParent; + while (lineMaxSubord < maxLine - 1) { + EnsureStyledTo(LineStart(lineMaxSubord + 2)); + if (!IsSubordinate(level, GetLevel(lineMaxSubord + 1))) + break; + lineMaxSubord++; + } + if (lineMaxSubord > lineParent) { + if (level > (GetLevel(lineMaxSubord + 1) & SC_FOLDLEVELNUMBERMASK)) { + // Have chewed up some whitespace that belongs to a parent so seek back + if (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG) { + lineMaxSubord--; + } + } + } + return lineMaxSubord; +} + +int Document::GetFoldParent(int line) { + int level = GetLevel(line) & SC_FOLDLEVELNUMBERMASK; + int lineLook = line - 1; + while ((lineLook > 0) && ( + (!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) || + ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) >= level)) + ) { + lineLook--; + } + if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) && + ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) < level)) { + return lineLook; + } else { + return -1; + } +} + +int Document::ClampPositionIntoDocument(int pos) { + return Platform::Clamp(pos, 0, Length()); +} + +bool Document::IsCrLf(int pos) { + if (pos < 0) + return false; + if (pos >= (Length() - 1)) + return false; + return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); +} + +static const int maxBytesInDBCSCharacter=5; + +int Document::LenChar(int pos) { + if (pos < 0) { + return 1; + } else if (IsCrLf(pos)) { + return 2; + } else if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + if (ch < 0x80) + return 1; + int len = 2; + if (ch >= (0x80 + 0x40 + 0x20)) + len = 3; + int lengthDoc = Length(); + if ((pos + len) > lengthDoc) + return lengthDoc -pos; + else + return len; + } else if (dbcsCodePage) { + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for (i=0; i= Length()) + return Length(); + + // PLATFORM_ASSERT(pos > 0 && pos < Length()); + if (checkLineEnd && IsCrLf(pos - 1)) { + if (moveDir > 0) + return pos + 1; + else + return pos - 1; + } + + // Not between CR and LF + + if (dbcsCodePage) { + if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) { + // ch is a trail byte + if (moveDir > 0) + pos++; + else + pos--; + ch = static_cast(cb.CharAt(pos)); + } + } else { + // Anchor DBCS calculations at start of line because start of line can + // not be a DBCS trail byte. + int posCheck = LineStart(LineFromPosition(pos)); + while (posCheck < pos) { + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for(i=0;i pos) { + if (moveDir > 0) { + return posCheck + mbsize; + } else { + return posCheck; + } + } + posCheck += mbsize; + } + } + } + + return pos; +} + +void Document::ModifiedAt(int pos) { + if (endStyled > pos) + endStyled = pos; +} + +void Document::CheckReadOnly() { + if (cb.IsReadOnly() && enteredReadOnlyCount == 0) { + enteredReadOnlyCount++; + NotifyModifyAttempt(); + enteredReadOnlyCount--; + } +} + +// Document only modified by gateways DeleteChars, InsertString, Undo, Redo, and SetStyleAt. +// SetStyleAt does not change the persistent state of a document + +bool Document::DeleteChars(int pos, int len) { + if (len == 0) + return false; + if ((pos + len) > Length()) + return false; + CheckReadOnly(); + if (enteredModification != 0) { + return false; + } else { + enteredModification++; + if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, + pos, len, + 0, 0)); + int prevLinesTotal = LinesTotal(); + bool startSavePoint = cb.IsSavePoint(); + bool startSequence = false; + const char *text = cb.DeleteChars(pos, len, startSequence); + if (startSavePoint && cb.IsCollectingUndo()) + NotifySavePoint(!startSavePoint); + if ((pos < Length()) || (pos == 0)) + ModifiedAt(pos); + else + ModifiedAt(pos-1); + NotifyModified( + DocModification( + SC_MOD_DELETETEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), + pos, len, + LinesTotal() - prevLinesTotal, text)); + } + enteredModification--; + } + return !cb.IsReadOnly(); +} + +/** + * Insert a string with a length. + */ +bool Document::InsertString(int position, const char *s, int insertLength) { + if (insertLength <= 0) { + return false; + } + CheckReadOnly(); + if (enteredModification != 0) { + return false; + } else { + enteredModification++; + if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, + position, insertLength, + 0, s)); + int prevLinesTotal = LinesTotal(); + bool startSavePoint = cb.IsSavePoint(); + bool startSequence = false; + const char *text = cb.InsertString(position, s, insertLength, startSequence); + if (startSavePoint && cb.IsCollectingUndo()) + NotifySavePoint(!startSavePoint); + ModifiedAt(position); + NotifyModified( + DocModification( + SC_MOD_INSERTTEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), + position, insertLength, + LinesTotal() - prevLinesTotal, text)); + } + enteredModification--; + } + return !cb.IsReadOnly(); +} + +int Document::Undo() { + int newPos = -1; + CheckReadOnly(); + if (enteredModification == 0) { + enteredModification++; + if (!cb.IsReadOnly()) { + bool startSavePoint = cb.IsSavePoint(); + bool multiLine = false; + int steps = cb.StartUndo(); + //Platform::DebugPrintf("Steps=%d\n", steps); + for (int step = 0; step < steps; step++) { + const int prevLinesTotal = LinesTotal(); + const Action &action = cb.GetUndoStep(); + if (action.at == removeAction) { + NotifyModified(DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); + } else { + NotifyModified(DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); + } + cb.PerformUndoStep(); + int cellPosition = action.position; + ModifiedAt(cellPosition); + newPos = cellPosition; + + int modFlags = SC_PERFORMED_UNDO; + // With undo, an insertion action becomes a deletion notification + if (action.at == removeAction) { + newPos += action.lenData; + modFlags |= SC_MOD_INSERTTEXT; + } else { + modFlags |= SC_MOD_DELETETEXT; + } + if (steps > 1) + modFlags |= SC_MULTISTEPUNDOREDO; + const int linesAdded = LinesTotal() - prevLinesTotal; + if (linesAdded != 0) + multiLine = true; + if (step == steps - 1) { + modFlags |= SC_LASTSTEPINUNDOREDO; + if (multiLine) + modFlags |= SC_MULTILINEUNDOREDO; + } + NotifyModified(DocModification(modFlags, cellPosition, action.lenData, + linesAdded, action.data)); + } + + bool endSavePoint = cb.IsSavePoint(); + if (startSavePoint != endSavePoint) + NotifySavePoint(endSavePoint); + } + enteredModification--; + } + return newPos; +} + +int Document::Redo() { + int newPos = -1; + CheckReadOnly(); + if (enteredModification == 0) { + enteredModification++; + if (!cb.IsReadOnly()) { + bool startSavePoint = cb.IsSavePoint(); + bool multiLine = false; + int steps = cb.StartRedo(); + for (int step = 0; step < steps; step++) { + const int prevLinesTotal = LinesTotal(); + const Action &action = cb.GetRedoStep(); + if (action.at == insertAction) { + NotifyModified(DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action)); + } else { + NotifyModified(DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action)); + } + cb.PerformRedoStep(); + ModifiedAt(action.position); + newPos = action.position; + + int modFlags = SC_PERFORMED_REDO; + if (action.at == insertAction) { + newPos += action.lenData; + modFlags |= SC_MOD_INSERTTEXT; + } else { + modFlags |= SC_MOD_DELETETEXT; + } + if (steps > 1) + modFlags |= SC_MULTISTEPUNDOREDO; + const int linesAdded = LinesTotal() - prevLinesTotal; + if (linesAdded != 0) + multiLine = true; + if (step == steps - 1) { + modFlags |= SC_LASTSTEPINUNDOREDO; + if (multiLine) + modFlags |= SC_MULTILINEUNDOREDO; + } + NotifyModified( + DocModification(modFlags, action.position, action.lenData, + linesAdded, action.data)); + } + + bool endSavePoint = cb.IsSavePoint(); + if (startSavePoint != endSavePoint) + NotifySavePoint(endSavePoint); + } + enteredModification--; + } + return newPos; +} + +/** + * Insert a single character. + */ +bool Document::InsertChar(int pos, char ch) { + char chs[1]; + chs[0] = ch; + return InsertString(pos, chs, 1); +} + +/** + * Insert a null terminated string. + */ +bool Document::InsertCString(int position, const char *s) { + return InsertString(position, s, strlen(s)); +} + +void Document::ChangeChar(int pos, char ch) { + DeleteChars(pos, 1); + InsertChar(pos, ch); +} + +void Document::DelChar(int pos) { + DeleteChars(pos, LenChar(pos)); +} + +void Document::DelCharBack(int pos) { + if (pos <= 0) { + return; + } else if (IsCrLf(pos - 2)) { + DeleteChars(pos - 2, 2); + } else if (dbcsCodePage) { + int startChar = MovePositionOutsideChar(pos - 1, -1, false); + DeleteChars(startChar, pos - startChar); + } else { + DeleteChars(pos - 1, 1); + } +} + +static bool isindentchar(char ch) { + return (ch == ' ') || (ch == '\t'); +} + +static int NextTab(int pos, int tabSize) { + return ((pos / tabSize) + 1) * tabSize; +} + +static void CreateIndentation(char *linebuf, int length, int indent, int tabSize, bool insertSpaces) { + length--; // ensure space for \0 + if (!insertSpaces) { + while ((indent >= tabSize) && (length > 0)) { + *linebuf++ = '\t'; + indent -= tabSize; + length--; + } + } + while ((indent > 0) && (length > 0)) { + *linebuf++ = ' '; + indent--; + length--; + } + *linebuf = '\0'; +} + +int Document::GetLineIndentation(int line) { + int indent = 0; + if ((line >= 0) && (line < LinesTotal())) { + int lineStart = LineStart(line); + int length = Length(); + for (int i = lineStart;i < length;i++) { + char ch = cb.CharAt(i); + if (ch == ' ') + indent++; + else if (ch == '\t') + indent = NextTab(indent, tabInChars); + else + return indent; + } + } + return indent; +} + +void Document::SetLineIndentation(int line, int indent) { + int indentOfLine = GetLineIndentation(line); + if (indent < 0) + indent = 0; + if (indent != indentOfLine) { + char linebuf[1000]; + CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs); + int thisLineStart = LineStart(line); + int indentPos = GetLineIndentPosition(line); + BeginUndoAction(); + DeleteChars(thisLineStart, indentPos - thisLineStart); + InsertCString(thisLineStart, linebuf); + EndUndoAction(); + } +} + +int Document::GetLineIndentPosition(int line) { + if (line < 0) + return 0; + int pos = LineStart(line); + int length = Length(); + while ((pos < length) && isindentchar(cb.CharAt(pos))) { + pos++; + } + return pos; +} + +int Document::GetColumn(int pos) { + int column = 0; + int line = LineFromPosition(pos); + if ((line >= 0) && (line < LinesTotal())) { + for (int i = LineStart(line);i < pos;) { + char ch = cb.CharAt(i); + if (ch == '\t') { + column = NextTab(column, tabInChars); + i++; + } else if (ch == '\r') { + return column; + } else if (ch == '\n') { + return column; + } else if (i >= Length()) { + return column; + } else { + column++; + i = MovePositionOutsideChar(i + 1, 1, false); + } + } + } + return column; +} + +int Document::FindColumn(int line, int column) { + int position = LineStart(line); + int columnCurrent = 0; + if ((line >= 0) && (line < LinesTotal())) { + while ((columnCurrent < column) && (position < Length())) { + char ch = cb.CharAt(position); + if (ch == '\t') { + columnCurrent = NextTab(columnCurrent, tabInChars); + position++; + } else if (ch == '\r') { + return position; + } else if (ch == '\n') { + return position; + } else { + columnCurrent++; + position = MovePositionOutsideChar(position + 1, 1, false); + } + } + } + return position; +} + +void Document::Indent(bool forwards, int lineBottom, int lineTop) { + // Dedent - suck white space off the front of the line to dedent by equivalent of a tab + for (int line = lineBottom; line >= lineTop; line--) { + int indentOfLine = GetLineIndentation(line); + if (forwards) { + if (LineStart(line) < LineEnd(line)) { + SetLineIndentation(line, indentOfLine + IndentSize()); + } + } else { + SetLineIndentation(line, indentOfLine - IndentSize()); + } + } +} + +// Convert line endings for a piece of text to a particular mode. +// Stop at len or when a NUL is found. +// Caller must delete the returned pointer. +char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode) { + char *dest = new char[2 * len + 1]; + const char *sptr = s; + char *dptr = dest; + for (size_t i = 0; (i < len) && (*sptr != '\0'); i++) { + if (*sptr == '\n' || *sptr == '\r') { + if (eolMode == SC_EOL_CR) { + *dptr++ = '\r'; + } else if (eolMode == SC_EOL_LF) { + *dptr++ = '\n'; + } else { // eolMode == SC_EOL_CRLF + *dptr++ = '\r'; + *dptr++ = '\n'; + } + if ((*sptr == '\r') && (i+1 < len) && (*(sptr+1) == '\n')) { + i++; + sptr++; + } + sptr++; + } else { + *dptr++ = *sptr++; + } + } + *dptr++ = '\0'; + *pLenOut = (dptr - dest) - 1; + return dest; +} + +void Document::ConvertLineEnds(int eolModeSet) { + BeginUndoAction(); + + for (int pos = 0; pos < Length(); pos++) { + if (cb.CharAt(pos) == '\r') { + if (cb.CharAt(pos + 1) == '\n') { + // CRLF + if (eolModeSet == SC_EOL_CR) { + DeleteChars(pos + 1, 1); // Delete the LF + } else if (eolModeSet == SC_EOL_LF) { + DeleteChars(pos, 1); // Delete the CR + } else { + pos++; + } + } else { + // CR + if (eolModeSet == SC_EOL_CRLF) { + InsertString(pos + 1, "\n", 1); // Insert LF + pos++; + } else if (eolModeSet == SC_EOL_LF) { + InsertString(pos, "\n", 1); // Insert LF + DeleteChars(pos + 1, 1); // Delete CR + } + } + } else if (cb.CharAt(pos) == '\n') { + // LF + if (eolModeSet == SC_EOL_CRLF) { + InsertString(pos, "\r", 1); // Insert CR + pos++; + } else if (eolModeSet == SC_EOL_CR) { + InsertString(pos, "\r", 1); // Insert CR + DeleteChars(pos + 1, 1); // Delete LF + } + } + } + + EndUndoAction(); +} + +bool Document::IsWhiteLine(int line) { + int currentChar = LineStart(line); + int endLine = LineEnd(line); + while (currentChar < endLine) { + if (cb.CharAt(currentChar) != ' ' && cb.CharAt(currentChar) != '\t') { + return false; + } + ++currentChar; + } + return true; +} + +int Document::ParaUp(int pos) { + int line = LineFromPosition(pos); + line--; + while (line >= 0 && IsWhiteLine(line)) { // skip empty lines + line--; + } + while (line >= 0 && !IsWhiteLine(line)) { // skip non-empty lines + line--; + } + line++; + return LineStart(line); +} + +int Document::ParaDown(int pos) { + int line = LineFromPosition(pos); + while (line < LinesTotal() && !IsWhiteLine(line)) { // skip non-empty lines + line++; + } + while (line < LinesTotal() && IsWhiteLine(line)) { // skip empty lines + line++; + } + if (line < LinesTotal()) + return LineStart(line); + else // end of a document + return LineEnd(line-1); +} + +CharClassify::cc Document::WordCharClass(unsigned char ch) { + if ((SC_CP_UTF8 == dbcsCodePage) && (ch >= 0x80)) + return CharClassify::ccWord; + return charClass.GetClass(ch); +} + +/** + * Used by commmands that want to select whole words. + * Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0. + */ +int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) { + CharClassify::cc ccStart = CharClassify::ccWord; + if (delta < 0) { + if (!onlyWordCharacters) + ccStart = WordCharClass(cb.CharAt(pos-1)); + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) + pos--; + } else { + if (!onlyWordCharacters && pos < Length()) + ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) + pos++; + } + return MovePositionOutsideChar(pos, delta); +} + +/** + * Find the start of the next word in either a forward (delta >= 0) or backwards direction + * (delta < 0). + * This is looking for a transition between character classes although there is also some + * additional movement to transit white space. + * Used by cursor movement by word commands. + */ +int Document::NextWordStart(int pos, int delta) { + if (delta < 0) { + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace)) + pos--; + if (pos > 0) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1)); + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) { + pos--; + } + } + } else { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) + pos++; + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace)) + pos++; + } + return pos; +} + +/** + * Find the end of the next word in either a forward (delta >= 0) or backwards direction + * (delta < 0). + * This is looking for a transition between character classes although there is also some + * additional movement to transit white space. + * Used by cursor movement by word commands. + */ +int Document::NextWordEnd(int pos, int delta) { + if (delta < 0) { + if (pos > 0) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1)); + if (ccStart != CharClassify::ccSpace) { + while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == ccStart) { + pos--; + } + } + while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace) { + pos--; + } + } + } else { + while (pos < Length() && WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace) { + pos++; + } + if (pos < Length()) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < Length() && WordCharClass(cb.CharAt(pos)) == ccStart) { + pos++; + } + } + } + return pos; +} + +/** + * Check that the character at the given position is a word or punctuation character and that + * the previous character is of a different character class. + */ +bool Document::IsWordStartAt(int pos) { + if (pos > 0) { + CharClassify::cc ccPos = WordCharClass(CharAt(pos)); + return (ccPos == CharClassify::ccWord || ccPos == CharClassify::ccPunctuation) && + (ccPos != WordCharClass(CharAt(pos - 1))); + } + return true; +} + +/** + * Check that the character at the given position is a word or punctuation character and that + * the next character is of a different character class. + */ +bool Document::IsWordEndAt(int pos) { + if (pos < Length()) { + CharClassify::cc ccPrev = WordCharClass(CharAt(pos-1)); + return (ccPrev == CharClassify::ccWord || ccPrev == CharClassify::ccPunctuation) && + (ccPrev != WordCharClass(CharAt(pos))); + } + return true; +} + +/** + * Check that the given range is has transitions between character classes at both + * ends and where the characters on the inside are word or punctuation characters. + */ +bool Document::IsWordAt(int start, int end) { + return IsWordStartAt(start) && IsWordEndAt(end); +} + +// The comparison and case changing functions here assume ASCII +// or extended ASCII such as the normal Windows code page. + +//Vitaliy +// NOTE: this function is called for non-Unicode characters only! +// ( i.e. when (!dbcsCodePage || isascii(ch)) ) +static inline char MakeUpperCase(char ch) { + if (ch >= 'A' && ch <= 'Z') + return ch; + else if (ch >= 'a' && ch <= 'z') + return static_cast(ch - 'a' + 'A'); + else + return Platform_MakeUpperChar(ch); +} + + + +// NOTE: this function is called for non-Unicode characters only! +// ( i.e. when (!dbcsCodePage || isascii(ch)) ) +static inline char MakeLowerCase(char ch) { + if (ch >= 'a' && ch <= 'z') + return ch; + else if (ch >= 'A' && ch <= 'Z') + return static_cast(ch - 'A' + 'a'); + else + return Platform_MakeLowerChar(ch); +} +//yilatiV + +// Define a way for the Regular Expression code to access the document +class DocumentIndexer : public CharacterIndexer { + Document *pdoc; + int end; +public: + DocumentIndexer(Document *pdoc_, int end_) : + pdoc(pdoc_), end(end_) { + } + + virtual ~DocumentIndexer() { + } + + virtual char CharAt(int index) { + if (index < 0 || index >= end) + return 0; + else + return pdoc->CharAt(index); + } +}; + +/** + * Find text in document, supporting both forward and backward + * searches (just pass minPos > maxPos to do a backward search) + * Has not been tested with backwards DBCS searches yet. + */ +long Document::FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, + int *length) { + if (regExp) { + if (!pre) + pre = new RESearch(&charClass); + if (!pre) + return -1; + + int increment = (minPos <= maxPos) ? 1 : -1; + + int startPos = minPos; + int endPos = maxPos; + + // Range endpoints should not be inside DBCS characters, but just in case, move them. + startPos = MovePositionOutsideChar(startPos, 1, false); + endPos = MovePositionOutsideChar(endPos, 1, false); + + const char *errmsg = pre->Compile(s, *length, caseSensitive, posix); + if (errmsg) { + return -1; + } + // Find a variable in a property file: \$(\([A-Za-z0-9_.]+\)) + // Replace first '.' with '-' in each property file variable reference: + // Search: \$(\([A-Za-z0-9_-]+\)\.\([A-Za-z0-9_.]+\)) + // Replace: $(\1-\2) + int lineRangeStart = LineFromPosition(startPos); + int lineRangeEnd = LineFromPosition(endPos); + if ((increment == 1) && + (startPos >= LineEnd(lineRangeStart)) && + (lineRangeStart < lineRangeEnd)) { + // the start position is at end of line or between line end characters. + lineRangeStart++; + startPos = LineStart(lineRangeStart); + } + int pos = -1; + int lenRet = 0; + char searchEnd = s[*length - 1]; + int lineRangeBreak = lineRangeEnd + increment; + for (int line = lineRangeStart; line != lineRangeBreak; line += increment) { + int startOfLine = LineStart(line); + int endOfLine = LineEnd(line); + if (increment == 1) { + if (line == lineRangeStart) { + if ((startPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if start position after start of line + startOfLine = startPos; + } + if (line == lineRangeEnd) { + if ((endPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if end position before end of line + endOfLine = endPos; + } + } else { + if (line == lineRangeEnd) { + if ((endPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if end position after start of line + startOfLine = endPos; + } + if (line == lineRangeStart) { + if ((startPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if start position before end of line + endOfLine = startPos; + } + } + + DocumentIndexer di(this, endOfLine); + int success = pre->Execute(di, startOfLine, endOfLine); + if (success) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + if (increment == -1) { + // Check for the last match on this line. + int repetitions = 1000; // Break out of infinite loop + while (success && (pre->eopat[0] <= endOfLine) && (repetitions--)) { + success = pre->Execute(di, pos+1, endOfLine); + if (success) { + if (pre->eopat[0] <= minPos) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + } else { + success = 0; + } + } + } + } + break; + } + } + *length = lenRet; + return pos; + + } else { + + bool forward = minPos <= maxPos; + int increment = forward ? 1 : -1; + + // Range endpoints should not be inside DBCS characters, but just in case, move them. + int startPos = MovePositionOutsideChar(minPos, increment, false); + int endPos = MovePositionOutsideChar(maxPos, increment, false); + + // Compute actual search ranges needed + int lengthFind = *length; + if (lengthFind == -1) + lengthFind = static_cast(strlen(s)); + int endSearch = endPos; + if (startPos <= endPos) { + endSearch = endPos - lengthFind + 1; + } + //Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind); + char firstChar = s[0]; + if (!caseSensitive) + firstChar = static_cast(MakeUpperCase(firstChar)); + int pos = forward ? startPos : (startPos - 1); + while (forward ? (pos < endSearch) : (pos >= endSearch)) { + char ch = CharAt(pos); + if (caseSensitive) { + if (ch == firstChar) { + bool found = true; + if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; + for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { + ch = CharAt(pos + posMatch); + if (ch != s[posMatch]) + found = false; + } + if (found) { + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; + } + } + } else { + if (MakeUpperCase(ch) == firstChar) { + bool found = true; + if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; + for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { + ch = CharAt(pos + posMatch); + if (MakeUpperCase(ch) != MakeUpperCase(s[posMatch])) + found = false; + } + if (found) { + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; + } + } + } + pos += increment; + if (dbcsCodePage && (pos >= 0)) { + // Ensure trying to match from start of character + pos = MovePositionOutsideChar(pos, increment, false); + } + } + } + //Platform::DebugPrintf("Not found\n"); + return -1; +} + +const char *Document::SubstituteByPosition(const char *text, int *length) { + if (!pre) + return 0; + delete []substituted; + substituted = 0; + DocumentIndexer di(this, Length()); + if (!pre->GrabMatches(di)) + return 0; + unsigned int lenResult = 0; + for (int i = 0; i < *length; i++) { + if (text[i] == '\\') { + if (text[i + 1] >= '1' && text[i + 1] <= '9') { + unsigned int patNum = text[i + 1] - '0'; + lenResult += pre->eopat[patNum] - pre->bopat[patNum]; + i++; + } else { + switch (text[i + 1]) { + case 'a': + case 'b': + case 'f': + case 'n': + case 'r': + case 't': + case 'v': + i++; + } + lenResult++; + } + } else { + lenResult++; + } + } + substituted = new char[lenResult + 1]; + if (!substituted) + return 0; + char *o = substituted; + for (int j = 0; j < *length; j++) { + if (text[j] == '\\') { + if (text[j + 1] >= '1' && text[j + 1] <= '9') { + unsigned int patNum = text[j + 1] - '0'; + unsigned int len = pre->eopat[patNum] - pre->bopat[patNum]; + if (pre->pat[patNum]) // Will be null if try for a match that did not occur + memcpy(o, pre->pat[patNum], len); + o += len; + j++; + } else { + j++; + switch (text[j]) { + case 'a': + *o++ = '\a'; + break; + case 'b': + *o++ = '\b'; + break; + case 'f': + *o++ = '\f'; + break; + case 'n': + *o++ = '\n'; + break; + case 'r': + *o++ = '\r'; + break; + case 't': + *o++ = '\t'; + break; + case 'v': + *o++ = '\v'; + break; + default: + *o++ = '\\'; + j--; + } + } + } else { + *o++ = text[j]; + } + } + *o = '\0'; + *length = lenResult; + return substituted; +} + +int Document::LinesTotal() { + return cb.Lines(); +} + +void Document::ChangeCase(Range r, bool makeUpperCase) { + for (int pos = r.start; pos < r.end;) { + int len = LenChar(pos); + if (len == 1) { + char ch = CharAt(pos); + if (makeUpperCase) { + if (IsLowerCase(ch)) { + ChangeChar(pos, static_cast(MakeUpperCase(ch))); + } + } else { + if (IsUpperCase(ch)) { + ChangeChar(pos, static_cast(MakeLowerCase(ch))); + } + } + } + pos += len; + } +} + +void Document::SetDefaultCharClasses(bool includeWordClass) { + charClass.SetDefaultCharClasses(includeWordClass); +} + +void Document::SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass) { + charClass.SetCharClasses(chars, newCharClass); +} + +void Document::SetStylingBits(int bits) { + stylingBits = bits; + stylingBitsMask = 0; + for (int bit = 0; bit < stylingBits; bit++) { + stylingBitsMask <<= 1; + stylingBitsMask |= 1; + } +} + +void Document::StartStyling(int position, char mask) { + stylingMask = mask; + endStyled = position; +} + +bool Document::SetStyleFor(int length, char style) { + if (enteredStyling != 0) { + return false; + } else { + enteredStyling++; + style &= stylingMask; + int prevEndStyled = endStyled; + if (cb.SetStyleFor(endStyled, length, style, stylingMask)) { + DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, + prevEndStyled, length); + NotifyModified(mh); + } + endStyled += length; + enteredStyling--; + return true; + } +} + +bool Document::SetStyles(int length, char *styles) { + if (enteredStyling != 0) { + return false; + } else { + enteredStyling++; + bool didChange = false; + int startMod = 0; + int endMod = 0; + for (int iPos = 0; iPos < length; iPos++, endStyled++) { + PLATFORM_ASSERT(endStyled < Length()); + if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) { + if (!didChange) { + startMod = endStyled; + } + didChange = true; + endMod = endStyled; + } + } + if (didChange) { + DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, + startMod, endMod - startMod + 1); + NotifyModified(mh); + } + enteredStyling--; + return true; + } +} + +void Document::EnsureStyledTo(int pos) { + if ((enteredStyling == 0) && (pos > GetEndStyled())) { + IncrementStyleClock(); + // Ask the watchers to style, and stop as soon as one responds. + for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) { + watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos); + } + } +} + +void Document::IncrementStyleClock() { + styleClock++; + if (styleClock > 0x100000) { + styleClock = 0; + } +} + +bool Document::AddWatcher(DocWatcher *watcher, void *userData) { + for (int i = 0; i < lenWatchers; i++) { + if ((watchers[i].watcher == watcher) && + (watchers[i].userData == userData)) + return false; + } + WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers + 1]; + if (!pwNew) + return false; + for (int j = 0; j < lenWatchers; j++) + pwNew[j] = watchers[j]; + pwNew[lenWatchers].watcher = watcher; + pwNew[lenWatchers].userData = userData; + delete []watchers; + watchers = pwNew; + lenWatchers++; + return true; +} + +bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) { + for (int i = 0; i < lenWatchers; i++) { + if ((watchers[i].watcher == watcher) && + (watchers[i].userData == userData)) { + if (lenWatchers == 1) { + delete []watchers; + watchers = 0; + lenWatchers = 0; + } else { + WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers]; + if (!pwNew) + return false; + for (int j = 0; j < lenWatchers - 1; j++) { + pwNew[j] = (j < i) ? watchers[j] : watchers[j + 1]; + } + delete []watchers; + watchers = pwNew; + lenWatchers--; + } + return true; + } + } + return false; +} + +void Document::NotifyModifyAttempt() { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyModifyAttempt(this, watchers[i].userData); + } +} + +void Document::NotifySavePoint(bool atSavePoint) { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifySavePoint(this, watchers[i].userData, atSavePoint); + } +} + +void Document::NotifyModified(DocModification mh) { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyModified(this, mh, watchers[i].userData); + } +} + +bool Document::IsWordPartSeparator(char ch) { + return (WordCharClass(ch) == CharClassify::ccWord) && IsPunctuation(ch); +} + +int Document::WordPartLeft(int pos) { + if (pos > 0) { + --pos; + char startChar = cb.CharAt(pos); + if (IsWordPartSeparator(startChar)) { + while (pos > 0 && IsWordPartSeparator(cb.CharAt(pos))) { + --pos; + } + } + if (pos > 0) { + startChar = cb.CharAt(pos); + --pos; + if (IsLowerCase(startChar)) { + while (pos > 0 && IsLowerCase(cb.CharAt(pos))) + --pos; + if (!IsUpperCase(cb.CharAt(pos)) && !IsLowerCase(cb.CharAt(pos))) + ++pos; + } else if (IsUpperCase(startChar)) { + while (pos > 0 && IsUpperCase(cb.CharAt(pos))) + --pos; + if (!IsUpperCase(cb.CharAt(pos))) + ++pos; + } else if (IsADigit(startChar)) { + while (pos > 0 && IsADigit(cb.CharAt(pos))) + --pos; + if (!IsADigit(cb.CharAt(pos))) + ++pos; + } else if (IsPunctuation(startChar)) { + while (pos > 0 && IsPunctuation(cb.CharAt(pos))) + --pos; + if (!IsPunctuation(cb.CharAt(pos))) + ++pos; + } else if (isspacechar(startChar)) { + while (pos > 0 && isspacechar(cb.CharAt(pos))) + --pos; + if (!isspacechar(cb.CharAt(pos))) + ++pos; + } else if (!isascii(startChar)) { + while (pos > 0 && !isascii(cb.CharAt(pos))) + --pos; + if (isascii(cb.CharAt(pos))) + ++pos; + } else { + ++pos; + } + } + } + return pos; +} + +int Document::WordPartRight(int pos) { + char startChar = cb.CharAt(pos); + int length = Length(); + if (IsWordPartSeparator(startChar)) { + while (pos < length && IsWordPartSeparator(cb.CharAt(pos))) + ++pos; + startChar = cb.CharAt(pos); + } + if (!isascii(startChar)) { + while (pos < length && !isascii(cb.CharAt(pos))) + ++pos; + } else if (IsLowerCase(startChar)) { + while (pos < length && IsLowerCase(cb.CharAt(pos))) + ++pos; + } else if (IsUpperCase(startChar)) { + if (IsLowerCase(cb.CharAt(pos + 1))) { + ++pos; + while (pos < length && IsLowerCase(cb.CharAt(pos))) + ++pos; + } else { + while (pos < length && IsUpperCase(cb.CharAt(pos))) + ++pos; + } + if (IsLowerCase(cb.CharAt(pos)) && IsUpperCase(cb.CharAt(pos - 1))) + --pos; + } else if (IsADigit(startChar)) { + while (pos < length && IsADigit(cb.CharAt(pos))) + ++pos; + } else if (IsPunctuation(startChar)) { + while (pos < length && IsPunctuation(cb.CharAt(pos))) + ++pos; + } else if (isspacechar(startChar)) { + while (pos < length && isspacechar(cb.CharAt(pos))) + ++pos; + } else { + ++pos; + } + return pos; +} + +bool IsLineEndChar(char c) { + return (c == '\n' || c == '\r'); +} + +int Document::ExtendStyleRange(int pos, int delta, bool singleLine) { + int sStart = cb.StyleAt(pos); + if (delta < 0) { + while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) + pos--; + pos++; + } else { + while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) + pos++; + } + return pos; +} + +static char BraceOpposite(char ch) { + switch (ch) { + case '(': + return ')'; + case ')': + return '('; + case '[': + return ']'; + case ']': + return '['; + case '{': + return '}'; + case '}': + return '{'; + case '<': + return '>'; + case '>': + return '<'; + default: + return '\0'; + } +} + +// TODO: should be able to extend styled region to find matching brace +int Document::BraceMatch(int position, int /*maxReStyle*/) { + char chBrace = CharAt(position); + char chSeek = BraceOpposite(chBrace); + if (chSeek == '\0') + return - 1; + char styBrace = static_cast(StyleAt(position) & stylingBitsMask); + int direction = -1; + if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') + direction = 1; + int depth = 1; + position = position + direction; + while ((position >= 0) && (position < Length())) { + position = MovePositionOutsideChar(position, direction); + char chAtPos = CharAt(position); + char styAtPos = static_cast(StyleAt(position) & stylingBitsMask); + if ((position > GetEndStyled()) || (styAtPos == styBrace)) { + if (chAtPos == chBrace) + depth++; + if (chAtPos == chSeek) + depth--; + if (depth == 0) + return position; + } + position = position + direction; + } + return - 1; +} diff --git a/scintilla/src/Document.h b/scintilla/src/Document.h new file mode 100644 index 00000000..492f108d --- /dev/null +++ b/scintilla/src/Document.h @@ -0,0 +1,308 @@ +// Scintilla source code edit control +/** @file Document.h + ** Text document that handles notifications, DBCS, styling, words and end of line. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef DOCUMENT_H +#define DOCUMENT_H + +/** + * A Position is a position within a document between two characters or at the beginning or end. + * Sometimes used as a character index where it identifies the character after the position. + */ +typedef int Position; +const Position invalidPosition = -1; + +/** + * The range class represents a range of text in a document. + * The two values are not sorted as one end may be more significant than the other + * as is the case for the selection where the end position is the position of the caret. + * If either position is invalidPosition then the range is invalid and most operations will fail. + */ +class Range { +public: + Position start; + Position end; + + Range(Position pos=0) : + start(pos), end(pos) { + }; + Range(Position start_, Position end_) : + start(start_), end(end_) { + }; + + bool Valid() const { + return (start != invalidPosition) && (end != invalidPosition); + } + + // Is the position within the range? + bool Contains(Position pos) const { + if (start < end) { + return (pos >= start && pos <= end); + } else { + return (pos <= start && pos >= end); + } + } + + // Is the character after pos within the range? + bool ContainsCharacter(Position pos) const { + if (start < end) { + return (pos >= start && pos < end); + } else { + return (pos < start && pos >= end); + } + } + + bool Contains(Range other) const { + return Contains(other.start) && Contains(other.end); + } + + bool Overlaps(Range other) const { + return + Contains(other.start) || + Contains(other.end) || + other.Contains(start) || + other.Contains(end); + } +}; + +class DocWatcher; +class DocModification; +class RESearch; + +/** + */ +class Document { + +public: + /** Used to pair watcher pointer with user data. */ + class WatcherWithUserData { + public: + DocWatcher *watcher; + void *userData; + WatcherWithUserData() { + watcher = 0; + userData = 0; + } + }; + + enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; + +private: + int refCount; + CellBuffer cb; + CharClassify charClass; + char stylingMask; + int endStyled; + int styleClock; + int enteredModification; + int enteredStyling; + int enteredReadOnlyCount; + + WatcherWithUserData *watchers; + int lenWatchers; + + bool matchesValid; + RESearch *pre; + char *substituted; + +public: + //Vitaliy + inline bool MatchCaseInsensitive(const char* lpch1, const char* lpch2); + //yilatiV + int stylingBits; + int stylingBitsMask; + + int eolMode; + /// Can also be SC_CP_UTF8 to enable UTF-8 mode + int dbcsCodePage; + int tabInChars; + int indentInChars; + int actualIndentInChars; + bool useTabs; + bool tabIndents; + bool backspaceUnindents; + + Document(); + virtual ~Document(); + + int AddRef(); + int Release(); + + int LineFromPosition(int pos); + int ClampPositionIntoDocument(int pos); + bool IsCrLf(int pos); + int LenChar(int pos); + int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); + + // Gateways to modifying document + void ModifiedAt(int pos); + bool DeleteChars(int pos, int len); + bool InsertString(int position, const char *s, int insertLength); + int Undo(); + int Redo(); + bool CanUndo() { return cb.CanUndo(); } + bool CanRedo() { return cb.CanRedo(); } + void DeleteUndoHistory() { cb.DeleteUndoHistory(); } + bool SetUndoCollection(bool collectUndo) { + return cb.SetUndoCollection(collectUndo); + } + bool IsCollectingUndo() { return cb.IsCollectingUndo(); } + void BeginUndoAction() { cb.BeginUndoAction(); } + void EndUndoAction() { cb.EndUndoAction(); } + void SetSavePoint(); + bool IsSavePoint() { return cb.IsSavePoint(); } + + int GetLineIndentation(int line); + void SetLineIndentation(int line, int indent); + int GetLineIndentPosition(int line); + int GetColumn(int position); + int FindColumn(int line, int column); + void Indent(bool forwards, int lineBottom, int lineTop); + static char *TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode); + void ConvertLineEnds(int eolModeSet); + void SetReadOnly(bool set) { cb.SetReadOnly(set); } + bool IsReadOnly() { return cb.IsReadOnly(); } + + bool InsertChar(int pos, char ch); + bool InsertCString(int position, const char *s); + void ChangeChar(int pos, char ch); + void DelChar(int pos); + void DelCharBack(int pos); + + char CharAt(int position) { return cb.CharAt(position); } + void GetCharRange(char *buffer, int position, int lengthRetrieve) { + cb.GetCharRange(buffer, position, lengthRetrieve); + } + char StyleAt(int position) { return cb.StyleAt(position); } + int GetMark(int line) { return cb.GetMark(line); } + int AddMark(int line, int markerNum); + void AddMarkSet(int line, int valueSet); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + void DeleteAllMarks(int markerNum); + int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); } + int LineStart(int line); + int LineEnd(int line); + int LineEndPosition(int position); + int VCHomePosition(int position); + + int SetLevel(int line, int level); + int GetLevel(int line) { return cb.GetLevel(line); } + void ClearLevels() { cb.ClearLevels(); } + int GetLastChild(int lineParent, int level=-1); + int GetFoldParent(int line); + + void Indent(bool forwards); + int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false); + int NextWordStart(int pos, int delta); + int NextWordEnd(int pos, int delta); + int Length() { return cb.Length(); } + void Allocate(int newSize) { cb.Allocate(newSize); } + long FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length); + long FindText(int iMessage, unsigned long wParam, long lParam); + const char *SubstituteByPosition(const char *text, int *length); + int LinesTotal(); + + void ChangeCase(Range r, bool makeUpperCase); + + void SetDefaultCharClasses(bool includeWordClass); + void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); + void SetStylingBits(int bits); + void StartStyling(int position, char mask); + bool SetStyleFor(int length, char style); + bool SetStyles(int length, char *styles); + int GetEndStyled() { return endStyled; } + void EnsureStyledTo(int pos); + int GetStyleClock() { return styleClock; } + void IncrementStyleClock(); + + int SetLineState(int line, int state) { return cb.SetLineState(line, state); } + int GetLineState(int line) { return cb.GetLineState(line); } + int GetMaxLineState() { return cb.GetMaxLineState(); } + + bool AddWatcher(DocWatcher *watcher, void *userData); + bool RemoveWatcher(DocWatcher *watcher, void *userData); + const WatcherWithUserData *GetWatchers() const { return watchers; } + int GetLenWatchers() const { return lenWatchers; } + + bool IsWordPartSeparator(char ch); + int WordPartLeft(int pos); + int WordPartRight(int pos); + int ExtendStyleRange(int pos, int delta, bool singleLine = false); + bool IsWhiteLine(int line); + int ParaUp(int pos); + int ParaDown(int pos); + int IndentSize() { return actualIndentInChars; } + int BraceMatch(int position, int maxReStyle); + +private: + void CheckReadOnly(); + + CharClassify::cc WordCharClass(unsigned char ch); + bool IsWordStartAt(int pos); + bool IsWordEndAt(int pos); + bool IsWordAt(int start, int end); + + void NotifyModifyAttempt(); + void NotifySavePoint(bool atSavePoint); + void NotifyModified(DocModification mh); +}; + +/** + * To optimise processing of document modifications by DocWatchers, a hint is passed indicating the + * scope of the change. + * If the DocWatcher is a document view then this can be used to optimise screen updating. + */ +class DocModification { +public: + int modificationType; + int position; + int length; + int linesAdded; /**< Negative if lines deleted. */ + const char *text; /**< Only valid for changes to text, not for changes to style. */ + int line; + int foldLevelNow; + int foldLevelPrev; + + DocModification(int modificationType_, int position_=0, int length_=0, + int linesAdded_=0, const char *text_=0, int line_=0) : + modificationType(modificationType_), + position(position_), + length(length_), + linesAdded(linesAdded_), + text(text_), + line(line_), + foldLevelNow(0), + foldLevelPrev(0) {} + + DocModification(int modificationType_, const Action &act, int linesAdded_=0) : + modificationType(modificationType_), + position(act.position), + length(act.lenData), + linesAdded(linesAdded_), + text(act.data), + line(0), + foldLevelNow(0), + foldLevelPrev(0) {} +}; + +/** + * A class that wants to receive notifications from a Document must be derived from DocWatcher + * and implement the notification methods. It can then be added to the watcher list with AddWatcher. + */ +class DocWatcher { +public: + virtual ~DocWatcher() {} + + virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; + virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; + virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; + virtual void NotifyDeleted(Document *doc, void *userData) = 0; + virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; +}; + +#endif diff --git a/scintilla/src/Document.h.bak b/scintilla/src/Document.h.bak new file mode 100644 index 00000000..cf4d8a3e --- /dev/null +++ b/scintilla/src/Document.h.bak @@ -0,0 +1,305 @@ +// Scintilla source code edit control +/** @file Document.h + ** Text document that handles notifications, DBCS, styling, words and end of line. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef DOCUMENT_H +#define DOCUMENT_H + +/** + * A Position is a position within a document between two characters or at the beginning or end. + * Sometimes used as a character index where it identifies the character after the position. + */ +typedef int Position; +const Position invalidPosition = -1; + +/** + * The range class represents a range of text in a document. + * The two values are not sorted as one end may be more significant than the other + * as is the case for the selection where the end position is the position of the caret. + * If either position is invalidPosition then the range is invalid and most operations will fail. + */ +class Range { +public: + Position start; + Position end; + + Range(Position pos=0) : + start(pos), end(pos) { + }; + Range(Position start_, Position end_) : + start(start_), end(end_) { + }; + + bool Valid() const { + return (start != invalidPosition) && (end != invalidPosition); + } + + // Is the position within the range? + bool Contains(Position pos) const { + if (start < end) { + return (pos >= start && pos <= end); + } else { + return (pos <= start && pos >= end); + } + } + + // Is the character after pos within the range? + bool ContainsCharacter(Position pos) const { + if (start < end) { + return (pos >= start && pos < end); + } else { + return (pos < start && pos >= end); + } + } + + bool Contains(Range other) const { + return Contains(other.start) && Contains(other.end); + } + + bool Overlaps(Range other) const { + return + Contains(other.start) || + Contains(other.end) || + other.Contains(start) || + other.Contains(end); + } +}; + +class DocWatcher; +class DocModification; +class RESearch; + +/** + */ +class Document { + +public: + /** Used to pair watcher pointer with user data. */ + class WatcherWithUserData { + public: + DocWatcher *watcher; + void *userData; + WatcherWithUserData() { + watcher = 0; + userData = 0; + } + }; + + enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; + +private: + int refCount; + CellBuffer cb; + CharClassify charClass; + char stylingMask; + int endStyled; + int styleClock; + int enteredModification; + int enteredStyling; + int enteredReadOnlyCount; + + WatcherWithUserData *watchers; + int lenWatchers; + + bool matchesValid; + RESearch *pre; + char *substituted; + +public: + int stylingBits; + int stylingBitsMask; + + int eolMode; + /// Can also be SC_CP_UTF8 to enable UTF-8 mode + int dbcsCodePage; + int tabInChars; + int indentInChars; + int actualIndentInChars; + bool useTabs; + bool tabIndents; + bool backspaceUnindents; + + Document(); + virtual ~Document(); + + int AddRef(); + int Release(); + + int LineFromPosition(int pos); + int ClampPositionIntoDocument(int pos); + bool IsCrLf(int pos); + int LenChar(int pos); + int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); + + // Gateways to modifying document + void ModifiedAt(int pos); + bool DeleteChars(int pos, int len); + bool InsertString(int position, const char *s, int insertLength); + int Undo(); + int Redo(); + bool CanUndo() { return cb.CanUndo(); } + bool CanRedo() { return cb.CanRedo(); } + void DeleteUndoHistory() { cb.DeleteUndoHistory(); } + bool SetUndoCollection(bool collectUndo) { + return cb.SetUndoCollection(collectUndo); + } + bool IsCollectingUndo() { return cb.IsCollectingUndo(); } + void BeginUndoAction() { cb.BeginUndoAction(); } + void EndUndoAction() { cb.EndUndoAction(); } + void SetSavePoint(); + bool IsSavePoint() { return cb.IsSavePoint(); } + + int GetLineIndentation(int line); + void SetLineIndentation(int line, int indent); + int GetLineIndentPosition(int line); + int GetColumn(int position); + int FindColumn(int line, int column); + void Indent(bool forwards, int lineBottom, int lineTop); + static char *TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode); + void ConvertLineEnds(int eolModeSet); + void SetReadOnly(bool set) { cb.SetReadOnly(set); } + bool IsReadOnly() { return cb.IsReadOnly(); } + + bool InsertChar(int pos, char ch); + bool InsertCString(int position, const char *s); + void ChangeChar(int pos, char ch); + void DelChar(int pos); + void DelCharBack(int pos); + + char CharAt(int position) { return cb.CharAt(position); } + void GetCharRange(char *buffer, int position, int lengthRetrieve) { + cb.GetCharRange(buffer, position, lengthRetrieve); + } + char StyleAt(int position) { return cb.StyleAt(position); } + int GetMark(int line) { return cb.GetMark(line); } + int AddMark(int line, int markerNum); + void AddMarkSet(int line, int valueSet); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + void DeleteAllMarks(int markerNum); + int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); } + int LineStart(int line); + int LineEnd(int line); + int LineEndPosition(int position); + int VCHomePosition(int position); + + int SetLevel(int line, int level); + int GetLevel(int line) { return cb.GetLevel(line); } + void ClearLevels() { cb.ClearLevels(); } + int GetLastChild(int lineParent, int level=-1); + int GetFoldParent(int line); + + void Indent(bool forwards); + int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false); + int NextWordStart(int pos, int delta); + int NextWordEnd(int pos, int delta); + int Length() { return cb.Length(); } + void Allocate(int newSize) { cb.Allocate(newSize); } + long FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length); + long FindText(int iMessage, unsigned long wParam, long lParam); + const char *SubstituteByPosition(const char *text, int *length); + int LinesTotal(); + + void ChangeCase(Range r, bool makeUpperCase); + + void SetDefaultCharClasses(bool includeWordClass); + void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); + void SetStylingBits(int bits); + void StartStyling(int position, char mask); + bool SetStyleFor(int length, char style); + bool SetStyles(int length, char *styles); + int GetEndStyled() { return endStyled; } + void EnsureStyledTo(int pos); + int GetStyleClock() { return styleClock; } + void IncrementStyleClock(); + + int SetLineState(int line, int state) { return cb.SetLineState(line, state); } + int GetLineState(int line) { return cb.GetLineState(line); } + int GetMaxLineState() { return cb.GetMaxLineState(); } + + bool AddWatcher(DocWatcher *watcher, void *userData); + bool RemoveWatcher(DocWatcher *watcher, void *userData); + const WatcherWithUserData *GetWatchers() const { return watchers; } + int GetLenWatchers() const { return lenWatchers; } + + bool IsWordPartSeparator(char ch); + int WordPartLeft(int pos); + int WordPartRight(int pos); + int ExtendStyleRange(int pos, int delta, bool singleLine = false); + bool IsWhiteLine(int line); + int ParaUp(int pos); + int ParaDown(int pos); + int IndentSize() { return actualIndentInChars; } + int BraceMatch(int position, int maxReStyle); + +private: + void CheckReadOnly(); + + CharClassify::cc WordCharClass(unsigned char ch); + bool IsWordStartAt(int pos); + bool IsWordEndAt(int pos); + bool IsWordAt(int start, int end); + + void NotifyModifyAttempt(); + void NotifySavePoint(bool atSavePoint); + void NotifyModified(DocModification mh); +}; + +/** + * To optimise processing of document modifications by DocWatchers, a hint is passed indicating the + * scope of the change. + * If the DocWatcher is a document view then this can be used to optimise screen updating. + */ +class DocModification { +public: + int modificationType; + int position; + int length; + int linesAdded; /**< Negative if lines deleted. */ + const char *text; /**< Only valid for changes to text, not for changes to style. */ + int line; + int foldLevelNow; + int foldLevelPrev; + + DocModification(int modificationType_, int position_=0, int length_=0, + int linesAdded_=0, const char *text_=0, int line_=0) : + modificationType(modificationType_), + position(position_), + length(length_), + linesAdded(linesAdded_), + text(text_), + line(line_), + foldLevelNow(0), + foldLevelPrev(0) {} + + DocModification(int modificationType_, const Action &act, int linesAdded_=0) : + modificationType(modificationType_), + position(act.position), + length(act.lenData), + linesAdded(linesAdded_), + text(act.data), + line(0), + foldLevelNow(0), + foldLevelPrev(0) {} +}; + +/** + * A class that wants to receive notifications from a Document must be derived from DocWatcher + * and implement the notification methods. It can then be added to the watcher list with AddWatcher. + */ +class DocWatcher { +public: + virtual ~DocWatcher() {} + + virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; + virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; + virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; + virtual void NotifyDeleted(Document *doc, void *userData) = 0; + virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; +}; + +#endif diff --git a/scintilla/src/DocumentAccessor.cxx b/scintilla/src/DocumentAccessor.cxx new file mode 100644 index 00000000..f72dbd61 --- /dev/null +++ b/scintilla/src/DocumentAccessor.cxx @@ -0,0 +1,190 @@ +// Scintilla source code edit control +/** @file DocumentAccessor.cxx + ** Rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "SVector.h" +#include "Accessor.h" +#include "DocumentAccessor.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" +#include "Scintilla.h" +#include "CharClassify.h" +#include "Document.h" + +DocumentAccessor::~DocumentAccessor() { +} + +bool DocumentAccessor::InternalIsLeadByte(char ch) { + if (SC_CP_UTF8 == codePage) + // For lexing, all characters >= 0x80 are treated the + // same so none is considered a lead byte. + return false; + else + return Platform::IsDBCSLeadByte(codePage, ch); +} + +void DocumentAccessor::Fill(int position) { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + startPos = position - slopSize; + if (startPos + bufferSize > lenDoc) + startPos = lenDoc - bufferSize; + if (startPos < 0) + startPos = 0; + endPos = startPos + bufferSize; + if (endPos > lenDoc) + endPos = lenDoc; + + pdoc->GetCharRange(buf, startPos, endPos-startPos); + buf[endPos-startPos] = '\0'; +} + +bool DocumentAccessor::Match(int pos, const char *s) { + for (int i=0; *s; i++) { + if (*s != SafeGetCharAt(pos+i)) + return false; + s++; + } + return true; +} + +char DocumentAccessor::StyleAt(int position) { + // Mask off all bits which aren't in the 'mask'. + return static_cast(pdoc->StyleAt(position) & mask); +} + +int DocumentAccessor::GetLine(int position) { + return pdoc->LineFromPosition(position); +} + +int DocumentAccessor::LineStart(int line) { + return pdoc->LineStart(line); +} + +int DocumentAccessor::LevelAt(int line) { + return pdoc->GetLevel(line); +} + +int DocumentAccessor::Length() { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + return lenDoc; +} + +int DocumentAccessor::GetLineState(int line) { + return pdoc->GetLineState(line); +} + +int DocumentAccessor::SetLineState(int line, int state) { + return pdoc->SetLineState(line, state); +} + +void DocumentAccessor::StartAt(unsigned int start, char chMask) { + // Store the mask specified for use with StyleAt. + mask = chMask; + pdoc->StartStyling(start, chMask); + startPosStyling = start; +} + +void DocumentAccessor::StartSegment(unsigned int pos) { + startSeg = pos; +} + +void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) { + // Only perform styling if non empty range + if (pos != startSeg - 1) { + PLATFORM_ASSERT(pos >= startSeg); + if (pos < startSeg) { + return; + } + + if (validLen + (pos - startSeg + 1) >= bufferSize) + Flush(); + if (validLen + (pos - startSeg + 1) >= bufferSize) { + // Too big for buffer so send directly + pdoc->SetStyleFor(pos - startSeg + 1, static_cast(chAttr)); + } else { + if (chAttr != chWhile) + chFlags = 0; + chAttr |= chFlags; + for (unsigned int i = startSeg; i <= pos; i++) { + PLATFORM_ASSERT((startPosStyling + validLen) < Length()); + styleBuf[validLen++] = static_cast(chAttr); + } + } + } + startSeg = pos+1; +} + +void DocumentAccessor::SetLevel(int line, int level) { + pdoc->SetLevel(line, level); +} + +void DocumentAccessor::Flush() { + startPos = extremePosition; + lenDoc = -1; + if (validLen > 0) { + pdoc->SetStyles(validLen, styleBuf); + startPosStyling += validLen; + validLen = 0; + } +} + +int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { + int end = Length(); + int spaceFlags = 0; + + // Determines the indentation level of the current line and also checks for consistent + // indentation compared to the previous line. + // Indentation is judged consistent when the indentation whitespace of each line lines + // the same or the indentation of one line is a prefix of the other. + + int pos = LineStart(line); + char ch = (*this)[pos]; + int indent = 0; + bool inPrevPrefix = line > 0; + int posPrev = inPrevPrefix ? LineStart(line-1) : 0; + while ((ch == ' ' || ch == '\t') && (pos < end)) { + if (inPrevPrefix) { + char chPrev = (*this)[posPrev++]; + if (chPrev == ' ' || chPrev == '\t') { + if (chPrev != ch) + spaceFlags |= wsInconsistent; + } else { + inPrevPrefix = false; + } + } + if (ch == ' ') { + spaceFlags |= wsSpace; + indent++; + } else { // Tab + spaceFlags |= wsTab; + if (spaceFlags & wsSpace) + spaceFlags |= wsSpaceTab; + indent = (indent / 8 + 1) * 8; + } + ch = (*this)[++pos]; + } + + *flags = spaceFlags; + indent += SC_FOLDLEVELBASE; + // if completely empty line or the start of a comment... + if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || + (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) + return indent | SC_FOLDLEVELWHITEFLAG; + else + return indent; +} + diff --git a/scintilla/src/DocumentAccessor.h b/scintilla/src/DocumentAccessor.h new file mode 100644 index 00000000..05eefda6 --- /dev/null +++ b/scintilla/src/DocumentAccessor.h @@ -0,0 +1,67 @@ +// Scintilla source code edit control +/** @file DocumentAccessor.h + ** Implementation of BufferAccess and StylingAccess on a Scintilla + ** rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +class Document; + +/** + */ +class DocumentAccessor : public Accessor { + // Private so DocumentAccessor objects can not be copied + DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {} + DocumentAccessor &operator=(const DocumentAccessor &) { return *this; } + +protected: + Document *pdoc; + PropSet &props; + WindowID id; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + int startPosStyling; + int mask; + + bool InternalIsLeadByte(char ch); + void Fill(int position); + +public: + DocumentAccessor(Document *pdoc_, PropSet &props_, WindowID id_=0) : + Accessor(), pdoc(pdoc_), props(props_), id(id_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0), + startSeg(0), startPosStyling(0), + mask(127) { // Initialize the mask to be big enough for any lexer. + } + ~DocumentAccessor(); + bool Match(int pos, const char *s); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + char *GetProperties() { + return props.ToString(); + } + WindowID GetWindow() { return id; } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); +}; diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx new file mode 100644 index 00000000..58ea56e5 --- /dev/null +++ b/scintilla/src/Editor.cxx @@ -0,0 +1,7424 @@ +// Scintilla source code edit control +/** @file Editor.cxx + ** Main code for the edit control. + **/ +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#ifndef PLAT_QT +#define INCLUDE_DEPRECATED_FEATURES +#endif +#include "Scintilla.h" + +#include "ContractionState.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" +#include "KeyMap.h" +#include "Indicator.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Style.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Document.h" +#include "Editor.h" + +/* + return whether this modification represents an operation that + may reasonably be deferred (not done now OR [possibly] at all) +*/ +static bool CanDeferToLastStep(const DocModification& mh) { + if (mh.modificationType & (SC_MOD_BEFOREINSERT|SC_MOD_BEFOREDELETE)) + return true; // CAN skip + if (!(mh.modificationType & (SC_PERFORMED_UNDO|SC_PERFORMED_REDO))) + return false; // MUST do + if (mh.modificationType & SC_MULTISTEPUNDOREDO) + return true; // CAN skip + return false; // PRESUMABLY must do +} + +static bool CanEliminate(const DocModification& mh) { + return + (mh.modificationType & (SC_MOD_BEFOREINSERT|SC_MOD_BEFOREDELETE)) != 0; +} + +/* + return whether this modification represents the FINAL step + in a [possibly lengthy] multi-step Undo/Redo sequence +*/ +static bool IsLastStep(const DocModification& mh) { + return + (mh.modificationType & (SC_PERFORMED_UNDO|SC_PERFORMED_REDO)) != 0 + && (mh.modificationType & SC_MULTISTEPUNDOREDO) != 0 + && (mh.modificationType & SC_LASTSTEPINUNDOREDO) != 0 + && (mh.modificationType & SC_MULTILINEUNDOREDO) != 0; +} + +Caret::Caret() : +active(false), on(false), period(500) {} + +Timer::Timer() : +ticking(false), ticksToWait(0), tickerID(0) {} + +Idler::Idler() : +state(false), idlerID(0) {} + +LineLayout::LineLayout(int maxLineLength_) : + lineStarts(0), + lenLineStarts(0), + lineNumber(-1), + inCache(false), + maxLineLength(-1), + numCharsInLine(0), + validity(llInvalid), + xHighlightGuide(0), + highlightColumn(0), + selStart(0), + selEnd(0), + containsCaret(false), + edgeColumn(0), + chars(0), + styles(0), + styleBitsSet(0), + indicators(0), + positions(0), + hsStart(0), + hsEnd(0), + widthLine(wrapWidthInfinite), + lines(1) { + Resize(maxLineLength_); +} + +LineLayout::~LineLayout() { + Free(); +} + +void LineLayout::Resize(int maxLineLength_) { + if (maxLineLength_ > maxLineLength) { + Free(); + chars = new char[maxLineLength_ + 1]; + styles = new unsigned char[maxLineLength_ + 1]; + indicators = new char[maxLineLength_ + 1]; + // Extra position allocated as sometimes the Windows + // GetTextExtentExPoint API writes an extra element. + positions = new int[maxLineLength_ + 1 + 1]; + maxLineLength = maxLineLength_; + } +} + +void LineLayout::Free() { + delete []chars; + chars = 0; + delete []styles; + styles = 0; + delete []indicators; + indicators = 0; + delete []positions; + positions = 0; + delete []lineStarts; + lineStarts = 0; +} + +void LineLayout::Invalidate(validLevel validity_) { + if (validity > validity_) + validity = validity_; +} + +void LineLayout::SetLineStart(int line, int start) { + if ((line >= lenLineStarts) && (line != 0)) { + int newMaxLines = line + 20; + int *newLineStarts = new int[newMaxLines]; + if (!newLineStarts) + return; + for (int i = 0; i < newMaxLines; i++) { + if (i < lenLineStarts) + newLineStarts[i] = lineStarts[i]; + else + newLineStarts[i] = 0; + } + delete []lineStarts; + lineStarts = newLineStarts; + lenLineStarts = newMaxLines; + } + lineStarts[line] = start; +} + +void LineLayout::SetBracesHighlight(Range rangeLine, Position braces[], + char bracesMatchStyle, int xHighlight) { + if (rangeLine.ContainsCharacter(braces[0])) { + int braceOffset = braces[0] - rangeLine.start; + if (braceOffset < numCharsInLine) { + bracePreviousStyles[0] = styles[braceOffset]; + styles[braceOffset] = bracesMatchStyle; + } + } + if (rangeLine.ContainsCharacter(braces[1])) { + int braceOffset = braces[1] - rangeLine.start; + if (braceOffset < numCharsInLine) { + bracePreviousStyles[1] = styles[braceOffset]; + styles[braceOffset] = bracesMatchStyle; + } + } + if ((braces[0] >= rangeLine.start && braces[1] <= rangeLine.end) || + (braces[1] >= rangeLine.start && braces[0] <= rangeLine.end)) { + xHighlightGuide = xHighlight; + } +} + +void LineLayout::RestoreBracesHighlight(Range rangeLine, Position braces[]) { + if (rangeLine.ContainsCharacter(braces[0])) { + int braceOffset = braces[0] - rangeLine.start; + if (braceOffset < numCharsInLine) { + styles[braceOffset] = bracePreviousStyles[0]; + } + } + if (rangeLine.ContainsCharacter(braces[1])) { + int braceOffset = braces[1] - rangeLine.start; + if (braceOffset < numCharsInLine) { + styles[braceOffset] = bracePreviousStyles[1]; + } + } + xHighlightGuide = 0; +} + +LineLayoutCache::LineLayoutCache() : + level(0), length(0), size(0), cache(0), + allInvalidated(false), styleClock(-1), useCount(0) { + Allocate(0); +} + +LineLayoutCache::~LineLayoutCache() { + Deallocate(); +} + +void LineLayoutCache::Allocate(int length_) { + PLATFORM_ASSERT(cache == NULL); + allInvalidated = false; + length = length_; + size = length; + if (size > 1) { + size = (size / 16 + 1) * 16; + } + if (size > 0) { + cache = new LineLayout * [size]; + } + for (int i = 0; i < size; i++) + cache[i] = 0; +} + +void LineLayoutCache::AllocateForLevel(int linesOnScreen, int linesInDoc) { + PLATFORM_ASSERT(useCount == 0); + int lengthForLevel = 0; + if (level == llcCaret) { + lengthForLevel = 1; + } else if (level == llcPage) { + lengthForLevel = linesOnScreen + 1; + } else if (level == llcDocument) { + lengthForLevel = linesInDoc; + } + if (lengthForLevel > size) { + Deallocate(); + Allocate(lengthForLevel); + } else { + if (lengthForLevel < length) { + for (int i = lengthForLevel; i < length; i++) { + delete cache[i]; + cache[i] = 0; + } + } + length = lengthForLevel; + } + PLATFORM_ASSERT(length == lengthForLevel); + PLATFORM_ASSERT(cache != NULL || length == 0); +} + +void LineLayoutCache::Deallocate() { + PLATFORM_ASSERT(useCount == 0); + for (int i = 0; i < length; i++) + delete cache[i]; + delete []cache; + cache = 0; + length = 0; + size = 0; +} + +void LineLayoutCache::Invalidate(LineLayout::validLevel validity_) { + if (cache && !allInvalidated) { + for (int i = 0; i < length; i++) { + if (cache[i]) { + cache[i]->Invalidate(validity_); + } + } + if (validity_ == LineLayout::llInvalid) { + allInvalidated = true; + } + } +} + +void LineLayoutCache::SetLevel(int level_) { + allInvalidated = false; + if ((level_ != -1) && (level != level_)) { + level = level_; + Deallocate(); + } +} + +LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, + int linesOnScreen, int linesInDoc) { + AllocateForLevel(linesOnScreen, linesInDoc); + if (styleClock != styleClock_) { + Invalidate(LineLayout::llCheckTextAndStyle); + styleClock = styleClock_; + } + allInvalidated = false; + int pos = -1; + LineLayout *ret = 0; + if (level == llcCaret) { + pos = 0; + } else if (level == llcPage) { + if (lineNumber == lineCaret) { + pos = 0; + } else if (length > 1) { + pos = 1 + (lineNumber % (length - 1)); + } + } else if (level == llcDocument) { + pos = lineNumber; + } + if (pos >= 0) { + PLATFORM_ASSERT(useCount == 0); + if (cache && (pos < length)) { + if (cache[pos]) { + if ((cache[pos]->lineNumber != lineNumber) || + (cache[pos]->maxLineLength < maxChars)) { + delete cache[pos]; + cache[pos] = 0; + } + } + if (!cache[pos]) { + cache[pos] = new LineLayout(maxChars); + } + if (cache[pos]) { + cache[pos]->lineNumber = lineNumber; + cache[pos]->inCache = true; + ret = cache[pos]; + useCount++; + } + } + } + + if (!ret) { + ret = new LineLayout(maxChars); + ret->lineNumber = lineNumber; + } + + return ret; +} + +void LineLayoutCache::Dispose(LineLayout *ll) { + allInvalidated = false; + if (ll) { + if (!ll->inCache) { + delete ll; + } else { + useCount--; + } + } +} + +Editor::Editor() { + ctrlID = 0; + + stylesValid = false; + + printMagnification = 0; + printColourMode = SC_PRINT_NORMAL; + printWrapState = eWrapWord; + cursorMode = SC_CURSORNORMAL; + controlCharSymbol = 0; /* Draw the control characters */ + + hasFocus = false; + hideSelection = false; + inOverstrike = false; + errorStatus = 0; + mouseDownCaptures = true; + + bufferedDraw = true; + twoPhaseDraw = true; + + lastClickTime = 0; + dwellDelay = SC_TIME_FOREVER; + ticksToDwell = SC_TIME_FOREVER; + dwelling = false; + ptMouseLast.x = 0; + ptMouseLast.y = 0; + inDragDrop = false; + dropWentOutside = false; + posDrag = invalidPosition; + posDrop = invalidPosition; + selectionType = selChar; + + lastXChosen = 0; + lineAnchor = 0; + originalAnchorPos = 0; + + selType = selStream; + moveExtendsSelection = false; + xStartSelect = 0; + xEndSelect = 0; + primarySelection = true; + + caretXPolicy = CARET_SLOP | CARET_EVEN; + caretXSlop = 50; + + caretYPolicy = CARET_EVEN; + caretYSlop = 0; + + searchAnchor = 0; + + xOffset = 0; + xCaretMargin = 50; + horizontalScrollBarVisible = true; + scrollWidth = 2000; + verticalScrollBarVisible = true; + endAtLastLine = true; + caretSticky = false; + + pixmapLine = Surface::Allocate(); + pixmapSelMargin = Surface::Allocate(); + pixmapSelPattern = Surface::Allocate(); + pixmapIndentGuide = Surface::Allocate(); + pixmapIndentGuideHighlight = Surface::Allocate(); + + currentPos = 0; + anchor = 0; + + targetStart = 0; + targetEnd = 0; + searchFlags = 0; + + topLine = 0; + posTopLine = 0; + + lengthForEncode = -1; + + needUpdateUI = true; + braces[0] = invalidPosition; + braces[1] = invalidPosition; + bracesMatchStyle = STYLE_BRACEBAD; + highlightGuideColumn = 0; + + theEdge = 0; + + paintState = notPainting; + + modEventMask = SC_MODEVENTMASKALL; + + pdoc = new Document(); + pdoc->AddRef(); + pdoc->AddWatcher(this, 0); + + recordingMacro = false; + foldFlags = 0; + + wrapState = eWrapNone; + wrapWidth = LineLayout::wrapWidthInfinite; + wrapStart = wrapLineLarge; + wrapEnd = wrapLineLarge; + wrapVisualFlags = 0; + wrapVisualFlagsLocation = 0; + wrapVisualStartIndent = 0; + actualWrapVisualStartIndent = 0; + + convertPastes = true; + + hsStart = -1; + hsEnd = -1; + + llc.SetLevel(LineLayoutCache::llcCaret); +} + +Editor::~Editor() { + pdoc->RemoveWatcher(this, 0); + pdoc->Release(); + pdoc = 0; + DropGraphics(); + delete pixmapLine; + delete pixmapSelMargin; + delete pixmapSelPattern; + delete pixmapIndentGuide; + delete pixmapIndentGuideHighlight; +} + +void Editor::Finalise() { + SetIdle(false); + CancelModes(); +} + +void Editor::DropGraphics() { + pixmapLine->Release(); + pixmapSelMargin->Release(); + pixmapSelPattern->Release(); + pixmapIndentGuide->Release(); + pixmapIndentGuideHighlight->Release(); +} + +void Editor::InvalidateStyleData() { + stylesValid = false; + palette.Release(); + DropGraphics(); + llc.Invalidate(LineLayout::llInvalid); + if (selType == selRectangle) { + xStartSelect = XFromPosition(anchor); + xEndSelect = XFromPosition(currentPos); + } +} + +void Editor::InvalidateStyleRedraw() { + NeedWrapping(); + InvalidateStyleData(); + Redraw(); +} + +void Editor::RefreshColourPalette(Palette &pal, bool want) { + vs.RefreshColourPalette(pal, want); +} + +void Editor::RefreshStyleData() { + if (!stylesValid) { + stylesValid = true; + AutoSurface surface(this); + if (surface) { + vs.Refresh(*surface); + RefreshColourPalette(palette, true); + palette.Allocate(wMain); + RefreshColourPalette(palette, false); + } + SetScrollBars(); + } +} + +PRectangle Editor::GetClientRectangle() { + return wMain.GetClientPosition(); +} + +PRectangle Editor::GetTextRectangle() { + PRectangle rc = GetClientRectangle(); + rc.left += vs.fixedColumnWidth; + rc.right -= vs.rightMarginWidth; + return rc; +} + +int Editor::LinesOnScreen() { + PRectangle rcClient = GetClientRectangle(); + int htClient = rcClient.bottom - rcClient.top; + //Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1); + return htClient / vs.lineHeight; +} + +int Editor::LinesToScroll() { + int retVal = LinesOnScreen() - 1; + if (retVal < 1) + return 1; + else + return retVal; +} + +int Editor::MaxScrollPos() { + //Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n", + //LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1); + int retVal = cs.LinesDisplayed(); + if (endAtLastLine) { + retVal -= LinesOnScreen(); + } else { + retVal--; + } + if (retVal < 0) { + return 0; + } else { + return retVal; + } +} + +static inline bool IsControlCharacter(int ch) { + // iscntrl returns true for lots of chars > 127 which are displayable + return ch >= 0 && ch < ' '; +} + +const char *ControlCharacterString(unsigned char ch) { + const char *reps[] = { + "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", + "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", + "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", + "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" + }; + if (ch < (sizeof(reps) / sizeof(reps[0]))) { + return reps[ch]; + } else { + return "BAD"; + } +} + +/** + * Convenience class to ensure LineLayout objects are always disposed. + */ +class AutoLineLayout { + LineLayoutCache &llc; + LineLayout *ll; + AutoLineLayout &operator=(const AutoLineLayout &) { return * this; } +public: + AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {} + ~AutoLineLayout() { + llc.Dispose(ll); + ll = 0; + } + LineLayout *operator->() const { + return ll; + } + operator LineLayout *() const { + return ll; + } + void Set(LineLayout *ll_) { + llc.Dispose(ll); + ll = ll_; + } +}; + +/** + * Allows to iterate through the lines of a selection. + * Althought it can be called for a stream selection, in most cases + * it is inefficient and it should be used only for + * a rectangular or a line selection. + */ +class SelectionLineIterator { +private: + Editor *ed; + int line; ///< Current line within the iteration. + bool forward; ///< True if iterating by increasing line number, false otherwise. + int selStart, selEnd; ///< Positions of the start and end of the selection relative to the start of the document. + int minX, maxX; ///< Left and right of selection rectangle. + +public: + int lineStart, lineEnd; ///< Line numbers, first and last lines of the selection. + int startPos, endPos; ///< Positions of the beginning and end of the selection on the current line. + + void Reset() { + if (forward) { + line = lineStart; + } else { + line = lineEnd; + } + } + + SelectionLineIterator(Editor *ed_, bool forward_ = true) : line(0), startPos(0), endPos(0) { + ed = ed_; + forward = forward_; + selStart = ed->SelectionStart(); + selEnd = ed->SelectionEnd(); + lineStart = ed->pdoc->LineFromPosition(selStart); + lineEnd = ed->pdoc->LineFromPosition(selEnd); + // Left of rectangle + minX = Platform::Minimum(ed->xStartSelect, ed->xEndSelect); + // Right of rectangle + maxX = Platform::Maximum(ed->xStartSelect, ed->xEndSelect); + Reset(); + } + ~SelectionLineIterator() {} + + void SetAt(int line) { + if (line < lineStart || line > lineEnd) { + startPos = endPos = INVALID_POSITION; + } else { + if (ed->selType == ed->selRectangle) { + // Measure line and return character closest to minX + startPos = ed->PositionFromLineX(line, minX); + // Measure line and return character closest to maxX + endPos = ed->PositionFromLineX(line, maxX); + } else if (ed->selType == ed->selLines) { + startPos = ed->pdoc->LineStart(line); + endPos = ed->pdoc->LineStart(line + 1); + } else { // Stream selection, here only for completion + if (line == lineStart) { + startPos = selStart; + } else { + startPos = ed->pdoc->LineStart(line); + } + if (line == lineEnd) { + endPos = selEnd; + } else { + endPos = ed->pdoc->LineStart(line + 1); + } + } + } + } + bool Iterate() { + SetAt(line); + if (forward) { + line++; + } else { + line--; + } + return startPos != INVALID_POSITION; + } +}; + +Point Editor::LocationFromPosition(int pos) { + Point pt; + RefreshStyleData(); + if (pos == INVALID_POSITION) + return pt; + int line = pdoc->LineFromPosition(pos); + int lineVisible = cs.DisplayFromDoc(line); + //Platform::DebugPrintf("line=%d\n", line); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + if (surface && ll) { + // -1 because of adding in for visible lines in following loop. + pt.y = (lineVisible - topLine - 1) * vs.lineHeight; + pt.x = 0; + unsigned int posLineStart = pdoc->LineStart(line); + LayoutLine(line, surface, vs, ll, wrapWidth); + int posInLine = pos - posLineStart; + // In case of very long line put x at arbitrary large position + if (posInLine > ll->maxLineLength) { + pt.x = ll->positions[ll->maxLineLength] - ll->positions[ll->LineStart(ll->lines)]; + } + + for (int subLine = 0; subLine < ll->lines; subLine++) { + if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { + pt.x = ll->positions[posInLine] - ll->positions[ll->LineStart(subLine)]; + if (actualWrapVisualStartIndent != 0) { + int lineStart = ll->LineStart(subLine); + if (lineStart != 0) // Wrapped + pt.x += actualWrapVisualStartIndent * vs.aveCharWidth; + } + } + if (posInLine >= ll->LineStart(subLine)) { + pt.y += vs.lineHeight; + } + } + pt.x += vs.fixedColumnWidth - xOffset; + } + return pt; +} + +int Editor::XFromPosition(int pos) { + Point pt = LocationFromPosition(pos); + return pt.x - vs.fixedColumnWidth + xOffset; +} + +int Editor::LineFromLocation(Point pt) { + return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine); +} + +void Editor::SetTopLine(int topLineNew) { + topLine = topLineNew; + posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine)); +} + +static inline bool IsEOLChar(char ch) { + return (ch == '\r') || (ch == '\n'); +} + +int Editor::PositionFromLocation(Point pt) { + RefreshStyleData(); + pt.x = pt.x - vs.fixedColumnWidth + xOffset; + int visibleLine = pt.y / vs.lineHeight + topLine; + if (pt.y < 0) { // Division rounds towards 0 + visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine; + } + if (visibleLine < 0) + visibleLine = 0; + int lineDoc = cs.DocFromDisplay(visibleLine); + if (lineDoc >= pdoc->LinesTotal()) + return pdoc->Length(); + unsigned int posLineStart = pdoc->LineStart(lineDoc); + int retVal = posLineStart; + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + if (surface && ll) { + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + int lineStartSet = cs.DisplayFromDoc(lineDoc); + int subLine = visibleLine - lineStartSet; + if (subLine < ll->lines) { + int lineStart = ll->LineStart(subLine); + int lineEnd = ll->LineStart(subLine + 1); + int subLineStart = ll->positions[lineStart]; + + if (actualWrapVisualStartIndent != 0) { + if (lineStart != 0) // Wrapped + pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth; + } + for (int i = lineStart; i < lineEnd; i++) { + if (pt.x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || + IsEOLChar(ll->chars[i])) { + return pdoc->MovePositionOutsideChar(i + posLineStart, 1); + } + } + return lineEnd + posLineStart; + } + retVal = ll->numCharsInLine + posLineStart; + } + return retVal; +} + +// Like PositionFromLocation but INVALID_POSITION returned when not near any text. +int Editor::PositionFromLocationClose(Point pt) { + RefreshStyleData(); + PRectangle rcClient = GetTextRectangle(); + if (!rcClient.Contains(pt)) + return INVALID_POSITION; + if (pt.x < vs.fixedColumnWidth) + return INVALID_POSITION; + if (pt.y < 0) + return INVALID_POSITION; + pt.x = pt.x - vs.fixedColumnWidth + xOffset; + int visibleLine = pt.y / vs.lineHeight + topLine; + if (pt.y < 0) { // Division rounds towards 0 + visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine; + } + int lineDoc = cs.DocFromDisplay(visibleLine); + if (lineDoc < 0) + return INVALID_POSITION; + if (lineDoc >= pdoc->LinesTotal()) + return INVALID_POSITION; + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + if (surface && ll) { + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + unsigned int posLineStart = pdoc->LineStart(lineDoc); + int lineStartSet = cs.DisplayFromDoc(lineDoc); + int subLine = visibleLine - lineStartSet; + if (subLine < ll->lines) { + int lineStart = ll->LineStart(subLine); + int lineEnd = ll->LineStart(subLine + 1); + int subLineStart = ll->positions[lineStart]; + + if (actualWrapVisualStartIndent != 0) { + if (lineStart != 0) // Wrapped + pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth; + } + for (int i = lineStart; i < lineEnd; i++) { + if (pt.x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || + IsEOLChar(ll->chars[i])) { + return pdoc->MovePositionOutsideChar(i + posLineStart, 1); + } + } + if (pt.x < (ll->positions[lineEnd] - subLineStart)) { + return pdoc->MovePositionOutsideChar(lineEnd + posLineStart, 1); + } + } + } + + return INVALID_POSITION; +} + +/** + * Find the document position corresponding to an x coordinate on a particular document line. + * Ensure is between whole characters when document is in multi-byte or UTF-8 mode. + */ +int Editor::PositionFromLineX(int lineDoc, int x) { + RefreshStyleData(); + if (lineDoc >= pdoc->LinesTotal()) + return pdoc->Length(); + //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + int retVal = 0; + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(lineDoc); + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + retVal = ll->numCharsInLine + posLineStart; + int subLine = 0; + int lineStart = ll->LineStart(subLine); + int lineEnd = ll->LineStart(subLine + 1); + int subLineStart = ll->positions[lineStart]; + + if (actualWrapVisualStartIndent != 0) { + if (lineStart != 0) // Wrapped + x -= actualWrapVisualStartIndent * vs.aveCharWidth; + } + for (int i = lineStart; i < lineEnd; i++) { + if (x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || + IsEOLChar(ll->chars[i])) { + retVal = pdoc->MovePositionOutsideChar(i + posLineStart, 1); + break; + } + } + } + return retVal; +} + +/** + * If painting then abandon the painting because a wider redraw is needed. + * @return true if calling code should stop drawing. + */ +bool Editor::AbandonPaint() { + if ((paintState == painting) && !paintingAllText) { + paintState = paintAbandoned; + } + return paintState == paintAbandoned; +} + +void Editor::RedrawRect(PRectangle rc) { + //Platform::DebugPrintf("Redraw %0d,%0d - %0d,%0d\n", rc.left, rc.top, rc.right, rc.bottom); + + // Clip the redraw rectangle into the client area + PRectangle rcClient = GetClientRectangle(); + if (rc.top < rcClient.top) + rc.top = rcClient.top; + if (rc.bottom > rcClient.bottom) + rc.bottom = rcClient.bottom; + if (rc.left < rcClient.left) + rc.left = rcClient.left; + if (rc.right > rcClient.right) + rc.right = rcClient.right; + + if ((rc.bottom > rc.top) && (rc.right > rc.left)) { + wMain.InvalidateRectangle(rc); + } +} + +void Editor::Redraw() { + //Platform::DebugPrintf("Redraw all\n"); + PRectangle rcClient = GetClientRectangle(); + wMain.InvalidateRectangle(rcClient); + //wMain.InvalidateAll(); +} + +void Editor::RedrawSelMargin(int line) { + if (!AbandonPaint()) { + if (vs.maskInLine) { + Redraw(); + } else { + PRectangle rcSelMargin = GetClientRectangle(); + rcSelMargin.right = vs.fixedColumnWidth; + if (line != -1) { + int position = pdoc->LineStart(line); + PRectangle rcLine = RectangleFromRange(position, position); + rcSelMargin.top = rcLine.top; + rcSelMargin.bottom = rcLine.bottom; + } + wMain.InvalidateRectangle(rcSelMargin); + } + } +} + +PRectangle Editor::RectangleFromRange(int start, int end) { + int minPos = start; + if (minPos > end) + minPos = end; + int maxPos = start; + if (maxPos < end) + maxPos = end; + int minLine = cs.DisplayFromDoc(pdoc->LineFromPosition(minPos)); + int lineDocMax = pdoc->LineFromPosition(maxPos); + int maxLine = cs.DisplayFromDoc(lineDocMax) + cs.GetHeight(lineDocMax) - 1; + PRectangle rcClient = GetTextRectangle(); + PRectangle rc; + rc.left = vs.fixedColumnWidth; + rc.top = (minLine - topLine) * vs.lineHeight; + if (rc.top < 0) + rc.top = 0; + rc.right = rcClient.right; + rc.bottom = (maxLine - topLine + 1) * vs.lineHeight; + // Ensure PRectangle is within 16 bit space + rc.top = Platform::Clamp(rc.top, -32000, 32000); + rc.bottom = Platform::Clamp(rc.bottom, -32000, 32000); + + return rc; +} + +void Editor::InvalidateRange(int start, int end) { + RedrawRect(RectangleFromRange(start, end)); +} + +int Editor::CurrentPosition() { + return currentPos; +} + +bool Editor::SelectionEmpty() { + return anchor == currentPos; +} + +int Editor::SelectionStart() { + return Platform::Minimum(currentPos, anchor); +} + +int Editor::SelectionEnd() { + return Platform::Maximum(currentPos, anchor); +} + +void Editor::SetRectangularRange() { + if (selType == selRectangle) { + xStartSelect = XFromPosition(anchor); + xEndSelect = XFromPosition(currentPos); + } +} + +void Editor::InvalidateSelection(int currentPos_, int anchor_) { + int firstAffected = anchor; + if (firstAffected > currentPos) + firstAffected = currentPos; + if (firstAffected > anchor_) + firstAffected = anchor_; + if (firstAffected > currentPos_) + firstAffected = currentPos_; + int lastAffected = anchor; + if (lastAffected < currentPos) + lastAffected = currentPos; + if (lastAffected < anchor_) + lastAffected = anchor_; + if (lastAffected < (currentPos_ + 1)) // +1 ensures caret repainted + lastAffected = (currentPos_ + 1); + needUpdateUI = true; + InvalidateRange(firstAffected, lastAffected); +} + +void Editor::SetSelection(int currentPos_, int anchor_) { + currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_); + anchor_ = pdoc->ClampPositionIntoDocument(anchor_); + if ((currentPos != currentPos_) || (anchor != anchor_)) { + InvalidateSelection(currentPos_, anchor_); + currentPos = currentPos_; + anchor = anchor_; + } + SetRectangularRange(); + ClaimSelection(); +} + +void Editor::SetSelection(int currentPos_) { + currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_); + if (currentPos != currentPos_) { + InvalidateSelection(currentPos_, currentPos_); + currentPos = currentPos_; + } + SetRectangularRange(); + ClaimSelection(); +} + +void Editor::SetEmptySelection(int currentPos_) { + selType = selStream; + moveExtendsSelection = false; + SetSelection(currentPos_, currentPos_); +} + +bool Editor::RangeContainsProtected(int start, int end) const { + if (vs.ProtectionActive()) { + if (start > end) { + int t = start; + start = end; + end = t; + } + int mask = pdoc->stylingBitsMask; + for (int pos = start; pos < end; pos++) { + if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) + return true; + } + } + return false; +} + +bool Editor::SelectionContainsProtected() { + // DONE, but untested...: make support rectangular selection + bool scp = false; + if (selType == selStream) { + scp = RangeContainsProtected(anchor, currentPos); + } else { + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + if (RangeContainsProtected(lineIterator.startPos, lineIterator.endPos)) { + scp = true; + break; + } + } + } + return scp; +} + +/** + * Asks document to find a good position and then moves out of any invisible positions. + */ +int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { + pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd); + if (vs.ProtectionActive()) { + int mask = pdoc->stylingBitsMask; + if (moveDir > 0) { + if ((pos > 0) && vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()) { + while ((pos < pdoc->Length()) && + (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected())) + pos++; + } + } else if (moveDir < 0) { + if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) { + while ((pos > 0) && + (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) + pos--; + } + } + } + return pos; +} + +int Editor::MovePositionTo(int newPos, selTypes sel, bool ensureVisible) { + int delta = newPos - currentPos; + newPos = pdoc->ClampPositionIntoDocument(newPos); + newPos = MovePositionOutsideChar(newPos, delta); + if (sel != noSel) { + selType = sel; + } + if (sel != noSel || moveExtendsSelection) { + SetSelection(newPos); + } else { + SetEmptySelection(newPos); + } + ShowCaretAtCurrentPosition(); + if (ensureVisible) { + EnsureCaretVisible(); + } + NotifyMove(newPos); + return 0; +} + +int Editor::MovePositionSoVisible(int pos, int moveDir) { + pos = pdoc->ClampPositionIntoDocument(pos); + pos = MovePositionOutsideChar(pos, moveDir); + int lineDoc = pdoc->LineFromPosition(pos); + if (cs.GetVisible(lineDoc)) { + return pos; + } else { + int lineDisplay = cs.DisplayFromDoc(lineDoc); + if (moveDir > 0) { + // lineDisplay is already line before fold as lines in fold use display line of line after fold + lineDisplay = Platform::Clamp(lineDisplay, 0, cs.LinesDisplayed()); + return pdoc->LineStart(cs.DocFromDisplay(lineDisplay)); + } else { + lineDisplay = Platform::Clamp(lineDisplay - 1, 0, cs.LinesDisplayed()); + return pdoc->LineEnd(cs.DocFromDisplay(lineDisplay)); + } + } +} + +/** + * Choose the x position that the caret will try to stick to + * as it moves up and down. + */ +void Editor::SetLastXChosen() { + Point pt = LocationFromPosition(currentPos); + lastXChosen = pt.x; +} + +void Editor::ScrollTo(int line, bool moveThumb) { + int topLineNew = Platform::Clamp(line, 0, MaxScrollPos()); + if (topLineNew != topLine) { + // Try to optimise small scrolls + int linesToMove = topLine - topLineNew; + SetTopLine(topLineNew); + ShowCaretAtCurrentPosition(); + // Perform redraw rather than scroll if many lines would be redrawn anyway. +#ifndef UNDER_CE + if ((abs(linesToMove) <= 10) && (paintState == notPainting)) { + ScrollText(linesToMove); + } else { + Redraw(); + } +#else + Redraw(); +#endif + if (moveThumb) { + SetVerticalScrollPos(); + } + } +} + +void Editor::ScrollText(int /* linesToMove */) { + //Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove); + Redraw(); +} + +void Editor::HorizontalScrollTo(int xPos) { + //Platform::DebugPrintf("HorizontalScroll %d\n", xPos); + if (xPos < 0) + xPos = 0; + if ((wrapState == eWrapNone) && (xOffset != xPos)) { + xOffset = xPos; + SetHorizontalScrollPos(); + RedrawRect(GetClientRectangle()); + } +} + +void Editor::MoveCaretInsideView(bool ensureVisible) { + PRectangle rcClient = GetTextRectangle(); + Point pt = LocationFromPosition(currentPos); + if (pt.y < rcClient.top) { + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top)), + noSel, ensureVisible); + } else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) { + int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight; + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed)), + noSel, ensureVisible); + } +} + +int Editor::DisplayFromPosition(int pos) { + int lineDoc = pdoc->LineFromPosition(pos); + int lineDisplay = cs.DisplayFromDoc(lineDoc); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + if (surface && ll) { + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + unsigned int posLineStart = pdoc->LineStart(lineDoc); + int posInLine = pos - posLineStart; + lineDisplay--; // To make up for first increment ahead. + for (int subLine = 0; subLine < ll->lines; subLine++) { + if (posInLine >= ll->LineStart(subLine)) { + lineDisplay++; + } + } + } + return lineDisplay; +} + +/** + * Ensure the caret is reasonably visible in context. + * +Caret policy in SciTE + +If slop is set, we can define a slop value. +This value defines an unwanted zone (UZ) where the caret is... unwanted. +This zone is defined as a number of pixels near the vertical margins, +and as a number of lines near the horizontal margins. +By keeping the caret away from the edges, it is seen within its context, +so it is likely that the identifier that the caret is on can be completely seen, +and that the current line is seen with some of the lines following it which are +often dependent on that line. + +If strict is set, the policy is enforced... strictly. +The caret is centred on the display if slop is not set, +and cannot go in the UZ if slop is set. + +If jumps is set, the display is moved more energetically +so the caret can move in the same direction longer before the policy is applied again. +'3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin. + +If even is not set, instead of having symmetrical UZs, +the left and bottom UZs are extended up to right and top UZs respectively. +This way, we favour the displaying of useful information: the begining of lines, +where most code reside, and the lines after the caret, eg. the body of a function. + + | | | | | +slop | strict | jumps | even | Caret can go to the margin | When reaching limitÝ(caret going out of + | | | | | visibility or going into the UZ) display is... +-----+--------+-------+------+--------------------------------------------+-------------------------------------------------------------- + 0 | 0 | 0 | 0 | Yes | moved to put caret on top/on right + 0 | 0 | 0 | 1 | Yes | moved by one position + 0 | 0 | 1 | 0 | Yes | moved to put caret on top/on right + 0 | 0 | 1 | 1 | Yes | centred on the caret + 0 | 1 | - | 0 | Caret is always on top/on right of display | - + 0 | 1 | - | 1 | No, caret is always centred | - + 1 | 0 | 0 | 0 | Yes | moved to put caret out of the asymmetrical UZ + 1 | 0 | 0 | 1 | Yes | moved to put caret out of the UZ + 1 | 0 | 1 | 0 | Yes | moved to put caret at 3UZ of the top or right margin + 1 | 0 | 1 | 1 | Yes | moved to put caret at 3UZ of the margin + 1 | 1 | - | 0 | Caret is always at UZ of top/right margin | - + 1 | 1 | 0 | 1 | No, kept out of UZ | moved by one position + 1 | 1 | 1 | 1 | No, kept out of UZ | moved to put caret at 3UZ of the margin +*/ +void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { + //Platform::DebugPrintf("EnsureCaretVisible %d %s\n", xOffset, useMargin ? " margin" : " "); + PRectangle rcClient = GetTextRectangle(); + //int rcClientFullWidth = rcClient.Width(); + int posCaret = currentPos; + if (posDrag >= 0) { + posCaret = posDrag; + } + Point pt = LocationFromPosition(posCaret); + Point ptBottomCaret = pt; + ptBottomCaret.y += vs.lineHeight - 1; + int lineCaret = DisplayFromPosition(posCaret); + bool bSlop, bStrict, bJump, bEven; + + // Vertical positioning + if (vert && (pt.y < rcClient.top || ptBottomCaret.y > rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) { + int linesOnScreen = LinesOnScreen(); + int halfScreen = Platform::Maximum(linesOnScreen - 1, 2) / 2; + int newTopLine = topLine; + bSlop = (caretYPolicy & CARET_SLOP) != 0; + bStrict = (caretYPolicy & CARET_STRICT) != 0; + bJump = (caretYPolicy & CARET_JUMPS) != 0; + bEven = (caretYPolicy & CARET_EVEN) != 0; + + // It should be possible to scroll the window to show the caret, + // but this fails to remove the caret on GTK+ + if (bSlop) { // A margin is defined + int yMoveT, yMoveB; + if (bStrict) { + int yMarginT, yMarginB; + if (!useMargin) { + // In drag mode, avoid moves + // otherwise, a double click will select several lines. + yMarginT = yMarginB = 0; + } else { + // yMarginT must equal to caretYSlop, with a minimum of 1 and + // a maximum of slightly less than half the heigth of the text area. + yMarginT = Platform::Clamp(caretYSlop, 1, halfScreen); + if (bEven) { + yMarginB = yMarginT; + } else { + yMarginB = linesOnScreen - yMarginT - 1; + } + } + yMoveT = yMarginT; + if (bEven) { + if (bJump) { + yMoveT = Platform::Clamp(caretYSlop * 3, 1, halfScreen); + } + yMoveB = yMoveT; + } else { + yMoveB = linesOnScreen - yMoveT - 1; + } + if (lineCaret < topLine + yMarginT) { + // Caret goes too high + newTopLine = lineCaret - yMoveT; + } else if (lineCaret > topLine + linesOnScreen - 1 - yMarginB) { + // Caret goes too low + newTopLine = lineCaret - linesOnScreen + 1 + yMoveB; + } + } else { // Not strict + yMoveT = bJump ? caretYSlop * 3 : caretYSlop; + yMoveT = Platform::Clamp(yMoveT, 1, halfScreen); + if (bEven) { + yMoveB = yMoveT; + } else { + yMoveB = linesOnScreen - yMoveT - 1; + } + if (lineCaret < topLine) { + // Caret goes too high + newTopLine = lineCaret - yMoveT; + } else if (lineCaret > topLine + linesOnScreen - 1) { + // Caret goes too low + newTopLine = lineCaret - linesOnScreen + 1 + yMoveB; + } + } + } else { // No slop + if (!bStrict && !bJump) { + // Minimal move + if (lineCaret < topLine) { + // Caret goes too high + newTopLine = lineCaret; + } else if (lineCaret > topLine + linesOnScreen - 1) { + // Caret goes too low + if (bEven) { + newTopLine = lineCaret - linesOnScreen + 1; + } else { + newTopLine = lineCaret; + } + } + } else { // Strict or going out of display + if (bEven) { + // Always center caret + newTopLine = lineCaret - halfScreen; + } else { + // Always put caret on top of display + newTopLine = lineCaret; + } + } + } + newTopLine = Platform::Clamp(newTopLine, 0, MaxScrollPos()); + if (newTopLine != topLine) { + Redraw(); + SetTopLine(newTopLine); + SetVerticalScrollPos(); + } + } + + // Horizontal positioning + if (horiz && (wrapState == eWrapNone)) { + int halfScreen = Platform::Maximum(rcClient.Width() - 4, 4) / 2; + int xOffsetNew = xOffset; + bSlop = (caretXPolicy & CARET_SLOP) != 0; + bStrict = (caretXPolicy & CARET_STRICT) != 0; + bJump = (caretXPolicy & CARET_JUMPS) != 0; + bEven = (caretXPolicy & CARET_EVEN) != 0; + + if (bSlop) { // A margin is defined + int xMoveL, xMoveR; + if (bStrict) { + int xMarginL, xMarginR; + if (!useMargin) { + // In drag mode, avoid moves unless very near of the margin + // otherwise, a simple click will select text. + xMarginL = xMarginR = 2; + } else { + // xMargin must equal to caretXSlop, with a minimum of 2 and + // a maximum of slightly less than half the width of the text area. + xMarginR = Platform::Clamp(caretXSlop, 2, halfScreen); + if (bEven) { + xMarginL = xMarginR; + } else { + xMarginL = rcClient.Width() - xMarginR - 4; + } + } + if (bJump && bEven) { + // Jump is used only in even mode + xMoveL = xMoveR = Platform::Clamp(caretXSlop * 3, 1, halfScreen); + } else { + xMoveL = xMoveR = 0; // Not used, avoid a warning + } + if (pt.x < rcClient.left + xMarginL) { + // Caret is on the left of the display + if (bJump && bEven) { + xOffsetNew -= xMoveL; + } else { + // Move just enough to allow to display the caret + xOffsetNew -= (rcClient.left + xMarginL) - pt.x; + } + } else if (pt.x >= rcClient.right - xMarginR) { + // Caret is on the right of the display + if (bJump && bEven) { + xOffsetNew += xMoveR; + } else { + // Move just enough to allow to display the caret + xOffsetNew += pt.x - (rcClient.right - xMarginR) + 1; + } + } + } else { // Not strict + xMoveR = bJump ? caretXSlop * 3 : caretXSlop; + xMoveR = Platform::Clamp(xMoveR, 1, halfScreen); + if (bEven) { + xMoveL = xMoveR; + } else { + xMoveL = rcClient.Width() - xMoveR - 4; + } + if (pt.x < rcClient.left) { + // Caret is on the left of the display + xOffsetNew -= xMoveL; + } else if (pt.x >= rcClient.right) { + // Caret is on the right of the display + xOffsetNew += xMoveR; + } + } + } else { // No slop + if (bStrict || + (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) { + // Strict or going out of display + if (bEven) { + // Center caret + xOffsetNew += pt.x - rcClient.left - halfScreen; + } else { + // Put caret on right + xOffsetNew += pt.x - rcClient.right + 1; + } + } else { + // Move just enough to allow to display the caret + if (pt.x < rcClient.left) { + // Caret is on the left of the display + if (bEven) { + xOffsetNew -= rcClient.left - pt.x; + } else { + xOffsetNew += pt.x - rcClient.right + 1; + } + } else if (pt.x >= rcClient.right) { + // Caret is on the right of the display + xOffsetNew += pt.x - rcClient.right + 1; + } + } + } + // In case of a jump (find result) largely out of display, adjust the offset to display the caret + if (pt.x + xOffset < rcClient.left + xOffsetNew) { + xOffsetNew = pt.x + xOffset - rcClient.left; + } else if (pt.x + xOffset >= rcClient.right + xOffsetNew) { + xOffsetNew = pt.x + xOffset - rcClient.right + 1; + } + if (xOffsetNew < 0) { + xOffsetNew = 0; + } + if (xOffset != xOffsetNew) { + xOffset = xOffsetNew; + if (xOffsetNew > 0) { + PRectangle rcText = GetTextRectangle(); + if (horizontalScrollBarVisible == true && + rcText.Width() + xOffset > scrollWidth) { + scrollWidth = xOffset + rcText.Width(); + SetScrollBars(); + } + } + SetHorizontalScrollPos(); + Redraw(); + } + } + UpdateSystemCaret(); +} + +void Editor::ShowCaretAtCurrentPosition() { + if (hasFocus) { + caret.active = true; + caret.on = true; + SetTicking(true); + } else { + caret.active = false; + caret.on = false; + } + InvalidateCaret(); +} + +void Editor::DropCaret() { + caret.active = false; + InvalidateCaret(); +} + +void Editor::InvalidateCaret() { + if (posDrag >= 0) + InvalidateRange(posDrag, posDrag + 1); + else + InvalidateRange(currentPos, currentPos + 1); + UpdateSystemCaret(); +} + +void Editor::UpdateSystemCaret() { +} + +void Editor::NeedWrapping(int docLineStart, int docLineEnd) { + docLineStart = Platform::Clamp(docLineStart, 0, pdoc->LinesTotal()); + if (wrapStart > docLineStart) { + wrapStart = docLineStart; + llc.Invalidate(LineLayout::llPositions); + } + if (wrapEnd < docLineEnd) { + wrapEnd = docLineEnd; + } + wrapEnd = Platform::Clamp(wrapEnd, 0, pdoc->LinesTotal()); + // Wrap lines during idle. + if ((wrapState != eWrapNone) && (wrapEnd != wrapStart)) { + SetIdle(true); + } +} + +// Check if wrapping needed and perform any needed wrapping. +// fullwrap: if true, all lines which need wrapping will be done, +// in this single call. +// priorityWrapLineStart: If greater than zero, all lines starting from +// here to 1 page + 100 lines past will be wrapped (even if there are +// more lines under wrapping process in idle). +// If it is neither fullwrap, nor priorityWrap, then 1 page + 100 lines will be +// wrapped, if there are any wrapping going on in idle. (Generally this +// condition is called only from idler). +// Return true if wrapping occurred. +bool Editor::WrapLines(bool fullWrap, int priorityWrapLineStart) { + // If there are any pending wraps, do them during idle if possible. + int linesInOneCall = LinesOnScreen() + 100; + if (wrapState != eWrapNone) { + if (wrapStart < wrapEnd) { + if (!SetIdle(true)) { + // Idle processing not supported so full wrap required. + fullWrap = true; + } + } + if (!fullWrap && priorityWrapLineStart >= 0 && + // .. and if the paint window is outside pending wraps + (((priorityWrapLineStart + linesInOneCall) < wrapStart) || + (priorityWrapLineStart > wrapEnd))) { + // No priority wrap pending + return false; + } + } + int goodTopLine = topLine; + bool wrapOccurred = false; + if (wrapStart <= pdoc->LinesTotal()) { + if (wrapState == eWrapNone) { + if (wrapWidth != LineLayout::wrapWidthInfinite) { + wrapWidth = LineLayout::wrapWidthInfinite; + for (int lineDoc = 0; lineDoc < pdoc->LinesTotal(); lineDoc++) { + cs.SetHeight(lineDoc, 1); + } + wrapOccurred = true; + } + wrapStart = wrapLineLarge; + wrapEnd = wrapLineLarge; + } else { + if (wrapEnd >= pdoc->LinesTotal()) + wrapEnd = pdoc->LinesTotal(); + //ElapsedTime et; + int lineDocTop = cs.DocFromDisplay(topLine); + int subLineTop = topLine - cs.DisplayFromDoc(lineDocTop); + PRectangle rcTextArea = GetClientRectangle(); + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + wrapWidth = rcTextArea.Width(); + // Ensure all of the document is styled. + pdoc->EnsureStyledTo(pdoc->Length()); + RefreshStyleData(); + AutoSurface surface(this); + if (surface) { + bool priorityWrap = false; + int lastLineToWrap = wrapEnd; + int lineToWrap = wrapStart; + if (!fullWrap) { + if (priorityWrapLineStart >= 0) { + // This is a priority wrap. + lineToWrap = priorityWrapLineStart; + lastLineToWrap = priorityWrapLineStart + linesInOneCall; + priorityWrap = true; + } else { + // This is idle wrap. + lastLineToWrap = wrapStart + linesInOneCall; + } + if (lastLineToWrap >= wrapEnd) + lastLineToWrap = wrapEnd; + } // else do a fullWrap. + + // Platform::DebugPrintf("Wraplines: full = %d, priorityStart = %d (wrapping: %d to %d)\n", fullWrap, priorityWrapLineStart, lineToWrap, lastLineToWrap); + // Platform::DebugPrintf("Pending wraps: %d to %d\n", wrapStart, wrapEnd); + while (lineToWrap < lastLineToWrap) { + AutoLineLayout ll(llc, RetrieveLineLayout(lineToWrap)); + int linesWrapped = 1; + if (ll) { + LayoutLine(lineToWrap, surface, vs, ll, wrapWidth); + linesWrapped = ll->lines; + } + if (cs.SetHeight(lineToWrap, linesWrapped)) { + wrapOccurred = true; + } + lineToWrap++; + } + if (!priorityWrap) + wrapStart = lineToWrap; + // If wrapping is done, bring it to resting position + if (wrapStart >= wrapEnd) { + wrapStart = wrapLineLarge; + wrapEnd = wrapLineLarge; + } + } + goodTopLine = cs.DisplayFromDoc(lineDocTop); + if (subLineTop < cs.GetHeight(lineDocTop)) + goodTopLine += subLineTop; + else + goodTopLine += cs.GetHeight(lineDocTop); + //double durWrap = et.Duration(true); + //Platform::DebugPrintf("Wrap:%9.6g \n", durWrap); + } + } + if (wrapOccurred) { + SetScrollBars(); + SetTopLine(Platform::Clamp(goodTopLine, 0, MaxScrollPos())); + SetVerticalScrollPos(); + } + return wrapOccurred; +} + +void Editor::LinesJoin() { + if (!RangeContainsProtected(targetStart, targetEnd)) { + pdoc->BeginUndoAction(); + bool prevNonWS = true; + for (int pos = targetStart; pos < targetEnd; pos++) { + if (IsEOLChar(pdoc->CharAt(pos))) { + targetEnd -= pdoc->LenChar(pos); + pdoc->DelChar(pos); + if (prevNonWS) { + // Ensure at least one space separating previous lines + pdoc->InsertChar(pos, ' '); + targetEnd++; + } + } else { + prevNonWS = pdoc->CharAt(pos) != ' '; + } + } + pdoc->EndUndoAction(); + } +} + +const char *StringFromEOLMode(int eolMode) { + if (eolMode == SC_EOL_CRLF) { + return "\r\n"; + } else if (eolMode == SC_EOL_CR) { + return "\r"; + } else { + return "\n"; + } +} + +void Editor::LinesSplit(int pixelWidth) { + if (!RangeContainsProtected(targetStart, targetEnd)) { + if (pixelWidth == 0) { + PRectangle rcText = GetTextRectangle(); + pixelWidth = rcText.Width(); + } + int lineStart = pdoc->LineFromPosition(targetStart); + int lineEnd = pdoc->LineFromPosition(targetEnd); + const char *eol = StringFromEOLMode(pdoc->eolMode); + pdoc->BeginUndoAction(); + for (int line = lineStart; line <= lineEnd; line++) { + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(line); + LayoutLine(line, surface, vs, ll, pixelWidth); + for (int subLine = 1; subLine < ll->lines; subLine++) { + pdoc->InsertCString(posLineStart + (subLine - 1) * strlen(eol) + + ll->LineStart(subLine), eol); + targetEnd += static_cast(strlen(eol)); + } + } + lineEnd = pdoc->LineFromPosition(targetEnd); + } + pdoc->EndUndoAction(); + } +} + +int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) { + if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) + return markerDefault; + return markerCheck; +} + +// Avoid 64 bit compiler warnings. +// Scintilla does not support text buffers larger than 2**31 +static int istrlen(const char *s) { + return static_cast(strlen(s)); +} + +void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { + if (vs.fixedColumnWidth == 0) + return; + + PRectangle rcMargin = GetClientRectangle(); + rcMargin.right = vs.fixedColumnWidth; + + if (!rc.Intersects(rcMargin)) + return; + + Surface *surface; + if (bufferedDraw) { + surface = pixmapSelMargin; + } else { + surface = surfWindow; + } + + PRectangle rcSelMargin = rcMargin; + rcSelMargin.right = rcMargin.left; + + for (int margin = 0; margin < vs.margins; margin++) { + if (vs.ms[margin].width > 0) { + + rcSelMargin.left = rcSelMargin.right; + rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; + + if (vs.ms[margin].style != SC_MARGIN_NUMBER) { + /* alternate scheme: + if (vs.ms[margin].mask & SC_MASK_FOLDERS) + surface->FillRectangle(rcSelMargin, vs.styles[STYLE_DEFAULT].back.allocated); + else + // Required because of special way brush is created for selection margin + surface->FillRectangle(rcSelMargin, pixmapSelPattern); + */ + if (vs.ms[margin].mask & SC_MASK_FOLDERS) + // Required because of special way brush is created for selection margin + surface->FillRectangle(rcSelMargin, *pixmapSelPattern); + else { + ColourAllocated colour; + switch (vs.ms[margin].style) { + case SC_MARGIN_BACK: + colour = vs.styles[STYLE_DEFAULT].back.allocated; + break; + case SC_MARGIN_FORE: + colour = vs.styles[STYLE_DEFAULT].fore.allocated; + break; + default: + colour = vs.styles[STYLE_LINENUMBER].back.allocated; + break; + } + surface->FillRectangle(rcSelMargin, colour); + } + } else { + surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); + } + + int visibleLine = topLine; + int yposScreen = 0; + + // Work out whether the top line is whitespace located after a + // lessening of fold level which implies a 'fold tail' but which should not + // be displayed until the last of a sequence of whitespace. + bool needWhiteClosure = false; + int level = pdoc->GetLevel(cs.DocFromDisplay(topLine)); + if (level & SC_FOLDLEVELWHITEFLAG) { + int lineBack = cs.DocFromDisplay(topLine); + int levelPrev = level; + while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) { + lineBack--; + levelPrev = pdoc->GetLevel(lineBack); + } + if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { + if ((level & SC_FOLDLEVELNUMBERMASK) < (levelPrev & SC_FOLDLEVELNUMBERMASK)) + needWhiteClosure = true; + } + } + + // Old code does not know about new markers needed to distinguish all cases + int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, + SC_MARKNUM_FOLDEROPEN); + int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, + SC_MARKNUM_FOLDER); + + while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { + + PLATFORM_ASSERT(visibleLine < cs.LinesDisplayed()); + + int lineDoc = cs.DocFromDisplay(visibleLine); + PLATFORM_ASSERT(cs.GetVisible(lineDoc)); + bool firstSubLine = visibleLine == cs.DisplayFromDoc(lineDoc); + + // Decide which fold indicator should be displayed + level = pdoc->GetLevel(lineDoc); + int levelNext = pdoc->GetLevel(lineDoc + 1); + int marks = pdoc->GetMark(lineDoc); + if (!firstSubLine) + marks = 0; + int levelNum = level & SC_FOLDLEVELNUMBERMASK; + int levelNextNum = levelNext & SC_FOLDLEVELNUMBERMASK; + if (level & SC_FOLDLEVELHEADERFLAG) { + if (firstSubLine) { + if (cs.GetExpanded(lineDoc)) { + if (levelNum == SC_FOLDLEVELBASE) + marks |= 1 << SC_MARKNUM_FOLDEROPEN; + else + marks |= 1 << folderOpenMid; + } else { + if (levelNum == SC_FOLDLEVELBASE) + marks |= 1 << SC_MARKNUM_FOLDER; + else + marks |= 1 << folderEnd; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + needWhiteClosure = false; + } else if (level & SC_FOLDLEVELWHITEFLAG) { + if (needWhiteClosure) { + if (levelNext & SC_FOLDLEVELWHITEFLAG) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } else if (levelNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + needWhiteClosure = false; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + needWhiteClosure = false; + } + } else if (levelNum > SC_FOLDLEVELBASE) { + if (levelNextNum < levelNum) { + if (levelNextNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } + } else if (levelNum > SC_FOLDLEVELBASE) { + if (levelNextNum < levelNum) { + needWhiteClosure = false; + if (levelNext & SC_FOLDLEVELWHITEFLAG) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + needWhiteClosure = true; + } else if (levelNextNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } + + marks &= vs.ms[margin].mask; + PRectangle rcMarker = rcSelMargin; + rcMarker.top = yposScreen; + rcMarker.bottom = yposScreen + vs.lineHeight; + if (vs.ms[margin].style == SC_MARGIN_NUMBER) { + char number[100]; + number[0] = '\0'; + if (firstSubLine) + sprintf(number, "%d", lineDoc + 1); + if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { + int lev = pdoc->GetLevel(lineDoc); + sprintf(number, "%c%c %03X %03X", + (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_', + (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', + lev & SC_FOLDLEVELNUMBERMASK, + lev >> 16 + ); + } + PRectangle rcNumber = rcMarker; + // Right justify + int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, istrlen(number)); + int xpos = rcNumber.right - width - 3; + rcNumber.left = xpos; + surface->DrawTextNoClip(rcNumber, vs.styles[STYLE_LINENUMBER].font, + rcNumber.top + vs.maxAscent, number, istrlen(number), + vs.styles[STYLE_LINENUMBER].fore.allocated, + vs.styles[STYLE_LINENUMBER].back.allocated); + } + + if (marks) { + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if (marks & 1) { + vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font); + } + marks >>= 1; + } + } + + visibleLine++; + yposScreen += vs.lineHeight; + } + } + } + + PRectangle rcBlankMargin = rcMargin; + rcBlankMargin.left = rcSelMargin.right; + surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated); + + if (bufferedDraw) { + surfWindow->Copy(rcMargin, Point(), *pixmapSelMargin); + } +} + +void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid) { + int ydiff = (rcTab.bottom - rcTab.top) / 2; + int xhead = rcTab.right - 1 - ydiff; + if (xhead <= rcTab.left) { + ydiff -= rcTab.left - xhead - 1; + xhead = rcTab.left - 1; + } + if ((rcTab.left + 2) < (rcTab.right - 1)) + surface->MoveTo(rcTab.left + 2, ymid); + else + surface->MoveTo(rcTab.right - 1, ymid); + surface->LineTo(rcTab.right - 1, ymid); + surface->LineTo(xhead, ymid - ydiff); + surface->MoveTo(rcTab.right - 1, ymid); + surface->LineTo(xhead, ymid + ydiff); +} + +static bool IsSpaceOrTab(char ch) { + return ch == ' ' || ch == '\t'; +} + +LineLayout *Editor::RetrieveLineLayout(int lineNumber) { + int posLineStart = pdoc->LineStart(lineNumber); + int posLineEnd = pdoc->LineStart(lineNumber + 1); + PLATFORM_ASSERT(posLineEnd >= posLineStart); + int lineCaret = pdoc->LineFromPosition(currentPos); + return llc.Retrieve(lineNumber, lineCaret, + posLineEnd - posLineStart, pdoc->GetStyleClock(), + LinesOnScreen() + 1, pdoc->LinesTotal()); +} + +/** + * Fill in the LineLayout data for the given line. + * Copy the given @a line and its styles from the document into local arrays. + * Also determine the x position at which each character starts. + */ +void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, int width) { + if (!ll) + return; + PLATFORM_ASSERT(line < pdoc->LinesTotal()); + PLATFORM_ASSERT(ll->chars != NULL); + int posLineStart = pdoc->LineStart(line); + int posLineEnd = pdoc->LineStart(line + 1); + // If the line is very long, limit the treatment to a length that should fit in the viewport + if (posLineEnd > (posLineStart + ll->maxLineLength)) { + posLineEnd = posLineStart + ll->maxLineLength; + } + if (ll->validity == LineLayout::llCheckTextAndStyle) { + int lineLength = posLineEnd - posLineStart; + if (!vstyle.viewEOL) { + int cid = posLineEnd - 1; + while ((cid > posLineStart) && IsEOLChar(pdoc->CharAt(cid))) { + cid--; + lineLength--; + } + } + if (lineLength == ll->numCharsInLine) { + // See if chars, styles, indicators, are all the same + bool allSame = true; + const int styleMask = pdoc->stylingBitsMask; + // Check base line layout + char styleByte = 0; + int numCharsInLine = 0; + while (numCharsInLine < lineLength) { + int charInDoc = numCharsInLine + posLineStart; + char chDoc = pdoc->CharAt(charInDoc); + styleByte = pdoc->StyleAt(charInDoc); + allSame = allSame && + (ll->styles[numCharsInLine] == static_cast(styleByte & styleMask)); + allSame = allSame && + (ll->indicators[numCharsInLine] == static_cast(styleByte & ~styleMask)); + if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseMixed) + allSame = allSame && + (ll->chars[numCharsInLine] == chDoc); + else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(tolower(chDoc))); + else // Style::caseUpper + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(toupper(chDoc))); + numCharsInLine++; + } + allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled + if (allSame) { + ll->validity = LineLayout::llPositions; + } else { + ll->validity = LineLayout::llInvalid; + } + } else { + ll->validity = LineLayout::llInvalid; + } + } + if (ll->validity == LineLayout::llInvalid) { + ll->widthLine = LineLayout::wrapWidthInfinite; + ll->lines = 1; + int numCharsInLine = 0; + if (vstyle.edgeState == EDGE_BACKGROUND) { + ll->edgeColumn = pdoc->FindColumn(line, theEdge); + if (ll->edgeColumn >= posLineStart) { + ll->edgeColumn -= posLineStart; + } + } else { + ll->edgeColumn = -1; + } + + char styleByte = 0; + int styleMask = pdoc->stylingBitsMask; + ll->styleBitsSet = 0; + // Fill base line layout + for (int charInDoc = posLineStart; charInDoc < posLineEnd; charInDoc++) { + char chDoc = pdoc->CharAt(charInDoc); + styleByte = pdoc->StyleAt(charInDoc); + ll->styleBitsSet |= styleByte; + if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { + ll->chars[numCharsInLine] = chDoc; + ll->styles[numCharsInLine] = static_cast(styleByte & styleMask); + ll->indicators[numCharsInLine] = static_cast(styleByte & ~styleMask); + if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) + ll->chars[numCharsInLine] = static_cast(toupper(chDoc)); + else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) + ll->chars[numCharsInLine] = static_cast(tolower(chDoc)); + numCharsInLine++; + } + } + ll->xHighlightGuide = 0; + // Extra element at the end of the line to hold end x position and act as + ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character + ll->styles[numCharsInLine] = styleByte; // For eolFilled + ll->indicators[numCharsInLine] = 0; + + // Layout the line, determining the position of each character, + // with an extra element at the end for the end of the line. + int startseg = 0; // Start of the current segment, in char. number + int startsegx = 0; // Start of the current segment, in pixels + ll->positions[0] = 0; + unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars; + bool lastSegItalics = false; + Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; + + int ctrlCharWidth[32] = {0}; + bool isControlNext = IsControlCharacter(ll->chars[0]); + for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { + bool isControl = isControlNext; + isControlNext = IsControlCharacter(ll->chars[charInLine + 1]); + if ((ll->styles[charInLine] != ll->styles[charInLine + 1]) || + isControl || isControlNext) { + ll->positions[startseg] = 0; + if (vstyle.styles[ll->styles[charInLine]].visible) { + if (isControl) { + if (ll->chars[charInLine] == '\t') { + ll->positions[charInLine + 1] = ((((startsegx + 2) / + tabWidth) + 1) * tabWidth) - startsegx; + } else if (controlCharSymbol < 32) { + if (ctrlCharWidth[ll->chars[charInLine]] == 0) { + const char *ctrlChar = ControlCharacterString(ll->chars[charInLine]); + // +3 For a blank on front and rounded edge each side: + ctrlCharWidth[ll->chars[charInLine]] = + surface->WidthText(ctrlCharsFont, ctrlChar, istrlen(ctrlChar)) + 3; + } + ll->positions[charInLine + 1] = ctrlCharWidth[ll->chars[charInLine]]; + } else { + char cc[2] = { static_cast(controlCharSymbol), '\0' }; + surface->MeasureWidths(ctrlCharsFont, cc, 1, + ll->positions + startseg + 1); + } + lastSegItalics = false; + } else { // Regular character + int lenSeg = charInLine - startseg + 1; + if ((lenSeg == 1) && (' ' == ll->chars[startseg])) { + lastSegItalics = false; + // Over half the segments are single characters and of these about half are space characters. + ll->positions[charInLine + 1] = vstyle.styles[ll->styles[charInLine]].spaceWidth; + } else { + lastSegItalics = vstyle.styles[ll->styles[charInLine]].italic; + surface->MeasureWidths(vstyle.styles[ll->styles[charInLine]].font, ll->chars + startseg, + lenSeg, ll->positions + startseg + 1); + } + } + } else { // invisible + for (int posToZero = startseg; posToZero <= (charInLine + 1); posToZero++) { + ll->positions[posToZero] = 0; + } + } + for (int posToIncrease = startseg; posToIncrease <= (charInLine + 1); posToIncrease++) { + ll->positions[posToIncrease] += startsegx; + } + startsegx = ll->positions[charInLine + 1]; + startseg = charInLine + 1; + } + } + // Small hack to make lines that end with italics not cut off the edge of the last character + if ((startseg > 0) && lastSegItalics) { + ll->positions[startseg] += 2; + } + ll->numCharsInLine = numCharsInLine; + ll->validity = LineLayout::llPositions; + } + // Hard to cope when too narrow, so just assume there is space + if (width < 20) { + width = 20; + } + if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { + ll->widthLine = width; + if (width == LineLayout::wrapWidthInfinite) { + ll->lines = 1; + } else if (width > ll->positions[ll->numCharsInLine]) { + // Simple common case where line does not need wrapping. + ll->lines = 1; + } else { + if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { + width -= vstyle.aveCharWidth; // take into account the space for end wrap mark + } + ll->lines = 0; + // Calculate line start positions based upon width. + // For now this is simplistic - wraps on byte rather than character and + // in the middle of words. Should search for spaces or style changes. + int lastGoodBreak = 0; + int lastLineStart = 0; + int startOffset = 0; + int p = 0; + while (p < ll->numCharsInLine) { + if ((ll->positions[p + 1] - startOffset) >= width) { + if (lastGoodBreak == lastLineStart) { + // Try moving to start of last character + if (p > 0) { + lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; + } + if (lastGoodBreak == lastLineStart) { + // Ensure at least one character on line. + lastGoodBreak = pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) + - posLineStart; + } + } + lastLineStart = lastGoodBreak; + ll->lines++; + ll->SetLineStart(ll->lines, lastGoodBreak); + startOffset = ll->positions[lastGoodBreak]; + // take into account the space for start wrap mark and indent + startOffset -= actualWrapVisualStartIndent * vstyle.aveCharWidth; + p = lastGoodBreak + 1; + continue; + } + if (p > 0) { + if (wrapState == eWrapChar) { + lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; + p = pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart; + continue; + } else if (ll->styles[p] != ll->styles[p - 1]) { + lastGoodBreak = p; + } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { + lastGoodBreak = p; + } + } + p++; + } + ll->lines++; + } + ll->validity = LineLayout::llLines; + } +} + +ColourAllocated Editor::SelectionBackground(ViewStyle &vsDraw) { + return primarySelection ? vsDraw.selbackground.allocated : vsDraw.selbackground2.allocated; +} + +ColourAllocated Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, + ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) { + if (inSelection) { + if (vsDraw.selbackset && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + return SelectionBackground(vsDraw); + } + } else { + if ((vsDraw.edgeState == EDGE_BACKGROUND) && + (i >= ll->edgeColumn) && + !IsEOLChar(ll->chars[i])) + return vsDraw.edgecolour.allocated; + if (inHotspot && vsDraw.hotspotBackgroundSet) + return vsDraw.hotspotBackground.allocated; + if (overrideBackground) + return background; + } + return vsDraw.styles[styleMain].back.allocated; +} + +void Editor::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { + Point from(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea(start + 1, rcSegment.top, start + 2, rcSegment.bottom); + surface->Copy(rcCopyArea, from, + highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); +} + +void Editor::DrawWrapMarker(Surface *surface, PRectangle rcPlace, + bool isEndMarker, ColourAllocated wrapColour) { + surface->PenColour(wrapColour); + + enum { xa = 1 }; // gap before start + int w = rcPlace.right - rcPlace.left - xa - 1; + + bool xStraight = isEndMarker; // x-mirrored symbol for start marker + bool yStraight = true; + //bool yStraight= isEndMarker; // comment in for start marker y-mirrowed + + int x0 = xStraight ? rcPlace.left : rcPlace.right - 1; + int y0 = yStraight ? rcPlace.top : rcPlace.bottom - 1; + + int dy = (rcPlace.bottom - rcPlace.top) / 5; + int y = (rcPlace.bottom - rcPlace.top) / 2 + dy; + + struct Relative { + Surface *surface; + int xBase; + int xDir; + int yBase; + int yDir; + void MoveTo(int xRelative, int yRelative) { + surface->MoveTo(xBase + xDir * xRelative, yBase + yDir * yRelative); + } + void LineTo(int xRelative, int yRelative) { + surface->LineTo(xBase + xDir * xRelative, yBase + yDir * yRelative); + } + }; + Relative rel = {surface, x0, xStraight ? 1 : -1, y0, yStraight ? 1 : -1}; + + // arrow head + rel.MoveTo(xa, y); + rel.LineTo(xa + 2*w / 3, y - dy); + rel.MoveTo(xa, y); + rel.LineTo(xa + 2*w / 3, y + dy); + + // arrow body + rel.MoveTo(xa, y); + rel.LineTo(xa + w, y); + rel.LineTo(xa + w, y - 2 * dy); + rel.LineTo(xa - 1, // on windows lineto is exclusive endpoint, perhaps GTK not... + y - 2 * dy); +} + +static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourAllocated fill, int alpha) { + if (alpha != SC_ALPHA_NOALPHA) { + surface->AlphaRectangle(rc, 0, fill, alpha, fill, alpha, 0); + } +} + +void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, + int line, int lineEnd, int xStart, int subLine, int subLineStart, + bool overrideBackground, ColourAllocated background, + bool drawWrapMarkEnd, ColourAllocated wrapColour) { + + int styleMask = pdoc->stylingBitsMask; + PRectangle rcSegment = rcLine; + + // Fill in a PRectangle representing the end of line characters + int xEol = ll->positions[lineEnd] - subLineStart; + rcSegment.left = xEol + xStart; + rcSegment.right = xEol + vsDraw.aveCharWidth + xStart; + int posLineEnd = pdoc->LineStart(line + 1); + bool eolInSelection = (subLine == (ll->lines - 1)) && + (posLineEnd > ll->selStart) && (posLineEnd <= ll->selEnd) && (ll->selStart != ll->selEnd); + + if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw)); + } else { + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } + if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha); + } + } + + rcSegment.left = xEol + vsDraw.aveCharWidth + xStart; + rcSegment.right = rcLine.right; + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); + } + + if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw)); + } else { + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); + } + if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha); + } + } + + if (drawWrapMarkEnd) { + PRectangle rcPlace = rcSegment; + + if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) { + rcPlace.left = xEol + xStart; + rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; + } else { + // draw left of the right text margin, to avoid clipping by the current clip rect + rcPlace.right = rcLine.right - vs.rightMarginWidth; + rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; + } + DrawWrapMarker(surface, rcPlace, true, wrapColour); + } +} + +void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, + PRectangle rcLine, LineLayout *ll, int subLine) { + + PRectangle rcSegment = rcLine; + + // Using one font for all control characters so it can be controlled independently to ensure + // the box goes around the characters tightly. Seems to be no way to work out what height + // is taken by an individual character - internal leading gives varying results. + Font &ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; + + // See if something overrides the line background color: Either if caret is on the line + // and background color is set for that, or if a marker is defined that forces its background + // color onto the line, or if a marker is defined but has no selection margin in which to + // display itself (as long as it's not an SC_MARK_EMPTY marker). These are checked in order + // with the earlier taking precedence. When multiple markers cause background override, + // the color for the highest numbered one is used. + bool overrideBackground = false; + ColourAllocated background; + if (caret.active && vsDraw.showCaretLineBackground && (vsDraw.caretLineAlpha == SC_ALPHA_NOALPHA) && ll->containsCaret) { + overrideBackground = true; + background = vsDraw.caretLineBackground.allocated; + } + if (!overrideBackground) { + int marks = pdoc->GetMark(line); + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND) && + (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { + background = vsDraw.markers[markBit].back.allocated; + overrideBackground = true; + } + marks >>= 1; + } + } + if (!overrideBackground) { + if (vsDraw.maskInLine) { + int marksMasked = pdoc->GetMark(line) & vsDraw.maskInLine; + if (marksMasked) { + for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) { + if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY) && + (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { + overrideBackground = true; + background = vsDraw.markers[markBit].back.allocated; + } + marksMasked >>= 1; + } + } + } + } + + bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) && + (!overrideBackground) && (vsDraw.whitespaceBackgroundSet); + + bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. + int indentWidth = pdoc->IndentSize() * vsDraw.spaceWidth; + + int posLineStart = pdoc->LineStart(line); + + int startseg = ll->LineStart(subLine); + int subLineStart = ll->positions[startseg]; + int lineStart = 0; + int lineEnd = 0; + if (subLine < ll->lines) { + lineStart = ll->LineStart(subLine); + lineEnd = ll->LineStart(subLine + 1); + } + + ColourAllocated wrapColour = vsDraw.styles[STYLE_DEFAULT].fore.allocated; + if (vsDraw.whitespaceForegroundSet) + wrapColour = vsDraw.whitespaceForeground.allocated; + + bool drawWrapMarkEnd = false; + + if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { + if (subLine + 1 < ll->lines) { + drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0; + } + } + + if (actualWrapVisualStartIndent != 0) { + + bool continuedWrapLine = false; + if (subLine < ll->lines) { + continuedWrapLine = ll->LineStart(subLine) != 0; + } + + if (continuedWrapLine) { + // draw continuation rect + PRectangle rcPlace = rcSegment; + + rcPlace.left = ll->positions[startseg] + xStart - subLineStart; + rcPlace.right = rcPlace.left + actualWrapVisualStartIndent * vsDraw.aveCharWidth; + + // default bgnd here.. + surface->FillRectangle(rcSegment, overrideBackground ? background : + vsDraw.styles[STYLE_DEFAULT].back.allocated); + + // main line style would be below but this would be inconsistent with end markers + // also would possibly not be the style at wrap point + //int styleMain = ll->styles[lineStart]; + //surface->FillRectangle(rcPlace, vsDraw.styles[styleMain].back.allocated); + + if (wrapVisualFlags & SC_WRAPVISUALFLAG_START) { + + if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT) + rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; + else + rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; + + DrawWrapMarker(surface, rcPlace, false, wrapColour); + } + + xStart += actualWrapVisualStartIndent * vsDraw.aveCharWidth; + } + } + + int i; + + // Background drawing loop + for (i = lineStart; twoPhaseDraw && (i < lineEnd); i++) { + + int iDoc = i + posLineStart; + // If there is the end of a style run for any reason + if ((ll->styles[i] != ll->styles[i + 1]) || + i == (lineEnd - 1) || + IsControlCharacter(ll->chars[i]) || IsControlCharacter(ll->chars[i + 1]) || + ((ll->selStart != ll->selEnd) && ((iDoc + 1 == ll->selStart) || (iDoc + 1 == ll->selEnd))) || + (i == (ll->edgeColumn - 1))) { + rcSegment.left = ll->positions[startseg] + xStart - subLineStart; + rcSegment.right = ll->positions[i + 1] + xStart - subLineStart; + // Only try to draw if really visible - enhances performance by not calling environment to + // draw strings that are completely past the right side of the window. + if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { + int styleMain = ll->styles[i]; + bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); + bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); + ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); + if (ll->chars[i] == '\t') { + // Tab display + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + textBack = vsDraw.whitespaceBackground.allocated; + surface->FillRectangle(rcSegment, textBack); + } else if (IsControlCharacter(ll->chars[i])) { + // Control character display + inIndentation = false; + surface->FillRectangle(rcSegment, textBack); + } else { + // Normal text display + surface->FillRectangle(rcSegment, textBack); + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides)) { + for (int cpos = 0; cpos <= i - startseg; cpos++) { + if (ll->chars[cpos + startseg] == ' ') { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { + PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, + ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); + surface->FillRectangle(rcSpace, vsDraw.whitespaceBackground.allocated); + } + } else { + inIndentation = false; + } + } + } + } + } else if (rcSegment.left > rcLine.right) { + break; + } + startseg = i + 1; + } + } + + if (twoPhaseDraw) { + DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, + xStart, subLine, subLineStart, overrideBackground, background, + drawWrapMarkEnd, wrapColour); + } + + if (vsDraw.edgeState == EDGE_LINE) { + int edgeX = theEdge * vsDraw.spaceWidth; + rcSegment.left = edgeX + xStart; + rcSegment.right = rcSegment.left + 1; + surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated); + } + + inIndentation = subLine == 0; // Do not handle indentation except on first subline. + startseg = ll->LineStart(subLine); + // Foreground drawing loop + for (i = lineStart; i < lineEnd; i++) { + + int iDoc = i + posLineStart; + // If there is the end of a style run for any reason + if ((ll->styles[i] != ll->styles[i + 1]) || + i == (lineEnd - 1) || + IsControlCharacter(ll->chars[i]) || IsControlCharacter(ll->chars[i + 1]) || + ((ll->selStart != ll->selEnd) && ((iDoc + 1 == ll->selStart) || (iDoc + 1 == ll->selEnd))) || + (i == (ll->edgeColumn - 1))) { + rcSegment.left = ll->positions[startseg] + xStart - subLineStart; + rcSegment.right = ll->positions[i + 1] + xStart - subLineStart; + // Only try to draw if really visible - enhances performance by not calling environment to + // draw strings that are completely past the right side of the window. + if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { + int styleMain = ll->styles[i]; + ColourAllocated textFore = vsDraw.styles[styleMain].fore.allocated; + Font &textFont = vsDraw.styles[styleMain].font; + //hotspot foreground + if (ll->hsStart != -1 && iDoc >= ll->hsStart && iDoc < hsEnd) { + if (vsDraw.hotspotForegroundSet) + textFore = vsDraw.hotspotForeground.allocated; + } + bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); + if (inSelection && (vsDraw.selforeset)) { + textFore = vsDraw.selforeground.allocated; + } + bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); + ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); + if (ll->chars[i] == '\t') { + // Tab display + if (!twoPhaseDraw) { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + textBack = vsDraw.whitespaceBackground.allocated; + surface->FillRectangle(rcSegment, textBack); + } + if ((vsDraw.viewWhitespace != wsInvisible) || ((inIndentation && vsDraw.viewIndentationGuides))) { + if (vsDraw.whitespaceForegroundSet) + textFore = vsDraw.whitespaceForeground.allocated; + surface->PenColour(textFore); + } + if (inIndentation && vsDraw.viewIndentationGuides) { + for (int xIG = ll->positions[i] / indentWidth * indentWidth; xIG < ll->positions[i + 1]; xIG += indentWidth) { + if (xIG >= ll->positions[i] && xIG > 0) { + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIG + xStart, rcSegment, + (ll->xHighlightGuide == xIG)); + } + } + } + if (vsDraw.viewWhitespace != wsInvisible) { + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, + rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); + DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); + } + } + } else if (IsControlCharacter(ll->chars[i])) { + // Control character display + inIndentation = false; + if (controlCharSymbol < 32) { + // Draw the character + const char *ctrlChar = ControlCharacterString(ll->chars[i]); + if (!twoPhaseDraw) { + surface->FillRectangle(rcSegment, textBack); + } + int normalCharHeight = surface->Ascent(ctrlCharsFont) - + surface->InternalLeading(ctrlCharsFont); + PRectangle rcCChar = rcSegment; + rcCChar.left = rcCChar.left + 1; + rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; + rcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1; + PRectangle rcCentral = rcCChar; + rcCentral.top++; + rcCentral.bottom--; + surface->FillRectangle(rcCentral, textFore); + PRectangle rcChar = rcCChar; + rcChar.left++; + rcChar.right--; + surface->DrawTextClipped(rcChar, ctrlCharsFont, + rcSegment.top + vsDraw.maxAscent, ctrlChar, istrlen(ctrlChar), + textBack, textFore); + } else { + char cc[2] = { static_cast(controlCharSymbol), '\0' }; + surface->DrawTextNoClip(rcSegment, ctrlCharsFont, + rcSegment.top + vsDraw.maxAscent, + cc, 1, textBack, textFore); + } + } else { + // Normal text display + if (vsDraw.styles[styleMain].visible) { + if (twoPhaseDraw) { + surface->DrawTextTransparent(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, + i - startseg + 1, textFore); + } else { + surface->DrawTextNoClip(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, + i - startseg + 1, textFore, textBack); + } + } + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides)) { + for (int cpos = 0; cpos <= i - startseg; cpos++) { + if (ll->chars[cpos + startseg] == ' ') { + if (vsDraw.viewWhitespace != wsInvisible) { + if (vsDraw.whitespaceForegroundSet) + textFore = vsDraw.whitespaceForeground.allocated; + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + int xmid = (ll->positions[cpos + startseg] + ll->positions[cpos + startseg + 1]) / 2; + if (!twoPhaseDraw && drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { + textBack = vsDraw.whitespaceBackground.allocated; + PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); + surface->FillRectangle(rcSpace, textBack); + } + PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); + rcDot.right = rcDot.left + 1; + rcDot.bottom = rcDot.top + 1; + surface->FillRectangle(rcDot, textFore); + } + } + if (inIndentation && vsDraw.viewIndentationGuides) { + int startSpace = ll->positions[cpos + startseg]; + if (startSpace > 0 && (startSpace % indentWidth == 0)) { + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, startSpace + xStart, rcSegment, + (ll->xHighlightGuide == ll->positions[cpos + startseg])); + } + } + } else { + inIndentation = false; + } + } + } + } + if (ll->hsStart != -1 && vsDraw.hotspotUnderline && iDoc >= ll->hsStart && iDoc < ll->hsEnd ) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + if (vsDraw.hotspotForegroundSet) + surface->FillRectangle(rcUL, vsDraw.hotspotForeground.allocated); + else + surface->FillRectangle(rcUL, textFore); + } else if (vsDraw.styles[styleMain].underline) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + surface->FillRectangle(rcUL, textFore); + } + } else if (rcSegment.left > rcLine.right) { + break; + } + startseg = i + 1; + } + } + + // Draw indicators + // foreach indicator... + for (int indicnum = 0, mask = 1 << pdoc->stylingBits; mask < 0x100; indicnum++) { + if (!(mask & ll->styleBitsSet)) { + mask <<= 1; + continue; + } + int startPos = -1; + // foreach style pos in line... + for (int indicPos = lineStart; indicPos <= lineEnd; indicPos++) { + // look for starts... + if (startPos < 0) { + // NOT in indicator run, looking for START + if (indicPos < lineEnd && (ll->indicators[indicPos] & mask)) + startPos = indicPos; + } + // ... or ends + if (startPos >= 0) { + // IN indicator run, looking for END + if (indicPos >= lineEnd || !(ll->indicators[indicPos] & mask)) { + // AT end of indicator run, DRAW it! + PRectangle rcIndic( + ll->positions[startPos] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent, + ll->positions[indicPos] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent + 3); + vsDraw.indicators[indicnum].Draw(surface, rcIndic, rcLine); + // RESET control var + startPos = -1; + } + } + } + mask <<= 1; + } + // End of the drawing of the current line + if (!twoPhaseDraw) { + DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, + xStart, subLine, subLineStart, overrideBackground, background, + drawWrapMarkEnd, wrapColour); + } + if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) && (ll->selStart >= 0) && (ll->selEnd >= 0)) { + int startPosSel = (ll->selStart < posLineStart) ? posLineStart : ll->selStart; + int endPosSel = (ll->selEnd < (lineEnd + posLineStart)) ? ll->selEnd : (lineEnd + posLineStart); + if (startPosSel < endPosSel) { + rcSegment.left = xStart + ll->positions[startPosSel - posLineStart] - subLineStart; + rcSegment.right = xStart + ll->positions[endPosSel - posLineStart] - subLineStart; + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha); + } + } + + // Draw any translucent whole line states + rcSegment.left = xStart; + rcSegment.right = rcLine.right - 1; + if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) { + SimpleAlphaRectangle(surface, rcSegment, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha); + } + int marks = pdoc->GetMark(line); + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND)) { + SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha); + } + marks >>= 1; + } + if (vsDraw.maskInLine) { + int marksMasked = pdoc->GetMark(line) & vsDraw.maskInLine; + if (marksMasked) { + for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) { + if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY)) { + SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha); + } + marksMasked >>= 1; + } + } + } +} + +void Editor::RefreshPixMaps(Surface *surfaceWindow) { + if (!pixmapSelPattern->Initialised()) { + const int patternSize = 8; + pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wMain.GetID()); + // This complex procedure is to reproduce the checkerboard dithered pattern used by windows + // for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half + // way between the chrome colour and the chrome highlight colour making a nice transition + // between the window chrome and the content area. And it works in low colour depths. + PRectangle rcPattern(0, 0, patternSize, patternSize); + + // Initialize default colours based on the chrome colour scheme. Typically the highlight is white. + ColourAllocated colourFMFill = vs.selbar.allocated; + ColourAllocated colourFMStripes = vs.selbarlight.allocated; + + if (!(vs.selbarlight.desired == ColourDesired(0xff, 0xff, 0xff))) { + // User has chosen an unusual chrome colour scheme so just use the highlight edge colour. + // (Typically, the highlight colour is white.) + colourFMFill = vs.selbarlight.allocated; + } + + if (vs.foldmarginColourSet) { + // override default fold margin colour + colourFMFill = vs.foldmarginColour.allocated; + } + if (vs.foldmarginHighlightColourSet) { + // override default fold margin highlight colour + colourFMStripes = vs.foldmarginHighlightColour.allocated; + } + + pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); + pixmapSelPattern->PenColour(colourFMStripes); + for (int stripe = 0; stripe < patternSize; stripe++) { + // Alternating 1 pixel stripes is same as checkerboard. + pixmapSelPattern->MoveTo(0, stripe * 2); + pixmapSelPattern->LineTo(patternSize, stripe * 2 - patternSize); + } + } + + if (!pixmapIndentGuide->Initialised()) { + // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line + pixmapIndentGuide->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); + pixmapIndentGuideHighlight->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); + PRectangle rcIG(0, 0, 1, vs.lineHeight); + pixmapIndentGuide->FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back.allocated); + pixmapIndentGuide->PenColour(vs.styles[STYLE_INDENTGUIDE].fore.allocated); + pixmapIndentGuideHighlight->FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back.allocated); + pixmapIndentGuideHighlight->PenColour(vs.styles[STYLE_BRACELIGHT].fore.allocated); + for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) { + pixmapIndentGuide->MoveTo(0, stripe); + pixmapIndentGuide->LineTo(2, stripe); + pixmapIndentGuideHighlight->MoveTo(0, stripe); + pixmapIndentGuideHighlight->LineTo(2, stripe); + } + } + + if (bufferedDraw) { + if (!pixmapLine->Initialised()) { + PRectangle rcClient = GetClientRectangle(); + pixmapLine->InitPixMap(rcClient.Width(), vs.lineHeight, + surfaceWindow, wMain.GetID()); + pixmapSelMargin->InitPixMap(vs.fixedColumnWidth, + rcClient.Height(), surfaceWindow, wMain.GetID()); + } + } +} + +void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { + //Platform::DebugPrintf("Paint:%1d (%3d,%3d) ... (%3d,%3d)\n", + // paintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom); + + RefreshStyleData(); + RefreshPixMaps(surfaceWindow); + + PRectangle rcClient = GetClientRectangle(); + //Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d) %d\n", + // rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); + + surfaceWindow->SetPalette(&palette, true); + pixmapLine->SetPalette(&palette, !hasFocus); + + int screenLinePaintFirst = rcArea.top / vs.lineHeight; + // The area to be painted plus one extra line is styled. + // The extra line is to determine when a style change, such as starting a comment flows on to other lines. + int lineStyleLast = topLine + (rcArea.bottom - 1) / vs.lineHeight + 1; + //Platform::DebugPrintf("Paint lines = %d .. %d\n", topLine + screenLinePaintFirst, lineStyleLast); + int endPosPaint = pdoc->Length(); + if (lineStyleLast < cs.LinesDisplayed()) + endPosPaint = pdoc->LineStart(cs.DocFromDisplay(lineStyleLast + 1)); + + int xStart = vs.fixedColumnWidth - xOffset; + int ypos = 0; + if (!bufferedDraw) + ypos += screenLinePaintFirst * vs.lineHeight; + int yposScreen = screenLinePaintFirst * vs.lineHeight; + + // Ensure we are styled as far as we are painting. + pdoc->EnsureStyledTo(endPosPaint); + bool paintAbandonedByStyling = paintState == paintAbandoned; + if (needUpdateUI) { + NotifyUpdateUI(); + needUpdateUI = false; + RefreshStyleData(); + RefreshPixMaps(surfaceWindow); + } + + // Call priority lines wrap on a window of lines which are likely + // to rendered with the following paint (that is wrap the visible + // lines first). + int startLineToWrap = cs.DocFromDisplay(topLine) - 5; + if (startLineToWrap < 0) + startLineToWrap = -1; + if (WrapLines(false, startLineToWrap)) { + // The wrapping process has changed the height of some lines so + // abandon this paint for a complete repaint. + if (AbandonPaint()) { + return; + } + RefreshPixMaps(surfaceWindow); // In case pixmaps invalidated by scrollbar change + } + PLATFORM_ASSERT(pixmapSelPattern->Initialised()); + + PaintSelMargin(surfaceWindow, rcArea); + + PRectangle rcRightMargin = rcClient; + rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; + if (rcArea.Intersects(rcRightMargin)) { + surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated); + } + + if (paintState == paintAbandoned) { + // Either styling or NotifyUpdateUI noticed that painting is needed + // outside the current painting rectangle + //Platform::DebugPrintf("Abandoning paint\n"); + if (wrapState != eWrapNone) { + if (paintAbandonedByStyling) { + // Styling has spilled over a line end, such as occurs by starting a multiline + // comment. The width of subsequent text may have changed, so rewrap. + NeedWrapping(cs.DocFromDisplay(topLine)); + } + } + return; + } + //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); + + // Do the painting + if (rcArea.right > vs.fixedColumnWidth) { + + Surface *surface = surfaceWindow; + if (bufferedDraw) { + surface = pixmapLine; + PLATFORM_ASSERT(pixmapLine->Initialised()); + } + surface->SetUnicodeMode(IsUnicodeMode()); + surface->SetDBCSMode(CodePage()); + + int visibleLine = topLine + screenLinePaintFirst; + + int posCaret = currentPos; + if (posDrag >= 0) + posCaret = posDrag; + int lineCaret = pdoc->LineFromPosition(posCaret); + + // Remove selection margin from drawing area so text will not be drawn + // on it in unbuffered mode. + PRectangle rcTextArea = rcClient; + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + surfaceWindow->SetClip(rcTextArea); + + // Loop on visible lines + //double durLayout = 0.0; + //double durPaint = 0.0; + //double durCopy = 0.0; + //ElapsedTime etWhole; + int lineDocPrevious = -1; // Used to avoid laying out one document line multiple times + AutoLineLayout ll(llc, 0); + SelectionLineIterator lineIterator(this); + while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) { + + int lineDoc = cs.DocFromDisplay(visibleLine); + // Only visible lines should be handled by the code within the loop + PLATFORM_ASSERT(cs.GetVisible(lineDoc)); + int lineStartSet = cs.DisplayFromDoc(lineDoc); + int subLine = visibleLine - lineStartSet; + + // Copy this line and its styles from the document into local arrays + // and determine the x position at which each character starts. + //ElapsedTime et; + if (lineDoc != lineDocPrevious) { + ll.Set(0); + // For rectangular selection this accesses the layout cache so should be after layout returned. + lineIterator.SetAt(lineDoc); + ll.Set(RetrieveLineLayout(lineDoc)); + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + lineDocPrevious = lineDoc; + } + //durLayout += et.Duration(true); + + if (ll) { + if (selType == selStream) { + ll->selStart = SelectionStart(); + ll->selEnd = SelectionEnd(); + } else { + ll->selStart = lineIterator.startPos; + ll->selEnd = lineIterator.endPos; + } + ll->containsCaret = lineDoc == lineCaret; + if (hideSelection) { + ll->selStart = -1; + ll->selEnd = -1; + ll->containsCaret = false; + } + + GetHotSpotRange(ll->hsStart, ll->hsEnd); + + PRectangle rcLine = rcClient; + rcLine.top = ypos; + rcLine.bottom = ypos + vs.lineHeight; + + Range rangeLine(pdoc->LineStart(lineDoc), pdoc->LineStart(lineDoc + 1)); + // Highlight the current braces if any + ll->SetBracesHighlight(rangeLine, braces, static_cast(bracesMatchStyle), + highlightGuideColumn * vs.spaceWidth); + + // Draw the line + DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine); + //durPaint += et.Duration(true); + + // Restore the previous styles for the brace highlights in case layout is in cache. + ll->RestoreBracesHighlight(rangeLine, braces); + + bool expanded = cs.GetExpanded(lineDoc); + if ((foldFlags & SC_FOLDFLAG_BOX) == 0) { + // Paint the line above the fold + if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { + if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.bottom = rcFoldLine.top + 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + // Paint the line below the fold + if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { + if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + } else { + int FoldLevelCurr = (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; + int FoldLevelPrev = (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; + int FoldLevelFlags = (pdoc->GetLevel(lineDoc) & ~SC_FOLDLEVELNUMBERMASK) & ~(0xFFF0000); + int indentationStep = pdoc->IndentSize(); + // Draw line above fold + if ((FoldLevelPrev < FoldLevelCurr) + || + (FoldLevelFlags & SC_FOLDLEVELBOXHEADERFLAG + && + (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELBOXFOOTERFLAG) == 0)) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.bottom = rcFoldLine.top + 1; + rcFoldLine.left += xStart + FoldLevelCurr * vs.spaceWidth * indentationStep - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + + // Line below the fold (or below a contracted fold) + if (FoldLevelFlags & SC_FOLDLEVELBOXFOOTERFLAG + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + rcFoldLine.left += xStart + (FoldLevelCurr) * vs.spaceWidth * indentationStep - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + + PRectangle rcBoxLine = rcLine; + // Draw vertical line for every fold level + for (int i = 0; i <= FoldLevelCurr; i++) { + rcBoxLine.left = xStart + i * vs.spaceWidth * indentationStep - 1; + rcBoxLine.right = rcBoxLine.left + 1; + surface->FillRectangle(rcBoxLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + + // Draw the Caret + if (lineDoc == lineCaret) { + int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength); + if ((offset >= ll->LineStart(subLine)) && + ((offset < ll->LineStart(subLine + 1)) || offset == ll->numCharsInLine)) { + int xposCaret = ll->positions[offset] - ll->positions[ll->LineStart(subLine)] + xStart; + + if (actualWrapVisualStartIndent != 0) { + int lineStart = ll->LineStart(subLine); + if (lineStart != 0) // Wrapped + xposCaret += actualWrapVisualStartIndent * vs.aveCharWidth; + } + int widthOverstrikeCaret; + if (posCaret == pdoc->Length()) { // At end of document + widthOverstrikeCaret = vs.aveCharWidth; + } else if ((posCaret - rangeLine.start) >= ll->numCharsInLine) { // At end of line + widthOverstrikeCaret = vs.aveCharWidth; + } else { + widthOverstrikeCaret = ll->positions[offset + 1] - ll->positions[offset]; + } + if (widthOverstrikeCaret < 3) // Make sure its visible + widthOverstrikeCaret = 3; + if (((caret.active && caret.on) || (posDrag >= 0)) && xposCaret >= 0) { + PRectangle rcCaret = rcLine; + int caretWidthOffset = 0; + if ((offset > 0) && (vs.caretWidth > 1)) + caretWidthOffset = 1; // Move back so overlaps both character cells. + if (posDrag >= 0) { + rcCaret.left = xposCaret - caretWidthOffset; + rcCaret.right = rcCaret.left + vs.caretWidth; + } else { + if (inOverstrike) { + rcCaret.top = rcCaret.bottom - 2; + rcCaret.left = xposCaret + 1; + rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; + } else { + rcCaret.left = xposCaret - caretWidthOffset; + rcCaret.right = rcCaret.left + vs.caretWidth; + } + } + surface->FillRectangle(rcCaret, vs.caretcolour.allocated); + } + } + } + + if (bufferedDraw) { + Point from(vs.fixedColumnWidth, 0); + PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, + rcClient.right, yposScreen + vs.lineHeight); + surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); + } + //durCopy += et.Duration(true); + } + + if (!bufferedDraw) { + ypos += vs.lineHeight; + } + + yposScreen += vs.lineHeight; + visibleLine++; + //gdk_flush(); + } + ll.Set(0); + //if (durPaint < 0.00000001) + // durPaint = 0.00000001; + + // Right column limit indicator + PRectangle rcBeyondEOF = rcClient; + rcBeyondEOF.left = vs.fixedColumnWidth; + rcBeyondEOF.right = rcBeyondEOF.right; + rcBeyondEOF.top = (cs.LinesDisplayed() - topLine) * vs.lineHeight; + if (rcBeyondEOF.top < rcBeyondEOF.bottom) { + surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back.allocated); + if (vs.edgeState == EDGE_LINE) { + int edgeX = theEdge * vs.spaceWidth; + rcBeyondEOF.left = edgeX + xStart; + rcBeyondEOF.right = rcBeyondEOF.left + 1; + surfaceWindow->FillRectangle(rcBeyondEOF, vs.edgecolour.allocated); + } + } + //Platform::DebugPrintf( + //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", + //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); + NotifyPainted(); + } +} + +// Space (3 space characters) between line numbers and text when printing. +#define lineNumberPrintSpace " " + +ColourDesired InvertedLight(ColourDesired orig) { + unsigned int r = orig.GetRed(); + unsigned int g = orig.GetGreen(); + unsigned int b = orig.GetBlue(); + unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye + unsigned int il = 0xff - l; + if (l == 0) + return ColourDesired(0xff, 0xff, 0xff); + r = r * il / l; + g = g * il / l; + b = b * il / l; + return ColourDesired(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); +} + +// This is mostly copied from the Paint method but with some things omitted +// such as the margin markers, line numbers, selection and caret +// Should be merged back into a combined Draw method. +long Editor::FormatRange(bool draw, RangeToFormat *pfr) { + if (!pfr) + return 0; + + AutoSurface surface(pfr->hdc, this); + if (!surface) + return 0; + AutoSurface surfaceMeasure(pfr->hdcTarget, this); + if (!surfaceMeasure) { + return 0; + } + + ViewStyle vsPrint(vs); + + // Modify the view style for printing as do not normally want any of the transient features to be printed + // Printing supports only the line number margin. + int lineNumberIndex = -1; + for (int margin = 0; margin < ViewStyle::margins; margin++) { + if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) { + lineNumberIndex = margin; + } else { + vsPrint.ms[margin].width = 0; + } + } + vsPrint.showMarkedLines = false; + vsPrint.fixedColumnWidth = 0; + vsPrint.zoomLevel = printMagnification; + vsPrint.viewIndentationGuides = false; + // Don't show the selection when printing + vsPrint.selbackset = false; + vsPrint.selforeset = false; + vsPrint.selAlpha = SC_ALPHA_NOALPHA; + vsPrint.whitespaceBackgroundSet = false; + vsPrint.whitespaceForegroundSet = false; + vsPrint.showCaretLineBackground = false; + + // Set colours for printing according to users settings + for (int sty = 0;sty <= STYLE_MAX;sty++) { + if (printColourMode == SC_PRINT_INVERTLIGHT) { + vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired); + vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired); + } else if (printColourMode == SC_PRINT_BLACKONWHITE) { + vsPrint.styles[sty].fore.desired = ColourDesired(0, 0, 0); + vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); + } else if (printColourMode == SC_PRINT_COLOURONWHITE) { + vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); + } else if (printColourMode == SC_PRINT_COLOURONWHITEDEFAULTBG) { + if (sty <= STYLE_DEFAULT) { + vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); + } + } + } + // White background for the line numbers + vsPrint.styles[STYLE_LINENUMBER].back.desired = ColourDesired(0xff, 0xff, 0xff); + + vsPrint.Refresh(*surfaceMeasure); + // Determining width must hapen after fonts have been realised in Refresh + int lineNumberWidth = 0; + if (lineNumberIndex >= 0) { + lineNumberWidth = surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, + "99999" lineNumberPrintSpace, 5 + istrlen(lineNumberPrintSpace)); + vsPrint.ms[lineNumberIndex].width = lineNumberWidth; + vsPrint.Refresh(*surfaceMeasure); // Recalculate fixedColumnWidth + } + // Ensure colours are set up + vsPrint.RefreshColourPalette(palette, true); + vsPrint.RefreshColourPalette(palette, false); + + int linePrintStart = pdoc->LineFromPosition(pfr->chrg.cpMin); + int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1; + if (linePrintLast < linePrintStart) + linePrintLast = linePrintStart; + int linePrintMax = pdoc->LineFromPosition(pfr->chrg.cpMax); + if (linePrintLast > linePrintMax) + linePrintLast = linePrintMax; + //Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n", + // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, + // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); + int endPosPrint = pdoc->Length(); + if (linePrintLast < pdoc->LinesTotal()) + endPosPrint = pdoc->LineStart(linePrintLast + 1); + + // Ensure we are styled to where we are formatting. + pdoc->EnsureStyledTo(endPosPrint); + + int xStart = vsPrint.fixedColumnWidth + pfr->rc.left; + int ypos = pfr->rc.top; + + int lineDoc = linePrintStart; + + int nPrintPos = pfr->chrg.cpMin; + int visibleLine = 0; + int widthPrint = pfr->rc.Width() - vsPrint.fixedColumnWidth; + if (printWrapState == eWrapNone) + widthPrint = LineLayout::wrapWidthInfinite; + + while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { + + // When printing, the hdc and hdcTarget may be the same, so + // changing the state of surfaceMeasure may change the underlying + // state of surface. Therefore, any cached state is discarded before + // using each surface. + surfaceMeasure->FlushCachedState(); + + // Copy this line and its styles from the document into local arrays + // and determine the x position at which each character starts. + LineLayout ll(8000); + LayoutLine(lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint); + + ll.selStart = -1; + ll.selEnd = -1; + ll.containsCaret = false; + + PRectangle rcLine; + rcLine.left = pfr->rc.left; + rcLine.top = ypos; + rcLine.right = pfr->rc.right - 1; + rcLine.bottom = ypos + vsPrint.lineHeight; + + // When document line is wrapped over multiple display lines, find where + // to start printing from to ensure a particular position is on the first + // line of the page. + if (visibleLine == 0) { + int startWithinLine = nPrintPos - pdoc->LineStart(lineDoc); + for (int iwl = 0; iwl < ll.lines - 1; iwl++) { + if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { + visibleLine = -iwl; + } + } + + if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { + visibleLine = -(ll.lines - 1); + } + } + + if (draw && lineNumberWidth && + (ypos + vsPrint.lineHeight <= pfr->rc.bottom) && + (visibleLine >= 0)) { + char number[100]; + sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1); + PRectangle rcNumber = rcLine; + rcNumber.right = rcNumber.left + lineNumberWidth; + // Right justify + rcNumber.left = rcNumber.right - surfaceMeasure->WidthText( + vsPrint.styles[STYLE_LINENUMBER].font, number, istrlen(number)); + surface->FlushCachedState(); + surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, + ypos + vsPrint.maxAscent, number, istrlen(number), + vsPrint.styles[STYLE_LINENUMBER].fore.allocated, + vsPrint.styles[STYLE_LINENUMBER].back.allocated); + } + + // Draw the line + surface->FlushCachedState(); + + for (int iwl = 0; iwl < ll.lines; iwl++) { + if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) { + if (visibleLine >= 0) { + if (draw) { + rcLine.top = ypos; + rcLine.bottom = ypos + vsPrint.lineHeight; + DrawLine(surface, vsPrint, lineDoc, visibleLine, xStart, rcLine, &ll, iwl); + } + ypos += vsPrint.lineHeight; + } + visibleLine++; + if (iwl == ll.lines - 1) + nPrintPos = pdoc->LineStart(lineDoc + 1); + else + nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl); + } + } + + ++lineDoc; + } + + return nPrintPos; +} + +int Editor::TextWidth(int style, const char *text) { + RefreshStyleData(); + AutoSurface surface(this); + if (surface) { + return surface->WidthText(vs.styles[style].font, text, istrlen(text)); + } else { + return 1; + } +} + +// Empty method is overridden on GTK+ to show / hide scrollbars +void Editor::ReconfigureScrollBars() {} + +void Editor::SetScrollBars() { + RefreshStyleData(); + + int nMax = MaxScrollPos(); + int nPage = LinesOnScreen(); + bool modified = ModifyScrollBars(nMax + nPage - 1, nPage); + if (modified) { + DwellEnd(true); + } + + // TODO: ensure always showing as many lines as possible + // May not be, if, for example, window made larger + if (topLine > MaxScrollPos()) { + SetTopLine(Platform::Clamp(topLine, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } + if (modified) { + if (!AbandonPaint()) + Redraw(); + } + //Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage); +} + +void Editor::ChangeSize() { + DropGraphics(); + SetScrollBars(); + if (wrapState != eWrapNone) { + PRectangle rcTextArea = GetClientRectangle(); + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + if (wrapWidth != rcTextArea.Width()) { + NeedWrapping(); + Redraw(); + } + } +} + +void Editor::AddChar(char ch) { + char s[2]; + s[0] = ch; + s[1] = '\0'; + AddCharUTF(s, 1); +} + +void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { + bool wasSelection = currentPos != anchor; + + ClearSelection(); + bool charReplaceAction = false; + if (inOverstrike && !wasSelection && !RangeContainsProtected(currentPos, currentPos + 1)) { + if (currentPos < (pdoc->Length())) { + if (!IsEOLChar(pdoc->CharAt(currentPos))) { + charReplaceAction = true; + pdoc->BeginUndoAction(); + pdoc->DelChar(currentPos); + } + } + } + if (pdoc->InsertString(currentPos, s, len)) { + SetEmptySelection(currentPos + len); + } + if (charReplaceAction) { + pdoc->EndUndoAction(); + } + EnsureCaretVisible(); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); + if (!caretSticky) { + SetLastXChosen(); + } + + if (treatAsDBCS) { + NotifyChar((static_cast(s[0]) << 8) | + static_cast(s[1])); + } else { + int byte = static_cast(s[0]); + if ((byte < 0xC0) || (1 == len)) { + // Handles UTF-8 characters between 0x01 and 0x7F and single byte + // characters when not in UTF-8 mode. + // Also treats \0 and naked trail bytes 0x80 to 0xBF as valid + // characters representing themselves. + } else { + // Unroll 1 to 3 byte UTF-8 sequences. See reference data at: + // http://www.cl.cam.ac.uk/~mgk25/unicode.html + // http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt + if (byte < 0xE0) { + int byte2 = static_cast(s[1]); + if ((byte2 & 0xC0) == 0x80) { + // Two-byte-character lead-byte followed by a trail-byte. + byte = (((byte & 0x1F) << 6) | (byte2 & 0x3F)); + } + // A two-byte-character lead-byte not followed by trail-byte + // represents itself. + } else if (byte < 0xF0) { + int byte2 = static_cast(s[1]); + int byte3 = static_cast(s[2]); + if (((byte2 & 0xC0) == 0x80) && ((byte3 & 0xC0) == 0x80)) { + // Three-byte-character lead byte followed by two trail bytes. + byte = (((byte & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | + (byte3 & 0x3F)); + } + // A three-byte-character lead-byte not followed by two trail-bytes + // represents itself. + } + } + NotifyChar(byte); + } +} + +void Editor::ClearSelection() { + if (!SelectionContainsProtected()) { + int startPos = SelectionStart(); + if (selType == selStream) { + unsigned int chars = SelectionEnd() - startPos; + if (0 != chars) { + pdoc->BeginUndoAction(); + pdoc->DeleteChars(startPos, chars); + pdoc->EndUndoAction(); + } + } else { + pdoc->BeginUndoAction(); + SelectionLineIterator lineIterator(this, false); + while (lineIterator.Iterate()) { + startPos = lineIterator.startPos; + unsigned int chars = lineIterator.endPos - startPos; + if (0 != chars) { + pdoc->DeleteChars(startPos, chars); + } + } + pdoc->EndUndoAction(); + selType = selStream; + } + SetEmptySelection(startPos); + } +} + +void Editor::ClearAll() { + pdoc->BeginUndoAction(); + if (0 != pdoc->Length()) { + pdoc->DeleteChars(0, pdoc->Length()); + } + if (!pdoc->IsReadOnly()) { + cs.Clear(); + } + pdoc->EndUndoAction(); + anchor = 0; + currentPos = 0; + SetTopLine(0); + SetVerticalScrollPos(); + InvalidateStyleRedraw(); +} + +void Editor::ClearDocumentStyle() { + pdoc->StartStyling(0, '\377'); + pdoc->SetStyleFor(pdoc->Length(), 0); + cs.ShowAll(); + pdoc->ClearLevels(); +} + +void Editor::Cut() { + if (!pdoc->IsReadOnly() && !SelectionContainsProtected()) { + Copy(); + ClearSelection(); + } +} + +void Editor::PasteRectangular(int pos, const char *ptr, int len) { + if (pdoc->IsReadOnly() || SelectionContainsProtected()) { + return; + } + currentPos = pos; + int xInsert = XFromPosition(currentPos); + int line = pdoc->LineFromPosition(currentPos); + bool prevCr = false; + pdoc->BeginUndoAction(); + for (int i = 0; i < len; i++) { + if (IsEOLChar(ptr[i])) { + if ((ptr[i] == '\r') || (!prevCr)) + line++; + if (line >= pdoc->LinesTotal()) { + if (pdoc->eolMode != SC_EOL_LF) + pdoc->InsertChar(pdoc->Length(), '\r'); + if (pdoc->eolMode != SC_EOL_CR) + pdoc->InsertChar(pdoc->Length(), '\n'); + } + // Pad the end of lines with spaces if required + currentPos = PositionFromLineX(line, xInsert); + if ((XFromPosition(currentPos) < xInsert) && (i + 1 < len)) { + for (int i = 0; i < xInsert - XFromPosition(currentPos); i++) { + pdoc->InsertChar(currentPos, ' '); + currentPos++; + } + } + prevCr = ptr[i] == '\r'; + } else { + pdoc->InsertString(currentPos, ptr + i, 1); + currentPos++; + prevCr = false; + } + } + pdoc->EndUndoAction(); + SetEmptySelection(pos); +} + +bool Editor::CanPaste() { + return !pdoc->IsReadOnly() && !SelectionContainsProtected(); +} + +void Editor::Clear() { + if (currentPos == anchor) { + if (!RangeContainsProtected(currentPos, currentPos + 1)) { + DelChar(); + } + } else { + ClearSelection(); + } + SetEmptySelection(currentPos); +} + +void Editor::SelectAll() { + SetSelection(0, pdoc->Length()); + Redraw(); +} + +void Editor::Undo() { + if (pdoc->CanUndo()) { + InvalidateCaret(); + int newPos = pdoc->Undo(); + if (newPos >= 0) + SetEmptySelection(newPos); + EnsureCaretVisible(); + } +} + +void Editor::Redo() { + if (pdoc->CanRedo()) { + int newPos = pdoc->Redo(); + if (newPos >= 0) + SetEmptySelection(newPos); + EnsureCaretVisible(); + } +} + +void Editor::DelChar() { + if (!RangeContainsProtected(currentPos, currentPos + 1)) { + pdoc->DelChar(currentPos); + } + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); +} + +void Editor::DelCharBack(bool allowLineStartDeletion) { + if (currentPos == anchor) { + if (!RangeContainsProtected(currentPos - 1, currentPos)) { + int lineCurrentPos = pdoc->LineFromPosition(currentPos); + if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != currentPos)) { + if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && + pdoc->GetColumn(currentPos) > 0 && pdoc->backspaceUnindents) { + pdoc->BeginUndoAction(); + int indentation = pdoc->GetLineIndentation(lineCurrentPos); + int indentationStep = pdoc->IndentSize(); + if (indentation % indentationStep == 0) { + pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); + } else { + pdoc->SetLineIndentation(lineCurrentPos, indentation - (indentation % indentationStep)); + } + SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); + pdoc->EndUndoAction(); + } else { + pdoc->DelCharBack(currentPos); + } + } + } + } else { + ClearSelection(); + SetEmptySelection(currentPos); + } + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); +} + +void Editor::NotifyFocus(bool) {} + +void Editor::NotifyStyleToNeeded(int endStyleNeeded) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_STYLENEEDED; + scn.position = endStyleNeeded; + NotifyParent(scn); +} + +void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) { + NotifyStyleToNeeded(endStyleNeeded); +} + +void Editor::NotifyChar(int ch) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_CHARADDED; + scn.ch = ch; + NotifyParent(scn); + if (recordingMacro) { + char txt[2]; + txt[0] = static_cast(ch); + txt[1] = '\0'; + NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast(txt)); + } +} + +void Editor::NotifySavePoint(bool isSavePoint) { + SCNotification scn = {0}; + if (isSavePoint) { + scn.nmhdr.code = SCN_SAVEPOINTREACHED; + } else { + scn.nmhdr.code = SCN_SAVEPOINTLEFT; + } + NotifyParent(scn); +} + +void Editor::NotifyModifyAttempt() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MODIFYATTEMPTRO; + NotifyParent(scn); +} + +void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_DOUBLECLICK; + scn.line = LineFromLocation(pt); + scn.position = PositionFromLocationClose(pt); + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + +void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK; + scn.position = position; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + +void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_HOTSPOTCLICK; + scn.position = position; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + +void Editor::NotifyUpdateUI() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_UPDATEUI; + NotifyParent(scn); +} + +void Editor::NotifyPainted() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_PAINTED; + NotifyParent(scn); +} + +bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { + int marginClicked = -1; + int x = 0; + for (int margin = 0; margin < ViewStyle::margins; margin++) { + if ((pt.x > x) && (pt.x < x + vs.ms[margin].width)) + marginClicked = margin; + x += vs.ms[margin].width; + } + if ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MARGINCLICK; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + scn.position = pdoc->LineStart(LineFromLocation(pt)); + scn.margin = marginClicked; + NotifyParent(scn); + return true; + } else { + return false; + } +} + +void Editor::NotifyNeedShown(int pos, int len) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_NEEDSHOWN; + scn.position = pos; + scn.length = len; + NotifyParent(scn); +} + +void Editor::NotifyDwelling(Point pt, bool state) { + SCNotification scn = {0}; + scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND; + scn.position = PositionFromLocationClose(pt); + scn.x = pt.x; + scn.y = pt.y; + NotifyParent(scn); +} + +void Editor::NotifyZoom() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_ZOOM; + NotifyParent(scn); +} + +// Notifications from document +void Editor::NotifyModifyAttempt(Document*, void *) { + //Platform::DebugPrintf("** Modify Attempt\n"); + NotifyModifyAttempt(); +} + +void Editor::NotifyMove(int position) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_POSCHANGED; + scn.position = position; + NotifyParent(scn); +} + +void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) { + //Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off"); + NotifySavePoint(atSavePoint); +} + +void Editor::CheckModificationForWrap(DocModification mh) { + if (mh.modificationType & (SC_MOD_INSERTTEXT|SC_MOD_DELETETEXT)) { + llc.Invalidate(LineLayout::llCheckTextAndStyle); + if (wrapState != eWrapNone) { + int lineDoc = pdoc->LineFromPosition(mh.position); + int lines = Platform::Maximum(0, mh.linesAdded); + NeedWrapping(lineDoc, lineDoc + lines + 1); + } + } +} + +// Move a position so it is still after the same character as before the insertion. +static inline int MovePositionForInsertion(int position, int startInsertion, int length) { + if (position > startInsertion) { + return position + length; + } + return position; +} + +// Move a position so it is still after the same character as before the deletion if that +// character is still present else after the previous surviving character. +static inline int MovePositionForDeletion(int position, int startDeletion, int length) { + if (position > startDeletion) { + int endDeletion = startDeletion + length; + if (position > endDeletion) { + return position - length; + } else { + return startDeletion; + } + } else { + return position; + } +} + +void Editor::NotifyModified(Document*, DocModification mh, void *) { + needUpdateUI = true; + if (paintState == painting) { + CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length)); + } + if (mh.modificationType & SC_MOD_CHANGESTYLE) { + pdoc->IncrementStyleClock(); + if (paintState == notPainting) { + if (mh.position < pdoc->LineStart(topLine)) { + // Styling performed before this view + Redraw(); + } else { + InvalidateRange(mh.position, mh.position + mh.length); + } + } + llc.Invalidate(LineLayout::llCheckTextAndStyle); + } else { + // Move selection and brace highlights + if (mh.modificationType & SC_MOD_INSERTTEXT) { + currentPos = MovePositionForInsertion(currentPos, mh.position, mh.length); + anchor = MovePositionForInsertion(anchor, mh.position, mh.length); + braces[0] = MovePositionForInsertion(braces[0], mh.position, mh.length); + braces[1] = MovePositionForInsertion(braces[1], mh.position, mh.length); + } else if (mh.modificationType & SC_MOD_DELETETEXT) { + currentPos = MovePositionForDeletion(currentPos, mh.position, mh.length); + anchor = MovePositionForDeletion(anchor, mh.position, mh.length); + braces[0] = MovePositionForDeletion(braces[0], mh.position, mh.length); + braces[1] = MovePositionForDeletion(braces[1], mh.position, mh.length); + } + if (cs.LinesDisplayed() < cs.LinesInDoc()) { + // Some lines are hidden so may need shown. + // TODO: check if the modified area is hidden. + if (mh.modificationType & SC_MOD_BEFOREINSERT) { + NotifyNeedShown(mh.position, 0); + } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { + NotifyNeedShown(mh.position, mh.length); + } + } + if (mh.linesAdded != 0) { + // Update contraction state for inserted and removed lines + // lineOfPos should be calculated in context of state before modification, shouldn't it + int lineOfPos = pdoc->LineFromPosition(mh.position); + if (mh.linesAdded > 0) { + cs.InsertLines(lineOfPos, mh.linesAdded); + } else { + cs.DeleteLines(lineOfPos, -mh.linesAdded); + } + } + CheckModificationForWrap(mh); + if (mh.linesAdded != 0) { + // Avoid scrolling of display if change before current display + if (mh.position < posTopLine && !CanDeferToLastStep(mh)) { + int newTop = Platform::Clamp(topLine + mh.linesAdded, 0, MaxScrollPos()); + if (newTop != topLine) { + SetTopLine(newTop); + SetVerticalScrollPos(); + } + } + + //Platform::DebugPrintf("** %x Doc Changed\n", this); + // TODO: could invalidate from mh.startModification to end of screen + //InvalidateRange(mh.position, mh.position + mh.length); + if (paintState == notPainting && !CanDeferToLastStep(mh)) { + Redraw(); + } + } else { + //Platform::DebugPrintf("** %x Line Changed %d .. %d\n", this, + // mh.position, mh.position + mh.length); + if (paintState == notPainting && mh.length && !CanEliminate(mh)) { + InvalidateRange(mh.position, mh.position + mh.length); + } + } + } + + if (mh.linesAdded != 0 && !CanDeferToLastStep(mh)) { + SetScrollBars(); + } + + if (mh.modificationType & SC_MOD_CHANGEMARKER) { + if ((paintState == notPainting) || !PaintContainsMargin()) { + if (mh.modificationType & SC_MOD_CHANGEFOLD) { + // Fold changes can affect the drawing of following lines so redraw whole margin + RedrawSelMargin(); + } else { + RedrawSelMargin(mh.line); + } + } + } + + // NOW pay the piper WRT "deferred" visual updates + if (IsLastStep(mh)) { + SetScrollBars(); + Redraw(); + } + + // If client wants to see this modification + if (mh.modificationType & modEventMask) { + if ((mh.modificationType & SC_MOD_CHANGESTYLE) == 0) { + // Real modification made to text of document. + NotifyChange(); // Send EN_CHANGE + } + + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MODIFIED; + scn.position = mh.position; + scn.modificationType = mh.modificationType; + scn.text = mh.text; + scn.length = mh.length; + scn.linesAdded = mh.linesAdded; + scn.line = mh.line; + scn.foldLevelNow = mh.foldLevelNow; + scn.foldLevelPrev = mh.foldLevelPrev; + NotifyParent(scn); + } +} + +void Editor::NotifyDeleted(Document *, void *) { + /* Do nothing */ +} + +void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + + // Enumerates all macroable messages + switch (iMessage) { + case SCI_CUT: + case SCI_COPY: + case SCI_PASTE: + case SCI_CLEAR: + case SCI_REPLACESEL: + case SCI_ADDTEXT: + case SCI_INSERTTEXT: + case SCI_APPENDTEXT: + case SCI_CLEARALL: + case SCI_SELECTALL: + case SCI_GOTOLINE: + case SCI_GOTOPOS: + case SCI_SEARCHANCHOR: + case SCI_SEARCHNEXT: + case SCI_SEARCHPREV: + case SCI_LINEDOWN: + case SCI_LINEDOWNEXTEND: + case SCI_PARADOWN: + case SCI_PARADOWNEXTEND: + case SCI_LINEUP: + case SCI_LINEUPEXTEND: + case SCI_PARAUP: + case SCI_PARAUPEXTEND: + case SCI_CHARLEFT: + case SCI_CHARLEFTEXTEND: + case SCI_CHARRIGHT: + case SCI_CHARRIGHTEXTEND: + case SCI_WORDLEFT: + case SCI_WORDLEFTEXTEND: + case SCI_WORDRIGHT: + case SCI_WORDRIGHTEXTEND: + case SCI_WORDPARTLEFT: + case SCI_WORDPARTLEFTEXTEND: + case SCI_WORDPARTRIGHT: + case SCI_WORDPARTRIGHTEXTEND: + case SCI_WORDLEFTEND: + case SCI_WORDLEFTENDEXTEND: + case SCI_WORDRIGHTEND: + case SCI_WORDRIGHTENDEXTEND: + case SCI_HOME: + case SCI_HOMEEXTEND: + case SCI_LINEEND: + case SCI_LINEENDEXTEND: + case SCI_HOMEWRAP: + case SCI_HOMEWRAPEXTEND: + case SCI_LINEENDWRAP: + case SCI_LINEENDWRAPEXTEND: + case SCI_DOCUMENTSTART: + case SCI_DOCUMENTSTARTEXTEND: + case SCI_DOCUMENTEND: + case SCI_DOCUMENTENDEXTEND: + case SCI_STUTTEREDPAGEUP: + case SCI_STUTTEREDPAGEUPEXTEND: + case SCI_STUTTEREDPAGEDOWN: + case SCI_STUTTEREDPAGEDOWNEXTEND: + case SCI_PAGEUP: + case SCI_PAGEUPEXTEND: + case SCI_PAGEDOWN: + case SCI_PAGEDOWNEXTEND: + case SCI_EDITTOGGLEOVERTYPE: + case SCI_CANCEL: + case SCI_DELETEBACK: + case SCI_TAB: + case SCI_BACKTAB: + case SCI_FORMFEED: + case SCI_VCHOME: + case SCI_VCHOMEEXTEND: + case SCI_VCHOMEWRAP: + case SCI_VCHOMEWRAPEXTEND: + case SCI_DELWORDLEFT: + case SCI_DELWORDRIGHT: + case SCI_DELLINELEFT: + case SCI_DELLINERIGHT: + case SCI_LINECOPY: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: + case SCI_LINESCROLLDOWN: + case SCI_LINESCROLLUP: + case SCI_DELETEBACKNOTLINE: + case SCI_HOMEDISPLAY: + case SCI_HOMEDISPLAYEXTEND: + case SCI_LINEENDDISPLAY: + case SCI_LINEENDDISPLAYEXTEND: + case SCI_SETSELECTIONMODE: + case SCI_LINEDOWNRECTEXTEND: + case SCI_LINEUPRECTEXTEND: + case SCI_CHARLEFTRECTEXTEND: + case SCI_CHARRIGHTRECTEXTEND: + case SCI_HOMERECTEXTEND: + case SCI_VCHOMERECTEXTEND: + case SCI_LINEENDRECTEXTEND: + case SCI_PAGEUPRECTEXTEND: + case SCI_PAGEDOWNRECTEXTEND: + case SCI_SELECTIONDUPLICATE: + break; + + // Filter out all others like display changes. Also, newlines are redundant + // with char insert messages. + case SCI_NEWLINE: + default: + // printf("Filtered out %ld of macro recording\n", iMessage); + return ; + } + + // Send notification + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MACRORECORD; + scn.message = iMessage; + scn.wParam = wParam; + scn.lParam = lParam; + NotifyParent(scn); +} + +/** + * Force scroll and keep position relative to top of window. + * + * If stuttered = true and not already at first/last row, move to first/last row of window. + * If stuttered = true and already at first/last row, scroll as normal. + */ +void Editor::PageMove(int direction, selTypes sel, bool stuttered) { + int topLineNew, newPos; + + // I consider only the caretYSlop, and ignore the caretYPolicy-- is that a problem? + int currentLine = pdoc->LineFromPosition(currentPos); + int topStutterLine = topLine + caretYSlop; + int bottomStutterLine = + pdoc->LineFromPosition(PositionFromLocation( + Point(lastXChosen, direction * vs.lineHeight * LinesToScroll()))) + - caretYSlop - 1; + + if (stuttered && (direction < 0 && currentLine > topStutterLine)) { + topLineNew = topLine; + newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * caretYSlop)); + + } else if (stuttered && (direction > 0 && currentLine < bottomStutterLine)) { + topLineNew = topLine; + newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * (LinesToScroll() - caretYSlop))); + + } else { + Point pt = LocationFromPosition(currentPos); + + topLineNew = Platform::Clamp( + topLine + direction * LinesToScroll(), 0, MaxScrollPos()); + newPos = PositionFromLocation( + Point(lastXChosen, pt.y + direction * (vs.lineHeight * LinesToScroll()))); + } + + if (topLineNew != topLine) { + SetTopLine(topLineNew); + MovePositionTo(newPos, sel); + Redraw(); + SetVerticalScrollPos(); + } else { + MovePositionTo(newPos, sel); + } +} + +void Editor::ChangeCaseOfSelection(bool makeUpperCase) { + pdoc->BeginUndoAction(); + int startCurrent = currentPos; + int startAnchor = anchor; + if (selType == selStream) { + pdoc->ChangeCase(Range(SelectionStart(), SelectionEnd()), + makeUpperCase); + SetSelection(startCurrent, startAnchor); + } else { + SelectionLineIterator lineIterator(this, false); + while (lineIterator.Iterate()) { + pdoc->ChangeCase( + Range(lineIterator.startPos, lineIterator.endPos), + makeUpperCase); + } + // Would be nicer to keep the rectangular selection but this is complex + SetEmptySelection(startCurrent); + } + pdoc->EndUndoAction(); +} + +void Editor::LineTranspose() { + int line = pdoc->LineFromPosition(currentPos); + if (line > 0) { + pdoc->BeginUndoAction(); + int startPrev = pdoc->LineStart(line - 1); + int endPrev = pdoc->LineEnd(line - 1); + int start = pdoc->LineStart(line); + int end = pdoc->LineEnd(line); + char *line1 = CopyRange(startPrev, endPrev); + int len1 = endPrev - startPrev; + char *line2 = CopyRange(start, end); + int len2 = end - start; + if (pdoc->DeleteChars(start, len2)) { + pdoc->DeleteChars(startPrev, len1); + pdoc->InsertString(startPrev, line2, len2); + pdoc->InsertString(start - len1 + len2, line1, len1); + MovePositionTo(start - len1 + len2); + } + delete []line1; + delete []line2; + pdoc->EndUndoAction(); + } +} + +void Editor::Duplicate(bool forLine) { + int start = SelectionStart(); + int end = SelectionEnd(); + if (start == end) { + forLine = true; + } + if (forLine) { + int line = pdoc->LineFromPosition(currentPos); + start = pdoc->LineStart(line); + end = pdoc->LineEnd(line); + } + char *text = CopyRange(start, end); + if (forLine) { + const char *eol = StringFromEOLMode(pdoc->eolMode); + pdoc->InsertCString(end, eol); + pdoc->InsertString(end + istrlen(eol), text, end - start); + } else { + pdoc->InsertString(end, text, end - start); + } + delete []text; +} + +void Editor::CancelModes() { + moveExtendsSelection = false; +} + +void Editor::NewLine() { + ClearSelection(); + const char *eol = "\n"; + if (pdoc->eolMode == SC_EOL_CRLF) { + eol = "\r\n"; + } else if (pdoc->eolMode == SC_EOL_CR) { + eol = "\r"; + } // else SC_EOL_LF -> "\n" already set + if (pdoc->InsertCString(currentPos, eol)) { + SetEmptySelection(currentPos + istrlen(eol)); + while (*eol) { + NotifyChar(*eol); + eol++; + } + } + SetLastXChosen(); + EnsureCaretVisible(); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); +} + +void Editor::CursorUpOrDown(int direction, selTypes sel) { + Point pt = LocationFromPosition(currentPos); + int posNew = PositionFromLocation( + Point(lastXChosen, pt.y + direction * vs.lineHeight)); + if (direction < 0) { + // Line wrapping may lead to a location on the same line, so + // seek back if that is the case. + // There is an equivalent case when moving down which skips + // over a line but as that does not trap the user it is fine. + Point ptNew = LocationFromPosition(posNew); + while ((posNew > 0) && (pt.y == ptNew.y)) { + posNew--; + ptNew = LocationFromPosition(posNew); + } + } + MovePositionTo(posNew, sel); +} + +void Editor::ParaUpOrDown(int direction, selTypes sel) { + int lineDoc, savedPos = currentPos; + do { + MovePositionTo(direction > 0 ? pdoc->ParaDown(currentPos) : pdoc->ParaUp(currentPos), sel); + lineDoc = pdoc->LineFromPosition(currentPos); + if (direction > 0) { + if (currentPos >= pdoc->Length() && !cs.GetVisible(lineDoc)) { + if (sel == noSel) { + MovePositionTo(pdoc->LineEndPosition(savedPos)); + } + break; + } + } + } while (!cs.GetVisible(lineDoc)); +} + +int Editor::StartEndDisplayLine(int pos, bool start) { + RefreshStyleData(); + int line = pdoc->LineFromPosition(pos); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + int posRet = INVALID_POSITION; + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(line); + LayoutLine(line, surface, vs, ll, wrapWidth); + int posInLine = pos - posLineStart; + if (posInLine <= ll->maxLineLength) { + for (int subLine = 0; subLine < ll->lines; subLine++) { + if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { + if (start) { + posRet = ll->LineStart(subLine) + posLineStart; + } else { + if (subLine == ll->lines - 1) + posRet = ll->LineStart(subLine + 1) + posLineStart; + else + posRet = ll->LineStart(subLine + 1) + posLineStart - 1; + } + } + } + } + } + if (posRet == INVALID_POSITION) { + return pos; + } else { + return posRet; + } +} + +int Editor::KeyCommand(unsigned int iMessage) { + switch (iMessage) { + case SCI_LINEDOWN: + CursorUpOrDown(1); + break; + case SCI_LINEDOWNEXTEND: + CursorUpOrDown(1, selStream); + break; + case SCI_LINEDOWNRECTEXTEND: + CursorUpOrDown(1, selRectangle); + break; + case SCI_PARADOWN: + ParaUpOrDown(1); + break; + case SCI_PARADOWNEXTEND: + ParaUpOrDown(1, selStream); + break; + case SCI_LINESCROLLDOWN: + ScrollTo(topLine + 1); + MoveCaretInsideView(false); + break; + case SCI_LINEUP: + CursorUpOrDown(-1); + break; + case SCI_LINEUPEXTEND: + CursorUpOrDown(-1, selStream); + break; + case SCI_LINEUPRECTEXTEND: + CursorUpOrDown(-1, selRectangle); + break; + case SCI_PARAUP: + ParaUpOrDown(-1); + break; + case SCI_PARAUPEXTEND: + ParaUpOrDown(-1, selStream); + break; + case SCI_LINESCROLLUP: + ScrollTo(topLine - 1); + MoveCaretInsideView(false); + break; + case SCI_CHARLEFT: + if (SelectionEmpty() || moveExtendsSelection) { + MovePositionTo(MovePositionSoVisible(currentPos - 1, -1)); + } else { + MovePositionTo(SelectionStart()); + } + SetLastXChosen(); + break; + case SCI_CHARLEFTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selStream); + SetLastXChosen(); + break; + case SCI_CHARLEFTRECTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selRectangle); + SetLastXChosen(); + break; + case SCI_CHARRIGHT: + if (SelectionEmpty() || moveExtendsSelection) { + MovePositionTo(MovePositionSoVisible(currentPos + 1, 1)); + } else { + MovePositionTo(SelectionEnd()); + } + SetLastXChosen(); + break; + case SCI_CHARRIGHTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selStream); + SetLastXChosen(); + break; + case SCI_CHARRIGHTRECTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selRectangle); + SetLastXChosen(); + break; + case SCI_WORDLEFT: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1)); + SetLastXChosen(); + break; + case SCI_WORDLEFTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1), selStream); + SetLastXChosen(); + break; + case SCI_WORDRIGHT: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1)); + SetLastXChosen(); + break; + case SCI_WORDRIGHTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1), selStream); + SetLastXChosen(); + break; + + case SCI_WORDLEFTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1)); + SetLastXChosen(); + break; + case SCI_WORDLEFTENDEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1), selStream); + SetLastXChosen(); + break; + case SCI_WORDRIGHTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1)); + SetLastXChosen(); + break; + case SCI_WORDRIGHTENDEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1), selStream); + SetLastXChosen(); + break; + + case SCI_HOME: + MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos))); + SetLastXChosen(); + break; + case SCI_HOMEEXTEND: + MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selStream); + SetLastXChosen(); + break; + case SCI_HOMERECTEXTEND: + MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selRectangle); + SetLastXChosen(); + break; + case SCI_LINEEND: + MovePositionTo(pdoc->LineEndPosition(currentPos)); + SetLastXChosen(); + break; + case SCI_LINEENDEXTEND: + MovePositionTo(pdoc->LineEndPosition(currentPos), selStream); + SetLastXChosen(); + break; + case SCI_LINEENDRECTEXTEND: + MovePositionTo(pdoc->LineEndPosition(currentPos), selRectangle); + SetLastXChosen(); + break; + case SCI_HOMEWRAP: { + int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if (currentPos <= homePos) + homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); + MovePositionTo(homePos); + SetLastXChosen(); + } + break; + case SCI_HOMEWRAPEXTEND: { + int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if (currentPos <= homePos) + homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); + MovePositionTo(homePos, selStream); + SetLastXChosen(); + } + break; + case SCI_LINEENDWRAP: { + int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); + int realEndPos = pdoc->LineEndPosition(currentPos); + if (endPos > realEndPos // if moved past visible EOLs + || currentPos >= endPos) // if at end of display line already + endPos = realEndPos; + MovePositionTo(endPos); + SetLastXChosen(); + } + break; + case SCI_LINEENDWRAPEXTEND: { + int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); + int realEndPos = pdoc->LineEndPosition(currentPos); + if (endPos > realEndPos // if moved past visible EOLs + || currentPos >= endPos) // if at end of display line already + endPos = realEndPos; + MovePositionTo(endPos, selStream); + SetLastXChosen(); + } + break; + case SCI_DOCUMENTSTART: + MovePositionTo(0); + SetLastXChosen(); + break; + case SCI_DOCUMENTSTARTEXTEND: + MovePositionTo(0, selStream); + SetLastXChosen(); + break; + case SCI_DOCUMENTEND: + MovePositionTo(pdoc->Length()); + SetLastXChosen(); + break; + case SCI_DOCUMENTENDEXTEND: + MovePositionTo(pdoc->Length(), selStream); + SetLastXChosen(); + break; + case SCI_STUTTEREDPAGEUP: + PageMove(-1, noSel, true); + break; + case SCI_STUTTEREDPAGEUPEXTEND: + PageMove(-1, selStream, true); + break; + case SCI_STUTTEREDPAGEDOWN: + PageMove(1, noSel, true); + break; + case SCI_STUTTEREDPAGEDOWNEXTEND: + PageMove(1, selStream, true); + break; + case SCI_PAGEUP: + PageMove(-1); + break; + case SCI_PAGEUPEXTEND: + PageMove(-1, selStream); + break; + case SCI_PAGEUPRECTEXTEND: + PageMove(-1, selRectangle); + break; + case SCI_PAGEDOWN: + PageMove(1); + break; + case SCI_PAGEDOWNEXTEND: + PageMove(1, selStream); + break; + case SCI_PAGEDOWNRECTEXTEND: + PageMove(1, selRectangle); + break; + case SCI_EDITTOGGLEOVERTYPE: + inOverstrike = !inOverstrike; + DropCaret(); + ShowCaretAtCurrentPosition(); + NotifyUpdateUI(); + break; + case SCI_CANCEL: // Cancel any modes - handled in subclass + // Also unselect text + CancelModes(); + break; + case SCI_DELETEBACK: + DelCharBack(true); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_DELETEBACKNOTLINE: + DelCharBack(false); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_TAB: + Indent(true); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_BACKTAB: + Indent(false); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_NEWLINE: + NewLine(); + break; + case SCI_FORMFEED: + AddChar('\f'); + break; + case SCI_VCHOME: + MovePositionTo(pdoc->VCHomePosition(currentPos)); + SetLastXChosen(); + break; + case SCI_VCHOMEEXTEND: + MovePositionTo(pdoc->VCHomePosition(currentPos), selStream); + SetLastXChosen(); + break; + case SCI_VCHOMERECTEXTEND: + MovePositionTo(pdoc->VCHomePosition(currentPos), selRectangle); + SetLastXChosen(); + break; + case SCI_VCHOMEWRAP: { + int homePos = pdoc->VCHomePosition(currentPos); + int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if ((viewLineStart < currentPos) && (viewLineStart > homePos)) + homePos = viewLineStart; + + MovePositionTo(homePos); + SetLastXChosen(); + } + break; + case SCI_VCHOMEWRAPEXTEND: { + int homePos = pdoc->VCHomePosition(currentPos); + int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if ((viewLineStart < currentPos) && (viewLineStart > homePos)) + homePos = viewLineStart; + + MovePositionTo(homePos, selStream); + SetLastXChosen(); + } + break; + case SCI_ZOOMIN: + if (vs.zoomLevel < 20) { + vs.zoomLevel++; + InvalidateStyleRedraw(); + NotifyZoom(); + } + break; + case SCI_ZOOMOUT: + if (vs.zoomLevel > -10) { + vs.zoomLevel--; + InvalidateStyleRedraw(); + NotifyZoom(); + } + break; + case SCI_DELWORDLEFT: { + int startWord = pdoc->NextWordStart(currentPos, -1); + pdoc->DeleteChars(startWord, currentPos - startWord); + SetLastXChosen(); + } + break; + case SCI_DELWORDRIGHT: { + int endWord = pdoc->NextWordStart(currentPos, 1); + pdoc->DeleteChars(currentPos, endWord - currentPos); + } + break; + case SCI_DELLINELEFT: { + int line = pdoc->LineFromPosition(currentPos); + int start = pdoc->LineStart(line); + pdoc->DeleteChars(start, currentPos - start); + SetLastXChosen(); + } + break; + case SCI_DELLINERIGHT: { + int line = pdoc->LineFromPosition(currentPos); + int end = pdoc->LineEnd(line); + pdoc->DeleteChars(currentPos, end - currentPos); + } + break; + case SCI_LINECOPY: { + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + CopyRangeToClipboard(pdoc->LineStart(lineStart), + pdoc->LineStart(lineEnd + 1)); + } + break; + case SCI_LINECUT: { + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + int start = pdoc->LineStart(lineStart); + int end = pdoc->LineStart(lineEnd + 1); + SetSelection(start, end); + Cut(); + SetLastXChosen(); + } + break; + case SCI_LINEDELETE: { + int line = pdoc->LineFromPosition(currentPos); + int start = pdoc->LineStart(line); + int end = pdoc->LineStart(line + 1); + pdoc->DeleteChars(start, end - start); + } + break; + case SCI_LINETRANSPOSE: + LineTranspose(); + break; + case SCI_LINEDUPLICATE: + Duplicate(true); + break; + case SCI_SELECTIONDUPLICATE: + Duplicate(false); + break; + case SCI_LOWERCASE: + ChangeCaseOfSelection(false); + break; + case SCI_UPPERCASE: + ChangeCaseOfSelection(true); + break; + case SCI_WORDPARTLEFT: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1)); + SetLastXChosen(); + break; + case SCI_WORDPARTLEFTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1), selStream); + SetLastXChosen(); + break; + case SCI_WORDPARTRIGHT: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1)); + SetLastXChosen(); + break; + case SCI_WORDPARTRIGHTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1), selStream); + SetLastXChosen(); + break; + case SCI_HOMEDISPLAY: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, true), -1)); + SetLastXChosen(); + break; + case SCI_HOMEDISPLAYEXTEND: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, true), -1), selStream); + SetLastXChosen(); + break; + case SCI_LINEENDDISPLAY: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, false), 1)); + SetLastXChosen(); + break; + case SCI_LINEENDDISPLAYEXTEND: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, false), 1), selStream); + SetLastXChosen(); + break; + } + return 0; +} + +int Editor::KeyDefault(int, int) { + return 0; +} + +int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) { + DwellEnd(false); + int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + int msg = kmap.Find(key, modifiers); + if (msg) { + if (consumed) + *consumed = true; + return WndProc(msg, 0, 0); + } else { + if (consumed) + *consumed = false; + return KeyDefault(key, modifiers); + } +} + +void Editor::SetWhitespaceVisible(int view) { + vs.viewWhitespace = static_cast(view); +} + +int Editor::GetWhitespaceVisible() { + return vs.viewWhitespace; +} + +void Editor::Indent(bool forwards) { + //Platform::DebugPrintf("INdent %d\n", forwards); + int lineOfAnchor = pdoc->LineFromPosition(anchor); + int lineCurrentPos = pdoc->LineFromPosition(currentPos); + if (lineOfAnchor == lineCurrentPos) { + if (forwards) { + pdoc->BeginUndoAction(); + ClearSelection(); + if (pdoc->GetColumn(currentPos) <= pdoc->GetColumn(pdoc->GetLineIndentPosition(lineCurrentPos)) && + pdoc->tabIndents) { + int indentation = pdoc->GetLineIndentation(lineCurrentPos); + int indentationStep = pdoc->IndentSize(); + pdoc->SetLineIndentation(lineCurrentPos, indentation + indentationStep - indentation % indentationStep); + SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); + } else { + if (pdoc->useTabs) { + pdoc->InsertChar(currentPos, '\t'); + SetEmptySelection(currentPos + 1); + } else { + int numSpaces = (pdoc->tabInChars) - + (pdoc->GetColumn(currentPos) % (pdoc->tabInChars)); + if (numSpaces < 1) + numSpaces = pdoc->tabInChars; + for (int i = 0; i < numSpaces; i++) { + pdoc->InsertChar(currentPos + i, ' '); + } + SetEmptySelection(currentPos + numSpaces); + } + } + pdoc->EndUndoAction(); + } else { + if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && + pdoc->tabIndents) { + pdoc->BeginUndoAction(); + int indentation = pdoc->GetLineIndentation(lineCurrentPos); + int indentationStep = pdoc->IndentSize(); + pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); + SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); + pdoc->EndUndoAction(); + } else { + int newColumn = ((pdoc->GetColumn(currentPos) - 1) / pdoc->tabInChars) * + pdoc->tabInChars; + if (newColumn < 0) + newColumn = 0; + int newPos = currentPos; + while (pdoc->GetColumn(newPos) > newColumn) + newPos--; + SetEmptySelection(newPos); + } + } + } else { + int anchorPosOnLine = anchor - pdoc->LineStart(lineOfAnchor); + int currentPosPosOnLine = currentPos - pdoc->LineStart(lineCurrentPos); + // Multiple lines selected so indent / dedent + int lineTopSel = Platform::Minimum(lineOfAnchor, lineCurrentPos); + int lineBottomSel = Platform::Maximum(lineOfAnchor, lineCurrentPos); + if (pdoc->LineStart(lineBottomSel) == anchor || pdoc->LineStart(lineBottomSel) == currentPos) + lineBottomSel--; // If not selecting any characters on a line, do not indent + pdoc->BeginUndoAction(); + pdoc->Indent(forwards, lineBottomSel, lineTopSel); + pdoc->EndUndoAction(); + if (lineOfAnchor < lineCurrentPos) { + if (currentPosPosOnLine == 0) + SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); + else + SetSelection(pdoc->LineStart(lineCurrentPos + 1), pdoc->LineStart(lineOfAnchor)); + } else { + if (anchorPosOnLine == 0) + SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); + else + SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor + 1)); + } + } +} + +/** + * Search of a text in the document, in the given range. + * @return The position of the found text, -1 if not found. + */ +long Editor::FindText( + uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, + ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. + sptr_t lParam) { ///< @c TextToFind structure: The text to search for in the given range. + + TextToFind *ft = reinterpret_cast(lParam); + int lengthFound = istrlen(ft->lpstrText); + int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText, + (wParam & SCFIND_MATCHCASE) != 0, + (wParam & SCFIND_WHOLEWORD) != 0, + (wParam & SCFIND_WORDSTART) != 0, + (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, + &lengthFound); + if (pos != -1) { + ft->chrgText.cpMin = pos; + ft->chrgText.cpMax = pos + lengthFound; + } + return pos; +} + +/** + * Relocatable search support : Searches relative to current selection + * point and sets the selection to the found text range with + * each search. + */ +/** + * Anchor following searches at current selection start: This allows + * multiple incremental interactive searches to be macro recorded + * while still setting the selection to found text so the find/select + * operation is self-contained. + */ +void Editor::SearchAnchor() { + searchAnchor = SelectionStart(); +} + +/** + * Find text from current search anchor: Must call @c SearchAnchor first. + * Used for next text and previous text requests. + * @return The position of the found text, -1 if not found. + */ +long Editor::SearchText( + unsigned int iMessage, ///< Accepts both @c SCI_SEARCHNEXT and @c SCI_SEARCHPREV. + uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, + ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. + sptr_t lParam) { ///< The text to search for. + + const char *txt = reinterpret_cast(lParam); + int pos; + int lengthFound = istrlen(txt); + if (iMessage == SCI_SEARCHNEXT) { + pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, + (wParam & SCFIND_MATCHCASE) != 0, + (wParam & SCFIND_WHOLEWORD) != 0, + (wParam & SCFIND_WORDSTART) != 0, + (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, + &lengthFound); + } else { + pos = pdoc->FindText(searchAnchor, 0, txt, + (wParam & SCFIND_MATCHCASE) != 0, + (wParam & SCFIND_WHOLEWORD) != 0, + (wParam & SCFIND_WORDSTART) != 0, + (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, + &lengthFound); + } + + if (pos != -1) { + SetSelection(pos, pos + lengthFound); + } + + return pos; +} + +/** + * Search for text in the target range of the document. + * @return The position of the found text, -1 if not found. + */ +long Editor::SearchInTarget(const char *text, int length) { + int lengthFound = length; + int pos = pdoc->FindText(targetStart, targetEnd, text, + (searchFlags & SCFIND_MATCHCASE) != 0, + (searchFlags & SCFIND_WHOLEWORD) != 0, + (searchFlags & SCFIND_WORDSTART) != 0, + (searchFlags & SCFIND_REGEXP) != 0, + (searchFlags & SCFIND_POSIX) != 0, + &lengthFound); + if (pos != -1) { + targetStart = pos; + targetEnd = pos + lengthFound; + } + return pos; +} + +void Editor::GoToLine(int lineNo) { + if (lineNo > pdoc->LinesTotal()) + lineNo = pdoc->LinesTotal(); + if (lineNo < 0) + lineNo = 0; + SetEmptySelection(pdoc->LineStart(lineNo)); + ShowCaretAtCurrentPosition(); + EnsureCaretVisible(); +} + +static bool Close(Point pt1, Point pt2) { + if (abs(pt1.x - pt2.x) > 3) + return false; + if (abs(pt1.y - pt2.y) > 3) + return false; + return true; +} + +char *Editor::CopyRange(int start, int end) { + char *text = 0; + if (start < end) { + int len = end - start; + text = new char[len + 1]; + if (text) { + for (int i = 0; i < len; i++) { + text[i] = pdoc->CharAt(start + i); + } + text[len] = '\0'; + } + } + return text; +} + +void Editor::CopySelectionFromRange(SelectionText *ss, int start, int end) { + ss->Set(CopyRange(start, end), end - start + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); +} + +void Editor::CopySelectionRange(SelectionText *ss) { + if (selType == selStream) { + CopySelectionFromRange(ss, SelectionStart(), SelectionEnd()); + } else { + char *text = 0; + int size = 0; + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + size += lineIterator.endPos - lineIterator.startPos; + if (selType != selLines) { + size++; + if (pdoc->eolMode == SC_EOL_CRLF) { + size++; + } + } + } + if (size > 0) { + text = new char[size + 1]; + if (text) { + int j = 0; + lineIterator.Reset(); + while (lineIterator.Iterate()) { + for (int i = lineIterator.startPos; + i < lineIterator.endPos; + i++) { + text[j++] = pdoc->CharAt(i); + } + if (selType != selLines) { + if (pdoc->eolMode != SC_EOL_LF) { + text[j++] = '\r'; + } + if (pdoc->eolMode != SC_EOL_CR) { + text[j++] = '\n'; + } + } + } + text[size] = '\0'; + } + } + ss->Set(text, size + 1, pdoc->dbcsCodePage, + vs.styles[STYLE_DEFAULT].characterSet, selType == selRectangle); + } +} + +void Editor::CopyRangeToClipboard(int start, int end) { + start = pdoc->ClampPositionIntoDocument(start); + end = pdoc->ClampPositionIntoDocument(end); + SelectionText selectedText; + selectedText.Set(CopyRange(start, end), end - start + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); + CopyToClipboard(selectedText); +} + +void Editor::CopyText(int length, const char *text) { + SelectionText selectedText; + selectedText.Copy(text, length + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); + CopyToClipboard(selectedText); +} + +void Editor::SetDragPosition(int newPos) { + if (newPos >= 0) { + newPos = MovePositionOutsideChar(newPos, 1); + posDrop = newPos; + } + if (posDrag != newPos) { + caret.on = true; + SetTicking(true); + InvalidateCaret(); + posDrag = newPos; + InvalidateCaret(); + } +} + +void Editor::DisplayCursor(Window::Cursor c) { + if (cursorMode == SC_CURSORNORMAL) + wMain.SetCursor(c); + else + wMain.SetCursor(static_cast(cursorMode)); +} + +void Editor::StartDrag() { + // Always handled by subclasses + //SetMouseCapture(true); + //DisplayCursor(Window::cursorArrow); +} + +void Editor::DropAt(int position, const char *value, bool moving, bool rectangular) { + //Platform::DebugPrintf("DropAt %d\n", inDragDrop); + if (inDragDrop) + dropWentOutside = false; + + int positionWasInSelection = PositionInSelection(position); + + bool positionOnEdgeOfSelection = + (position == SelectionStart()) || (position == SelectionEnd()); + + if ((!inDragDrop) || !(0 == positionWasInSelection) || + (positionOnEdgeOfSelection && !moving)) { + + int selStart = SelectionStart(); + int selEnd = SelectionEnd(); + + pdoc->BeginUndoAction(); + + int positionAfterDeletion = position; + if (inDragDrop && moving) { + // Remove dragged out text + if (rectangular || selType == selLines) { + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + if (position >= lineIterator.startPos) { + if (position > lineIterator.endPos) { + positionAfterDeletion -= lineIterator.endPos - lineIterator.startPos; + } else { + positionAfterDeletion -= position - lineIterator.startPos; + } + } + } + } else { + if (position > selStart) { + positionAfterDeletion -= selEnd - selStart; + } + } + ClearSelection(); + } + position = positionAfterDeletion; + + if (rectangular) { + PasteRectangular(position, value, istrlen(value)); + pdoc->EndUndoAction(); + // Should try to select new rectangle but it may not be a rectangle now so just select the drop position + SetEmptySelection(position); + } else { + position = MovePositionOutsideChar(position, currentPos - position); + if (pdoc->InsertCString(position, value)) { + SetSelection(position + istrlen(value), position); + } + pdoc->EndUndoAction(); + } + } else if (inDragDrop) { + SetEmptySelection(position); + } +} + +/** + * @return -1 if given position is before the selection, + * 1 if position is after the selection, + * 0 if position is inside the selection, + */ +int Editor::PositionInSelection(int pos) { + pos = MovePositionOutsideChar(pos, currentPos - pos); + if (pos < SelectionStart()) { + return -1; + } + if (pos > SelectionEnd()) { + return 1; + } + if (selType == selStream) { + return 0; + } else { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(pdoc->LineFromPosition(pos)); + if (pos < lineIterator.startPos) { + return -1; + } else if (pos > lineIterator.endPos) { + return 1; + } else { + return 0; + } + } +} + +bool Editor::PointInSelection(Point pt) { + int pos = PositionFromLocation(pt); + if (0 == PositionInSelection(pos)) { + // Probably inside, but we must make a finer test + int selStart, selEnd; + if (selType == selStream) { + selStart = SelectionStart(); + selEnd = SelectionEnd(); + } else { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(pdoc->LineFromPosition(pos)); + selStart = lineIterator.startPos; + selEnd = lineIterator.endPos; + } + if (pos == selStart) { + // see if just before selection + Point locStart = LocationFromPosition(pos); + if (pt.x < locStart.x) { + return false; + } + } + if (pos == selEnd) { + // see if just after selection + Point locEnd = LocationFromPosition(pos); + if (pt.x > locEnd.x) { + return false; + } + } + return true; + } + return false; +} + +bool Editor::PointInSelMargin(Point pt) { + // Really means: "Point in a margin" + if (vs.fixedColumnWidth > 0) { // There is a margin + PRectangle rcSelMargin = GetClientRectangle(); + rcSelMargin.right = vs.fixedColumnWidth - vs.leftMarginWidth; + return rcSelMargin.Contains(pt); + } else { + return false; + } +} + +void Editor::LineSelection(int lineCurrent_, int lineAnchor_) { + if (lineAnchor_ < lineCurrent_) { + SetSelection(pdoc->LineStart(lineCurrent_ + 1), + pdoc->LineStart(lineAnchor_)); + } else if (lineAnchor_ > lineCurrent_) { + SetSelection(pdoc->LineStart(lineCurrent_), + pdoc->LineStart(lineAnchor_ + 1)); + } else { // Same line, select it + SetSelection(pdoc->LineStart(lineAnchor_ + 1), + pdoc->LineStart(lineAnchor_)); + } +} + +void Editor::DwellEnd(bool mouseMoved) { + if (mouseMoved) + ticksToDwell = dwellDelay; + else + ticksToDwell = SC_TIME_FOREVER; + if (dwelling && (dwellDelay < SC_TIME_FOREVER)) { + dwelling = false; + NotifyDwelling(ptMouseLast, dwelling); + } +} + +void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { + //Platform::DebugPrintf("Scintilla:ButtonDown %d %d = %d alt=%d\n", curTime, lastClickTime, curTime - lastClickTime, alt); + ptMouseLast = pt; + int newPos = PositionFromLocation(pt); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); + inDragDrop = false; + moveExtendsSelection = false; + + bool processed = NotifyMarginClick(pt, shift, ctrl, alt); + if (processed) + return; + + bool inSelMargin = PointInSelMargin(pt); + if (shift & !inSelMargin) { + SetSelection(newPos); + } + if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) { + //Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime); + SetMouseCapture(true); + SetEmptySelection(newPos); + bool doubleClick = false; + // Stop mouse button bounce changing selection type + if (!Platform::MouseButtonBounce() || curTime != lastClickTime) { + if (selectionType == selChar) { + selectionType = selWord; + doubleClick = true; + } else if (selectionType == selWord) { + selectionType = selLine; + } else { + selectionType = selChar; + originalAnchorPos = currentPos; + } + } + + if (selectionType == selWord) { + if (currentPos >= originalAnchorPos) { // Moved forward + SetSelection(pdoc->ExtendWordSelect(currentPos, 1), + pdoc->ExtendWordSelect(originalAnchorPos, -1)); + } else { // Moved backward + SetSelection(pdoc->ExtendWordSelect(currentPos, -1), + pdoc->ExtendWordSelect(originalAnchorPos, 1)); + } + } else if (selectionType == selLine) { + lineAnchor = LineFromLocation(pt); + SetSelection(pdoc->LineStart(lineAnchor + 1), pdoc->LineStart(lineAnchor)); + //Platform::DebugPrintf("Triple click: %d - %d\n", anchor, currentPos); + } else { + SetEmptySelection(currentPos); + } + //Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos); + if (doubleClick) { + NotifyDoubleClick(pt, shift, ctrl, alt); + if (PositionIsHotspot(newPos)) + NotifyHotSpotDoubleClicked(newPos, shift, ctrl, alt); + } + } else { // Single click + if (inSelMargin) { + selType = selStream; + if (ctrl) { + SelectAll(); + lastClickTime = curTime; + return; + } + if (!shift) { + lineAnchor = LineFromLocation(pt); + // Single click in margin: select whole line + LineSelection(lineAnchor, lineAnchor); + SetSelection(pdoc->LineStart(lineAnchor + 1), + pdoc->LineStart(lineAnchor)); + } else { + // Single shift+click in margin: select from line anchor to clicked line + if (anchor > currentPos) + lineAnchor = pdoc->LineFromPosition(anchor - 1); + else + lineAnchor = pdoc->LineFromPosition(anchor); + int lineStart = LineFromLocation(pt); + LineSelection(lineStart, lineAnchor); + //lineAnchor = lineStart; // Keep the same anchor for ButtonMove + } + + SetDragPosition(invalidPosition); + SetMouseCapture(true); + selectionType = selLine; + } else { + if (PointIsHotspot(pt)) { + NotifyHotSpotClicked(newPos, shift, ctrl, alt); + } + if (!shift) { + inDragDrop = PointInSelection(pt) && !SelectionEmpty(); + } + if (inDragDrop) { + SetMouseCapture(false); + SetDragPosition(newPos); + CopySelectionRange(&drag); + StartDrag(); + } else { + SetDragPosition(invalidPosition); + SetMouseCapture(true); + if (!shift) { + SetEmptySelection(newPos); + } + selType = alt ? selRectangle : selStream; + selectionType = selChar; + originalAnchorPos = currentPos; + SetRectangularRange(); + } + } + } + lastClickTime = curTime; + lastXChosen = pt.x; + ShowCaretAtCurrentPosition(); +} + +bool Editor::PositionIsHotspot(int position) { + return vs.styles[pdoc->StyleAt(position) & pdoc->stylingBitsMask].hotspot; +} + +bool Editor::PointIsHotspot(Point pt) { + int pos = PositionFromLocationClose(pt); + if (pos == INVALID_POSITION) + return false; + return PositionIsHotspot(pos); +} + +void Editor::SetHotSpotRange(Point *pt) { + if (pt) { + int pos = PositionFromLocation(*pt); + + // If we don't limit this to word characters then the + // range can encompass more than the run range and then + // the underline will not be drawn properly. + int hsStart_ = pdoc->ExtendStyleRange(pos, -1, vs.hotspotSingleLine); + int hsEnd_ = pdoc->ExtendStyleRange(pos, 1, vs.hotspotSingleLine); + + // Only invalidate the range if the hotspot range has changed... + if (hsStart_ != hsStart || hsEnd_ != hsEnd) { + if (hsStart != -1) { + InvalidateRange(hsStart, hsEnd); + } + hsStart = hsStart_; + hsEnd = hsEnd_; + InvalidateRange(hsStart, hsEnd); + } + } else { + if (hsStart != -1) { + int hsStart_ = hsStart; + int hsEnd_ = hsEnd; + hsStart = -1; + hsEnd = -1; + InvalidateRange(hsStart_, hsEnd_); + } else { + hsStart = -1; + hsEnd = -1; + } + } +} + +void Editor::GetHotSpotRange(int& hsStart_, int& hsEnd_) { + hsStart_ = hsStart; + hsEnd_ = hsEnd; +} + +void Editor::ButtonMove(Point pt) { + if ((ptMouseLast.x != pt.x) || (ptMouseLast.y != pt.y)) { + DwellEnd(true); + } + ptMouseLast = pt; + //Platform::DebugPrintf("Move %d %d\n", pt.x, pt.y); + if (HaveMouseCapture()) { + + // Slow down autoscrolling/selection + autoScrollTimer.ticksToWait -= timer.tickSize; + if (autoScrollTimer.ticksToWait > 0) + return; + autoScrollTimer.ticksToWait = autoScrollDelay; + + // Adjust selection + int movePos = PositionFromLocation(pt); + movePos = MovePositionOutsideChar(movePos, currentPos - movePos); + if (posDrag >= 0) { + SetDragPosition(movePos); + } else { + if (selectionType == selChar) { + SetSelection(movePos); + } else if (selectionType == selWord) { + // Continue selecting by word + if (movePos == originalAnchorPos) { // Didn't move + // No need to do anything. Previously this case was lumped + // in with "Moved forward", but that can be harmful in this + // case: a handler for the NotifyDoubleClick re-adjusts + // the selection for a fancier definition of "word" (for + // example, in Perl it is useful to include the leading + // '$', '%' or '@' on variables for word selection). In this + // the ButtonMove() called via Tick() for auto-scrolling + // could result in the fancier word selection adjustment + // being unmade. + } else if (movePos > originalAnchorPos) { // Moved forward + SetSelection(pdoc->ExtendWordSelect(movePos, 1), + pdoc->ExtendWordSelect(originalAnchorPos, -1)); + } else { // Moved backward + SetSelection(pdoc->ExtendWordSelect(movePos, -1), + pdoc->ExtendWordSelect(originalAnchorPos, 1)); + } + } else { + // Continue selecting by line + int lineMove = LineFromLocation(pt); + LineSelection(lineMove, lineAnchor); + } + } + // While dragging to make rectangular selection, we don't want the current + // position to jump to the end of smaller or empty lines. + //xEndSelect = pt.x - vs.fixedColumnWidth + xOffset; + xEndSelect = XFromPosition(movePos); + + // Autoscroll + PRectangle rcClient = GetClientRectangle(); + if (pt.y > rcClient.bottom) { + int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); + if (lineMove < 0) { + lineMove = cs.DisplayFromDoc(pdoc->LinesTotal() - 1); + } + ScrollTo(lineMove - LinesOnScreen() + 5); + Redraw(); + } else if (pt.y < rcClient.top) { + int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); + ScrollTo(lineMove - 5); + Redraw(); + } + EnsureCaretVisible(false, false, true); + + if (hsStart != -1 && !PositionIsHotspot(movePos)) + SetHotSpotRange(NULL); + + } else { + if (vs.fixedColumnWidth > 0) { // There is a margin + if (PointInSelMargin(pt)) { + DisplayCursor(Window::cursorReverseArrow); + return; // No need to test for selection + } + } + // Display regular (drag) cursor over selection + if (PointInSelection(pt) && !SelectionEmpty()) { + DisplayCursor(Window::cursorArrow); + } else if (PointIsHotspot(pt)) { + DisplayCursor(Window::cursorHand); + SetHotSpotRange(&pt); + } else { + DisplayCursor(Window::cursorText); + SetHotSpotRange(NULL); + } + } +} + +void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { + //Platform::DebugPrintf("ButtonUp %d\n", HaveMouseCapture()); + if (HaveMouseCapture()) { + if (PointInSelMargin(pt)) { + DisplayCursor(Window::cursorReverseArrow); + } else { + DisplayCursor(Window::cursorText); + SetHotSpotRange(NULL); + } + ptMouseLast = pt; + SetMouseCapture(false); + int newPos = PositionFromLocation(pt); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); + if (inDragDrop) { + int selStart = SelectionStart(); + int selEnd = SelectionEnd(); + if (selStart < selEnd) { + if (drag.len) { + if (ctrl) { + if (pdoc->InsertString(newPos, drag.s, drag.len)) { + SetSelection(newPos, newPos + drag.len); + } + } else if (newPos < selStart) { + pdoc->DeleteChars(selStart, drag.len); + if (pdoc->InsertString(newPos, drag.s, drag.len)) { + SetSelection(newPos, newPos + drag.len); + } + } else if (newPos > selEnd) { + pdoc->DeleteChars(selStart, drag.len); + newPos -= drag.len; + if (pdoc->InsertString(newPos, drag.s, drag.len)) { + SetSelection(newPos, newPos + drag.len); + } + } else { + SetEmptySelection(newPos); + } + drag.Free(); + } + selectionType = selChar; + } + } else { + if (selectionType == selChar) { + SetSelection(newPos); + } + } + SetRectangularRange(); + lastClickTime = curTime; + lastClick = pt; + lastXChosen = pt.x; + if (selType == selStream) { + SetLastXChosen(); + } + inDragDrop = false; + EnsureCaretVisible(false); + } +} + +// Called frequently to perform background UI including +// caret blinking and automatic scrolling. +void Editor::Tick() { + if (HaveMouseCapture()) { + // Auto scroll + ButtonMove(ptMouseLast); + } + if (caret.period > 0) { + timer.ticksToWait -= timer.tickSize; + if (timer.ticksToWait <= 0) { + caret.on = !caret.on; + timer.ticksToWait = caret.period; + if (caret.active) { + InvalidateCaret(); + } + } + } + if ((dwellDelay < SC_TIME_FOREVER) && + (ticksToDwell > 0) && + (!HaveMouseCapture())) { + ticksToDwell -= timer.tickSize; + if (ticksToDwell <= 0) { + dwelling = true; + NotifyDwelling(ptMouseLast, dwelling); + } + } +} + +bool Editor::Idle() { + + bool idleDone; + + bool wrappingDone = wrapState == eWrapNone; + + if (!wrappingDone) { + // Wrap lines during idle. + WrapLines(false, -1); + // No more wrapping + if (wrapStart == wrapEnd) + wrappingDone = true; + } + + // Add more idle things to do here, but make sure idleDone is + // set correctly before the function returns. returning + // false will stop calling this idle funtion until SetIdle() is + // called again. + + idleDone = wrappingDone; // && thatDone && theOtherThingDone... + + return !idleDone; +} + +void Editor::SetFocusState(bool focusState) { + hasFocus = focusState; + NotifyFocus(hasFocus); + if (hasFocus) { + ShowCaretAtCurrentPosition(); + } else { + CancelModes(); + DropCaret(); + } +} + +bool Editor::PaintContains(PRectangle rc) { + return rcPaint.Contains(rc); +} + +bool Editor::PaintContainsMargin() { + PRectangle rcSelMargin = GetClientRectangle(); + rcSelMargin.right = vs.fixedColumnWidth; + return PaintContains(rcSelMargin); +} + +void Editor::CheckForChangeOutsidePaint(Range r) { + if (paintState == painting && !paintingAllText) { + //Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end); + if (!r.Valid()) + return; + + PRectangle rcRange = RectangleFromRange(r.start, r.end); + PRectangle rcText = GetTextRectangle(); + if (rcRange.top < rcText.top) { + rcRange.top = rcText.top; + } + if (rcRange.bottom > rcText.bottom) { + rcRange.bottom = rcText.bottom; + } + + if (!PaintContains(rcRange)) { + AbandonPaint(); + } + } +} + +void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { + if ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) { + if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { + CheckForChangeOutsidePaint(Range(braces[0])); + CheckForChangeOutsidePaint(Range(pos0)); + braces[0] = pos0; + } + if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { + CheckForChangeOutsidePaint(Range(braces[1])); + CheckForChangeOutsidePaint(Range(pos1)); + braces[1] = pos1; + } + bracesMatchStyle = matchStyle; + if (paintState == notPainting) { + Redraw(); + } + } +} + +void Editor::SetDocPointer(Document *document) { + //Platform::DebugPrintf("** %x setdoc to %x\n", pdoc, document); + pdoc->RemoveWatcher(this, 0); + pdoc->Release(); + if (document == NULL) { + pdoc = new Document(); + } else { + pdoc = document; + } + pdoc->AddRef(); + + // Ensure all positions within document + selType = selStream; + currentPos = 0; + anchor = 0; + targetStart = 0; + targetEnd = 0; + + braces[0] = invalidPosition; + braces[1] = invalidPosition; + + // Reset the contraction state to fully shown. + cs.Clear(); + cs.InsertLines(0, pdoc->LinesTotal() - 1); + llc.Deallocate(); + NeedWrapping(); + + pdoc->AddWatcher(this, 0); + SetScrollBars(); + Redraw(); +} + +/** + * Recursively expand a fold, making lines visible except where they have an unexpanded parent. + */ +void Editor::Expand(int &line, bool doExpand) { + int lineMaxSubord = pdoc->GetLastChild(line); + line++; + while (line <= lineMaxSubord) { + if (doExpand) + cs.SetVisible(line, line, true); + int level = pdoc->GetLevel(line); + if (level & SC_FOLDLEVELHEADERFLAG) { + if (doExpand && cs.GetExpanded(line)) { + Expand(line, true); + } else { + Expand(line, false); + } + } else { + line++; + } + } +} + +void Editor::ToggleContraction(int line) { + if (line >= 0) { + if ((pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) == 0) { + line = pdoc->GetFoldParent(line); + if (line < 0) + return; + } + + if (cs.GetExpanded(line)) { + int lineMaxSubord = pdoc->GetLastChild(line); + cs.SetExpanded(line, 0); + if (lineMaxSubord > line) { + cs.SetVisible(line + 1, lineMaxSubord, false); + + int lineCurrent = pdoc->LineFromPosition(currentPos); + if (lineCurrent > line && lineCurrent <= lineMaxSubord) { + // This does not re-expand the fold + EnsureCaretVisible(); + } + + SetScrollBars(); + Redraw(); + } + + } else { + if (!(cs.GetVisible(line))) { + EnsureLineVisible(line, false); + GoToLine(line); + } + cs.SetExpanded(line, 1); + Expand(line, true); + SetScrollBars(); + Redraw(); + } + } +} + +/** + * Recurse up from this line to find any folds that prevent this line from being visible + * and unfold them all. + */ +void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) { + + // In case in need of wrapping to ensure DisplayFromDoc works. + WrapLines(true, -1); + + if (!cs.GetVisible(lineDoc)) { + int lineParent = pdoc->GetFoldParent(lineDoc); + if (lineParent >= 0) { + if (lineDoc != lineParent) + EnsureLineVisible(lineParent, enforcePolicy); + if (!cs.GetExpanded(lineParent)) { + cs.SetExpanded(lineParent, 1); + Expand(lineParent, true); + } + } + SetScrollBars(); + Redraw(); + } + if (enforcePolicy) { + int lineDisplay = cs.DisplayFromDoc(lineDoc); + if (visiblePolicy & VISIBLE_SLOP) { + if ((topLine > lineDisplay) || ((visiblePolicy & VISIBLE_STRICT) && (topLine + visibleSlop > lineDisplay))) { + SetTopLine(Platform::Clamp(lineDisplay - visibleSlop, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } else if ((lineDisplay > topLine + LinesOnScreen() - 1) || + ((visiblePolicy & VISIBLE_STRICT) && (lineDisplay > topLine + LinesOnScreen() - 1 - visibleSlop))) { + SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() + 1 + visibleSlop, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } + } else { + if ((topLine > lineDisplay) || (lineDisplay > topLine + LinesOnScreen() - 1) || (visiblePolicy & VISIBLE_STRICT)) { + SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() / 2 + 1, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } + } + } +} + +int Editor::ReplaceTarget(bool replacePatterns, const char *text, int length) { + pdoc->BeginUndoAction(); + if (length == -1) + length = istrlen(text); + if (replacePatterns) { + text = pdoc->SubstituteByPosition(text, &length); + if (!text) + return 0; + } + if (targetStart != targetEnd) + pdoc->DeleteChars(targetStart, targetEnd - targetStart); + targetEnd = targetStart; + pdoc->InsertString(targetStart, text, length); + targetEnd = targetStart + length; + pdoc->EndUndoAction(); + return length; +} + +bool Editor::IsUnicodeMode() const { + return pdoc && (SC_CP_UTF8 == pdoc->dbcsCodePage); +} + +int Editor::CodePage() const { + if (pdoc) + return pdoc->dbcsCodePage; + else + return 0; +} + +int Editor::WrapCount(int line) { + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + + if (surface && ll) { + LayoutLine(line, surface, vs, ll, wrapWidth); + return ll->lines; + } else { + return 1; + } +} + +void Editor::AddStyledText(char *buffer, int appendLength) { + // The buffer consists of alternating character bytes and style bytes + size_t textLength = appendLength / 2; + char *text = new char[textLength]; + if (text) { + size_t i; + for (i=0;iInsertString(CurrentPosition(), text, textLength); + for (i=0;iStartStyling(CurrentPosition(), static_cast(0xff)); + pdoc->SetStyles(textLength, text); + delete []text; + } + SetEmptySelection(currentPos + textLength); +} + +static bool ValidMargin(unsigned long wParam) { + return wParam < ViewStyle::margins; +} + +static char *CharPtrFromSPtr(sptr_t lParam) { + return reinterpret_cast(lParam); +} + +sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + //Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam); + + // Optional macro recording hook + if (recordingMacro) + NotifyMacroRecord(iMessage, wParam, lParam); + + switch (iMessage) { + + case SCI_GETTEXT: { + if (lParam == 0) + return pdoc->Length() + 1; + if (wParam == 0) + return 0; + char *ptr = CharPtrFromSPtr(lParam); + unsigned int iChar = 0; + for (; iChar < wParam - 1; iChar++) + ptr[iChar] = pdoc->CharAt(iChar); + ptr[iChar] = '\0'; + return iChar; + } + + case SCI_SETTEXT: { + if (lParam == 0) + return 0; + pdoc->BeginUndoAction(); + pdoc->DeleteChars(0, pdoc->Length()); + SetEmptySelection(0); + pdoc->InsertCString(0, CharPtrFromSPtr(lParam)); + pdoc->EndUndoAction(); + return 1; + } + + case SCI_GETTEXTLENGTH: + return pdoc->Length(); + + case SCI_CUT: + Cut(); + SetLastXChosen(); + break; + + case SCI_COPY: + Copy(); + break; + + case SCI_COPYRANGE: + CopyRangeToClipboard(wParam, lParam); + break; + + case SCI_COPYTEXT: + CopyText(wParam, CharPtrFromSPtr(lParam)); + break; + + case SCI_PASTE: + Paste(); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + + case SCI_CLEAR: + Clear(); + SetLastXChosen(); + EnsureCaretVisible(); + break; + + case SCI_UNDO: + Undo(); + SetLastXChosen(); + break; + + case SCI_CANUNDO: + return (pdoc->CanUndo() && !pdoc->IsReadOnly()) ? 1 : 0; + + case SCI_EMPTYUNDOBUFFER: + pdoc->DeleteUndoHistory(); + return 0; + + case SCI_GETFIRSTVISIBLELINE: + return topLine; + + case SCI_GETLINE: { // Risk of overwriting the end of the buffer + int lineStart = pdoc->LineStart(wParam); + int lineEnd = pdoc->LineStart(wParam + 1); + if (lParam == 0) { + return lineEnd - lineStart; + } + char *ptr = CharPtrFromSPtr(lParam); + int iPlace = 0; + for (int iChar = lineStart; iChar < lineEnd; iChar++) { + ptr[iPlace++] = pdoc->CharAt(iChar); + } + return iPlace; + } + + case SCI_GETLINECOUNT: + if (pdoc->LinesTotal() == 0) + return 1; + else + return pdoc->LinesTotal(); + + case SCI_GETMODIFY: + return !pdoc->IsSavePoint(); + + case SCI_SETSEL: { + int nStart = static_cast(wParam); + int nEnd = static_cast(lParam); + if (nEnd < 0) + nEnd = pdoc->Length(); + if (nStart < 0) + nStart = nEnd; // Remove selection + selType = selStream; + SetSelection(nEnd, nStart); + EnsureCaretVisible(); + } + break; + + case SCI_GETSELTEXT: { + if (lParam == 0) { + if (selType == selStream) { + return 1 + SelectionEnd() - SelectionStart(); + } else { + // TODO: why is selLines handled the slow way? + int size = 0; + int extraCharsPerLine = 0; + if (selType != selLines) + extraCharsPerLine = (pdoc->eolMode == SC_EOL_CRLF) ? 2 : 1; + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + size += lineIterator.endPos + extraCharsPerLine - lineIterator.startPos; + } + + return 1 + size; + } + } + SelectionText selectedText; + CopySelectionRange(&selectedText); + char *ptr = CharPtrFromSPtr(lParam); + int iChar = 0; + if (selectedText.len) { + for (; iChar < selectedText.len; iChar++) + ptr[iChar] = selectedText.s[iChar]; + } else { + ptr[0] = '\0'; + } + return iChar; + } + + case SCI_LINEFROMPOSITION: + if (static_cast(wParam) < 0) + return 0; + return pdoc->LineFromPosition(wParam); + + case SCI_POSITIONFROMLINE: + if (static_cast(wParam) < 0) + wParam = pdoc->LineFromPosition(SelectionStart()); + if (wParam == 0) + return 0; // Even if there is no text, there is a first line that starts at 0 + if (static_cast(wParam) > pdoc->LinesTotal()) + return -1; + //if (wParam > pdoc->LineFromPosition(pdoc->Length())) // Useful test, anyway... + // return -1; + return pdoc->LineStart(wParam); + + // Replacement of the old Scintilla interpretation of EM_LINELENGTH + case SCI_LINELENGTH: + if ((static_cast(wParam) < 0) || + (static_cast(wParam) > pdoc->LineFromPosition(pdoc->Length()))) + return 0; + return pdoc->LineStart(wParam + 1) - pdoc->LineStart(wParam); + + case SCI_REPLACESEL: { + if (lParam == 0) + return 0; + pdoc->BeginUndoAction(); + ClearSelection(); + char *replacement = CharPtrFromSPtr(lParam); + pdoc->InsertCString(currentPos, replacement); + pdoc->EndUndoAction(); + SetEmptySelection(currentPos + istrlen(replacement)); + EnsureCaretVisible(); + } + break; + + case SCI_SETTARGETSTART: + targetStart = wParam; + break; + + case SCI_GETTARGETSTART: + return targetStart; + + case SCI_SETTARGETEND: + targetEnd = wParam; + break; + + case SCI_GETTARGETEND: + return targetEnd; + + case SCI_TARGETFROMSELECTION: + if (currentPos < anchor) { + targetStart = currentPos; + targetEnd = anchor; + } else { + targetStart = anchor; + targetEnd = currentPos; + } + break; + + case SCI_REPLACETARGET: + PLATFORM_ASSERT(lParam); + return ReplaceTarget(false, CharPtrFromSPtr(lParam), wParam); + + case SCI_REPLACETARGETRE: + PLATFORM_ASSERT(lParam); + return ReplaceTarget(true, CharPtrFromSPtr(lParam), wParam); + + case SCI_SEARCHINTARGET: + PLATFORM_ASSERT(lParam); + return SearchInTarget(CharPtrFromSPtr(lParam), wParam); + + case SCI_SETSEARCHFLAGS: + searchFlags = wParam; + break; + + case SCI_GETSEARCHFLAGS: + return searchFlags; + + case SCI_POSITIONBEFORE: + return pdoc->MovePositionOutsideChar(wParam-1, -1, true); + + case SCI_POSITIONAFTER: + return pdoc->MovePositionOutsideChar(wParam+1, 1, true); + + case SCI_LINESCROLL: + ScrollTo(topLine + lParam); + HorizontalScrollTo(xOffset + wParam * vs.spaceWidth); + return 1; + + case SCI_SETXOFFSET: + xOffset = wParam; + SetHorizontalScrollPos(); + Redraw(); + break; + + case SCI_GETXOFFSET: + return xOffset; + + case SCI_CHOOSECARETX: + SetLastXChosen(); + break; + + case SCI_SCROLLCARET: + EnsureCaretVisible(); + break; + + case SCI_SETREADONLY: + pdoc->SetReadOnly(wParam != 0); + return 1; + + case SCI_GETREADONLY: + return pdoc->IsReadOnly(); + + case SCI_CANPASTE: + return CanPaste(); + + case SCI_POINTXFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.x; + } + + case SCI_POINTYFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.y; + } + + case SCI_FINDTEXT: + return FindText(wParam, lParam); + + case SCI_GETTEXTRANGE: { + if (lParam == 0) + return 0; + TextRange *tr = reinterpret_cast(lParam); + int cpMax = tr->chrg.cpMax; + if (cpMax == -1) + cpMax = pdoc->Length(); + PLATFORM_ASSERT(cpMax <= pdoc->Length()); + int len = cpMax - tr->chrg.cpMin; // No -1 as cpMin and cpMax are referring to inter character positions + pdoc->GetCharRange(tr->lpstrText, tr->chrg.cpMin, len); + // Spec says copied text is terminated with a NUL + tr->lpstrText[len] = '\0'; + return len; // Not including NUL + } + + case SCI_HIDESELECTION: + hideSelection = wParam != 0; + Redraw(); + break; + + case SCI_FORMATRANGE: + return FormatRange(wParam != 0, reinterpret_cast(lParam)); + + case SCI_GETMARGINLEFT: + return vs.leftMarginWidth; + + case SCI_GETMARGINRIGHT: + return vs.rightMarginWidth; + + case SCI_SETMARGINLEFT: + vs.leftMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + + case SCI_SETMARGINRIGHT: + vs.rightMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + + // Control specific mesages + + case SCI_ADDTEXT: { + if (lParam == 0) + return 0; + pdoc->InsertString(CurrentPosition(), CharPtrFromSPtr(lParam), wParam); + SetEmptySelection(currentPos + wParam); + return 0; + } + + case SCI_ADDSTYLEDTEXT: + if (lParam) + AddStyledText(CharPtrFromSPtr(lParam), wParam); + return 0; + + case SCI_INSERTTEXT: { + if (lParam == 0) + return 0; + int insertPos = wParam; + if (static_cast(wParam) == -1) + insertPos = CurrentPosition(); + int newCurrent = CurrentPosition(); + char *sz = CharPtrFromSPtr(lParam); + pdoc->InsertCString(insertPos, sz); + if (newCurrent > insertPos) + newCurrent += istrlen(sz); + SetEmptySelection(newCurrent); + return 0; + } + + case SCI_APPENDTEXT: + pdoc->InsertString(pdoc->Length(), CharPtrFromSPtr(lParam), wParam); + return 0; + + case SCI_CLEARALL: + ClearAll(); + return 0; + + case SCI_CLEARDOCUMENTSTYLE: + ClearDocumentStyle(); + return 0; + + case SCI_SETUNDOCOLLECTION: + pdoc->SetUndoCollection(wParam != 0); + return 0; + + case SCI_GETUNDOCOLLECTION: + return pdoc->IsCollectingUndo(); + + case SCI_BEGINUNDOACTION: + pdoc->BeginUndoAction(); + return 0; + + case SCI_ENDUNDOACTION: + pdoc->EndUndoAction(); + return 0; + + case SCI_GETCARETPERIOD: + return caret.period; + + case SCI_SETCARETPERIOD: + caret.period = wParam; + break; + + case SCI_SETWORDCHARS: { + pdoc->SetDefaultCharClasses(false); + if (lParam == 0) + return 0; + pdoc->SetCharClasses(reinterpret_cast(lParam), CharClassify::ccWord); + } + break; + + case SCI_SETWHITESPACECHARS: { + if (lParam == 0) + return 0; + pdoc->SetCharClasses(reinterpret_cast(lParam), CharClassify::ccSpace); + } + break; + + case SCI_SETCHARSDEFAULT: + pdoc->SetDefaultCharClasses(true); + break; + + case SCI_GETLENGTH: + return pdoc->Length(); + + case SCI_ALLOCATE: + pdoc->Allocate(wParam); + break; + + case SCI_GETCHARAT: + return pdoc->CharAt(wParam); + + case SCI_SETCURRENTPOS: + SetSelection(wParam, anchor); + break; + + case SCI_GETCURRENTPOS: + return currentPos; + + case SCI_SETANCHOR: + SetSelection(currentPos, wParam); + break; + + case SCI_GETANCHOR: + return anchor; + + case SCI_SETSELECTIONSTART: + SetSelection(Platform::Maximum(currentPos, wParam), wParam); + break; + + case SCI_GETSELECTIONSTART: + return Platform::Minimum(anchor, currentPos); + + case SCI_SETSELECTIONEND: + SetSelection(wParam, Platform::Minimum(anchor, wParam)); + break; + + case SCI_GETSELECTIONEND: + return Platform::Maximum(anchor, currentPos); + + case SCI_SETPRINTMAGNIFICATION: + printMagnification = wParam; + break; + + case SCI_GETPRINTMAGNIFICATION: + return printMagnification; + + case SCI_SETPRINTCOLOURMODE: + printColourMode = wParam; + break; + + case SCI_GETPRINTCOLOURMODE: + return printColourMode; + + case SCI_SETPRINTWRAPMODE: + printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone; + break; + + case SCI_GETPRINTWRAPMODE: + return printWrapState; + + case SCI_GETSTYLEAT: + if (static_cast(wParam) >= pdoc->Length()) + return 0; + else + return pdoc->StyleAt(wParam); + + case SCI_REDO: + Redo(); + break; + + case SCI_SELECTALL: + SelectAll(); + break; + + case SCI_SETSAVEPOINT: + pdoc->SetSavePoint(); + break; + + case SCI_GETSTYLEDTEXT: { + if (lParam == 0) + return 0; + TextRange *tr = reinterpret_cast(lParam); + int iPlace = 0; + for (int iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) { + tr->lpstrText[iPlace++] = pdoc->CharAt(iChar); + tr->lpstrText[iPlace++] = pdoc->StyleAt(iChar); + } + tr->lpstrText[iPlace] = '\0'; + tr->lpstrText[iPlace + 1] = '\0'; + return iPlace; + } + + case SCI_CANREDO: + return (pdoc->CanRedo() && !pdoc->IsReadOnly()) ? 1 : 0; + + case SCI_MARKERLINEFROMHANDLE: + return pdoc->LineFromHandle(wParam); + + case SCI_MARKERDELETEHANDLE: + pdoc->DeleteMarkFromHandle(wParam); + break; + + case SCI_GETVIEWWS: + return vs.viewWhitespace; + + case SCI_SETVIEWWS: + vs.viewWhitespace = static_cast(wParam); + Redraw(); + break; + + case SCI_POSITIONFROMPOINT: + return PositionFromLocation(Point(wParam, lParam)); + + case SCI_POSITIONFROMPOINTCLOSE: + return PositionFromLocationClose(Point(wParam, lParam)); + + case SCI_GOTOLINE: + GoToLine(wParam); + break; + + case SCI_GOTOPOS: + SetEmptySelection(wParam); + EnsureCaretVisible(); + Redraw(); + break; + + case SCI_GETCURLINE: { + int lineCurrentPos = pdoc->LineFromPosition(currentPos); + int lineStart = pdoc->LineStart(lineCurrentPos); + unsigned int lineEnd = pdoc->LineStart(lineCurrentPos + 1); + if (lParam == 0) { + return 1 + lineEnd - lineStart; + } + PLATFORM_ASSERT(wParam > 0); + char *ptr = CharPtrFromSPtr(lParam); + unsigned int iPlace = 0; + for (unsigned int iChar = lineStart; iChar < lineEnd && iPlace < wParam - 1; iChar++) { + ptr[iPlace++] = pdoc->CharAt(iChar); + } + ptr[iPlace] = '\0'; + return currentPos - lineStart; + } + + case SCI_GETENDSTYLED: + return pdoc->GetEndStyled(); + + case SCI_GETEOLMODE: + return pdoc->eolMode; + + case SCI_SETEOLMODE: + pdoc->eolMode = wParam; + break; + + case SCI_STARTSTYLING: + pdoc->StartStyling(wParam, static_cast(lParam)); + break; + + case SCI_SETSTYLING: + pdoc->SetStyleFor(wParam, static_cast(lParam)); + break; + + case SCI_SETSTYLINGEX: // Specify a complete styling buffer + if (lParam == 0) + return 0; + pdoc->SetStyles(wParam, CharPtrFromSPtr(lParam)); + break; + + case SCI_SETBUFFEREDDRAW: + bufferedDraw = wParam != 0; + break; + + case SCI_GETBUFFEREDDRAW: + return bufferedDraw; + + case SCI_GETTWOPHASEDRAW: + return twoPhaseDraw; + + case SCI_SETTWOPHASEDRAW: + twoPhaseDraw = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_SETTABWIDTH: + if (wParam > 0) { + pdoc->tabInChars = wParam; + if (pdoc->indentInChars == 0) + pdoc->actualIndentInChars = pdoc->tabInChars; + } + InvalidateStyleRedraw(); + break; + + case SCI_GETTABWIDTH: + return pdoc->tabInChars; + + case SCI_SETINDENT: + pdoc->indentInChars = wParam; + if (pdoc->indentInChars != 0) + pdoc->actualIndentInChars = pdoc->indentInChars; + else + pdoc->actualIndentInChars = pdoc->tabInChars; + InvalidateStyleRedraw(); + break; + + case SCI_GETINDENT: + return pdoc->indentInChars; + + case SCI_SETUSETABS: + pdoc->useTabs = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETUSETABS: + return pdoc->useTabs; + + case SCI_SETLINEINDENTATION: + pdoc->SetLineIndentation(wParam, lParam); + break; + + case SCI_GETLINEINDENTATION: + return pdoc->GetLineIndentation(wParam); + + case SCI_GETLINEINDENTPOSITION: + return pdoc->GetLineIndentPosition(wParam); + + case SCI_SETTABINDENTS: + pdoc->tabIndents = wParam != 0; + break; + + case SCI_GETTABINDENTS: + return pdoc->tabIndents; + + case SCI_SETBACKSPACEUNINDENTS: + pdoc->backspaceUnindents = wParam != 0; + break; + + case SCI_GETBACKSPACEUNINDENTS: + return pdoc->backspaceUnindents; + + case SCI_SETMOUSEDWELLTIME: + dwellDelay = wParam; + ticksToDwell = dwellDelay; + break; + + case SCI_GETMOUSEDWELLTIME: + return dwellDelay; + + case SCI_WORDSTARTPOSITION: + return pdoc->ExtendWordSelect(wParam, -1, lParam != 0); + + case SCI_WORDENDPOSITION: + return pdoc->ExtendWordSelect(wParam, 1, lParam != 0); + + case SCI_SETWRAPMODE: + switch (wParam) { + case SC_WRAP_WORD: + wrapState = eWrapWord; + break; + case SC_WRAP_CHAR: + wrapState = eWrapChar; + break; + default: + wrapState = eWrapNone; + break; + } + xOffset = 0; + InvalidateStyleRedraw(); + ReconfigureScrollBars(); + break; + + case SCI_GETWRAPMODE: + return wrapState; + + case SCI_SETWRAPVISUALFLAGS: + wrapVisualFlags = wParam; + actualWrapVisualStartIndent = wrapVisualStartIndent; + if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0)) + actualWrapVisualStartIndent = 1; // must indent to show start visual + InvalidateStyleRedraw(); + ReconfigureScrollBars(); + break; + + case SCI_GETWRAPVISUALFLAGS: + return wrapVisualFlags; + + case SCI_SETWRAPVISUALFLAGSLOCATION: + wrapVisualFlagsLocation = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETWRAPVISUALFLAGSLOCATION: + return wrapVisualFlagsLocation; + + case SCI_SETWRAPSTARTINDENT: + wrapVisualStartIndent = wParam; + actualWrapVisualStartIndent = wrapVisualStartIndent; + if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0)) + actualWrapVisualStartIndent = 1; // must indent to show start visual + InvalidateStyleRedraw(); + ReconfigureScrollBars(); + break; + + case SCI_GETWRAPSTARTINDENT: + return wrapVisualStartIndent; + + case SCI_SETLAYOUTCACHE: + llc.SetLevel(wParam); + break; + + case SCI_GETLAYOUTCACHE: + return llc.GetLevel(); + + case SCI_SETSCROLLWIDTH: + PLATFORM_ASSERT(wParam > 0); + if ((wParam > 0) && (wParam != static_cast(scrollWidth))) { + scrollWidth = wParam; + SetScrollBars(); + } + break; + + case SCI_GETSCROLLWIDTH: + return scrollWidth; + + case SCI_LINESJOIN: + LinesJoin(); + break; + + case SCI_LINESSPLIT: + LinesSplit(wParam); + break; + + case SCI_TEXTWIDTH: + PLATFORM_ASSERT(wParam <= STYLE_MAX); + PLATFORM_ASSERT(lParam); + return TextWidth(wParam, CharPtrFromSPtr(lParam)); + + case SCI_TEXTHEIGHT: + return vs.lineHeight; + + case SCI_SETENDATLASTLINE: + PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); + if (endAtLastLine != (wParam != 0)) { + endAtLastLine = wParam != 0; + SetScrollBars(); + } + break; + + case SCI_GETENDATLASTLINE: + return endAtLastLine; + + case SCI_SETCARETSTICKY: + PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); + if (caretSticky != (wParam != 0)) { + caretSticky = wParam != 0; + } + break; + + case SCI_GETCARETSTICKY: + return caretSticky; + + case SCI_TOGGLECARETSTICKY: + caretSticky = !caretSticky; + break; + + case SCI_GETCOLUMN: + return pdoc->GetColumn(wParam); + + case SCI_FINDCOLUMN: + return pdoc->FindColumn(wParam, lParam); + + case SCI_SETHSCROLLBAR : + if (horizontalScrollBarVisible != (wParam != 0)) { + horizontalScrollBarVisible = wParam != 0; + SetScrollBars(); + ReconfigureScrollBars(); + } + break; + + case SCI_GETHSCROLLBAR: + return horizontalScrollBarVisible; + + case SCI_SETVSCROLLBAR: + if (verticalScrollBarVisible != (wParam != 0)) { + verticalScrollBarVisible = wParam != 0; + SetScrollBars(); + ReconfigureScrollBars(); + } + break; + + case SCI_GETVSCROLLBAR: + return verticalScrollBarVisible; + + case SCI_SETINDENTATIONGUIDES: + vs.viewIndentationGuides = wParam != 0; + Redraw(); + break; + + case SCI_GETINDENTATIONGUIDES: + return vs.viewIndentationGuides; + + case SCI_SETHIGHLIGHTGUIDE: + if ((highlightGuideColumn != static_cast(wParam)) || (wParam > 0)) { + highlightGuideColumn = wParam; + Redraw(); + } + break; + + case SCI_GETHIGHLIGHTGUIDE: + return highlightGuideColumn; + + case SCI_GETLINEENDPOSITION: + return pdoc->LineEnd(wParam); + + case SCI_SETCODEPAGE: + if (ValidCodePage(wParam)) { + pdoc->dbcsCodePage = wParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETCODEPAGE: + return pdoc->dbcsCodePage; + + case SCI_SETUSEPALETTE: + palette.allowRealization = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETUSEPALETTE: + return palette.allowRealization; + + // Marker definition and setting + case SCI_MARKERDEFINE: + if (wParam <= MARKER_MAX) + vs.markers[wParam].markType = lParam; + InvalidateStyleData(); + RedrawSelMargin(); + break; + case SCI_MARKERSETFORE: + if (wParam <= MARKER_MAX) + vs.markers[wParam].fore.desired = ColourDesired(lParam); + InvalidateStyleData(); + RedrawSelMargin(); + break; + case SCI_MARKERSETBACK: + if (wParam <= MARKER_MAX) + vs.markers[wParam].back.desired = ColourDesired(lParam); + InvalidateStyleData(); + RedrawSelMargin(); + break; + case SCI_MARKERSETALPHA: + if (wParam <= MARKER_MAX) + vs.markers[wParam].alpha = lParam; + InvalidateStyleRedraw(); + break; + case SCI_MARKERADD: { + int markerID = pdoc->AddMark(wParam, lParam); + return markerID; + } + case SCI_MARKERADDSET: + if (lParam != 0) + pdoc->AddMarkSet(wParam, lParam); + break; + + case SCI_MARKERDELETE: + pdoc->DeleteMark(wParam, lParam); + break; + + case SCI_MARKERDELETEALL: + pdoc->DeleteAllMarks(static_cast(wParam)); + break; + + case SCI_MARKERGET: + return pdoc->GetMark(wParam); + + case SCI_MARKERNEXT: { + int lt = pdoc->LinesTotal(); + for (int iLine = wParam; iLine < lt; iLine++) { + if ((pdoc->GetMark(iLine) & lParam) != 0) + return iLine; + } + } + return -1; + + case SCI_MARKERPREVIOUS: { + for (int iLine = wParam; iLine >= 0; iLine--) { + if ((pdoc->GetMark(iLine) & lParam) != 0) + return iLine; + } + } + return -1; + + case SCI_MARKERDEFINEPIXMAP: + if (wParam <= MARKER_MAX) { + vs.markers[wParam].SetXPM(CharPtrFromSPtr(lParam)); + }; + InvalidateStyleData(); + RedrawSelMargin(); + break; + + case SCI_SETMARGINTYPEN: + if (ValidMargin(wParam)) { + vs.ms[wParam].style = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETMARGINTYPEN: + if (ValidMargin(wParam)) + return vs.ms[wParam].style; + else + return 0; + + case SCI_SETMARGINWIDTHN: + if (ValidMargin(wParam)) { + // Short-circuit if the width is unchanged, to avoid unnecessary redraw. + if (vs.ms[wParam].width != lParam) { + vs.ms[wParam].width = lParam; + InvalidateStyleRedraw(); + } + } + break; + + case SCI_GETMARGINWIDTHN: + if (ValidMargin(wParam)) + return vs.ms[wParam].width; + else + return 0; + + case SCI_SETMARGINMASKN: + if (ValidMargin(wParam)) { + vs.ms[wParam].mask = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETMARGINMASKN: + if (ValidMargin(wParam)) + return vs.ms[wParam].mask; + else + return 0; + + case SCI_SETMARGINSENSITIVEN: + if (ValidMargin(wParam)) { + vs.ms[wParam].sensitive = lParam != 0; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETMARGINSENSITIVEN: + if (ValidMargin(wParam)) + return vs.ms[wParam].sensitive ? 1 : 0; + else + return 0; + + case SCI_STYLECLEARALL: + vs.ClearStyles(); + InvalidateStyleRedraw(); + break; + + case SCI_STYLESETFORE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].fore.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETBACK: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].back.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETBOLD: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].bold = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETITALIC: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].italic = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETEOLFILLED: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].eolFilled = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETSIZE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].size = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETFONT: + if (lParam == 0) + return 0; + if (wParam <= STYLE_MAX) { + vs.SetStyleFontName(wParam, CharPtrFromSPtr(lParam)); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETUNDERLINE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].underline = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCASE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].caseForce = static_cast(lParam); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCHARACTERSET: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].characterSet = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETVISIBLE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].visible = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCHANGEABLE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].changeable = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETHOTSPOT: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].hotspot = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLEGETFORE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].fore.desired.AsLong(); + else + return 0; + case SCI_STYLEGETBACK: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].back.desired.AsLong(); + else + return 0; + case SCI_STYLEGETBOLD: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].bold ? 1 : 0; + else + return 0; + case SCI_STYLEGETITALIC: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].italic ? 1 : 0; + else + return 0; + case SCI_STYLEGETEOLFILLED: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].eolFilled ? 1 : 0; + else + return 0; + case SCI_STYLEGETSIZE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].size; + else + return 0; + case SCI_STYLEGETFONT: + if (lParam == 0) + return strlen(vs.styles[wParam].fontName); + + if (wParam <= STYLE_MAX) + strcpy(CharPtrFromSPtr(lParam), vs.styles[wParam].fontName); + break; + case SCI_STYLEGETUNDERLINE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].underline ? 1 : 0; + else + return 0; + case SCI_STYLEGETCASE: + if (wParam <= STYLE_MAX) + return static_cast(vs.styles[wParam].caseForce); + else + return 0; + case SCI_STYLEGETCHARACTERSET: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].characterSet; + else + return 0; + case SCI_STYLEGETVISIBLE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].visible ? 1 : 0; + else + return 0; + case SCI_STYLEGETCHANGEABLE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].changeable ? 1 : 0; + else + return 0; + case SCI_STYLEGETHOTSPOT: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].hotspot ? 1 : 0; + else + return 0; + case SCI_STYLERESETDEFAULT: + vs.ResetDefaultStyle(); + InvalidateStyleRedraw(); + break; + case SCI_SETSTYLEBITS: + pdoc->SetStylingBits(wParam); + break; + + case SCI_GETSTYLEBITS: + return pdoc->stylingBits; + + case SCI_SETLINESTATE: + return pdoc->SetLineState(wParam, lParam); + + case SCI_GETLINESTATE: + return pdoc->GetLineState(wParam); + + case SCI_GETMAXLINESTATE: + return pdoc->GetMaxLineState(); + + case SCI_GETCARETLINEVISIBLE: + return vs.showCaretLineBackground; + case SCI_SETCARETLINEVISIBLE: + vs.showCaretLineBackground = wParam != 0; + InvalidateStyleRedraw(); + break; + case SCI_GETCARETLINEBACK: + return vs.caretLineBackground.desired.AsLong(); + case SCI_SETCARETLINEBACK: + vs.caretLineBackground.desired = wParam; + InvalidateStyleRedraw(); + break; + case SCI_GETCARETLINEBACKALPHA: + return vs.caretLineAlpha; + case SCI_SETCARETLINEBACKALPHA: + vs.caretLineAlpha = wParam; + InvalidateStyleRedraw(); + break; + + // Folding messages + + case SCI_VISIBLEFROMDOCLINE: + return cs.DisplayFromDoc(wParam); + + case SCI_DOCLINEFROMVISIBLE: + return cs.DocFromDisplay(wParam); + + case SCI_WRAPCOUNT: + return WrapCount(wParam); + + case SCI_SETFOLDLEVEL: { + int prev = pdoc->SetLevel(wParam, lParam); + if (prev != lParam) + RedrawSelMargin(); + return prev; + } + + case SCI_GETFOLDLEVEL: + return pdoc->GetLevel(wParam); + + case SCI_GETLASTCHILD: + return pdoc->GetLastChild(wParam, lParam); + + case SCI_GETFOLDPARENT: + return pdoc->GetFoldParent(wParam); + + case SCI_SHOWLINES: + cs.SetVisible(wParam, lParam, true); + SetScrollBars(); + Redraw(); + break; + + case SCI_HIDELINES: + cs.SetVisible(wParam, lParam, false); + SetScrollBars(); + Redraw(); + break; + + case SCI_GETLINEVISIBLE: + return cs.GetVisible(wParam); + + case SCI_SETFOLDEXPANDED: + if (cs.SetExpanded(wParam, lParam != 0)) { + RedrawSelMargin(); + } + break; + + case SCI_GETFOLDEXPANDED: + return cs.GetExpanded(wParam); + + case SCI_SETFOLDFLAGS: + foldFlags = wParam; + Redraw(); + break; + + case SCI_TOGGLEFOLD: + ToggleContraction(wParam); + break; + + case SCI_ENSUREVISIBLE: + EnsureLineVisible(wParam, false); + break; + + case SCI_ENSUREVISIBLEENFORCEPOLICY: + EnsureLineVisible(wParam, true); + break; + + case SCI_SEARCHANCHOR: + SearchAnchor(); + break; + + case SCI_SEARCHNEXT: + case SCI_SEARCHPREV: + return SearchText(iMessage, wParam, lParam); + +#ifdef INCLUDE_DEPRECATED_FEATURES + case SCI_SETCARETPOLICY: // Deprecated + caretXPolicy = caretYPolicy = wParam; + caretXSlop = caretYSlop = lParam; + break; +#endif + + case SCI_SETXCARETPOLICY: + caretXPolicy = wParam; + caretXSlop = lParam; + break; + + case SCI_SETYCARETPOLICY: + caretYPolicy = wParam; + caretYSlop = lParam; + break; + + case SCI_SETVISIBLEPOLICY: + visiblePolicy = wParam; + visibleSlop = lParam; + break; + + case SCI_LINESONSCREEN: + return LinesOnScreen(); + + case SCI_SETSELFORE: + vs.selforeset = wParam != 0; + vs.selforeground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETSELBACK: + vs.selbackset = wParam != 0; + vs.selbackground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETSELALPHA: + vs.selAlpha = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETSELALPHA: + return vs.selAlpha; + + case SCI_GETSELEOLFILLED: + return vs.selEOLFilled; + + case SCI_SETSELEOLFILLED: + vs.selEOLFilled = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_SETWHITESPACEFORE: + vs.whitespaceForegroundSet = wParam != 0; + vs.whitespaceForeground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETWHITESPACEBACK: + vs.whitespaceBackgroundSet = wParam != 0; + vs.whitespaceBackground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETCARETFORE: + vs.caretcolour.desired = ColourDesired(wParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETCARETFORE: + return vs.caretcolour.desired.AsLong(); + + case SCI_SETCARETWIDTH: + if (wParam <= 0) + vs.caretWidth = 0; + else if (wParam >= 3) + vs.caretWidth = 3; + else + vs.caretWidth = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETCARETWIDTH: + return vs.caretWidth; + + case SCI_ASSIGNCMDKEY: + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), lParam); + break; + + case SCI_CLEARCMDKEY: + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), SCI_NULL); + break; + + case SCI_CLEARALLCMDKEYS: + kmap.Clear(); + break; + + case SCI_INDICSETSTYLE: + if (wParam <= INDIC_MAX) { + vs.indicators[wParam].style = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETSTYLE: + return (wParam <= INDIC_MAX) ? vs.indicators[wParam].style : 0; + + case SCI_INDICSETFORE: + if (wParam <= INDIC_MAX) { + vs.indicators[wParam].fore.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETFORE: + return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fore.desired.AsLong() : 0; + + case SCI_LINEDOWN: + case SCI_LINEDOWNEXTEND: + case SCI_PARADOWN: + case SCI_PARADOWNEXTEND: + case SCI_LINEUP: + case SCI_LINEUPEXTEND: + case SCI_PARAUP: + case SCI_PARAUPEXTEND: + case SCI_CHARLEFT: + case SCI_CHARLEFTEXTEND: + case SCI_CHARRIGHT: + case SCI_CHARRIGHTEXTEND: + case SCI_WORDLEFT: + case SCI_WORDLEFTEXTEND: + case SCI_WORDRIGHT: + case SCI_WORDRIGHTEXTEND: + case SCI_WORDLEFTEND: + case SCI_WORDLEFTENDEXTEND: + case SCI_WORDRIGHTEND: + case SCI_WORDRIGHTENDEXTEND: + case SCI_HOME: + case SCI_HOMEEXTEND: + case SCI_LINEEND: + case SCI_LINEENDEXTEND: + case SCI_HOMEWRAP: + case SCI_HOMEWRAPEXTEND: + case SCI_LINEENDWRAP: + case SCI_LINEENDWRAPEXTEND: + case SCI_DOCUMENTSTART: + case SCI_DOCUMENTSTARTEXTEND: + case SCI_DOCUMENTEND: + case SCI_DOCUMENTENDEXTEND: + + case SCI_STUTTEREDPAGEUP: + case SCI_STUTTEREDPAGEUPEXTEND: + case SCI_STUTTEREDPAGEDOWN: + case SCI_STUTTEREDPAGEDOWNEXTEND: + + case SCI_PAGEUP: + case SCI_PAGEUPEXTEND: + case SCI_PAGEDOWN: + case SCI_PAGEDOWNEXTEND: + case SCI_EDITTOGGLEOVERTYPE: + case SCI_CANCEL: + case SCI_DELETEBACK: + case SCI_TAB: + case SCI_BACKTAB: + case SCI_NEWLINE: + case SCI_FORMFEED: + case SCI_VCHOME: + case SCI_VCHOMEEXTEND: + case SCI_VCHOMEWRAP: + case SCI_VCHOMEWRAPEXTEND: + case SCI_ZOOMIN: + case SCI_ZOOMOUT: + case SCI_DELWORDLEFT: + case SCI_DELWORDRIGHT: + case SCI_DELLINELEFT: + case SCI_DELLINERIGHT: + case SCI_LINECOPY: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: + case SCI_LINESCROLLDOWN: + case SCI_LINESCROLLUP: + case SCI_WORDPARTLEFT: + case SCI_WORDPARTLEFTEXTEND: + case SCI_WORDPARTRIGHT: + case SCI_WORDPARTRIGHTEXTEND: + case SCI_DELETEBACKNOTLINE: + case SCI_HOMEDISPLAY: + case SCI_HOMEDISPLAYEXTEND: + case SCI_LINEENDDISPLAY: + case SCI_LINEENDDISPLAYEXTEND: + case SCI_LINEDOWNRECTEXTEND: + case SCI_LINEUPRECTEXTEND: + case SCI_CHARLEFTRECTEXTEND: + case SCI_CHARRIGHTRECTEXTEND: + case SCI_HOMERECTEXTEND: + case SCI_VCHOMERECTEXTEND: + case SCI_LINEENDRECTEXTEND: + case SCI_PAGEUPRECTEXTEND: + case SCI_PAGEDOWNRECTEXTEND: + case SCI_SELECTIONDUPLICATE: + return KeyCommand(iMessage); + + case SCI_BRACEHIGHLIGHT: + SetBraceHighlight(static_cast(wParam), lParam, STYLE_BRACELIGHT); + break; + + case SCI_BRACEBADLIGHT: + SetBraceHighlight(static_cast(wParam), -1, STYLE_BRACEBAD); + break; + + case SCI_BRACEMATCH: + // wParam is position of char to find brace for, + // lParam is maximum amount of text to restyle to find it + return pdoc->BraceMatch(wParam, lParam); + + case SCI_GETVIEWEOL: + return vs.viewEOL; + + case SCI_SETVIEWEOL: + vs.viewEOL = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_SETZOOM: + vs.zoomLevel = wParam; + InvalidateStyleRedraw(); + NotifyZoom(); + break; + + case SCI_GETZOOM: + return vs.zoomLevel; + + case SCI_GETEDGECOLUMN: + return theEdge; + + case SCI_SETEDGECOLUMN: + theEdge = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETEDGEMODE: + return vs.edgeState; + + case SCI_SETEDGEMODE: + vs.edgeState = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETEDGECOLOUR: + return vs.edgecolour.desired.AsLong(); + + case SCI_SETEDGECOLOUR: + vs.edgecolour.desired = ColourDesired(wParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETDOCPOINTER: + return reinterpret_cast(pdoc); + + case SCI_SETDOCPOINTER: + CancelModes(); + SetDocPointer(reinterpret_cast(lParam)); + return 0; + + case SCI_CREATEDOCUMENT: { + Document *doc = new Document(); + if (doc) { + doc->AddRef(); + } + return reinterpret_cast(doc); + } + + case SCI_ADDREFDOCUMENT: + (reinterpret_cast(lParam))->AddRef(); + break; + + case SCI_RELEASEDOCUMENT: + (reinterpret_cast(lParam))->Release(); + break; + + case SCI_SETMODEVENTMASK: + modEventMask = wParam; + return 0; + + case SCI_GETMODEVENTMASK: + return modEventMask; + + case SCI_CONVERTEOLS: + pdoc->ConvertLineEnds(wParam); + SetSelection(currentPos, anchor); // Ensure selection inside document + return 0; + + case SCI_SETLENGTHFORENCODE: + lengthForEncode = wParam; + return 0; + + case SCI_SELECTIONISRECTANGLE: + return selType == selRectangle ? 1 : 0; + + case SCI_SETSELECTIONMODE: { + switch (wParam) { + case SC_SEL_STREAM: + moveExtendsSelection = !moveExtendsSelection || (selType != selStream); + selType = selStream; + break; + case SC_SEL_RECTANGLE: + moveExtendsSelection = !moveExtendsSelection || (selType != selRectangle); + selType = selRectangle; + break; + case SC_SEL_LINES: + moveExtendsSelection = !moveExtendsSelection || (selType != selLines); + selType = selLines; + break; + default: + moveExtendsSelection = !moveExtendsSelection || (selType != selStream); + selType = selStream; + } + InvalidateSelection(currentPos, anchor); + } + case SCI_GETSELECTIONMODE: + switch (selType) { + case selStream: + return SC_SEL_STREAM; + case selRectangle: + return SC_SEL_RECTANGLE; + case selLines: + return SC_SEL_LINES; + default: // ?! + return SC_SEL_STREAM; + } + case SCI_GETLINESELSTARTPOSITION: { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(wParam); + return lineIterator.startPos; + } + case SCI_GETLINESELENDPOSITION: { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(wParam); + return lineIterator.endPos; + } + + case SCI_SETOVERTYPE: + inOverstrike = wParam != 0; + break; + + case SCI_GETOVERTYPE: + return inOverstrike ? 1 : 0; + + case SCI_SETFOCUS: + SetFocusState(wParam != 0); + break; + + case SCI_GETFOCUS: + return hasFocus; + + case SCI_SETSTATUS: + errorStatus = wParam; + break; + + case SCI_GETSTATUS: + return errorStatus; + + case SCI_SETMOUSEDOWNCAPTURES: + mouseDownCaptures = wParam != 0; + break; + + case SCI_GETMOUSEDOWNCAPTURES: + return mouseDownCaptures; + + case SCI_SETCURSOR: + cursorMode = wParam; + DisplayCursor(Window::cursorText); + break; + + case SCI_GETCURSOR: + return cursorMode; + + case SCI_SETCONTROLCHARSYMBOL: + controlCharSymbol = wParam; + break; + + case SCI_GETCONTROLCHARSYMBOL: + return controlCharSymbol; + + case SCI_STARTRECORD: + recordingMacro = true; + return 0; + + case SCI_STOPRECORD: + recordingMacro = false; + return 0; + + case SCI_MOVECARETINSIDEVIEW: + MoveCaretInsideView(); + break; + + case SCI_SETFOLDMARGINCOLOUR: + vs.foldmarginColourSet = wParam != 0; + vs.foldmarginColour.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETFOLDMARGINHICOLOUR: + vs.foldmarginHighlightColourSet = wParam != 0; + vs.foldmarginHighlightColour.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETHOTSPOTACTIVEFORE: + vs.hotspotForegroundSet = wParam != 0; + vs.hotspotForeground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTACTIVEFORE: + return vs.hotspotForeground.desired.AsLong(); + + case SCI_SETHOTSPOTACTIVEBACK: + vs.hotspotBackgroundSet = wParam != 0; + vs.hotspotBackground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTACTIVEBACK: + return vs.hotspotBackground.desired.AsLong(); + + case SCI_SETHOTSPOTACTIVEUNDERLINE: + vs.hotspotUnderline = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTACTIVEUNDERLINE: + return vs.hotspotUnderline ? 1 : 0; + + case SCI_SETHOTSPOTSINGLELINE: + vs.hotspotSingleLine = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTSINGLELINE: + return vs.hotspotSingleLine ? 1 : 0; + + case SCI_SETPASTECONVERTENDINGS: + convertPastes = wParam != 0; + break; + + case SCI_GETPASTECONVERTENDINGS: + return convertPastes ? 1 : 0; + + default: + return DefWndProc(iMessage, wParam, lParam); + } + //Platform::DebugPrintf("end wnd proc\n"); + return 0l; +} diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h new file mode 100644 index 00000000..c782b752 --- /dev/null +++ b/scintilla/src/Editor.h @@ -0,0 +1,583 @@ +// Scintilla source code edit control +/** @file Editor.h + ** Defines the main editor class. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EDITOR_H +#define EDITOR_H + +/** + */ +class Caret { +public: + bool active; + bool on; + int period; + + Caret(); +}; + +/** + */ +class Timer { +public: + bool ticking; + int ticksToWait; + enum {tickSize = 100}; + TickerID tickerID; + + Timer(); +}; + +/** + */ +class Idler { +public: + bool state; + IdlerID idlerID; + + Idler(); +}; + +/** + */ +class LineLayout { +private: + friend class LineLayoutCache; + int *lineStarts; + int lenLineStarts; + /// Drawing is only performed for @a maxLineLength characters on each line. + int lineNumber; + bool inCache; +public: + enum { wrapWidthInfinite = 0x7ffffff }; + int maxLineLength; + int numCharsInLine; + enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity; + int xHighlightGuide; + bool highlightColumn; + int selStart; + int selEnd; + bool containsCaret; + int edgeColumn; + char *chars; + unsigned char *styles; + int styleBitsSet; + char *indicators; + int *positions; + char bracePreviousStyles[2]; + + // Hotspot support + int hsStart; + int hsEnd; + + // Wrapped line support + int widthLine; + int lines; + + LineLayout(int maxLineLength_); + virtual ~LineLayout(); + void Resize(int maxLineLength_); + void Free(); + void Invalidate(validLevel validity_); + int LineStart(int line) { + if (line <= 0) { + return 0; + } else if ((line >= lines) || !lineStarts) { + return numCharsInLine; + } else { + return lineStarts[line]; + } + } + void SetLineStart(int line, int start); + void SetBracesHighlight(Range rangeLine, Position braces[], + char bracesMatchStyle, int xHighlight); + void RestoreBracesHighlight(Range rangeLine, Position braces[]); +}; + +/** + */ +class LineLayoutCache { + int level; + int length; + int size; + LineLayout **cache; + bool allInvalidated; + int styleClock; + int useCount; + void Allocate(int length_); + void AllocateForLevel(int linesOnScreen, int linesInDoc); +public: + LineLayoutCache(); + virtual ~LineLayoutCache(); + void Deallocate(); + enum { + llcNone=SC_CACHE_NONE, + llcCaret=SC_CACHE_CARET, + llcPage=SC_CACHE_PAGE, + llcDocument=SC_CACHE_DOCUMENT + }; + void Invalidate(LineLayout::validLevel validity_); + void SetLevel(int level_); + int GetLevel() { return level; } + LineLayout *Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, + int linesOnScreen, int linesInDoc); + void Dispose(LineLayout *ll); +}; + +/** + * Hold a piece of text selected for copying or dragging. + * The text is expected to hold a terminating '\0' and this is counted in len. + */ +class SelectionText { +public: + char *s; + int len; + bool rectangular; + int codePage; + int characterSet; + SelectionText() : s(0), len(0), rectangular(false), codePage(0), characterSet(0) {} + ~SelectionText() { + Free(); + } + void Free() { + Set(0, 0, 0, 0, false); + } + void Set(char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { + delete []s; + s = s_; + if (s) + len = len_; + else + len = 0; + codePage = codePage_; + characterSet = characterSet_; + rectangular = rectangular_; + } + void Copy(const char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { + delete []s; + s = new char[len_]; + if (s) { + len = len_; + for (int i = 0; i < len_; i++) { + s[i] = s_[i]; + } + } else { + len = 0; + } + codePage = codePage_; + characterSet = characterSet_; + rectangular = rectangular_; + } + void Copy(const SelectionText &other) { + Copy(other.s, other.len, other.codePage, other.characterSet, other.rectangular); + } +}; + +/** + */ +class Editor : public DocWatcher { + // Private so Editor objects can not be copied + Editor(const Editor &) : DocWatcher() {} + Editor &operator=(const Editor &) { return *this; } + +protected: // ScintillaBase subclass needs access to much of Editor + + /** On GTK+, Scintilla is a container widget holding two scroll bars + * whereas on Windows there is just one window with both scroll bars turned on. */ + Window wMain; ///< The Scintilla parent window + + /** Style resources may be expensive to allocate so are cached between uses. + * When a style attribute is changed, this cache is flushed. */ + bool stylesValid; + ViewStyle vs; + Palette palette; + + int printMagnification; + int printColourMode; + int printWrapState; + int cursorMode; + int controlCharSymbol; + + bool hasFocus; + bool hideSelection; + bool inOverstrike; + int errorStatus; + bool mouseDownCaptures; + + /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to + * the screen. This avoids flashing but is about 30% slower. */ + bool bufferedDraw; + /** In twoPhaseDraw mode, drawing is performed in two phases, first the background + * and then the foreground. This avoids chopping off characters that overlap the next run. */ + bool twoPhaseDraw; + + int xOffset; ///< Horizontal scrolled amount in pixels + int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret + bool horizontalScrollBarVisible; + int scrollWidth; + bool verticalScrollBarVisible; + bool endAtLastLine; + bool caretSticky; + + Surface *pixmapLine; + Surface *pixmapSelMargin; + Surface *pixmapSelPattern; + Surface *pixmapIndentGuide; + Surface *pixmapIndentGuideHighlight; + + LineLayoutCache llc; + + KeyMap kmap; + + Caret caret; + Timer timer; + Timer autoScrollTimer; + enum { autoScrollDelay = 200 }; + + Idler idler; + + Point lastClick; + unsigned int lastClickTime; + int dwellDelay; + int ticksToDwell; + bool dwelling; + enum { selChar, selWord, selLine } selectionType; + Point ptMouseLast; + bool inDragDrop; + bool dropWentOutside; + int posDrag; + int posDrop; + int lastXChosen; + int lineAnchor; + int originalAnchorPos; + int currentPos; + int anchor; + int targetStart; + int targetEnd; + int searchFlags; + int topLine; + int posTopLine; + int lengthForEncode; + + bool needUpdateUI; + Position braces[2]; + int bracesMatchStyle; + int highlightGuideColumn; + + int theEdge; + + enum { notPainting, painting, paintAbandoned } paintState; + PRectangle rcPaint; + bool paintingAllText; + + int modEventMask; + + SelectionText drag; + enum selTypes { noSel, selStream, selRectangle, selLines }; + selTypes selType; + bool moveExtendsSelection; + int xStartSelect; ///< x position of start of rectangular selection + int xEndSelect; ///< x position of end of rectangular selection + bool primarySelection; + + int caretXPolicy; + int caretXSlop; ///< Ensure this many pixels visible on both sides of caret + + int caretYPolicy; + int caretYSlop; ///< Ensure this many lines visible on both sides of caret + + int visiblePolicy; + int visibleSlop; + + int searchAnchor; + + bool recordingMacro; + + int foldFlags; + ContractionState cs; + + // Hotspot support + int hsStart; + int hsEnd; + + // Wrapping support + enum { eWrapNone, eWrapWord, eWrapChar } wrapState; + enum { wrapLineLarge = 0x7ffffff }; + int wrapWidth; + int wrapStart; + int wrapEnd; + int wrapVisualFlags; + int wrapVisualFlagsLocation; + int wrapVisualStartIndent; + int actualWrapVisualStartIndent; + + bool convertPastes; + + Document *pdoc; + + Editor(); + virtual ~Editor(); + virtual void Initialise() = 0; + virtual void Finalise(); + + void InvalidateStyleData(); + void InvalidateStyleRedraw(); + virtual void RefreshColourPalette(Palette &pal, bool want); + void RefreshStyleData(); + void DropGraphics(); + + virtual PRectangle GetClientRectangle(); + PRectangle GetTextRectangle(); + + int LinesOnScreen(); + int LinesToScroll(); + int MaxScrollPos(); + Point LocationFromPosition(int pos); + int XFromPosition(int pos); + int PositionFromLocation(Point pt); + int PositionFromLocationClose(Point pt); + int PositionFromLineX(int line, int x); + int LineFromLocation(Point pt); + void SetTopLine(int topLineNew); + + bool AbandonPaint(); + void RedrawRect(PRectangle rc); + void Redraw(); + void RedrawSelMargin(int line=-1); + PRectangle RectangleFromRange(int start, int end); + void InvalidateRange(int start, int end); + + int CurrentPosition(); + bool SelectionEmpty(); + int SelectionStart(); + int SelectionEnd(); + void SetRectangularRange(); + void InvalidateSelection(int currentPos_, int anchor_); + void SetSelection(int currentPos_, int anchor_); + void SetSelection(int currentPos_); + void SetEmptySelection(int currentPos_); + bool RangeContainsProtected(int start, int end) const; + bool SelectionContainsProtected(); + int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); + int MovePositionTo(int newPos, selTypes sel=noSel, bool ensureVisible=true); + int MovePositionSoVisible(int pos, int moveDir); + void SetLastXChosen(); + + void ScrollTo(int line, bool moveThumb=true); + virtual void ScrollText(int linesToMove); + void HorizontalScrollTo(int xPos); + void MoveCaretInsideView(bool ensureVisible=true); + int DisplayFromPosition(int pos); + void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true); + void ShowCaretAtCurrentPosition(); + void DropCaret(); + void InvalidateCaret(); + virtual void UpdateSystemCaret(); + + void NeedWrapping(int docLineStart = 0, int docLineEnd = wrapLineLarge); + bool WrapLines(bool fullWrap, int priorityWrapLineStart); + void LinesJoin(); + void LinesSplit(int pixelWidth); + + int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault); + void PaintSelMargin(Surface *surface, PRectangle &rc); + LineLayout *RetrieveLineLayout(int lineNumber); + void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, + int width=LineLayout::wrapWidthInfinite); + ColourAllocated SelectionBackground(ViewStyle &vsDraw); + ColourAllocated TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll); + void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); + void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourAllocated wrapColour); + void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, + int line, int lineEnd, int xStart, int subLine, int subLineStart, + bool overrideBackground, ColourAllocated background, + bool drawWrapMark, ColourAllocated wrapColour); + void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, + PRectangle rcLine, LineLayout *ll, int subLine=0); + void RefreshPixMaps(Surface *surfaceWindow); + void Paint(Surface *surfaceWindow, PRectangle rcArea); + long FormatRange(bool draw, RangeToFormat *pfr); + int TextWidth(int style, const char *text); + + virtual void SetVerticalScrollPos() = 0; + virtual void SetHorizontalScrollPos() = 0; + virtual bool ModifyScrollBars(int nMax, int nPage) = 0; + virtual void ReconfigureScrollBars(); + void SetScrollBars(); + void ChangeSize(); + + void AddChar(char ch); + virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); + void ClearSelection(); + void ClearAll(); + void ClearDocumentStyle(); + void Cut(); + void PasteRectangular(int pos, const char *ptr, int len); + virtual void Copy() = 0; + virtual bool CanPaste(); + virtual void Paste() = 0; + void Clear(); + void SelectAll(); + void Undo(); + void Redo(); + void DelChar(); + void DelCharBack(bool allowLineStartDeletion); + virtual void ClaimSelection() = 0; + + virtual void NotifyChange() = 0; + virtual void NotifyFocus(bool focus); + virtual int GetCtrlID() { return ctrlID; } + virtual void NotifyParent(SCNotification scn) = 0; + virtual void NotifyStyleToNeeded(int endStyleNeeded); + void NotifyChar(int ch); + void NotifyMove(int position); + void NotifySavePoint(bool isSavePoint); + void NotifyModifyAttempt(); + virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt); + void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt); + void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt); + void NotifyUpdateUI(); + void NotifyPainted(); + bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt); + void NotifyNeedShown(int pos, int len); + void NotifyDwelling(Point pt, bool state); + void NotifyZoom(); + + void NotifyModifyAttempt(Document *document, void *userData); + void NotifySavePoint(Document *document, void *userData, bool atSavePoint); + void CheckModificationForWrap(DocModification mh); + void NotifyModified(Document *document, DocModification mh, void *userData); + void NotifyDeleted(Document *document, void *userData); + void NotifyStyleNeeded(Document *doc, void *userData, int endPos); + void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam); + + void PageMove(int direction, selTypes sel=noSel, bool stuttered = false); + void ChangeCaseOfSelection(bool makeUpperCase); + void LineTranspose(); + void Duplicate(bool forLine); + virtual void CancelModes(); + void NewLine(); + void CursorUpOrDown(int direction, selTypes sel=noSel); + void ParaUpOrDown(int direction, selTypes sel=noSel); + int StartEndDisplayLine(int pos, bool start); + virtual int KeyCommand(unsigned int iMessage); + virtual int KeyDefault(int /* key */, int /*modifiers*/); + int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0); + + int GetWhitespaceVisible(); + void SetWhitespaceVisible(int view); + + void Indent(bool forwards); + + long FindText(uptr_t wParam, sptr_t lParam); + void SearchAnchor(); + long SearchText(unsigned int iMessage, uptr_t wParam, sptr_t lParam); + long SearchInTarget(const char *text, int length); + void GoToLine(int lineNo); + + virtual void CopyToClipboard(const SelectionText &selectedText) = 0; + char *CopyRange(int start, int end); + void CopySelectionFromRange(SelectionText *ss, int start, int end); + void CopySelectionRange(SelectionText *ss); + void CopyRangeToClipboard(int start, int end); + void CopyText(int length, const char *text); + void SetDragPosition(int newPos); + virtual void DisplayCursor(Window::Cursor c); + virtual void StartDrag(); + void DropAt(int position, const char *value, bool moving, bool rectangular); + /** PositionInSelection returns 0 if position in selection, -1 if position before selection, and 1 if after. + * Before means either before any line of selection or before selection on its line, with a similar meaning to after. */ + int PositionInSelection(int pos); + bool PointInSelection(Point pt); + bool PointInSelMargin(Point pt); + void LineSelection(int lineCurrent_, int lineAnchor_); + void DwellEnd(bool mouseMoved); + virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); + void ButtonMove(Point pt); + void ButtonUp(Point pt, unsigned int curTime, bool ctrl); + + void Tick(); + bool Idle(); + virtual void SetTicking(bool on) = 0; + virtual bool SetIdle(bool) { return false; } + virtual void SetMouseCapture(bool on) = 0; + virtual bool HaveMouseCapture() = 0; + void SetFocusState(bool focusState); + + virtual bool PaintContains(PRectangle rc); + bool PaintContainsMargin(); + void CheckForChangeOutsidePaint(Range r); + void SetBraceHighlight(Position pos0, Position pos1, int matchStyle); + + void SetDocPointer(Document *document); + + void Expand(int &line, bool doExpand); + void ToggleContraction(int line); + void EnsureLineVisible(int lineDoc, bool enforcePolicy); + int ReplaceTarget(bool replacePatterns, const char *text, int length=-1); + + bool PositionIsHotspot(int position); + bool PointIsHotspot(Point pt); + void SetHotSpotRange(Point *pt); + void GetHotSpotRange(int& hsStart, int& hsEnd); + + int CodePage() const; + virtual bool ValidCodePage(int /* codePage */) const { return true; } + int WrapCount(int line); + void AddStyledText(char *buffer, int appendLength); + + virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; + +public: + // Public so the COM thunks can access it. + bool IsUnicodeMode() const; + // Public so scintilla_send_message can use it. + virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); + // Public so scintilla_set_id can use it. + int ctrlID; + friend class AutoSurface; + friend class SelectionLineIterator; +}; + +/** + * A smart pointer class to ensure Surfaces are set up and deleted correctly. + */ +class AutoSurface { +private: + Surface *surf; +public: + AutoSurface(Editor *ed) : surf(0) { + if (ed->wMain.GetID()) { + surf = Surface::Allocate(); + if (surf) { + surf->Init(ed->wMain.GetID()); + surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); + surf->SetDBCSMode(ed->CodePage()); + } + } + } + AutoSurface(SurfaceID sid, Editor *ed) : surf(0) { + if (ed->wMain.GetID()) { + surf = Surface::Allocate(); + if (surf) { + surf->Init(sid, ed->wMain.GetID()); + surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); + surf->SetDBCSMode(ed->CodePage()); + } + } + } + ~AutoSurface() { + delete surf; + } + Surface *operator->() const { + return surf; + } + operator Surface *() const { + return surf; + } +}; + +#endif diff --git a/scintilla/src/ExternalLexer.cxx b/scintilla/src/ExternalLexer.cxx new file mode 100644 index 00000000..7abfbdd9 --- /dev/null +++ b/scintilla/src/ExternalLexer.cxx @@ -0,0 +1,259 @@ +// Scintilla source code edit control +/** @file ExternalLexer.cxx + ** Support external lexers in DLLs. + **/ +// Copyright 2001 Simon Steele , portions copyright Neil Hodgson. +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" + +#include "SciLexer.h" +#include "PropSet.h" +#include "Accessor.h" +#include "DocumentAccessor.h" +#include "KeyWords.h" +#include "ExternalLexer.h" + +LexerManager *LexerManager::theInstance = NULL; + +//------------------------------------------ +// +// ExternalLexerModule +// +//------------------------------------------ + +char **WordListsToStrings(WordList *val[]) { + int dim = 0; + while (val[dim]) + dim++; + char **wls = new char * [dim + 1]; + for (int i = 0;i < dim;i++) { + SString words; + words = ""; + for (int n = 0; n < val[i]->len; n++) { + words += val[i]->words[n]; + if (n != val[i]->len - 1) + words += " "; + } + wls[i] = new char[words.length() + 1]; + strcpy(wls[i], words.c_str()); + } + wls[dim] = 0; + return wls; +} + +void DeleteWLStrings(char *strs[]) { + int dim = 0; + while (strs[dim]) { + delete strs[dim]; + dim++; + } + delete [] strs; +} + +void ExternalLexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (!fneLexer) + return ; + + char **kwds = WordListsToStrings(keywordlists); + char *ps = styler.GetProperties(); + + // The accessor passed in is always a DocumentAccessor so this cast and the subsequent + // access will work. Can not use the stricter dynamic_cast as that requires RTTI. + DocumentAccessor &da = static_cast(styler); + WindowID wID = da.GetWindow(); + + fneLexer(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); + + delete ps; + DeleteWLStrings(kwds); +} + +void ExternalLexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (!fneFolder) + return ; + + char **kwds = WordListsToStrings(keywordlists); + char *ps = styler.GetProperties(); + + // The accessor passed in is always a DocumentAccessor so this cast and the subsequent + // access will work. Can not use the stricter dynamic_cast as that requires RTTI. + DocumentAccessor &da = static_cast(styler); + WindowID wID = da.GetWindow(); + + fneFolder(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); + + delete ps; + DeleteWLStrings(kwds); +} + +void ExternalLexerModule::SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index) { + fneLexer = fLexer; + fneFolder = fFolder; + externalLanguage = index; +} + +//------------------------------------------ +// +// LexerLibrary +// +//------------------------------------------ + +LexerLibrary::LexerLibrary(const char* ModuleName) { + // Initialise some members... + first = NULL; + last = NULL; + + // Load the DLL + lib = DynamicLibrary::Load(ModuleName); + if (lib->IsValid()) { + m_sModuleName = ModuleName; + //Cannot use reinterpret_cast because: ANSI C++ forbids casting between pointers to functions and objects + GetLexerCountFn GetLexerCount = (GetLexerCountFn)(sptr_t)lib->FindFunction("GetLexerCount"); + + if (GetLexerCount) { + ExternalLexerModule *lex; + LexerMinder *lm; + + // Find functions in the DLL + GetLexerNameFn GetLexerName = (GetLexerNameFn)(sptr_t)lib->FindFunction("GetLexerName"); + ExtLexerFunction Lexer = (ExtLexerFunction)(sptr_t)lib->FindFunction("Lex"); + ExtFoldFunction Folder = (ExtFoldFunction)(sptr_t)lib->FindFunction("Fold"); + + // Assign a buffer for the lexer name. + char lexname[100]; + strcpy(lexname, ""); + + int nl = GetLexerCount(); + + for (int i = 0; i < nl; i++) { + GetLexerName(i, lexname, 100); + lex = new ExternalLexerModule(SCLEX_AUTOMATIC, NULL, lexname, NULL); + + // Create a LexerMinder so we don't leak the ExternalLexerModule... + lm = new LexerMinder; + lm->self = lex; + lm->next = NULL; + if (first != NULL) { + last->next = lm; + last = lm; + } else { + first = lm; + last = lm; + } + + // The external lexer needs to know how to call into its DLL to + // do its lexing and folding, we tell it here. Folder may be null. + lex->SetExternal(Lexer, Folder, i); + } + } + } + next = NULL; +} + +LexerLibrary::~LexerLibrary() { + Release(); + delete lib; +} + +void LexerLibrary::Release() { + //TODO maintain a list of lexers created, and delete them! + LexerMinder *lm; + LexerMinder *next; + lm = first; + while (NULL != lm) { + next = lm->next; + delete lm->self; + delete lm; + lm = next; + } + + first = NULL; + last = NULL; +} + +//------------------------------------------ +// +// LexerManager +// +//------------------------------------------ + +/// Return the single LexerManager instance... +LexerManager *LexerManager::GetInstance() { + if(!theInstance) + theInstance = new LexerManager; + return theInstance; +} + +/// Delete any LexerManager instance... +void LexerManager::DeleteInstance() +{ + if(theInstance) { + delete theInstance; + theInstance = NULL; + } +} + +/// protected constructor - this is a singleton... +LexerManager::LexerManager() { + first = NULL; + last = NULL; +} + +LexerManager::~LexerManager() { + Clear(); +} + +void LexerManager::Load(const char* path) +{ + LoadLexerLibrary(path); +} + +void LexerManager::LoadLexerLibrary(const char* module) +{ + LexerLibrary *lib = new LexerLibrary(module); + if (NULL != first) { + last->next = lib; + last = lib; + } else { + first = lib; + last = lib; + } +} + +void LexerManager::Clear() +{ + if (NULL != first) { + LexerLibrary *cur = first; + LexerLibrary *next; + while (cur) { + next = cur->next; + delete cur; + cur = next; + } + first = NULL; + last = NULL; + } +} + +//------------------------------------------ +// +// LexerManager +// +//------------------------------------------ + +LMMinder::~LMMinder() +{ + LexerManager::DeleteInstance(); +} + +LMMinder minder; diff --git a/scintilla/src/ExternalLexer.h b/scintilla/src/ExternalLexer.h new file mode 100644 index 00000000..3888c1a2 --- /dev/null +++ b/scintilla/src/ExternalLexer.h @@ -0,0 +1,95 @@ +// Scintilla source code edit control +/** @file ExternalLexer.h + ** Support external lexers in DLLs. + **/ +// Copyright 2001 Simon Steele , portions copyright Neil Hodgson. +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EXTERNALLEXER_H +#define EXTERNALLEXER_H + +#if PLAT_WIN +#define EXT_LEXER_DECL __stdcall +#else +#define EXT_LEXER_DECL +#endif + +// External Lexer function definitions... +typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, + char *words[], WindowID window, char *props); +typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, + char *words[], WindowID window, char *props); +typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index); +typedef int (EXT_LEXER_DECL *GetLexerCountFn)(); +typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); + +//class DynamicLibrary; + +/// Sub-class of LexerModule to use an external lexer. +class ExternalLexerModule : protected LexerModule { +protected: + ExtLexerFunction fneLexer; + ExtFoldFunction fneFolder; + int externalLanguage; + char name[100]; +public: + ExternalLexerModule(int language_, LexerFunction fnLexer_, + const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){ + strncpy(name, languageName_, sizeof(name)); + languageName = name; + }; + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index); +}; + +/// LexerMinder points to an ExternalLexerModule - so we don't leak them. +class LexerMinder { +public: + ExternalLexerModule *self; + LexerMinder *next; +}; + +/// LexerLibrary exists for every External Lexer DLL, contains LexerMinders. +class LexerLibrary { + DynamicLibrary *lib; + LexerMinder *first; + LexerMinder *last; + +public: + LexerLibrary(const char* ModuleName); + ~LexerLibrary(); + void Release(); + + LexerLibrary *next; + SString m_sModuleName; +}; + +/// LexerManager manages external lexers, contains LexerLibrarys. +class LexerManager { +public: + ~LexerManager(); + + static LexerManager *GetInstance(); + static void DeleteInstance(); + + void Load(const char* path); + void Clear(); + +private: + LexerManager(); + static LexerManager *theInstance; + + void LoadLexerLibrary(const char* module); + LexerLibrary *first; + LexerLibrary *last; +}; + +class LMMinder { +public: + ~LMMinder(); +}; + +#endif diff --git a/scintilla/src/Indicator.cxx b/scintilla/src/Indicator.cxx new file mode 100644 index 00000000..1c41036c --- /dev/null +++ b/scintilla/src/Indicator.cxx @@ -0,0 +1,77 @@ +// Scintilla source code edit control +/** @file Indicator.cxx + ** Defines the style of indicators which are text decorations such as underlining. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include "Platform.h" + +#include "Scintilla.h" +#include "Indicator.h" + +void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine) { + surface->PenColour(fore.allocated); + int ymid = (rc.bottom + rc.top) / 2; + if (style == INDIC_SQUIGGLE) { + surface->MoveTo(rc.left, rc.top); + int x = rc.left + 2; + int y = 2; + while (x < rc.right) { + surface->LineTo(x, rc.top + y); + x += 2; + y = 2 - y; + } + surface->LineTo(rc.right, rc.top + y); // Finish the line + } else if (style == INDIC_TT) { + surface->MoveTo(rc.left, ymid); + int x = rc.left + 5; + while (x < rc.right) { + surface->LineTo(x, ymid); + surface->MoveTo(x-3, ymid); + surface->LineTo(x-3, ymid+2); + x++; + surface->MoveTo(x, ymid); + x += 5; + } + surface->LineTo(rc.right, ymid); // Finish the line + if (x - 3 <= rc.right) { + surface->MoveTo(x-3, ymid); + surface->LineTo(x-3, ymid+2); + } + } else if (style == INDIC_DIAGONAL) { + int x = rc.left; + while (x < rc.right) { + surface->MoveTo(x, rc.top+2); + int endX = x+3; + int endY = rc.top - 1; + if (endX > rc.right) { + endY += endX - rc.right; + endX = rc.right; + } + surface->LineTo(endX, endY); + x += 4; + } + } else if (style == INDIC_STRIKE) { + surface->MoveTo(rc.left, rc.top - 4); + surface->LineTo(rc.right, rc.top - 4); + } else if (style == INDIC_HIDDEN) { + // Draw nothing + } else if (style == INDIC_BOX) { + surface->MoveTo(rc.left, ymid+1); + surface->LineTo(rc.right, ymid+1); + surface->LineTo(rc.right, rcLine.top+1); + surface->LineTo(rc.left, rcLine.top+1); + surface->LineTo(rc.left, ymid+1); + } else if (style == INDIC_ROUNDBOX) { + PRectangle rcBox = rcLine; + rcBox.top = rcLine.top + 1; + rcBox.left = rc.left; + rcBox.right = rc.right; + surface->AlphaRectangle(rcBox, 1, fore.allocated, 30, fore.allocated, 50, 0); + } else { // Either INDIC_PLAIN or unknown + surface->MoveTo(rc.left, ymid); + surface->LineTo(rc.right, ymid); + } +} + diff --git a/scintilla/src/Indicator.h b/scintilla/src/Indicator.h new file mode 100644 index 00000000..646728ce --- /dev/null +++ b/scintilla/src/Indicator.h @@ -0,0 +1,22 @@ +// Scintilla source code edit control +/** @file Indicator.h + ** Defines the style of indicators which are text decorations such as underlining. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef INDICATOR_H +#define INDICATOR_H + +/** + */ +class Indicator { +public: + int style; + ColourPair fore; + Indicator() : style(INDIC_PLAIN), fore(ColourDesired(0,0,0)) { + } + void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine); +}; + +#endif diff --git a/scintilla/src/KeyMap.cxx b/scintilla/src/KeyMap.cxx new file mode 100644 index 00000000..faf8a21f --- /dev/null +++ b/scintilla/src/KeyMap.cxx @@ -0,0 +1,148 @@ +// Scintilla source code edit control +/** @file KeyMap.cxx + ** Defines a mapping between keystrokes and commands. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include "Platform.h" + +#include "Scintilla.h" + +#include "KeyMap.h" + +KeyMap::KeyMap() : kmap(0), len(0), alloc(0) { + for (int i = 0; MapDefault[i].key; i++) { + AssignCmdKey(MapDefault[i].key, + MapDefault[i].modifiers, + MapDefault[i].msg); + } +} + +KeyMap::~KeyMap() { + Clear(); +} + +void KeyMap::Clear() { + delete []kmap; + kmap = 0; + len = 0; + alloc = 0; +} + +void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) { + if ((len+1) >= alloc) { + KeyToCommand *ktcNew = new KeyToCommand[alloc + 5]; + if (!ktcNew) + return; + for (int k = 0; k < len; k++) + ktcNew[k] = kmap[k]; + alloc += 5; + delete []kmap; + kmap = ktcNew; + } + for (int keyIndex = 0; keyIndex < len; keyIndex++) { + if ((key == kmap[keyIndex].key) && (modifiers == kmap[keyIndex].modifiers)) { + kmap[keyIndex].msg = msg; + return; + } + } + kmap[len].key = key; + kmap[len].modifiers = modifiers; + kmap[len].msg = msg; + len++; +} + +unsigned int KeyMap::Find(int key, int modifiers) { + for (int i = 0; i < len; i++) { + if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) { + return kmap[i].msg; + } + } + return 0; +} + +const KeyToCommand KeyMap::MapDefault[] = { + {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, + {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, + {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN}, + {SCK_DOWN, SCI_ASHIFT, SCI_LINEDOWNRECTEXTEND}, + {SCK_UP, SCI_NORM, SCI_LINEUP}, + {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, + {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP}, + {SCK_UP, SCI_ASHIFT, SCI_LINEUPRECTEXTEND}, + {'[', SCI_CTRL, SCI_PARAUP}, + {'[', SCI_CSHIFT, SCI_PARAUPEXTEND}, + {']', SCI_CTRL, SCI_PARADOWN}, + {']', SCI_CSHIFT, SCI_PARADOWNEXTEND}, + {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, + {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, + {SCK_LEFT, SCI_CTRL, SCI_WORDLEFT}, + {SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND}, + {SCK_LEFT, SCI_ASHIFT, SCI_CHARLEFTRECTEXTEND}, + {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT}, + {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND}, + {SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT}, + {SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND}, + {SCK_RIGHT, SCI_ASHIFT, SCI_CHARRIGHTRECTEXTEND}, + {'/', SCI_CTRL, SCI_WORDPARTLEFT}, + {'/', SCI_CSHIFT, SCI_WORDPARTLEFTEXTEND}, + {'\\', SCI_CTRL, SCI_WORDPARTRIGHT}, + {'\\', SCI_CSHIFT, SCI_WORDPARTRIGHTEXTEND}, + {SCK_HOME, SCI_NORM, SCI_VCHOME}, + {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND}, + {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART}, + {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, + {SCK_HOME, SCI_ALT, SCI_HOMEDISPLAY}, +// {SCK_HOME, SCI_ASHIFT, SCI_HOMEDISPLAYEXTEND}, + {SCK_HOME, SCI_ASHIFT, SCI_VCHOMERECTEXTEND}, + {SCK_END, SCI_NORM, SCI_LINEEND}, + {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND}, + {SCK_END, SCI_CTRL, SCI_DOCUMENTEND}, + {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, + {SCK_END, SCI_ALT, SCI_LINEENDDISPLAY}, +// {SCK_END, SCI_ASHIFT, SCI_LINEENDDISPLAYEXTEND}, + {SCK_END, SCI_ASHIFT, SCI_LINEENDRECTEXTEND}, + {SCK_PRIOR, SCI_NORM, SCI_PAGEUP}, + {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND}, + {SCK_PRIOR, SCI_ASHIFT, SCI_PAGEUPRECTEXTEND}, + {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN}, + {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND}, + {SCK_NEXT, SCI_ASHIFT, SCI_PAGEDOWNRECTEXTEND}, + {SCK_DELETE, SCI_NORM, SCI_CLEAR}, + {SCK_DELETE, SCI_SHIFT, SCI_CUT}, + {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT}, + {SCK_DELETE, SCI_CSHIFT, SCI_DELLINERIGHT}, + {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE}, + {SCK_INSERT, SCI_SHIFT, SCI_PASTE}, + {SCK_INSERT, SCI_CTRL, SCI_COPY}, + {SCK_ESCAPE, SCI_NORM, SCI_CANCEL}, + {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, + {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, + {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, + {SCK_BACK, SCI_ALT, SCI_UNDO}, + {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT}, + {'Z', SCI_CTRL, SCI_UNDO}, + {'Y', SCI_CTRL, SCI_REDO}, + {'X', SCI_CTRL, SCI_CUT}, + {'C', SCI_CTRL, SCI_COPY}, + {'V', SCI_CTRL, SCI_PASTE}, + {'A', SCI_CTRL, SCI_SELECTALL}, + {SCK_TAB, SCI_NORM, SCI_TAB}, + {SCK_TAB, SCI_SHIFT, SCI_BACKTAB}, + {SCK_RETURN, SCI_NORM, SCI_NEWLINE}, + {SCK_RETURN, SCI_SHIFT, SCI_NEWLINE}, + {SCK_ADD, SCI_CTRL, SCI_ZOOMIN}, + {SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT}, + {SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM}, + //'L', SCI_CTRL, SCI_FORMFEED, + {'L', SCI_CTRL, SCI_LINECUT}, + {'L', SCI_CSHIFT, SCI_LINEDELETE}, + {'T', SCI_CSHIFT, SCI_LINECOPY}, + {'T', SCI_CTRL, SCI_LINETRANSPOSE}, + {'D', SCI_CTRL, SCI_SELECTIONDUPLICATE}, + {'U', SCI_CTRL, SCI_LOWERCASE}, + {'U', SCI_CSHIFT, SCI_UPPERCASE}, + {0,0,0}, +}; + diff --git a/scintilla/src/KeyMap.h b/scintilla/src/KeyMap.h new file mode 100644 index 00000000..985d2cd5 --- /dev/null +++ b/scintilla/src/KeyMap.h @@ -0,0 +1,43 @@ +// Scintilla source code edit control +/** @file KeyMap.h + ** Defines a mapping between keystrokes and commands. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef KEYTOCOMMAND_H +#define KEYTOCOMMAND_H + +#define SCI_NORM 0 +#define SCI_SHIFT SCMOD_SHIFT +#define SCI_CTRL SCMOD_CTRL +#define SCI_ALT SCMOD_ALT +#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) +#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) + +/** + */ +class KeyToCommand { +public: + int key; + int modifiers; + unsigned int msg; +}; + +/** + */ +class KeyMap { + KeyToCommand *kmap; + int len; + int alloc; + static const KeyToCommand MapDefault[]; + +public: + KeyMap(); + ~KeyMap(); + void Clear(); + void AssignCmdKey(int key, int modifiers, unsigned int msg); + unsigned int Find(int key, int modifiers); // 0 returned on failure +}; + +#endif diff --git a/scintilla/src/KeyWords.cxx b/scintilla/src/KeyWords.cxx new file mode 100644 index 00000000..b17a1c3f --- /dev/null +++ b/scintilla/src/KeyWords.cxx @@ -0,0 +1,223 @@ +// Scintilla source code edit control +/** @file KeyWords.cxx + ** Colourise for particular languages. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +const LexerModule *LexerModule::base = 0; +int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1; + +LexerModule::LexerModule(int language_, + LexerFunction fnLexer_, + const char *languageName_, + LexerFunction fnFolder_, + const char * const wordListDescriptions_[], + int styleBits_) : + language(language_), + fnLexer(fnLexer_), + fnFolder(fnFolder_), + wordListDescriptions(wordListDescriptions_), + styleBits(styleBits_), + languageName(languageName_) { + next = base; + base = this; + if (language == SCLEX_AUTOMATIC) { + language = nextLanguage; + nextLanguage++; + } +} + +int LexerModule::GetNumWordLists() const { + if (wordListDescriptions == NULL) { + return -1; + } else { + int numWordLists = 0; + + while (wordListDescriptions[numWordLists]) { + ++numWordLists; + } + + return numWordLists; + } +} + +const char *LexerModule::GetWordListDescription(int index) const { + static const char *emptyStr = ""; + + PLATFORM_ASSERT(index < GetNumWordLists()); + if (index >= GetNumWordLists()) { + return emptyStr; + } else { + return wordListDescriptions[index]; + } +} + +int LexerModule::GetStyleBitsNeeded() const { + return styleBits; +} + +const LexerModule *LexerModule::Find(int language) { + const LexerModule *lm = base; + while (lm) { + if (lm->language == language) { + return lm; + } + lm = lm->next; + } + return 0; +} + +const LexerModule *LexerModule::Find(const char *languageName) { + if (languageName) { + const LexerModule *lm = base; + while (lm) { + if (lm->languageName && 0 == strcmp(lm->languageName, languageName)) { + return lm; + } + lm = lm->next; + } + } + return 0; +} + +void LexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (fnLexer) + fnLexer(startPos, lengthDoc, initStyle, keywordlists, styler); +} + +void LexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (fnFolder) { + int lineCurrent = styler.GetLine(startPos); + // Move back one line in case deletion wrecked current line fold state + if (lineCurrent > 0) { + lineCurrent--; + int newStartPos = styler.LineStart(lineCurrent); + lengthDoc += startPos - newStartPos; + startPos = newStartPos; + initStyle = 0; + if (startPos > 0) { + initStyle = styler.StyleAt(startPos - 1); + } + } + fnFolder(startPos, lengthDoc, initStyle, keywordlists, styler); + } +} + +// Alternative historical name for Scintilla_LinkLexers +int wxForceScintillaLexers(void) { + return Scintilla_LinkLexers(); +} + +// To add or remove a lexer, add or remove its file and run LexGen.py. + +// Force a reference to all of the Scintilla lexers so that the linker will +// not remove the code of the lexers. +int Scintilla_LinkLexers() { + static int forcer = 0; + +// Shorten the code that declares a lexer and ensures it is linked in by calling a method. +#define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage(); + +//++Autogenerated -- run src/LexGen.py to regenerate +//**\(\tLINK_LEXER(\*);\n\) + LINK_LEXER(lmAda); + LINK_LEXER(lmAns1); + LINK_LEXER(lmAPDL); + LINK_LEXER(lmAsm); + LINK_LEXER(lmASP); + LINK_LEXER(lmAU3); + LINK_LEXER(lmAVE); + LINK_LEXER(lmBaan); + LINK_LEXER(lmBash); + LINK_LEXER(lmBatch); + LINK_LEXER(lmBlitzBasic); + LINK_LEXER(lmBullant); + LINK_LEXER(lmCaml); + LINK_LEXER(lmClw); + LINK_LEXER(lmClwNoCase); + LINK_LEXER(lmCmake); + LINK_LEXER(lmConf); + LINK_LEXER(lmCPP); + LINK_LEXER(lmCPPNoCase); + LINK_LEXER(lmCsound); + LINK_LEXER(lmCss); + LINK_LEXER(lmD); + LINK_LEXER(lmDiff); + LINK_LEXER(lmEiffel); + LINK_LEXER(lmEiffelkw); + LINK_LEXER(lmErlang); + LINK_LEXER(lmErrorList); + LINK_LEXER(lmESCRIPT); + LINK_LEXER(lmF77); + LINK_LEXER(lmFlagShip); + LINK_LEXER(lmForth); + LINK_LEXER(lmFortran); + LINK_LEXER(lmFreeBasic); + LINK_LEXER(lmGui4Cli); + LINK_LEXER(lmHaskell); + LINK_LEXER(lmHTML); + LINK_LEXER(lmInno); + LINK_LEXER(lmKix); + LINK_LEXER(lmLatex); + LINK_LEXER(lmLISP); + LINK_LEXER(lmLot); + LINK_LEXER(lmLout); + LINK_LEXER(lmLua); + LINK_LEXER(lmMake); + LINK_LEXER(lmMatlab); + LINK_LEXER(lmMETAPOST); + LINK_LEXER(lmMMIXAL); + LINK_LEXER(lmMSSQL); + LINK_LEXER(lmNncrontab); + LINK_LEXER(lmNsis); + LINK_LEXER(lmNull); + LINK_LEXER(lmOctave); + LINK_LEXER(lmOpal); + LINK_LEXER(lmPascal); + LINK_LEXER(lmPB); + LINK_LEXER(lmPerl); + LINK_LEXER(lmPHP); + LINK_LEXER(lmPHPSCRIPT); + LINK_LEXER(lmPOV); + LINK_LEXER(lmProps); + LINK_LEXER(lmPS); + LINK_LEXER(lmPureBasic); + LINK_LEXER(lmPython); + LINK_LEXER(lmREBOL); + LINK_LEXER(lmRuby); + LINK_LEXER(lmScriptol); + LINK_LEXER(lmSmalltalk); + LINK_LEXER(lmSpecman); + LINK_LEXER(lmSpice); + LINK_LEXER(lmSQL); + LINK_LEXER(lmTADS3); + LINK_LEXER(lmTCL); + LINK_LEXER(lmTeX); + LINK_LEXER(lmVB); + LINK_LEXER(lmVBScript); + LINK_LEXER(lmVerilog); + LINK_LEXER(lmVHDL); + LINK_LEXER(lmXML); + LINK_LEXER(lmYAML); + +//--Autogenerated -- end of automatically generated section + + return 1; +} diff --git a/scintilla/src/LexAPDL.cxx b/scintilla/src/LexAPDL.cxx new file mode 100644 index 00000000..d1347c2e --- /dev/null +++ b/scintilla/src/LexAPDL.cxx @@ -0,0 +1,136 @@ +// Scintilla source code edit control +/** @file LexAPDL.cxx + ** Lexer for APDL. Based on the lexer for Assembler by The Black Horus. + ** By Hadar Raz. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80 && (isalnum(ch) || ch == '_')); +} + +static inline bool IsAnOperator(char ch) { + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '$' || ch == ':' || ch == '%') + return true; + return false; +} + +static void ColouriseAPDLDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + int stringStart = ' '; + + WordList &processors = *keywordlists[0]; + WordList &commands = *keywordlists[1]; + WordList &slashcommands = *keywordlists[2]; + WordList &starcommands = *keywordlists[3]; + WordList &arguments = *keywordlists[4]; + WordList &functions = *keywordlists[5]; + + // Do not leak onto next line + initStyle = SCE_APDL_DEFAULT; + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + // Determine if the current state should terminate. + if (sc.state == SCE_APDL_NUMBER) { + if (!(IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') || + ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) { + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_COMMENTBLOCK) { + if (sc.atLineEnd) { + if (sc.ch == '\r') { + sc.Forward(); + } + sc.ForwardSetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_STRING) { + if (sc.atLineEnd) { + sc.SetState(SCE_APDL_DEFAULT); + } else if ((sc.ch == '\'' && stringStart == '\'') || (sc.ch == '\"' && stringStart == '\"')) { + sc.ForwardSetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_WORD) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (processors.InList(s)) { + sc.ChangeState(SCE_APDL_PROCESSOR); + } else if (slashcommands.InList(s)) { + sc.ChangeState(SCE_APDL_SLASHCOMMAND); + } else if (starcommands.InList(s)) { + sc.ChangeState(SCE_APDL_STARCOMMAND); + } else if (commands.InList(s)) { + sc.ChangeState(SCE_APDL_COMMAND); + } else if (arguments.InList(s)) { + sc.ChangeState(SCE_APDL_ARGUMENT); + } else if (functions.InList(s)) { + sc.ChangeState(SCE_APDL_FUNCTION); + } + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_OPERATOR) { + if (!IsAnOperator(static_cast(sc.ch))) { + sc.SetState(SCE_APDL_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_APDL_DEFAULT) { + if (sc.ch == '!' && sc.chNext == '!') { + sc.SetState(SCE_APDL_COMMENTBLOCK); + } else if (sc.ch == '!') { + sc.SetState(SCE_APDL_COMMENT); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_APDL_NUMBER); + } else if (sc.ch == '\'' || sc.ch == '\"') { + sc.SetState(SCE_APDL_STRING); + stringStart = sc.ch; + } else if (IsAWordChar(sc.ch) || ((sc.ch == '*' || sc.ch == '/') && !isgraph(sc.chPrev))) { + sc.SetState(SCE_APDL_WORD); + } else if (IsAnOperator(static_cast(sc.ch))) { + sc.SetState(SCE_APDL_OPERATOR); + } + } + } + sc.Complete(); +} + +static const char * const apdlWordListDesc[] = { + "processors", + "commands", + "slashommands", + "starcommands", + "arguments", + "functions", + 0 +}; + +LexerModule lmAPDL(SCLEX_APDL, ColouriseAPDLDoc, "apdl", 0, apdlWordListDesc); diff --git a/scintilla/src/LexAU3.cxx b/scintilla/src/LexAU3.cxx new file mode 100644 index 00000000..f0ac7a28 --- /dev/null +++ b/scintilla/src/LexAU3.cxx @@ -0,0 +1,894 @@ +// Scintilla source code edit control +// @file LexAU3.cxx +// Lexer for AutoIt3 http://www.hiddensoft.com/autoit3 +// by Jos van der Zande, jvdzande@yahoo.com +// +// Changes: +// March 28, 2004 - Added the standard Folding code +// April 21, 2004 - Added Preprosessor Table + Syntax Highlighting +// Fixed Number highlighting +// Changed default isoperator to IsAOperator to have a better match to AutoIt3 +// Fixed "#comments_start" -> "#comments-start" +// Fixed "#comments_end" -> "#comments-end" +// Fixed Sendkeys in Strings when not terminated with } +// Added support for Sendkey strings that have second parameter e.g. {UP 5} or {a down} +// April 26, 2004 - Fixed # pre-processor statement inside of comment block would invalidly change the color. +// Added logic for #include to treat the <> as string +// Added underscore to IsAOperator. +// May 17, 2004 - Changed the folding logic from indent to keyword folding. +// Added Folding logic for blocks of single-commentlines or commentblock. +// triggered by: fold.comment=1 +// Added Folding logic for preprocessor blocks triggered by fold.preprocessor=1 +// Added Special for #region - #endregion syntax highlight and folding. +// May 30, 2004 - Fixed issue with continuation lines on If statements. +// June 5, 2004 - Added comma to Operators for better readability. +// Added fold.compact support set with fold.compact=1 +// Changed folding inside of #cs-#ce. Default is no keyword folding inside comment blocks when fold.comment=1 +// it will now only happen when fold.comment=2. +// Sep 5, 2004 - Added logic to handle colourizing words on the last line. +// Typed Characters now show as "default" till they match any table. +// Oct 10, 2004 - Added logic to show Comments in "Special" directives. +// Nov 1, 2004 - Added better testing for Numbers supporting x and e notation. +// Nov 28, 2004 - Added logic to handle continuation lines for syntax highlighting. +// Jan 10, 2005 - Added Abbreviations Keyword used for expansion +// Mar 24, 2005 - Updated Abbreviations Keywords to fix when followed by Operator. +// Apr 18, 2005 - Updated #CE/#Comment-End logic to take a linecomment ";" into account +// - Added folding support for With...EndWith +// - Added support for a DOT in variable names +// - Fixed Underscore in CommentBlock +// May 23, 2005 - Fixed the SentKey lexing in case of a missing } +// Aug 11, 2005 - Fixed possible bug with s_save length > 100. +// Aug 23, 2005 - Added Switch/endswitch support to the folding logic. +// Sep 27, 2005 - Fixed the SentKey lexing logic in case of multiple sentkeys. +// Mar 12, 2006 - Fixed issue with <> coloring as String in stead of Operator in rare occasions. +// Apr 8, 2006 - Added support for AutoIt3 Standard UDF library (SCE_AU3_UDF) +// Mar 9, 2007 - Fixed bug with + following a String getting the wrong Color. +// +// Copyright for Scintilla: 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. +// Scintilla source code edit control + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static inline bool IsTypeCharacter(const int ch) +{ + return ch == '$'; +} +static inline bool IsAWordChar(const int ch) +{ + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) +{ + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '@' || ch == '#' || ch == '$' || ch == '.'); +} + +static inline bool IsAOperator(char ch) { + if (isascii(ch) && isalnum(ch)) + return false; + if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || + ch == '&' || ch == '^' || ch == '=' || ch == '<' || ch == '>' || + ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == ',' ) + return true; + return false; +} + +/////////////////////////////////////////////////////////////////////////////// +// GetSendKey() filters the portion before and after a/multiple space(s) +// and return the first portion to be looked-up in the table +// also check if the second portion is valid... (up,down.on.off,toggle or a number) +/////////////////////////////////////////////////////////////////////////////// + +static int GetSendKey(const char *szLine, char *szKey) +{ + int nFlag = 0; + int nStartFound = 0; + int nKeyPos = 0; + int nSpecPos= 0; + int nSpecNum= 1; + int nPos = 0; + char cTemp; + char szSpecial[100]; + + // split the portion of the sendkey in the part before and after the spaces + while ( ( (cTemp = szLine[nPos]) != '\0')) + { + // skip leading Ctrl/Shift/Alt state + if (cTemp == '{') { + nStartFound = 1; + } + // + if (nStartFound == 1) { + if ((cTemp == ' ') && (nFlag == 0) ) // get the stuff till first space + { + nFlag = 1; + // Add } to the end of the first bit for table lookup later. + szKey[nKeyPos++] = '}'; + } + else if (cTemp == ' ') + { + // skip other spaces + } + else if (nFlag == 0) + { + // save first portion into var till space or } is hit + szKey[nKeyPos++] = cTemp; + } + else if ((nFlag == 1) && (cTemp != '}')) + { + // Save second portion into var... + szSpecial[nSpecPos++] = cTemp; + // check if Second portion is all numbers for repeat fuction + if (isdigit(cTemp) == false) {nSpecNum = 0;} + } + } + nPos++; // skip to next char + + } // End While + + + // Check if the second portion is either a number or one of these keywords + szKey[nKeyPos] = '\0'; + szSpecial[nSpecPos] = '\0'; + if (strcmp(szSpecial,"down")== 0 || strcmp(szSpecial,"up")== 0 || + strcmp(szSpecial,"on")== 0 || strcmp(szSpecial,"off")== 0 || + strcmp(szSpecial,"toggle")== 0 || nSpecNum == 1 ) + { + nFlag = 0; + } + else + { + nFlag = 1; + } + return nFlag; // 1 is bad, 0 is good + +} // GetSendKey() + +// +// Routine to check the last "none comment" character on a line to see if its a continuation +// +static bool IsContinuationLine(unsigned int szLine, Accessor &styler) +{ + int nsPos = styler.LineStart(szLine); + int nePos = styler.LineStart(szLine+1) - 2; + //int stylech = styler.StyleAt(nsPos); + while (nsPos < nePos) + { + //stylech = styler.StyleAt(nePos); + int stylech = styler.StyleAt(nsPos); + if (!(stylech == SCE_AU3_COMMENT)) { + char ch = styler.SafeGetCharAt(nePos); + if (!isspacechar(ch)) { + if (ch == '_') + return true; + else + return false; + } + } + nePos--; // skip to next char + } // End While + return false; +} // IsContinuationLine() + +// +// syntax highlighting logic +static void ColouriseAU3Doc(unsigned int startPos, + int length, int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; + WordList &keywords7 = *keywordlists[6]; + WordList &keywords8 = *keywordlists[7]; + // find the first previous line without continuation character at the end + int lineCurrent = styler.GetLine(startPos); + int s_startPos = startPos; + // When not inside a Block comment: find First line without _ + if (!(initStyle==SCE_AU3_COMMENTBLOCK)) { + while ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) || + (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); // get start position + initStyle = 0; // reset the start style to 0 + } + } + // Set the new length to include it from the start and set the start position + length = length + s_startPos - startPos; // correct the total length to process + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + char si; // string indicator "=1 '=2 + char ni; // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 Enot=3 + char ci; // comment indicator 0=not linecomment(;) + char s_save[100]; + si=0; + ni=0; + ci=0; + //$$$ + for (; sc.More(); sc.Forward()) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + // ********************************************** + // save the total current word for eof processing + if (IsAWordChar(sc.ch) || sc.ch == '}') + { + strcpy(s_save,s); + int tp = strlen(s_save); + if (tp < 99) { + s_save[tp] = static_cast(tolower(sc.ch)); + s_save[tp+1] = '\0'; + } + } + // ********************************************** + // + switch (sc.state) + { + case SCE_AU3_COMMENTBLOCK: + { + //Reset at line end + if (sc.atLineEnd) { + ci=0; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + //skip rest of line when a ; is encountered + if (sc.chPrev == ';') { + ci=2; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + // skip rest of the line + if (ci==2) + break; + // check when first character is detected on the line + if (ci==0) { + if (IsAWordStart(static_cast(sc.ch)) || IsAOperator(static_cast(sc.ch))) { + ci=1; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + break; + } + if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && strcmp(s, "#comments") == 0))) { + if ((strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0)) + sc.SetState(SCE_AU3_COMMENT); // set to comment line for the rest of the line + else + ci=2; // line doesn't begin with #CE so skip the rest of the line + } + break; + } + case SCE_AU3_COMMENT: + { + if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_OPERATOR: + { + // check if its a COMobject + if (sc.chPrev == '.' && IsAWordChar(sc.ch)) { + sc.SetState(SCE_AU3_COMOBJ); + } + else { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_SPECIAL: + { + if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);} + if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_KEYWORD: + { + if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && (strcmp(s, "#comments") == 0 || strcmp(s, "#include") == 0)))) + { + if (!IsTypeCharacter(sc.ch)) + { + if (strcmp(s, "#cs")== 0 || strcmp(s, "#comments-start")== 0 ) + { + sc.ChangeState(SCE_AU3_COMMENTBLOCK); + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + else if (keywords.InList(s)) { + sc.ChangeState(SCE_AU3_KEYWORD); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords2.InList(s)) { + sc.ChangeState(SCE_AU3_FUNCTION); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords3.InList(s)) { + sc.ChangeState(SCE_AU3_MACRO); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords5.InList(s)) { + sc.ChangeState(SCE_AU3_PREPROCESSOR); + sc.SetState(SCE_AU3_DEFAULT); + if (strcmp(s, "#include")== 0) + { + si = 3; // use to determine string start for #inlude <> + } + } + else if (keywords6.InList(s)) { + sc.ChangeState(SCE_AU3_SPECIAL); + sc.SetState(SCE_AU3_SPECIAL); + } + else if ((keywords7.InList(s)) && (!IsAOperator(static_cast(sc.ch)))) { + sc.ChangeState(SCE_AU3_EXPAND); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords8.InList(s)) { + sc.ChangeState(SCE_AU3_UDF); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (strcmp(s, "_") == 0) { + sc.ChangeState(SCE_AU3_OPERATOR); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (!IsAWordChar(sc.ch)) { + sc.ChangeState(SCE_AU3_DEFAULT); + sc.SetState(SCE_AU3_DEFAULT); + } + } + } + if (sc.atLineEnd) { + sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_NUMBER: + { + // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 E-not=3 + // + // test for Hex notation + if (strcmp(s, "0") == 0 && (sc.ch == 'x' || sc.ch == 'X') && ni == 0) + { + ni = 2; + break; + } + // test for E notation + if (IsADigit(sc.chPrev) && (sc.ch == 'e' || sc.ch == 'E') && ni <= 1) + { + ni = 3; + break; + } + // Allow Hex characters inside hex numeric strings + if ((ni == 2) && + (sc.ch == 'a' || sc.ch == 'b' || sc.ch == 'c' || sc.ch == 'd' || sc.ch == 'e' || sc.ch == 'f' || + sc.ch == 'A' || sc.ch == 'B' || sc.ch == 'C' || sc.ch == 'D' || sc.ch == 'E' || sc.ch == 'F' )) + { + break; + } + // test for 1 dec point only + if (sc.ch == '.') + { + if (ni==0) + { + ni=1; + } + else + { + ni=9; + } + break; + } + // end of numeric string ? + if (!(IsADigit(sc.ch))) + { + if (ni==9) + { + sc.ChangeState(SCE_AU3_DEFAULT); + } + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_VARIABLE: + { + // Check if its a COMObject + if (sc.ch == '.' && !IsADigit(sc.chNext)) { + sc.SetState(SCE_AU3_OPERATOR); + } + else if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_COMOBJ: + { + if (!(IsAWordChar(sc.ch))) { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_STRING: + { + // check for " to end a double qouted string or + // check for ' to end a single qouted string + if ((si == 1 && sc.ch == '\"') || (si == 2 && sc.ch == '\'') || (si == 3 && sc.ch == '>')) + { + sc.ForwardSetState(SCE_AU3_DEFAULT); + si=0; + break; + } + if (sc.atLineEnd) + { + si=0; + // at line end and not found a continuation char then reset to default + int lineCurrent = styler.GetLine(sc.currentPos); + if (!IsContinuationLine(lineCurrent,styler)) + { + sc.SetState(SCE_AU3_DEFAULT); + break; + } + } + // find Sendkeys in a STRING + if (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ) { + sc.SetState(SCE_AU3_SENT);} + break; + } + + case SCE_AU3_SENT: + { + // Send key string ended + if (sc.chPrev == '}' && sc.ch != '}') + { + // set color to SENDKEY when valid sendkey .. else set back to regular string + char sk[100]; + // split {111 222} and return {111} and check if 222 is valid. + // if return code = 1 then invalid 222 so must be string + if (GetSendKey(s,sk)) + { + sc.ChangeState(SCE_AU3_STRING); + } + // if single char between {?} then its ok as sendkey for a single character + else if (strlen(sk) == 3) + { + sc.ChangeState(SCE_AU3_SENT); + } + // if sendkey {111} is in table then ok as sendkey + else if (keywords4.InList(sk)) + { + sc.ChangeState(SCE_AU3_SENT); + } + else + { + sc.ChangeState(SCE_AU3_STRING); + } + sc.SetState(SCE_AU3_STRING); + } + else + { + // check if the start is a valid SendKey start + int nPos = 0; + int nState = 1; + char cTemp; + while (!(nState == 2) && ((cTemp = s[nPos]) != '\0')) + { + if (cTemp == '{' && nState == 1) + { + nState = 2; + } + if (nState == 1 && !(cTemp == '+' || cTemp == '!' || cTemp == '^' || cTemp == '#' )) + { + nState = 0; + } + nPos++; + } + //Verify characters infront of { ... if not assume regular string + if (nState == 1 && (!(sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ))) { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_STRING); + } + // If invalid character found then assume its a regular string + if (nState == 0) { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_STRING); + } + } + // check if next portion is again a sendkey + if (sc.atLineEnd) + { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_DEFAULT); + si = 0; // reset string indicator + } + //* check in next characters following a sentkey are again a sent key + // Need this test incase of 2 sentkeys like {F1}{ENTER} but not detect {{} + if (sc.state == SCE_AU3_STRING && (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' )) { + sc.SetState(SCE_AU3_SENT);} + // check to see if the string ended... + // Sendkey string isn't complete but the string ended.... + if ((si == 1 && sc.ch == '\"') || (si == 2 && sc.ch == '\'')) + { + sc.ChangeState(SCE_AU3_STRING); + sc.ForwardSetState(SCE_AU3_DEFAULT); + } + break; + } + } //switch (sc.state) + + // Determine if a new state should be entered: + + if (sc.state == SCE_AU3_DEFAULT) + { + if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);} + else if (sc.ch == '#') {sc.SetState(SCE_AU3_KEYWORD);} + else if (sc.ch == '$') {sc.SetState(SCE_AU3_VARIABLE);} + else if (sc.ch == '.' && !IsADigit(sc.chNext)) {sc.SetState(SCE_AU3_OPERATOR);} + else if (sc.ch == '@') {sc.SetState(SCE_AU3_KEYWORD);} + //else if (sc.ch == '_') {sc.SetState(SCE_AU3_KEYWORD);} + else if (sc.ch == '<' && si==3) {sc.SetState(SCE_AU3_STRING);} // string after #include + else if (sc.ch == '\"') { + sc.SetState(SCE_AU3_STRING); + si = 1; } + else if (sc.ch == '\'') { + sc.SetState(SCE_AU3_STRING); + si = 2; } + else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) + { + sc.SetState(SCE_AU3_NUMBER); + ni = 0; + } + else if (IsAWordStart(sc.ch)) {sc.SetState(SCE_AU3_KEYWORD);} + else if (IsAOperator(static_cast(sc.ch))) {sc.SetState(SCE_AU3_OPERATOR);} + else if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + } + } //for (; sc.More(); sc.Forward()) + + //************************************* + // Colourize the last word correctly + //************************************* + if (sc.state == SCE_AU3_KEYWORD) + { + if (strcmp(s_save, "#cs")== 0 || strcmp(s_save, "#comments-start")== 0 ) + { + sc.ChangeState(SCE_AU3_COMMENTBLOCK); + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + else if (keywords.InList(s_save)) { + sc.ChangeState(SCE_AU3_KEYWORD); + sc.SetState(SCE_AU3_KEYWORD); + } + else if (keywords2.InList(s_save)) { + sc.ChangeState(SCE_AU3_FUNCTION); + sc.SetState(SCE_AU3_FUNCTION); + } + else if (keywords3.InList(s_save)) { + sc.ChangeState(SCE_AU3_MACRO); + sc.SetState(SCE_AU3_MACRO); + } + else if (keywords5.InList(s_save)) { + sc.ChangeState(SCE_AU3_PREPROCESSOR); + sc.SetState(SCE_AU3_PREPROCESSOR); + } + else if (keywords6.InList(s_save)) { + sc.ChangeState(SCE_AU3_SPECIAL); + sc.SetState(SCE_AU3_SPECIAL); + } + else if (keywords7.InList(s_save) && sc.atLineEnd) { + sc.ChangeState(SCE_AU3_EXPAND); + sc.SetState(SCE_AU3_EXPAND); + } + else if (keywords8.InList(s_save)) { + sc.ChangeState(SCE_AU3_UDF); + sc.SetState(SCE_AU3_UDF); + } + else { + sc.ChangeState(SCE_AU3_DEFAULT); + sc.SetState(SCE_AU3_DEFAULT); + } + } + if (sc.state == SCE_AU3_SENT) + { + // Send key string ended + if (sc.chPrev == '}' && sc.ch != '}') + { + // set color to SENDKEY when valid sendkey .. else set back to regular string + char sk[100]; + // split {111 222} and return {111} and check if 222 is valid. + // if return code = 1 then invalid 222 so must be string + if (GetSendKey(s_save,sk)) + { + sc.ChangeState(SCE_AU3_STRING); + } + // if single char between {?} then its ok as sendkey for a single character + else if (strlen(sk) == 3) + { + sc.ChangeState(SCE_AU3_SENT); + } + // if sendkey {111} is in table then ok as sendkey + else if (keywords4.InList(sk)) + { + sc.ChangeState(SCE_AU3_SENT); + } + else + { + sc.ChangeState(SCE_AU3_STRING); + } + sc.SetState(SCE_AU3_STRING); + } + // check if next portion is again a sendkey + if (sc.atLineEnd) + { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_DEFAULT); + } + } + //************************************* + sc.Complete(); +} + +// +static bool IsStreamCommentStyle(int style) { + return style == SCE_AU3_COMMENT || style == SCE_AU3_COMMENTBLOCK; +} + +// +// Routine to find first none space on the current line and return its Style +// needed for comment lines not starting on pos 1 +static int GetStyleFirstWord(unsigned int szLine, Accessor &styler) +{ + int nsPos = styler.LineStart(szLine); + int nePos = styler.LineStart(szLine+1) - 1; + while (isspacechar(styler.SafeGetCharAt(nsPos)) && nsPos < nePos) + { + nsPos++; // skip to next char + + } // End While + return styler.StyleAt(nsPos); + +} // GetStyleFirstWord() + + +// +static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) +{ + int endPos = startPos + length; + // get settings from the config files for folding comments and preprocessor lines + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldInComment = styler.GetPropertyInt("fold.comment") == 2; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldpreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; + // Backtrack to previous line in case need to fix its fold status + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + // vars for style of previous/current/next lines + int style = GetStyleFirstWord(lineCurrent,styler); + int stylePrev = 0; + // find the first previous line without continuation character at the end + while ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) || + (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + if (lineCurrent > 0) { + stylePrev = GetStyleFirstWord(lineCurrent-1,styler); + } + // vars for getting first word to check for keywords + bool FirstWordStart = false; + bool FirstWordEnd = false; + char szKeyword[10]=""; + int szKeywordlen = 0; + char szThen[5]=""; + int szThenlen = 0; + bool ThenFoundLast = false; + // var for indentlevel + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + // + int visibleChars = 0; + char chNext = styler.SafeGetCharAt(startPos); + char chPrev = ' '; + // + for (int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + if (IsAWordChar(ch)) { + visibleChars++; + } + // get the syle for the current character neede to check in comment + int stylech = styler.StyleAt(i); + // get first word for the line for indent check max 9 characters + if (FirstWordStart && (!(FirstWordEnd))) { + if (!IsAWordChar(ch)) { + FirstWordEnd = true; + szKeyword[szKeywordlen] = '\0'; + } + else { + if (szKeywordlen < 10) { + szKeyword[szKeywordlen++] = static_cast(tolower(ch)); + } + } + } + // start the capture of the first word + if (!(FirstWordStart)) { + if (IsAWordChar(ch) || IsAWordStart(ch) || ch == ';') { + FirstWordStart = true; + szKeyword[szKeywordlen++] = static_cast(tolower(ch)); + } + } + // only process this logic when not in comment section + if (!(stylech == SCE_AU3_COMMENT)) { + if (ThenFoundLast) { + if (IsAWordChar(ch)) { + ThenFoundLast = false; + } + } + // find out if the word "then" is the last on a "if" line + if (FirstWordEnd && strcmp(szKeyword,"if") == 0) { + if (szThenlen == 4) { + szThen[0] = szThen[1]; + szThen[1] = szThen[2]; + szThen[2] = szThen[3]; + szThen[3] = static_cast(tolower(ch)); + if (strcmp(szThen,"then") == 0 ) { + ThenFoundLast = true; + } + } + else { + szThen[szThenlen++] = static_cast(tolower(ch)); + if (szThenlen == 5) { + szThen[4] = '\0'; + } + } + } + } + // End of Line found so process the information + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) { + // ************************** + // Folding logic for Keywords + // ************************** + // if a keyword is found on the current line and the line doesn't end with _ (continuation) + // and we are not inside a commentblock. + if (szKeywordlen > 0 && (!(chPrev == '_')) && + ((!(IsStreamCommentStyle(style)) || foldInComment)) ) { + szKeyword[szKeywordlen] = '\0'; + // only fold "if" last keyword is "then" (else its a one line if) + if (strcmp(szKeyword,"if") == 0 && ThenFoundLast) { + levelNext++; + } + // create new fold for these words + if (strcmp(szKeyword,"do") == 0 || strcmp(szKeyword,"for") == 0 || + strcmp(szKeyword,"func") == 0 || strcmp(szKeyword,"while") == 0|| + strcmp(szKeyword,"with") == 0 || strcmp(szKeyword,"#region") == 0 ) { + levelNext++; + } + // create double Fold for select&switch because Case will subtract one of the current level + if (strcmp(szKeyword,"select") == 0 || strcmp(szKeyword,"switch") == 0) { + levelNext++; + levelNext++; + } + // end the fold for these words before the current line + if (strcmp(szKeyword,"endfunc") == 0 || strcmp(szKeyword,"endif") == 0 || + strcmp(szKeyword,"next") == 0 || strcmp(szKeyword,"until") == 0 || + strcmp(szKeyword,"endwith") == 0 ||strcmp(szKeyword,"wend") == 0){ + levelNext--; + levelCurrent--; + } + // end the fold for these words before the current line and Start new fold + if (strcmp(szKeyword,"case") == 0 || strcmp(szKeyword,"else") == 0 || + strcmp(szKeyword,"elseif") == 0 ) { + levelCurrent--; + } + // end the double fold for this word before the current line + if (strcmp(szKeyword,"endselect") == 0 || strcmp(szKeyword,"endswitch") == 0 ) { + levelNext--; + levelNext--; + levelCurrent--; + levelCurrent--; + } + // end the fold for these words on the current line + if (strcmp(szKeyword,"#endregion") == 0 ) { + levelNext--; + } + } + // Preprocessor and Comment folding + int styleNext = GetStyleFirstWord(lineCurrent + 1,styler); + // ************************************* + // Folding logic for preprocessor blocks + // ************************************* + // process preprosessor line + if (foldpreprocessor && style == SCE_AU3_PREPROCESSOR) { + if (!(stylePrev == SCE_AU3_PREPROCESSOR) && (styleNext == SCE_AU3_PREPROCESSOR)) { + levelNext++; + } + // fold till the last line for normal comment lines + else if (stylePrev == SCE_AU3_PREPROCESSOR && !(styleNext == SCE_AU3_PREPROCESSOR)) { + levelNext--; + } + } + // ********************************* + // Folding logic for Comment blocks + // ********************************* + if (foldComment && IsStreamCommentStyle(style)) { + // Start of a comment block + if (!(stylePrev==style) && IsStreamCommentStyle(styleNext) && styleNext==style) { + levelNext++; + } + // fold till the last line for normal comment lines + else if (IsStreamCommentStyle(stylePrev) + && !(styleNext == SCE_AU3_COMMENT) + && stylePrev == SCE_AU3_COMMENT + && style == SCE_AU3_COMMENT) { + levelNext--; + } + // fold till the one but last line for Blockcomment lines + else if (IsStreamCommentStyle(stylePrev) + && !(styleNext == SCE_AU3_COMMENTBLOCK) + && style == SCE_AU3_COMMENTBLOCK) { + levelNext--; + levelCurrent--; + } + } + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + // reset values for the next line + lineCurrent++; + stylePrev = style; + style = styleNext; + levelCurrent = levelNext; + visibleChars = 0; + // if the last character is an Underscore then don't reset since the line continues on the next line. + if (!(chPrev == '_')) { + szKeywordlen = 0; + szThenlen = 0; + FirstWordStart = false; + FirstWordEnd = false; + ThenFoundLast = false; + } + } + // save the last processed character + if (!isspacechar(ch)) { + chPrev = ch; + visibleChars++; + } + } +} + + +// + +static const char * const AU3WordLists[] = { + "#autoit keywords", + "#autoit functions", + "#autoit macros", + "#autoit Sent keys", + "#autoit Pre-processors", + "#autoit Special", + "#autoit Expand", + "#autoit UDF", + 0 +}; +LexerModule lmAU3(SCLEX_AU3, ColouriseAU3Doc, "au3", FoldAU3Doc , AU3WordLists); diff --git a/scintilla/src/LexAVE.cxx b/scintilla/src/LexAVE.cxx new file mode 100644 index 00000000..aa57f169 --- /dev/null +++ b/scintilla/src/LexAVE.cxx @@ -0,0 +1,225 @@ +// SciTE - Scintilla based Text Editor +/** @file LexAVE.cxx + ** Lexer for Avenue. + ** + ** Written by Alexey Yutkin . + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} +static inline bool IsEnumChar(const int ch) { + return (ch < 0x80) && (isalnum(ch)|| ch == '_'); +} +static inline bool IsANumberChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' ); +} + +inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +inline bool isAveOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || + ch == '.' ) + return true; + return false; +} + +static void ColouriseAveDoc( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; + + // Do not leak onto next line + if (initStyle == SCE_AVE_STRINGEOL) { + initStyle = SCE_AVE_DEFAULT; + } + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + int currentLine = styler.GetLine(sc.currentPos); + styler.SetLineState(currentLine, 0); + } + if (sc.atLineStart && (sc.state == SCE_AVE_STRING)) { + // Prevent SCE_AVE_STRINGEOL from leaking back to previous line + sc.SetState(SCE_AVE_STRING); + } + + + // Determine if the current state should terminate. + if (sc.state == SCE_AVE_OPERATOR) { + sc.SetState(SCE_AVE_DEFAULT); + } else if (sc.state == SCE_AVE_NUMBER) { + if (!IsANumberChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_ENUM) { + if (!IsEnumChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + //sc.GetCurrent(s, sizeof(s)); + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_AVE_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_AVE_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_AVE_WORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_AVE_WORD4); + } else if (keywords5.InList(s)) { + sc.ChangeState(SCE_AVE_WORD5); + } else if (keywords6.InList(s)) { + sc.ChangeState(SCE_AVE_WORD6); + } + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_AVE_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_AVE_STRINGEOL); + sc.ForwardSetState(SCE_AVE_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_AVE_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_AVE_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_AVE_IDENTIFIER); + } else if (sc.Match('\"')) { + sc.SetState(SCE_AVE_STRING); + } else if (sc.Match('\'')) { + sc.SetState(SCE_AVE_COMMENT); + sc.Forward(); + } else if (isAveOperator(static_cast(sc.ch))) { + sc.SetState(SCE_AVE_OPERATOR); + } else if (sc.Match('#')) { + sc.SetState(SCE_AVE_ENUM); + sc.Forward(); + } + } + } + sc.Complete(); +} + +static void FoldAveDoc(unsigned int startPos, int length, int /* initStyle */, WordList *[], + Accessor &styler) { + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = static_cast(tolower(styler[startPos])); + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + int styleNext = styler.StyleAt(startPos); + char s[10]; + + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = static_cast(tolower(chNext)); + chNext = static_cast(tolower(styler.SafeGetCharAt(i + 1))); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (style == SCE_AVE_WORD) { + if (ch == 't' || ch == 'f' || ch == 'w' || ch == 'e') { + for (unsigned int j = 0; j < 6; j++) { + if (!iswordchar(styler[i + j])) { + break; + } + s[j] = static_cast(tolower(styler[i + j])); + s[j + 1] = '\0'; + } + + if ((strcmp(s, "then") == 0) || (strcmp(s, "for") == 0) || (strcmp(s, "while") == 0)) { + levelCurrent++; + } + if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0)) { + // Normally "elseif" and "then" will be on the same line and will cancel + // each other out. // As implemented, this does not support fold.at.else. + levelCurrent--; + } + } + } else if (style == SCE_AVE_OPERATOR) { + if (ch == '{' || ch == '(') { + levelCurrent++; + } else if (ch == '}' || ch == ')') { + levelCurrent--; + } + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) { + lev |= SC_FOLDLEVELWHITEFLAG; + } + if ((levelCurrent > levelPrev) && (visibleChars > 0)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) { + visibleChars++; + } + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +LexerModule lmAVE(SCLEX_AVE, ColouriseAveDoc, "ave", FoldAveDoc); + diff --git a/scintilla/src/LexAda.cxx b/scintilla/src/LexAda.cxx new file mode 100644 index 00000000..ac284ba7 --- /dev/null +++ b/scintilla/src/LexAda.cxx @@ -0,0 +1,520 @@ +// Scintilla source code edit control +/** @file LexAda.cxx + ** Lexer for Ada 95 + **/ +// Copyright 2002 by Sergey Koshcheyev +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Accessor.h" +#include "StyleContext.h" +#include "PropSet.h" +#include "KeyWords.h" +#include "SciLexer.h" +#include "SString.h" + +/* + * Interface + */ + +static void ColouriseDocument( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static const char * const adaWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmAda(SCLEX_ADA, ColouriseDocument, "ada", NULL, adaWordListDesc); + +/* + * Implementation + */ + +// Functions that have apostropheStartsAttribute as a parameter set it according to whether +// an apostrophe encountered after processing the current token will start an attribute or +// a character literal. +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseComment(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL); +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWhiteSpace(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); + +static inline bool IsDelimiterCharacter(int ch); +static inline bool IsNumberStartCharacter(int ch); +static inline bool IsNumberCharacter(int ch); +static inline bool IsSeparatorOrDelimiterCharacter(int ch); +static bool IsValidIdentifier(const SString& identifier); +static bool IsValidNumber(const SString& number); +static inline bool IsWordStartCharacter(int ch); +static inline bool IsWordCharacter(int ch); + +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_CHARACTER); + + // Skip the apostrophe and one more character (so that '' is shown as non-terminated and ''' + // is handled correctly) + sc.Forward(); + sc.Forward(); + + ColouriseContext(sc, '\'', SCE_ADA_CHARACTEREOL); +} + +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL) { + while (!sc.atLineEnd && !sc.Match(chEnd)) { + sc.Forward(); + } + + if (!sc.atLineEnd) { + sc.ForwardSetState(SCE_ADA_DEFAULT); + } else { + sc.ChangeState(stateEOL); + } +} + +static void ColouriseComment(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity + + sc.SetState(SCE_ADA_COMMENTLINE); + + while (!sc.atLineEnd) { + sc.Forward(); + } +} + +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = sc.Match (')'); + sc.SetState(SCE_ADA_DELIMITER); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = false; + + sc.SetState(SCE_ADA_LABEL); + + // Skip "<<" + sc.Forward(); + sc.Forward(); + + SString identifier; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + identifier += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + // Skip ">>" + if (sc.Match('>', '>')) { + sc.Forward(); + sc.Forward(); + } else { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + // If the name is an invalid identifier or a keyword, then make it invalid label + if (!IsValidIdentifier(identifier) || keywords.InList(identifier.c_str())) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); + +} + +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + SString number; + sc.SetState(SCE_ADA_NUMBER); + + // Get all characters up to a delimiter or a separator, including points, but excluding + // double points (ranges). + while (!IsSeparatorOrDelimiterCharacter(sc.ch) || (sc.ch == '.' && sc.chNext != '.')) { + number += static_cast(sc.ch); + sc.Forward(); + } + + // Special case: exponent with sign + if ((sc.chPrev == 'e' || sc.chPrev == 'E') && + (sc.ch == '+' || sc.ch == '-')) { + number += static_cast(sc.ch); + sc.Forward (); + + while (!IsSeparatorOrDelimiterCharacter(sc.ch)) { + number += static_cast(sc.ch); + sc.Forward(); + } + } + + if (!IsValidNumber(number)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_STRING); + sc.Forward(); + + ColouriseContext(sc, '"', SCE_ADA_STRINGEOL); +} + +static void ColouriseWhiteSpace(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity + sc.SetState(SCE_ADA_DEFAULT); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + sc.SetState(SCE_ADA_IDENTIFIER); + + SString word; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + word += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + if (!IsValidIdentifier(word)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + + } else if (keywords.InList(word.c_str())) { + sc.ChangeState(SCE_ADA_WORD); + + if (word != "all") { + apostropheStartsAttribute = false; + } + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +// +// ColouriseDocument +// + +static void ColouriseDocument( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + WordList &keywords = *keywordlists[0]; + + StyleContext sc(startPos, length, initStyle, styler); + + int lineCurrent = styler.GetLine(startPos); + bool apostropheStartsAttribute = (styler.GetLineState(lineCurrent) & 1) != 0; + + while (sc.More()) { + if (sc.atLineEnd) { + // Go to the next line + sc.Forward(); + lineCurrent++; + + // Remember the line state for future incremental lexing + styler.SetLineState(lineCurrent, apostropheStartsAttribute); + + // Don't continue any styles on the next line + sc.SetState(SCE_ADA_DEFAULT); + } + + // Comments + if (sc.Match('-', '-')) { + ColouriseComment(sc, apostropheStartsAttribute); + + // Strings + } else if (sc.Match('"')) { + ColouriseString(sc, apostropheStartsAttribute); + + // Characters + } else if (sc.Match('\'') && !apostropheStartsAttribute) { + ColouriseCharacter(sc, apostropheStartsAttribute); + + // Labels + } else if (sc.Match('<', '<')) { + ColouriseLabel(sc, keywords, apostropheStartsAttribute); + + // Whitespace + } else if (IsASpace(sc.ch)) { + ColouriseWhiteSpace(sc, apostropheStartsAttribute); + + // Delimiters + } else if (IsDelimiterCharacter(sc.ch)) { + ColouriseDelimiter(sc, apostropheStartsAttribute); + + // Numbers + } else if (IsADigit(sc.ch) || sc.ch == '#') { + ColouriseNumber(sc, apostropheStartsAttribute); + + // Keywords or identifiers + } else { + ColouriseWord(sc, keywords, apostropheStartsAttribute); + } + } + + sc.Complete(); +} + +static inline bool IsDelimiterCharacter(int ch) { + switch (ch) { + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': + case '/': + case ':': + case ';': + case '<': + case '=': + case '>': + case '|': + return true; + default: + return false; + } +} + +static inline bool IsNumberCharacter(int ch) { + return IsNumberStartCharacter(ch) || + ch == '_' || + ch == '.' || + ch == '#' || + (ch >= 'a' && ch <= 'f') || + (ch >= 'A' && ch <= 'F'); +} + +static inline bool IsNumberStartCharacter(int ch) { + return IsADigit(ch); +} + +static inline bool IsSeparatorOrDelimiterCharacter(int ch) { + return IsASpace(ch) || IsDelimiterCharacter(ch); +} + +static bool IsValidIdentifier(const SString& identifier) { + // First character can't be '_', so initialize the flag to true + bool lastWasUnderscore = true; + + size_t length = identifier.length(); + + // Zero-length identifiers are not valid (these can occur inside labels) + if (length == 0) { + return false; + } + + // Check for valid character at the start + if (!IsWordStartCharacter(identifier[0])) { + return false; + } + + // Check for only valid characters and no double underscores + for (size_t i = 0; i < length; i++) { + if (!IsWordCharacter(identifier[i]) || + (identifier[i] == '_' && lastWasUnderscore)) { + return false; + } + lastWasUnderscore = identifier[i] == '_'; + } + + // Check for underscore at the end + if (lastWasUnderscore == true) { + return false; + } + + // All checks passed + return true; +} + +static bool IsValidNumber(const SString& number) { + int hashPos = number.search("#"); + bool seenDot = false; + + size_t i = 0; + size_t length = number.length(); + + if (length == 0) + return false; // Just in case + + // Decimal number + if (hashPos == -1) { + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (number[i] == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + } else if (IsADigit(number[i])) { + canBeSpecial = true; + } else { + break; + } + } + + if (!canBeSpecial) + return false; + } else { + // Based number + bool canBeSpecial = false; + int base = 0; + + // Parse base + for (; i < length; i++) { + int ch = number[i]; + if (ch == '_') { + if (!canBeSpecial) + return false; + canBeSpecial = false; + } else if (IsADigit(ch)) { + base = base * 10 + (ch - '0'); + if (base > 16) + return false; + canBeSpecial = true; + } else if (ch == '#' && canBeSpecial) { + break; + } else { + return false; + } + } + + if (base < 2) + return false; + if (i == length) + return false; + + i++; // Skip over '#' + + // Parse number + canBeSpecial = false; + + for (; i < length; i++) { + int ch = tolower(number[i]); + + if (ch == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + + } else if (ch == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + + } else if (IsADigit(ch)) { + if (ch - '0' >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch >= 'a' && ch <= 'f') { + if (ch - 'a' + 10 >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch == '#' && canBeSpecial) { + break; + + } else { + return false; + } + } + + if (i == length) { + return false; + } + + i++; + } + + // Exponent (optional) + if (i < length) { + if (number[i] != 'e' && number[i] != 'E') + return false; + + i++; // Move past 'E' + + if (i == length) { + return false; + } + + if (number[i] == '+') + i++; + else if (number[i] == '-') { + if (seenDot) { + i++; + } else { + return false; // Integer literals should not have negative exponents + } + } + + if (i == length) { + return false; + } + + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (IsADigit(number[i])) { + canBeSpecial = true; + } else { + return false; + } + } + + if (!canBeSpecial) + return false; + } + + // if i == length, number was parsed successfully. + return i == length; +} + +static inline bool IsWordCharacter(int ch) { + return IsWordStartCharacter(ch) || IsADigit(ch); +} + +static inline bool IsWordStartCharacter(int ch) { + return (isascii(ch) && isalpha(ch)) || ch == '_'; +} diff --git a/scintilla/src/LexAsm.cxx b/scintilla/src/LexAsm.cxx new file mode 100644 index 00000000..dad70628 --- /dev/null +++ b/scintilla/src/LexAsm.cxx @@ -0,0 +1,177 @@ +// Scintilla source code edit control +/** @file LexAsm.cxx + ** Lexer for Assembler, just for the MASM syntax + ** Written by The Black Horus + ** Enhancements and NASM stuff by Kein-Hong Man, 2003-10 + ** SCE_ASM_COMMENTBLOCK and SCE_ASM_CHARACTER are for future GNU as colouring + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || + ch == '_' || ch == '?'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' || + ch == '%' || ch == '@' || ch == '$' || ch == '?'); +} + +static inline bool IsAsmOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '%' || ch == ':') + return true; + return false; +} + +static void ColouriseAsmDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &cpuInstruction = *keywordlists[0]; + WordList &mathInstruction = *keywordlists[1]; + WordList ®isters = *keywordlists[2]; + WordList &directive = *keywordlists[3]; + WordList &directiveOperand = *keywordlists[4]; + WordList &extInstruction = *keywordlists[5]; + + // Do not leak onto next line + if (initStyle == SCE_ASM_STRINGEOL) + initStyle = SCE_ASM_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + + // Prevent SCE_ASM_STRINGEOL from leaking back to previous line + if (sc.atLineStart && (sc.state == SCE_ASM_STRING)) { + sc.SetState(SCE_ASM_STRING); + } else if (sc.atLineStart && (sc.state == SCE_ASM_CHARACTER)) { + sc.SetState(SCE_ASM_CHARACTER); + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_ASM_OPERATOR) { + if (!IsAsmOperator(static_cast(sc.ch))) { + sc.SetState(SCE_ASM_DEFAULT); + } + }else if (sc.state == SCE_ASM_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_IDENTIFIER) { + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + + if (cpuInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_CPUINSTRUCTION); + } else if (mathInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_MATHINSTRUCTION); + } else if (registers.InList(s)) { + sc.ChangeState(SCE_ASM_REGISTER); + } else if (directive.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVE); + } else if (directiveOperand.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVEOPERAND); + } else if (extInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_EXTINSTRUCTION); + } + sc.SetState(SCE_ASM_DEFAULT); + } + } + else if (sc.state == SCE_ASM_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_ASM_STRINGEOL); + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_CHARACTER) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_ASM_STRINGEOL); + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ASM_DEFAULT) { + if (sc.ch == ';'){ + sc.SetState(SCE_ASM_COMMENT); + } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) { + sc.SetState(SCE_ASM_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_ASM_IDENTIFIER); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ASM_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_ASM_CHARACTER); + } else if (IsAsmOperator(static_cast(sc.ch))) { + sc.SetState(SCE_ASM_OPERATOR); + } + } + + } + sc.Complete(); +} + +static const char * const asmWordListDesc[] = { + "CPU instructions", + "FPU instructions", + "Registers", + "Directives", + "Directive operands", + "Extended instructions", + 0 +}; + +LexerModule lmAsm(SCLEX_ASM, ColouriseAsmDoc, "asm", 0, asmWordListDesc); + diff --git a/scintilla/src/LexAsn1.cxx b/scintilla/src/LexAsn1.cxx new file mode 100644 index 00000000..a4b08617 --- /dev/null +++ b/scintilla/src/LexAsn1.cxx @@ -0,0 +1,181 @@ +// Scintilla source code edit control +/** @file LexAsn1.cxx + ** Lexer for ASN.1 + **/ +// Copyright 2004 by Herr Pfarrer rpfarrer yahoo de +// Last Updated: 20/07/2004 +// The License.txt file describes the conditions under which this software may be distributed. +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +// Some char test functions +static bool isAsn1Number(int ch) +{ + return (ch >= '0' && ch <= '9'); +} + +static bool isAsn1Letter(int ch) +{ + return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool isAsn1Char(int ch) +{ + return (ch == '-' ) || isAsn1Number(ch) || isAsn1Letter (ch); +} + +// +// Function determining the color of a given code portion +// Based on a "state" +// +static void ColouriseAsn1Doc(unsigned int startPos, int length, int initStyle, WordList *keywordLists[], Accessor &styler) +{ + // The keywords + WordList &Keywords = *keywordLists[0]; + WordList &Attributes = *keywordLists[1]; + WordList &Descriptors = *keywordLists[2]; + WordList &Types = *keywordLists[3]; + + // Parse the whole buffer character by character using StyleContext + StyleContext sc(startPos, length, initStyle, styler); + for (; sc.More(); sc.Forward()) + { + // The state engine + switch (sc.state) + { + case SCE_ASN1_DEFAULT: // Plain characters +asn1_default: + if (sc.ch == '-' && sc.chNext == '-') + // A comment begins here + sc.SetState(SCE_ASN1_COMMENT); + else if (sc.ch == '"') + // A string begins here + sc.SetState(SCE_ASN1_STRING); + else if (isAsn1Number (sc.ch)) + // A number starts here (identifier should start with a letter in ASN.1) + sc.SetState(SCE_ASN1_SCALAR); + else if (isAsn1Char (sc.ch)) + // An identifier starts here (identifier always start with a letter) + sc.SetState(SCE_ASN1_IDENTIFIER); + else if (sc.ch == ':') + // A ::= operator starts here + sc.SetState(SCE_ASN1_OPERATOR); + break; + case SCE_ASN1_COMMENT: // A comment + if (sc.ch == '\r' || sc.ch == '\n') + // A comment ends here + sc.SetState(SCE_ASN1_DEFAULT); + break; + case SCE_ASN1_IDENTIFIER: // An identifier (keyword, attribute, descriptor or type) + if (!isAsn1Char (sc.ch)) + { + // The end of identifier is here: we can look for it in lists by now and change its state + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (Keywords.InList(s)) + // It's a keyword, change its state + sc.ChangeState(SCE_ASN1_KEYWORD); + else if (Attributes.InList(s)) + // It's an attribute, change its state + sc.ChangeState(SCE_ASN1_ATTRIBUTE); + else if (Descriptors.InList(s)) + // It's a descriptor, change its state + sc.ChangeState(SCE_ASN1_DESCRIPTOR); + else if (Types.InList(s)) + // It's a type, change its state + sc.ChangeState(SCE_ASN1_TYPE); + + // Set to default now + sc.SetState(SCE_ASN1_DEFAULT); + } + break; + case SCE_ASN1_STRING: // A string delimited by "" + if (sc.ch == '"') + { + // A string ends here + sc.ForwardSetState(SCE_ASN1_DEFAULT); + + // To correctly manage a char sticking to the string quote + goto asn1_default; + } + break; + case SCE_ASN1_SCALAR: // A plain number + if (!isAsn1Number (sc.ch)) + // A number ends here + sc.SetState(SCE_ASN1_DEFAULT); + break; + case SCE_ASN1_OPERATOR: // The affectation operator ::= and wath follows (eg: ::= { org 6 } OID or ::= 12 trap) + if (sc.ch == '{') + { + // An OID definition starts here: enter the sub loop + for (; sc.More(); sc.Forward()) + { + if (isAsn1Number (sc.ch) && (!isAsn1Char (sc.chPrev) || isAsn1Number (sc.chPrev))) + // The OID number is highlighted + sc.SetState(SCE_ASN1_OID); + else if (isAsn1Char (sc.ch)) + // The OID parent identifier is plain + sc.SetState(SCE_ASN1_IDENTIFIER); + else + sc.SetState(SCE_ASN1_DEFAULT); + + if (sc.ch == '}') + // Here ends the OID and the operator sub loop: go back to main loop + break; + } + } + else if (isAsn1Number (sc.ch)) + { + // A trap number definition starts here: enter the sub loop + for (; sc.More(); sc.Forward()) + { + if (isAsn1Number (sc.ch)) + // The trap number is highlighted + sc.SetState(SCE_ASN1_OID); + else + { + // The number ends here: go back to main loop + sc.SetState(SCE_ASN1_DEFAULT); + break; + } + } + } + else if (sc.ch != ':' && sc.ch != '=' && sc.ch != ' ') + // The operator doesn't imply an OID definition nor a trap, back to main loop + goto asn1_default; // To be sure to handle actually the state change + break; + } + } + sc.Complete(); +} + +static void FoldAsn1Doc(unsigned int, int, int, WordList *[], Accessor &styler) +{ + // No folding enabled, no reason to continue... + if( styler.GetPropertyInt("fold") == 0 ) + return; + + // No folding implemented: doesn't make sense for ASN.1 +} + +static const char * const asn1WordLists[] = { + "Keywords", + "Attributes", + "Descriptors", + "Types", + 0, }; + + +LexerModule lmAns1(SCLEX_ASN1, ColouriseAsn1Doc, "asn1", FoldAsn1Doc, asn1WordLists); diff --git a/scintilla/src/LexBaan.cxx b/scintilla/src/LexBaan.cxx new file mode 100644 index 00000000..e38a2715 --- /dev/null +++ b/scintilla/src/LexBaan.cxx @@ -0,0 +1,189 @@ +// Scintilla source code edit control +/** @file LexBaan.cxx + ** Lexer for Baan. + ** Based heavily on LexCPP.cxx + **/ +// Copyright 2001- by Vamsi Potluru & Praveen Ambekar +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '$' || ch == ':'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static void ColouriseBaanDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0; + + if (initStyle == SCE_BAAN_STRINGEOL) // Does not leak onto next line + initStyle = SCE_BAAN_DEFAULT; + + int visibleChars = 0; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_BAAN_OPERATOR) { + sc.SetState(SCE_BAAN_DEFAULT); + } else if (sc.state == SCE_BAAN_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_BAAN_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_BAAN_WORD2); + } + sc.SetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_PREPROCESSOR) { + if (stylingWithinPreprocessor) { + if (IsASpace(sc.ch)) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } else { + if (sc.atLineEnd && (sc.chNext != '^')) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } + } else if (sc.state == SCE_BAAN_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_COMMENTDOC) { + if (sc.MatchIgnoreCase("enddllusage")) { + for (unsigned int i = 0; i < 10; i++){ + sc.Forward(); + } + sc.ForwardSetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_BAAN_DEFAULT); + } else if ((sc.atLineEnd) && (sc.chNext != '^')) { + sc.ChangeState(SCE_BAAN_STRINGEOL); + sc.ForwardSetState(SCE_C_DEFAULT); + visibleChars = 0; + } + } + + if (sc.state == SCE_BAAN_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_BAAN_NUMBER); + } else if (sc.MatchIgnoreCase("dllusage")){ + sc.SetState(SCE_BAAN_COMMENTDOC); + do { + sc.Forward(); + } while ((!sc.atLineEnd) && sc.More()); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_BAAN_IDENTIFIER); + } else if (sc.Match('|')){ + sc.SetState(SCE_BAAN_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_BAAN_STRING); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_BAAN_PREPROCESSOR); + // Skip whitespace between # and preprocessor word + do { + sc.Forward(); + } while (IsASpace(sc.ch) && sc.More()); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_BAAN_OPERATOR); + } + } + if (sc.atLineEnd) { + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +static void FoldBaanDoc(unsigned int startPos, int length, int initStyle, WordList *[], + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && + (style == SCE_BAAN_COMMENT || style == SCE_BAAN_COMMENTDOC)) { + if (style != stylePrev) { + levelCurrent++; + } else if ((style != styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + if (style == SCE_BAAN_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +LexerModule lmBaan(SCLEX_BAAN, ColouriseBaanDoc, "baan", FoldBaanDoc); diff --git a/scintilla/src/LexBash.cxx b/scintilla/src/LexBash.cxx new file mode 100644 index 00000000..1bc3ead0 --- /dev/null +++ b/scintilla/src/LexBash.cxx @@ -0,0 +1,664 @@ +// Scintilla source code edit control +/** @file LexBash.cxx + ** Lexer for Bash. + **/ +// Copyright 2004-2005 by Neil Hodgson +// Adapted from LexPerl by Kein-Hong Man 2004 +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define BASH_BASE_ERROR 65 +#define BASH_BASE_DECIMAL 66 +#define BASH_BASE_HEX 67 +#define BASH_BASE_OCTAL 68 +#define BASH_BASE_OCTAL_ERROR 69 + +#define HERE_DELIM_MAX 256 + +static inline int translateBashDigit(char ch) { + if (ch >= '0' && ch <= '9') { + return ch - '0'; + } else if (ch >= 'a' && ch <= 'z') { + return ch - 'a' + 10; + } else if (ch >= 'A' && ch <= 'Z') { + return ch - 'A' + 36; + } else if (ch == '@') { + return 62; + } else if (ch == '_') { + return 63; + } + return BASH_BASE_ERROR; +} + +static inline bool isEOLChar(char ch) { + return (ch == '\r') || (ch == '\n'); +} + +static bool isSingleCharOp(char ch) { + char strCharSet[2]; + strCharSet[0] = ch; + strCharSet[1] = '\0'; + return (NULL != strstr("rwxoRWXOezsfdlpSbctugkTBMACahGLNn", strCharSet)); +} + +static inline bool isBashOperator(char ch) { + if (ch == '^' || ch == '&' || ch == '\\' || ch == '%' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '>' || ch == ',' || ch == '/' || ch == '<' || + ch == '?' || ch == '!' || ch == '.' || ch == '~' || + ch == '@') + return true; + return false; +} + +static int classifyWordBash(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_SH_IDENTIFIER; + if (keywords.InList(s)) + chAttr = SCE_SH_WORD; + styler.ColourTo(end, chAttr); + return chAttr; +} + +static inline int getBashNumberBase(unsigned int start, unsigned int end, Accessor &styler) { + int base = 0; + for (unsigned int i = 0; i < end - start + 1 && i < 10; i++) { + base = base * 10 + (styler[start + i] - '0'); + } + if (base > 64 || (end - start) > 1) { + return BASH_BASE_ERROR; + } + return base; +} + +static inline bool isEndVar(char ch) { + return !isalnum(ch) && ch != '$' && ch != '_'; +} + +static inline bool isNonQuote(char ch) { + return isalnum(ch) || ch == '_'; +} + +static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) { + if ((pos + static_cast(strlen(val))) >= lengthDoc) { + return false; + } + while (*val) { + if (*val != styler[pos++]) { + return false; + } + val++; + } + return true; +} + +static char opposite(char ch) { + if (ch == '(') + return ')'; + if (ch == '[') + return ']'; + if (ch == '{') + return '}'; + if (ch == '<') + return '>'; + return ch; +} + +static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + // Lexer for bash often has to backtrack to start of current style to determine + // which characters are being used as quotes, how deeply nested is the + // start position and what the termination string is for here documents + + WordList &keywords = *keywordlists[0]; + + class HereDocCls { + public: + int State; // 0: '<<' encountered + // 1: collect the delimiter + // 2: here doc text (lines after the delimiter) + char Quote; // the char after '<<' + bool Quoted; // true if Quote in ('\'','"','`') + bool Indent; // indented delimiter (for <<-) + int DelimiterLength; // strlen(Delimiter) + char *Delimiter; // the Delimiter, 256: sizeof PL_tokenbuf + HereDocCls() { + State = 0; + Quote = 0; + Quoted = false; + Indent = 0; + DelimiterLength = 0; + Delimiter = new char[HERE_DELIM_MAX]; + Delimiter[0] = '\0'; + } + ~HereDocCls() { + delete []Delimiter; + } + }; + HereDocCls HereDoc; + + class QuoteCls { + public: + int Rep; + int Count; + char Up; + char Down; + QuoteCls() { + this->New(1); + } + void New(int r) { + Rep = r; + Count = 0; + Up = '\0'; + Down = '\0'; + } + void Open(char u) { + Count++; + Up = u; + Down = opposite(Up); + } + }; + QuoteCls Quote; + + int state = initStyle; + int numBase = 0; + unsigned int lengthDoc = startPos + length; + + // If in a long distance lexical state, seek to the beginning to find quote characters + // Bash strings can be multi-line with embedded newlines, so backtrack. + // Bash numbers have additional state during lexing, so backtrack too. + if (state == SCE_SH_HERE_Q) { + while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_SH_HERE_DELIM)) { + startPos--; + } + startPos = styler.LineStart(styler.GetLine(startPos)); + state = styler.StyleAt(startPos - 1); + } + if (state == SCE_SH_STRING + || state == SCE_SH_BACKTICKS + || state == SCE_SH_CHARACTER + || state == SCE_SH_NUMBER + || state == SCE_SH_IDENTIFIER + || state == SCE_SH_COMMENTLINE + ) { + while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) { + startPos--; + } + state = SCE_SH_DEFAULT; + } + + styler.StartAt(startPos); + char chPrev = styler.SafeGetCharAt(startPos - 1); + if (startPos == 0) + chPrev = '\n'; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + // if the current character is not consumed due to the completion of an + // earlier style, lexing can be restarted via a simple goto + restartLexer: + chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if ((chPrev == '\r' && ch == '\n')) { // skip on DOS/Windows + styler.ColourTo(i, state); + chPrev = ch; + continue; + } + + if (HereDoc.State == 1 && isEOLChar(ch)) { + // Begin of here-doc (the line after the here-doc delimiter): + // Lexically, the here-doc starts from the next line after the >>, but the + // first line of here-doc seem to follow the style of the last EOL sequence + HereDoc.State = 2; + if (HereDoc.Quoted) { + if (state == SCE_SH_HERE_DELIM) { + // Missing quote at end of string! We are stricter than bash. + // Colour here-doc anyway while marking this bit as an error. + state = SCE_SH_ERROR; + } + styler.ColourTo(i - 1, state); + // HereDoc.Quote always == '\'' + state = SCE_SH_HERE_Q; + } else { + styler.ColourTo(i - 1, state); + // always switch + state = SCE_SH_HERE_Q; + } + } + + if (state == SCE_SH_DEFAULT) { + if (ch == '\\') { // escaped character + if (i < lengthDoc - 1) + i++; + ch = chNext; + chNext = chNext2; + styler.ColourTo(i, SCE_SH_IDENTIFIER); + } else if (isdigit(ch)) { + state = SCE_SH_NUMBER; + numBase = BASH_BASE_DECIMAL; + if (ch == '0') { // hex,octal + if (chNext == 'x' || chNext == 'X') { + numBase = BASH_BASE_HEX; + i++; + ch = chNext; + chNext = chNext2; + } else if (isdigit(chNext)) { + numBase = BASH_BASE_OCTAL; + } + } + } else if (iswordstart(ch)) { + state = SCE_SH_WORD; + if (!iswordchar(chNext) && chNext != '+' && chNext != '-') { + // We need that if length of word == 1! + // This test is copied from the SCE_SH_WORD handler. + classifyWordBash(styler.GetStartSegment(), i, keywords, styler); + state = SCE_SH_DEFAULT; + } + } else if (ch == '#') { + state = SCE_SH_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_SH_STRING; + Quote.New(1); + Quote.Open(ch); + } else if (ch == '\'') { + state = SCE_SH_CHARACTER; + Quote.New(1); + Quote.Open(ch); + } else if (ch == '`') { + state = SCE_SH_BACKTICKS; + Quote.New(1); + Quote.Open(ch); + } else if (ch == '$') { + if (chNext == '{') { + state = SCE_SH_PARAM; + goto startQuote; + } else if (chNext == '\'') { + state = SCE_SH_CHARACTER; + goto startQuote; + } else if (chNext == '"') { + state = SCE_SH_STRING; + goto startQuote; + } else if (chNext == '(' && chNext2 == '(') { + styler.ColourTo(i, SCE_SH_OPERATOR); + state = SCE_SH_DEFAULT; + goto skipChar; + } else if (chNext == '(' || chNext == '`') { + state = SCE_SH_BACKTICKS; + startQuote: + Quote.New(1); + Quote.Open(chNext); + goto skipChar; + } else { + state = SCE_SH_SCALAR; + skipChar: + i++; + ch = chNext; + chNext = chNext2; + } + } else if (ch == '*') { + if (chNext == '*') { // exponentiation + i++; + ch = chNext; + chNext = chNext2; + } + styler.ColourTo(i, SCE_SH_OPERATOR); + } else if (ch == '<' && chNext == '<') { + state = SCE_SH_HERE_DELIM; + HereDoc.State = 0; + HereDoc.Indent = false; + } else if (ch == '-' // file test operators + && isSingleCharOp(chNext) + && !isalnum((chNext2 = styler.SafeGetCharAt(i+2))) + && isspace(chPrev)) { + styler.ColourTo(i + 1, SCE_SH_WORD); + state = SCE_SH_DEFAULT; + i++; + ch = chNext; + chNext = chNext2; + } else if (isBashOperator(ch)) { + styler.ColourTo(i, SCE_SH_OPERATOR); + } else { + // keep colouring defaults to make restart easier + styler.ColourTo(i, SCE_SH_DEFAULT); + } + } else if (state == SCE_SH_NUMBER) { + int digit = translateBashDigit(ch); + if (numBase == BASH_BASE_DECIMAL) { + if (ch == '#') { + numBase = getBashNumberBase(styler.GetStartSegment(), i - 1, styler); + if (numBase == BASH_BASE_ERROR) // take the rest as comment + goto numAtEnd; + } else if (!isdigit(ch)) + goto numAtEnd; + } else if (numBase == BASH_BASE_HEX) { + if ((digit < 16) || (digit >= 36 && digit <= 41)) { + // hex digit 0-9a-fA-F + } else + goto numAtEnd; + } else if (numBase == BASH_BASE_OCTAL || + numBase == BASH_BASE_OCTAL_ERROR) { + if (digit > 7) { + if (digit <= 9) { + numBase = BASH_BASE_OCTAL_ERROR; + } else + goto numAtEnd; + } + } else if (numBase == BASH_BASE_ERROR) { + if (digit > 9) + goto numAtEnd; + } else { // DD#DDDD number style handling + if (digit != BASH_BASE_ERROR) { + if (numBase <= 36) { + // case-insensitive if base<=36 + if (digit >= 36) digit -= 26; + } + if (digit >= numBase) { + if (digit <= 9) { + numBase = BASH_BASE_ERROR; + } else + goto numAtEnd; + } + } else { + numAtEnd: + if (numBase == BASH_BASE_ERROR || + numBase == BASH_BASE_OCTAL_ERROR) + state = SCE_SH_ERROR; + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } + } + } else if (state == SCE_SH_WORD) { + if (!iswordchar(chNext) && chNext != '+' && chNext != '-') { + // "." never used in Bash variable names + // but used in file names + classifyWordBash(styler.GetStartSegment(), i, keywords, styler); + state = SCE_SH_DEFAULT; + ch = ' '; + } + } else if (state == SCE_SH_IDENTIFIER) { + if (!iswordchar(chNext) && chNext != '+' && chNext != '-') { + styler.ColourTo(i, SCE_SH_IDENTIFIER); + state = SCE_SH_DEFAULT; + ch = ' '; + } + } else { + if (state == SCE_SH_COMMENTLINE) { + if (ch == '\\' && isEOLChar(chNext)) { + // comment continuation + if (chNext == '\r' && chNext2 == '\n') { + i += 2; + ch = styler.SafeGetCharAt(i); + chNext = styler.SafeGetCharAt(i + 1); + } else { + i++; + ch = chNext; + chNext = chNext2; + } + } else if (isEOLChar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } else if (isEOLChar(chNext)) { + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + } + } else if (state == SCE_SH_HERE_DELIM) { + // + // From Bash info: + // --------------- + // Specifier format is: <<[-]WORD + // Optional '-' is for removal of leading tabs from here-doc. + // Whitespace acceptable after <<[-] operator + // + if (HereDoc.State == 0) { // '<<' encountered + HereDoc.State = 1; + HereDoc.Quote = chNext; + HereDoc.Quoted = false; + HereDoc.DelimiterLength = 0; + HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + if (chNext == '\'' || chNext == '\"') { // a quoted here-doc delimiter (' or ") + i++; + ch = chNext; + chNext = chNext2; + HereDoc.Quoted = true; + } else if (!HereDoc.Indent && chNext == '-') { // <<- indent case + HereDoc.Indent = true; + HereDoc.State = 0; + } else if (isalpha(chNext) || chNext == '_' || chNext == '\\' + || chNext == '-' || chNext == '+' || chNext == '!') { + // an unquoted here-doc delimiter, no special handling + // TODO check what exactly bash considers part of the delim + } else if (chNext == '<') { // HERE string <<< + i++; + ch = chNext; + chNext = chNext2; + styler.ColourTo(i, SCE_SH_HERE_DELIM); + state = SCE_SH_DEFAULT; + HereDoc.State = 0; + } else if (isspacechar(chNext)) { + // eat whitespace + HereDoc.State = 0; + } else if (isdigit(chNext) || chNext == '=' || chNext == '$') { + // left shift << or <<= operator cases + styler.ColourTo(i, SCE_SH_OPERATOR); + state = SCE_SH_DEFAULT; + HereDoc.State = 0; + } else { + // symbols terminates; deprecated zero-length delimiter + } + } else if (HereDoc.State == 1) { // collect the delimiter + if (HereDoc.Quoted) { // a quoted here-doc delimiter + if (ch == HereDoc.Quote) { // closing quote => end of delimiter + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + } else { + if (ch == '\\' && chNext == HereDoc.Quote) { // escaped quote + i++; + ch = chNext; + chNext = chNext2; + } + HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch; + HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + } + } else { // an unquoted here-doc delimiter + if (isalnum(ch) || ch == '_' || ch == '-' || ch == '+' || ch == '!') { + HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch; + HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + } else if (ch == '\\') { + // skip escape prefix + } else { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } + } + if (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) { + styler.ColourTo(i - 1, state); + state = SCE_SH_ERROR; + goto restartLexer; + } + } + } else if (HereDoc.State == 2) { + // state == SCE_SH_HERE_Q + if (isMatch(styler, lengthDoc, i, HereDoc.Delimiter)) { + if (!HereDoc.Indent && isEOLChar(chPrev)) { + endHereDoc: + // standard HERE delimiter + i += HereDoc.DelimiterLength; + chPrev = styler.SafeGetCharAt(i - 1); + ch = styler.SafeGetCharAt(i); + if (isEOLChar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + HereDoc.State = 0; + goto restartLexer; + } + chNext = styler.SafeGetCharAt(i + 1); + } else if (HereDoc.Indent) { + // indented HERE delimiter + unsigned int bk = (i > 0)? i - 1: 0; + while (i > 0) { + ch = styler.SafeGetCharAt(bk--); + if (isEOLChar(ch)) { + goto endHereDoc; + } else if (!isspacechar(ch)) { + break; // got leading non-whitespace + } + } + } + } + } else if (state == SCE_SH_SCALAR) { // variable names + if (isEndVar(ch)) { + if ((state == SCE_SH_SCALAR) + && i == (styler.GetStartSegment() + 1)) { + // Special variable: $(, $_ etc. + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + } else { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } + } + } else if (state == SCE_SH_STRING + || state == SCE_SH_CHARACTER + || state == SCE_SH_BACKTICKS + || state == SCE_SH_PARAM + ) { + if (!Quote.Down && !isspacechar(ch)) { + Quote.Open(ch); + } else if (ch == '\\' && Quote.Up != '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } else if (ch == Quote.Down) { + Quote.Count--; + if (Quote.Count == 0) { + Quote.Rep--; + if (Quote.Rep <= 0) { + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + ch = ' '; + } + if (Quote.Up == Quote.Down) { + Quote.Count++; + } + } + } else if (ch == Quote.Up) { + Quote.Count++; + } + } + } + if (state == SCE_SH_ERROR) { + break; + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); +} + +static bool IsCommentLine(int line, Accessor &styler) { + int pos = styler.LineStart(line); + int eol_pos = styler.LineStart(line + 1) - 1; + for (int i = pos; i < eol_pos; i++) { + char ch = styler[i]; + if (ch == '#') + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; +} + +static void FoldBashDoc(unsigned int startPos, int length, int, WordList *[], + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + // Comment folding + if (foldComment && atEOL && IsCommentLine(lineCurrent, styler)) + { + if (!IsCommentLine(lineCurrent - 1, styler) + && IsCommentLine(lineCurrent + 1, styler)) + levelCurrent++; + else if (IsCommentLine(lineCurrent - 1, styler) + && !IsCommentLine(lineCurrent+1, styler)) + levelCurrent--; + } + if (style == SCE_SH_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const bashWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBash(SCLEX_BASH, ColouriseBashDoc, "bash", FoldBashDoc, bashWordListDesc); diff --git a/scintilla/src/LexBasic.cxx b/scintilla/src/LexBasic.cxx new file mode 100644 index 00000000..5661b0b9 --- /dev/null +++ b/scintilla/src/LexBasic.cxx @@ -0,0 +1,369 @@ +// Scintilla source code edit control +/** @file LexBasic.cxx + ** Lexer for BlitzBasic and PureBasic. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// This tries to be a unified Lexer/Folder for all the BlitzBasic/BlitzMax/PurBasic basics +// and derivatives. Once they diverge enough, might want to split it into multiple +// lexers for more code clearity. +// +// Mail me (elias users sf net) for any bugs. + +// Folding only works for simple things like functions or types. + +// You may want to have a look at my ctags lexer as well, if you additionally to coloring +// and folding need to extract things like label tags in your editor. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +/* Bits: + * 1 - whitespace + * 2 - operator + * 4 - identifier + * 8 - decimal digit + * 16 - hex digit + * 32 - bin digit + */ +static int character_classification[128] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, + 60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 2, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0 +}; + +static bool IsSpace(int c) { + return c < 128 && (character_classification[c] & 1); +} + +static bool IsOperator(int c) { + return c < 128 && (character_classification[c] & 2); +} + +static bool IsIdentifier(int c) { + return c < 128 && (character_classification[c] & 4); +} + +static bool IsDigit(int c) { + return c < 128 && (character_classification[c] & 8); +} + +static bool IsHexDigit(int c) { + return c < 128 && (character_classification[c] & 16); +} + +static bool IsBinDigit(int c) { + return c < 128 && (character_classification[c] & 32); +} + +static int LowerCase(int c) +{ + if (c >= 'A' && c <= 'Z') + return 'a' + c - 'A'; + return c; +} + +static void ColouriseBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler, char comment_char) { + bool wasfirst = true, isfirst = true; // true if first token in a line + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + + // Can't use sc.More() here else we miss the last character + for (; ; sc.Forward()) { + if (sc.state == SCE_B_IDENTIFIER) { + if (!IsIdentifier(sc.ch)) { + // Labels + if (wasfirst && sc.Match(':')) { + sc.ChangeState(SCE_B_LABEL); + sc.ForwardSetState(SCE_B_DEFAULT); + } else { + char s[100]; + int kstates[4] = { + SCE_B_KEYWORD, + SCE_B_KEYWORD2, + SCE_B_KEYWORD3, + SCE_B_KEYWORD4, + }; + sc.GetCurrentLowered(s, sizeof(s)); + for (int i = 0; i < 4; i++) { + if (keywordlists[i]->InList(s)) { + sc.ChangeState(kstates[i]); + } + } + // Types, must set them as operator else they will be + // matched as number/constant + if (sc.Match('.') || sc.Match('$') || sc.Match('%') || + sc.Match('#')) { + sc.SetState(SCE_B_OPERATOR); + } else { + sc.SetState(SCE_B_DEFAULT); + } + } + } + } else if (sc.state == SCE_B_OPERATOR) { + if (!IsOperator(sc.ch) || sc.Match('#')) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_LABEL) { + if (!IsIdentifier(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_CONSTANT) { + if (!IsIdentifier(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_NUMBER) { + if (!IsDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_HEXNUMBER) { + if (!IsHexDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_BINNUMBER) { + if (!IsBinDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_STRING) { + if (sc.ch == '"') { + sc.ForwardSetState(SCE_B_DEFAULT); + } + if (sc.atLineEnd) { + sc.ChangeState(SCE_B_ERROR); + sc.SetState(SCE_B_DEFAULT); + } + } else if (sc.state == SCE_B_COMMENT || sc.state == SCE_B_PREPROCESSOR) { + if (sc.atLineEnd) { + sc.SetState(SCE_B_DEFAULT); + } + } + + if (sc.atLineStart) + isfirst = true; + + if (sc.state == SCE_B_DEFAULT || sc.state == SCE_B_ERROR) { + if (isfirst && sc.Match('.')) { + sc.SetState(SCE_B_LABEL); + } else if (isfirst && sc.Match('#')) { + wasfirst = isfirst; + sc.SetState(SCE_B_IDENTIFIER); + } else if (sc.Match(comment_char)) { + // Hack to make deprecated QBASIC '$Include show + // up in freebasic with SCE_B_PREPROCESSOR. + if (comment_char == '\'' && sc.Match(comment_char, '$')) + sc.SetState(SCE_B_PREPROCESSOR); + else + sc.SetState(SCE_B_COMMENT); + } else if (sc.Match('"')) { + sc.SetState(SCE_B_STRING); + } else if (IsDigit(sc.ch)) { + sc.SetState(SCE_B_NUMBER); + } else if (sc.Match('$')) { + sc.SetState(SCE_B_HEXNUMBER); + } else if (sc.Match('%')) { + sc.SetState(SCE_B_BINNUMBER); + } else if (sc.Match('#')) { + sc.SetState(SCE_B_CONSTANT); + } else if (IsOperator(sc.ch)) { + sc.SetState(SCE_B_OPERATOR); + } else if (IsIdentifier(sc.ch)) { + wasfirst = isfirst; + sc.SetState(SCE_B_IDENTIFIER); + } else if (!IsSpace(sc.ch)) { + sc.SetState(SCE_B_ERROR); + } + } + + if (!IsSpace(sc.ch)) + isfirst = false; + + if (!sc.More()) + break; + } + sc.Complete(); +} + +static int CheckBlitzFoldPoint(char const *token, int &level) { + if (!strcmp(token, "function") || + !strcmp(token, "type")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "end function") || + !strcmp(token, "end type")) { + return -1; + } + return 0; +} + +static int CheckPureFoldPoint(char const *token, int &level) { + if (!strcmp(token, "procedure") || + !strcmp(token, "enumeration") || + !strcmp(token, "interface") || + !strcmp(token, "structure")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "endprocedure") || + !strcmp(token, "endenumeration") || + !strcmp(token, "endinterface") || + !strcmp(token, "endstructure")) { + return -1; + } + return 0; +} + +static int CheckFreeFoldPoint(char const *token, int &level) { + if (!strcmp(token, "function") || + !strcmp(token, "sub") || + !strcmp(token, "type")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "end function") || + !strcmp(token, "end sub") || + !strcmp(token, "end type")) { + return -1; + } + return 0; +} + +static void FoldBasicDoc(unsigned int startPos, int length, + Accessor &styler, int (*CheckFoldPoint)(char const *, int &)) { + int line = styler.GetLine(startPos); + int level = styler.LevelAt(line); + int go = 0, done = 0; + int endPos = startPos + length; + char word[256]; + int wordlen = 0; + int i; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + // Scan for tokens at the start of the line (they may include + // whitespace, for tokens like "End Function" + for (i = startPos; i < endPos; i++) { + int c = styler.SafeGetCharAt(i); + if (!done && !go) { + if (wordlen) { // are we scanning a token already? + word[wordlen] = static_cast(LowerCase(c)); + if (!IsIdentifier(c)) { // done with token + word[wordlen] = '\0'; + go = CheckFoldPoint(word, level); + if (!go) { + // Treat any whitespace as single blank, for + // things like "End Function". + if (IsSpace(c) && IsIdentifier(word[wordlen - 1])) { + word[wordlen] = ' '; + if (wordlen < 255) + wordlen++; + } + else // done with this line + done = 1; + } + } else if (wordlen < 255) { + wordlen++; + } + } else { // start scanning at first non-whitespace character + if (!IsSpace(c)) { + if (IsIdentifier(c)) { + word[0] = static_cast(LowerCase(c)); + wordlen = 1; + } else // done with this line + done = 1; + } + } + } + if (c == '\n') { // line end + if (!done && wordlen == 0 && foldCompact) // line was only space + level |= SC_FOLDLEVELWHITEFLAG; + if (level != styler.LevelAt(line)) + styler.SetLevel(line, level); + level += go; + line++; + // reset state + wordlen = 0; + level &= ~SC_FOLDLEVELHEADERFLAG; + level &= ~SC_FOLDLEVELWHITEFLAG; + go = 0; + done = 0; + } + } +} + +static void ColouriseBlitzBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, ';'); +} + +static void ColourisePureBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, ';'); +} + +static void ColouriseFreeBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, '\''); +} + +static void FoldBlitzBasicDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + FoldBasicDoc(startPos, length, styler, CheckBlitzFoldPoint); +} + +static void FoldPureBasicDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + FoldBasicDoc(startPos, length, styler, CheckPureFoldPoint); +} + +static void FoldFreeBasicDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + FoldBasicDoc(startPos, length, styler, CheckFreeFoldPoint); +} + +static const char * const blitzbasicWordListDesc[] = { + "BlitzBasic Keywords", + "user1", + "user2", + "user3", + 0 +}; + +static const char * const purebasicWordListDesc[] = { + "PureBasic Keywords", + "PureBasic PreProcessor Keywords", + "user defined 1", + "user defined 2", + 0 +}; + +static const char * const freebasicWordListDesc[] = { + "FreeBasic Keywords", + "FreeBasic PreProcessor Keywords", + "user defined 1", + "user defined 2", + 0 +}; + +LexerModule lmBlitzBasic(SCLEX_BLITZBASIC, ColouriseBlitzBasicDoc, "blitzbasic", + FoldBlitzBasicDoc, blitzbasicWordListDesc); + +LexerModule lmPureBasic(SCLEX_PUREBASIC, ColourisePureBasicDoc, "purebasic", + FoldPureBasicDoc, purebasicWordListDesc); + +LexerModule lmFreeBasic(SCLEX_FREEBASIC, ColouriseFreeBasicDoc, "freebasic", + FoldFreeBasicDoc, freebasicWordListDesc); + diff --git a/scintilla/src/LexBullant.cxx b/scintilla/src/LexBullant.cxx new file mode 100644 index 00000000..59fe6c41 --- /dev/null +++ b/scintilla/src/LexBullant.cxx @@ -0,0 +1,225 @@ +// SciTE - Scintilla based Text Editor +// LexBullant.cxx - lexer for Bullant + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + +static int classifyWordBullant(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + int lev= 0; + char chAttr = SCE_C_IDENTIFIER; + if (isdigit(s[0]) || (s[0] == '.')){ + chAttr = SCE_C_NUMBER; + } + else { + if (keywords.InList(s)) { + chAttr = SCE_C_WORD; + if (strcmp(s, "end") == 0) + lev = -1; + else if (strcmp(s, "method") == 0 || + strcmp(s, "case") == 0 || + strcmp(s, "class") == 0 || + strcmp(s, "debug") == 0 || + strcmp(s, "test") == 0 || + strcmp(s, "if") == 0 || + strcmp(s, "lock") == 0 || + strcmp(s, "transaction") == 0 || + strcmp(s, "trap") == 0 || + strcmp(s, "until") == 0 || + strcmp(s, "while") == 0) + lev = 1; + } + } + styler.ColourTo(end, chAttr); + return lev; +} + +static void ColouriseBullantDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + bool fold = styler.GetPropertyInt("fold") != 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + + int state = initStyle; + if (state == SCE_C_STRINGEOL) // Does not leak onto next line + state = SCE_C_DEFAULT; + char chPrev = ' '; + char chNext = styler[startPos]; + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + styler.StartSegment(startPos); + int endFoundThisLine = 0; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // End of line + endFoundThisLine = 0; + if (state == SCE_C_STRINGEOL) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + levelPrev = levelCurrent; + } + visibleChars = 0; + +/* int indentBlock = GetLineIndentation(lineCurrent); + if (blockChange==1){ + lineCurrent++; + int pos=SetLineIndentation(lineCurrent, indentBlock + indentSize); + } else if (blockChange==-1) { + indentBlock -= indentSize; + if (indentBlock < 0) + indentBlock = 0; + SetLineIndentation(lineCurrent, indentBlock); + lineCurrent++; + } + blockChange=0; +*/ } + if (!isspace(ch)) + visibleChars++; + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i-1, state); + state = SCE_C_IDENTIFIER; + } else if (ch == '@' && chNext == 'o') { + if ((styler.SafeGetCharAt(i+2) =='f') && (styler.SafeGetCharAt(i+3) == 'f')) { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENT; + } + } else if (ch == '#') { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i-1, state); + state = SCE_C_STRING; + } else if (ch == '\'') { + styler.ColourTo(i-1, state); + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i-1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_IDENTIFIER) { + if (!iswordchar(ch)) { + int levelChange = classifyWordBullant(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_C_DEFAULT; + chNext = styler.SafeGetCharAt(i + 1); + if (ch == '#') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (ch == '\'') { + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + } + if (endFoundThisLine == 0) + levelCurrent+=levelChange; + if (levelChange == -1) + endFoundThisLine=1; + } + } else if (state == SCE_C_COMMENT) { + if (ch == '@' && chNext == 'o') { + if (styler.SafeGetCharAt(i+2) == 'n') { + styler.ColourTo(i+2, state); + state = SCE_C_DEFAULT; + i+=2; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + endFoundThisLine = 0; + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } else if (chNext == '\r' || chNext == '\n') { + endFoundThisLine = 0; + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } + } else if (state == SCE_C_CHARACTER) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + endFoundThisLine = 0; + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + + } +} + +static const char * const bullantWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBullant(SCLEX_BULLANT, ColouriseBullantDoc, "bullant", 0, bullantWordListDesc); diff --git a/scintilla/src/LexCLW.cxx b/scintilla/src/LexCLW.cxx new file mode 100644 index 00000000..e768b731 --- /dev/null +++ b/scintilla/src/LexCLW.cxx @@ -0,0 +1,675 @@ +// Scintilla source code edit control +/** @file LexClw.cxx + ** Lexer for Clarion. + ** 2004/12/17 Updated Lexer + **/ +// Copyright 2003-2004 by Ron Schofield +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +// Is an end of line character +inline bool IsEOL(const int ch) { + + return(ch == '\n'); +} + +// Convert character to uppercase +static char CharacterUpper(char chChar) { + + if (chChar < 'a' || chChar > 'z') { + return(chChar); + } + else { + return(static_cast(chChar - 'a' + 'A')); + } +} + +// Convert string to uppercase +static void StringUpper(char *szString) { + + while (*szString) { + *szString = CharacterUpper(*szString); + szString++; + } +} + +// Is a label start character +inline bool IsALabelStart(const int iChar) { + + return(isalpha(iChar) || iChar == '_'); +} + +// Is a label character +inline bool IsALabelCharacter(const int iChar) { + + return(isalnum(iChar) || iChar == '_' || iChar == ':'); +} + +// Is the character is a ! and the the next character is not a ! +inline bool IsACommentStart(const int iChar) { + + return(iChar == '!'); +} + +// Is the character a Clarion hex character (ABCDEF) +inline bool IsAHexCharacter(const int iChar, bool bCaseSensitive) { + + // Case insensitive. + if (!bCaseSensitive) { + if (strchr("ABCDEFabcdef", iChar) != NULL) { + return(true); + } + } + // Case sensitive + else { + if (strchr("ABCDEF", iChar) != NULL) { + return(true); + } + } + return(false); +} + +// Is the character a Clarion base character (B=Binary, O=Octal, H=Hex) +inline bool IsANumericBaseCharacter(const int iChar, bool bCaseSensitive) { + + // Case insensitive. + if (!bCaseSensitive) { + // If character is a numeric base character + if (strchr("BOHboh", iChar) != NULL) { + return(true); + } + } + // Case sensitive + else { + // If character is a numeric base character + if (strchr("BOH", iChar) != NULL) { + return(true); + } + } + return(false); +} + +// Set the correct numeric constant state +inline bool SetNumericConstantState(StyleContext &scDoc) { + + int iPoints = 0; // Point counter + char cNumericString[512]; // Numeric string buffer + + // Buffer the current numberic string + scDoc.GetCurrent(cNumericString, sizeof(cNumericString)); + // Loop through the string until end of string (NULL termination) + for (int iIndex = 0; cNumericString[iIndex] != '\0'; iIndex++) { + // Depending on the character + switch (cNumericString[iIndex]) { + // Is a . (point) + case '.' : + // Increment point counter + iPoints++; + break; + default : + break; + } + } + // If points found (can be more than one for improper formatted number + if (iPoints > 0) { + return(true); + } + // Else no points found + else { + return(false); + } +} + +// Get the next word in uppercase from the current position (keyword lookahead) +inline bool GetNextWordUpper(Accessor &styler, unsigned int uiStartPos, int iLength, char *cWord) { + + unsigned int iIndex = 0; // Buffer Index + + // Loop through the remaining string from the current position + for (int iOffset = uiStartPos; iOffset < iLength; iOffset++) { + // Get the character from the buffer using the offset + char cCharacter = styler[iOffset]; + if (IsEOL(cCharacter)) { + break; + } + // If the character is alphabet character + if (isalpha(cCharacter)) { + // Add UPPERCASE character to the word buffer + cWord[iIndex++] = CharacterUpper(cCharacter); + } + } + // Add null termination + cWord[iIndex] = '\0'; + // If no word was found + if (iIndex == 0) { + // Return failure + return(false); + } + // Else word was found + else { + // Return success + return(true); + } +} + +// Clarion Language Colouring Procedure +static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler, bool bCaseSensitive) { + + int iParenthesesLevel = 0; // Parenthese Level + int iColumn1Label = false; // Label starts in Column 1 + + WordList &wlClarionKeywords = *wlKeywords[0]; // Clarion Keywords + WordList &wlCompilerDirectives = *wlKeywords[1]; // Compiler Directives + WordList &wlRuntimeExpressions = *wlKeywords[2]; // Runtime Expressions + WordList &wlBuiltInProcsFuncs = *wlKeywords[3]; // Builtin Procedures and Functions + WordList &wlStructsDataTypes = *wlKeywords[4]; // Structures and Data Types + WordList &wlAttributes = *wlKeywords[5]; // Procedure Attributes + WordList &wlStandardEquates = *wlKeywords[6]; // Standard Equates + WordList &wlLabelReservedWords = *wlKeywords[7]; // Clarion Reserved Keywords (Labels) + WordList &wlProcLabelReservedWords = *wlKeywords[8]; // Clarion Reserved Keywords (Procedure Labels) + + const char wlProcReservedKeywordList[] = + "PROCEDURE FUNCTION"; + WordList wlProcReservedKeywords; + wlProcReservedKeywords.Set(wlProcReservedKeywordList); + + const char wlCompilerKeywordList[] = + "COMPILE OMIT"; + WordList wlCompilerKeywords; + wlCompilerKeywords.Set(wlCompilerKeywordList); + + const char wlLegacyStatementsList[] = + "BOF EOF FUNCTION POINTER SHARE"; + WordList wlLegacyStatements; + wlLegacyStatements.Set(wlLegacyStatementsList); + + StyleContext scDoc(uiStartPos, iLength, iInitStyle, accStyler); + + // lex source code + for (; scDoc.More(); scDoc.Forward()) + { + // + // Determine if the current state should terminate. + // + + // Label State Handling + if (scDoc.state == SCE_CLW_LABEL) { + // If the character is not a valid label + if (!IsALabelCharacter(scDoc.ch)) { + // If the character is a . (dot syntax) + if (scDoc.ch == '.') { + // Turn off column 1 label flag as label now cannot be reserved work + iColumn1Label = false; + // Uncolour the . (dot) to default state, move forward one character, + // and change back to the label state. + scDoc.SetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + scDoc.SetState(SCE_CLW_LABEL); + } + // Else check label + else { + char cLabel[512]; // Label buffer + // Buffer the current label string + scDoc.GetCurrent(cLabel,sizeof(cLabel)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cLabel); + } + // Else if UPPERCASE label string is in the Clarion compiler keyword list + if (wlCompilerKeywords.InList(cLabel) && iColumn1Label){ + // change the label to error state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Else if UPPERCASE label string is in the Clarion reserved keyword list + else if (wlLabelReservedWords.InList(cLabel) && iColumn1Label){ + // change the label to error state + scDoc.ChangeState(SCE_CLW_ERROR); + } + // Else if UPPERCASE label string is + else if (wlProcLabelReservedWords.InList(cLabel) && iColumn1Label) { + char cWord[512]; // Word buffer + // Get the next word from the current position + if (GetNextWordUpper(accStyler,scDoc.currentPos,uiStartPos+iLength,cWord)) { + // If the next word is a procedure reserved word + if (wlProcReservedKeywords.InList(cWord)) { + // Change the label to error state + scDoc.ChangeState(SCE_CLW_ERROR); + } + } + } + // Else if label string is in the compiler directive keyword list + else if (wlCompilerDirectives.InList(cLabel)) { + // change the state to compiler directive state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Terminate the label state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + } + // Keyword State Handling + else if (scDoc.state == SCE_CLW_KEYWORD) { + // If character is : (colon) + if (scDoc.ch == ':') { + char cEquate[512]; // Equate buffer + // Move forward to include : (colon) in buffer + scDoc.Forward(); + // Buffer the equate string + scDoc.GetCurrent(cEquate,sizeof(cEquate)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cEquate); + } + // If statement string is in the equate list + if (wlStandardEquates.InList(cEquate)) { + // Change to equate state + scDoc.ChangeState(SCE_CLW_STANDARD_EQUATE); + } + } + // If the character is not a valid label character + else if (!IsALabelCharacter(scDoc.ch)) { + char cStatement[512]; // Statement buffer + // Buffer the statement string + scDoc.GetCurrent(cStatement,sizeof(cStatement)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cStatement); + } + // If statement string is in the Clarion keyword list + if (wlClarionKeywords.InList(cStatement)) { + // Change the statement string to the Clarion keyword state + scDoc.ChangeState(SCE_CLW_KEYWORD); + } + // Else if statement string is in the compiler directive keyword list + else if (wlCompilerDirectives.InList(cStatement)) { + // Change the statement string to the compiler directive state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Else if statement string is in the runtime expressions keyword list + else if (wlRuntimeExpressions.InList(cStatement)) { + // Change the statement string to the runtime expressions state + scDoc.ChangeState(SCE_CLW_RUNTIME_EXPRESSIONS); + } + // Else if statement string is in the builtin procedures and functions keyword list + else if (wlBuiltInProcsFuncs.InList(cStatement)) { + // Change the statement string to the builtin procedures and functions state + scDoc.ChangeState(SCE_CLW_BUILTIN_PROCEDURES_FUNCTION); + } + // Else if statement string is in the tructures and data types keyword list + else if (wlStructsDataTypes.InList(cStatement)) { + // Change the statement string to the structures and data types state + scDoc.ChangeState(SCE_CLW_STRUCTURE_DATA_TYPE); + } + // Else if statement string is in the procedure attribute keyword list + else if (wlAttributes.InList(cStatement)) { + // Change the statement string to the procedure attribute state + scDoc.ChangeState(SCE_CLW_ATTRIBUTE); + } + // Else if statement string is in the standard equate keyword list + else if (wlStandardEquates.InList(cStatement)) { + // Change the statement string to the standard equate state + scDoc.ChangeState(SCE_CLW_STANDARD_EQUATE); + } + // Else if statement string is in the deprecated or legacy keyword list + else if (wlLegacyStatements.InList(cStatement)) { + // Change the statement string to the standard equate state + scDoc.ChangeState(SCE_CLW_DEPRECATED); + } + // Else the statement string doesn't match any work list + else { + // Change the statement string to the default state + scDoc.ChangeState(SCE_CLW_DEFAULT); + } + // Terminate the keyword state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + // String State Handling + else if (scDoc.state == SCE_CLW_STRING) { + // If the character is an ' (single quote) + if (scDoc.ch == '\'') { + // Set the state to default and move forward colouring + // the ' (single quote) as default state + // terminating the string state + scDoc.SetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + } + // If the next character is an ' (single quote) + if (scDoc.chNext == '\'') { + // Move forward one character and set to default state + // colouring the next ' (single quote) as default state + // terminating the string state + scDoc.ForwardSetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + } + } + // Picture String State Handling + else if (scDoc.state == SCE_CLW_PICTURE_STRING) { + // If the character is an ( (open parenthese) + if (scDoc.ch == '(') { + // Increment the parenthese level + iParenthesesLevel++; + } + // Else if the character is a ) (close parenthese) + else if (scDoc.ch == ')') { + // If the parenthese level is set to zero + // parentheses matched + if (!iParenthesesLevel) { + scDoc.SetState(SCE_CLW_DEFAULT); + } + // Else parenthese level is greater than zero + // still looking for matching parentheses + else { + // Decrement the parenthese level + iParenthesesLevel--; + } + } + } + // Standard Equate State Handling + else if (scDoc.state == SCE_CLW_STANDARD_EQUATE) { + if (!isalnum(scDoc.ch)) { + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + // Integer Constant State Handling + else if (scDoc.state == SCE_CLW_INTEGER_CONSTANT) { + // If the character is not a digit (0-9) + // or character is not a hexidecimal character (A-F) + // or character is not a . (point) + // or character is not a numberic base character (B,O,H) + if (!(isdigit(scDoc.ch) + || IsAHexCharacter(scDoc.ch, bCaseSensitive) + || scDoc.ch == '.' + || IsANumericBaseCharacter(scDoc.ch, bCaseSensitive))) { + // If the number was a real + if (SetNumericConstantState(scDoc)) { + // Colour the matched string to the real constant state + scDoc.ChangeState(SCE_CLW_REAL_CONSTANT); + } + // Else the number was an integer + else { + // Colour the matched string to an integer constant state + scDoc.ChangeState(SCE_CLW_INTEGER_CONSTANT); + } + // Terminate the integer constant state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + + // + // Determine if a new state should be entered. + // + + // Beginning of Line Handling + if (scDoc.atLineStart) { + // Reset the column 1 label flag + iColumn1Label = false; + // If column 1 character is a label start character + if (IsALabelStart(scDoc.ch)) { + // Label character is found in column 1 + // so set column 1 label flag and clear last column 1 label + iColumn1Label = true; + // Set the state to label + scDoc.SetState(SCE_CLW_LABEL); + } + // else if character is a space or tab + else if (IsASpace(scDoc.ch)){ + // Set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + // else if comment start (!) or is an * (asterisk) + else if (IsACommentStart(scDoc.ch) || scDoc.ch == '*' ) { + // then set the state to comment. + scDoc.SetState(SCE_CLW_COMMENT); + } + // else the character is a ? (question mark) + else if (scDoc.ch == '?') { + // Change to the compiler directive state, move forward, + // colouring the ? (question mark), change back to default state. + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + scDoc.Forward(); + scDoc.SetState(SCE_CLW_DEFAULT); + } + // else an invalid character in column 1 + else { + // Set to error state + scDoc.SetState(SCE_CLW_ERROR); + } + } + // End of Line Handling + else if (scDoc.atLineEnd) { + // Reset to the default state at the end of each line. + scDoc.SetState(SCE_CLW_DEFAULT); + } + // Default Handling + else { + // If in default state + if (scDoc.state == SCE_CLW_DEFAULT) { + // If is a letter could be a possible statement + if (isalpha(scDoc.ch)) { + // Set the state to Clarion Keyword and verify later + scDoc.SetState(SCE_CLW_KEYWORD); + } + // else is a number + else if (isdigit(scDoc.ch)) { + // Set the state to Integer Constant and verify later + scDoc.SetState(SCE_CLW_INTEGER_CONSTANT); + } + // else if the start of a comment or a | (line continuation) + else if (IsACommentStart(scDoc.ch) || scDoc.ch == '|') { + // then set the state to comment. + scDoc.SetState(SCE_CLW_COMMENT); + } + // else if the character is a ' (single quote) + else if (scDoc.ch == '\'') { + // If the character is also a ' (single quote) + // Embedded Apostrophe + if (scDoc.chNext == '\'') { + // Move forward colouring it as default state + scDoc.ForwardSetState(SCE_CLW_DEFAULT); + } + else { + // move to the next character and then set the state to comment. + scDoc.ForwardSetState(SCE_CLW_STRING); + } + } + // else the character is an @ (ampersand) + else if (scDoc.ch == '@') { + // Case insensitive. + if (!bCaseSensitive) { + // If character is a valid picture token character + if (strchr("DEKNPSTdeknpst", scDoc.chNext) != NULL) { + // Set to the picture string state + scDoc.SetState(SCE_CLW_PICTURE_STRING); + } + } + // Case sensitive + else { + // If character is a valid picture token character + if (strchr("DEKNPST", scDoc.chNext) != NULL) { + // Set the picture string state + scDoc.SetState(SCE_CLW_PICTURE_STRING); + } + } + } + } + } + } + // lexing complete + scDoc.Complete(); +} + +// Clarion Language Case Sensitive Colouring Procedure +static void ColouriseClarionDocSensitive(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) { + + ColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, true); +} + +// Clarion Language Case Insensitive Colouring Procedure +static void ColouriseClarionDocInsensitive(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) { + + ColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, false); +} + +// Fill Buffer + +static void FillBuffer(unsigned int uiStart, unsigned int uiEnd, Accessor &accStyler, char *szBuffer, unsigned int uiLength) { + + unsigned int uiPos = 0; + + while ((uiPos < uiEnd - uiStart + 1) && (uiPos < uiLength-1)) { + szBuffer[uiPos] = static_cast(toupper(accStyler[uiStart + uiPos])); + uiPos++; + } + szBuffer[uiPos] = '\0'; +} + +// Classify Clarion Fold Point + +static int ClassifyClarionFoldPoint(int iLevel, const char* szString) { + + if (!(isdigit(szString[0]) || (szString[0] == '.'))) { + if (strcmp(szString, "PROCEDURE") == 0) { + // iLevel = SC_FOLDLEVELBASE + 1; + } + else if (strcmp(szString, "MAP") == 0 || + strcmp(szString,"ACCEPT") == 0 || + strcmp(szString,"BEGIN") == 0 || + strcmp(szString,"CASE") == 0 || + strcmp(szString,"EXECUTE") == 0 || + strcmp(szString,"IF") == 0 || + strcmp(szString,"ITEMIZE") == 0 || + strcmp(szString,"INTERFACE") == 0 || + strcmp(szString,"JOIN") == 0 || + strcmp(szString,"LOOP") == 0 || + strcmp(szString,"MODULE") == 0 || + strcmp(szString,"RECORD") == 0) { + iLevel++; + } + else if (strcmp(szString, "APPLICATION") == 0 || + strcmp(szString, "CLASS") == 0 || + strcmp(szString, "DETAIL") == 0 || + strcmp(szString, "FILE") == 0 || + strcmp(szString, "FOOTER") == 0 || + strcmp(szString, "FORM") == 0 || + strcmp(szString, "GROUP") == 0 || + strcmp(szString, "HEADER") == 0 || + strcmp(szString, "INTERFACE") == 0 || + strcmp(szString, "MENU") == 0 || + strcmp(szString, "MENUBAR") == 0 || + strcmp(szString, "OLE") == 0 || + strcmp(szString, "OPTION") == 0 || + strcmp(szString, "QUEUE") == 0 || + strcmp(szString, "REPORT") == 0 || + strcmp(szString, "SHEET") == 0 || + strcmp(szString, "TAB") == 0 || + strcmp(szString, "TOOLBAR") == 0 || + strcmp(szString, "VIEW") == 0 || + strcmp(szString, "WINDOW") == 0) { + iLevel++; + } + else if (strcmp(szString, "END") == 0 || + strcmp(szString, "UNTIL") == 0 || + strcmp(szString, "WHILE") == 0) { + iLevel--; + } + } + return(iLevel); +} + +// Clarion Language Folding Procedure +static void FoldClarionDoc(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *[], Accessor &accStyler) { + + unsigned int uiEndPos = uiStartPos + iLength; + int iLineCurrent = accStyler.GetLine(uiStartPos); + int iLevelPrev = accStyler.LevelAt(iLineCurrent) & SC_FOLDLEVELNUMBERMASK; + int iLevelCurrent = iLevelPrev; + char chNext = accStyler[uiStartPos]; + int iStyle = iInitStyle; + int iStyleNext = accStyler.StyleAt(uiStartPos); + int iVisibleChars = 0; + int iLastStart = 0; + + for (unsigned int uiPos = uiStartPos; uiPos < uiEndPos; uiPos++) { + + char chChar = chNext; + chNext = accStyler.SafeGetCharAt(uiPos + 1); + int iStylePrev = iStyle; + iStyle = iStyleNext; + iStyleNext = accStyler.StyleAt(uiPos + 1); + bool bEOL = (chChar == '\r' && chNext != '\n') || (chChar == '\n'); + + if (iStylePrev == SCE_CLW_DEFAULT) { + if (iStyle == SCE_CLW_KEYWORD || iStyle == SCE_CLW_STRUCTURE_DATA_TYPE) { + // Store last word start point. + iLastStart = uiPos; + } + } + + if (iStylePrev == SCE_CLW_KEYWORD || iStylePrev == SCE_CLW_STRUCTURE_DATA_TYPE) { + if(iswordchar(chChar) && !iswordchar(chNext)) { + char chBuffer[100]; + FillBuffer(iLastStart, uiPos, accStyler, chBuffer, sizeof(chBuffer)); + iLevelCurrent = ClassifyClarionFoldPoint(iLevelCurrent,chBuffer); + // if ((iLevelCurrent == SC_FOLDLEVELBASE + 1) && iLineCurrent > 1) { + // accStyler.SetLevel(iLineCurrent-1,SC_FOLDLEVELBASE); + // iLevelPrev = SC_FOLDLEVELBASE; + // } + } + } + + if (bEOL) { + int iLevel = iLevelPrev; + if ((iLevelCurrent > iLevelPrev) && (iVisibleChars > 0)) + iLevel |= SC_FOLDLEVELHEADERFLAG; + if (iLevel != accStyler.LevelAt(iLineCurrent)) { + accStyler.SetLevel(iLineCurrent,iLevel); + } + iLineCurrent++; + iLevelPrev = iLevelCurrent; + iVisibleChars = 0; + } + + if (!isspacechar(chChar)) + iVisibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags + // as they will be filled in later. + int iFlagsNext = accStyler.LevelAt(iLineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + accStyler.SetLevel(iLineCurrent, iLevelPrev | iFlagsNext); +} + +// Word List Descriptions +static const char * const rgWordListDescriptions[] = { + "Clarion Keywords", + "Compiler Directives", + "Built-in Procedures and Functions", + "Runtime Expressions", + "Structure and Data Types", + "Attributes", + "Standard Equates", + "Reserved Words (Labels)", + "Reserved Words (Procedure Labels)", + 0, +}; + +// Case Sensitive Clarion Language Lexer +LexerModule lmClw(SCLEX_CLW, ColouriseClarionDocSensitive, "clarion", FoldClarionDoc, rgWordListDescriptions); + +// Case Insensitive Clarion Language Lexer +LexerModule lmClwNoCase(SCLEX_CLWNOCASE, ColouriseClarionDocInsensitive, "clarionnocase", FoldClarionDoc, rgWordListDescriptions); diff --git a/scintilla/src/LexCPP.cxx b/scintilla/src/LexCPP.cxx new file mode 100644 index 00000000..e4d51b5b --- /dev/null +++ b/scintilla/src/LexCPP.cxx @@ -0,0 +1,484 @@ +// Scintilla source code edit control +/** @file LexCPP.cxx + ** Lexer for C++, C, Java, and JavaScript. + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define SET_LOWER "abcdefghijklmnopqrstuvwxyz" +#define SET_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +#define SET_DIGITS "0123456789" + +class SetOfCharacters { + int size; + bool valueAfter; + bool *bset; +public: + SetOfCharacters(const char *setOfCharacters, int size_=0x80, bool valueAfter_=false) { + size = size_; + valueAfter = valueAfter_; + bset = new bool[size]; + for (int i=0; i < size; i++) { + bset[i] = false; + } + for (const char *cp=setOfCharacters; *cp; cp++) { + int val = static_cast(*cp); + PLATFORM_ASSERT(val >= 0); + PLATFORM_ASSERT(val < size); + bset[val] = true; + } + } + ~SetOfCharacters() { + delete []bset; + bset = 0; + size = 0; + } + void Add(int val) { + PLATFORM_ASSERT(val >= 0); + PLATFORM_ASSERT(val < size); + bset[val] = true; + } + bool Contains(int val) { + PLATFORM_ASSERT(val >= 0); + return (val < size) ? bset[val] : valueAfter; + } +}; + +static bool IsSpaceEquiv(int state) { + return (state <= SCE_C_COMMENTDOC) || + // including SCE_C_DEFAULT, SCE_C_COMMENT, SCE_C_COMMENTLINE + (state == SCE_C_COMMENTLINEDOC) || (state == SCE_C_COMMENTDOCKEYWORD) || + (state == SCE_C_COMMENTDOCKEYWORDERROR); +} + +static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler, bool caseSensitive) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0; + + SetOfCharacters setOKBeforeRE("(=,"); + + SetOfCharacters setDoxygen("$@\\&<>#{}[]" SET_LOWER); + + SetOfCharacters setWordStart("_" SET_LOWER SET_UPPER, 0x80, true); + SetOfCharacters setWord("._" SET_LOWER SET_UPPER SET_DIGITS, 0x80, true); + if (styler.GetPropertyInt("lexer.cpp.allow.dollars", 1) != 0) { + setWordStart.Add('$'); + setWord.Add('$'); + } + + int chPrevNonWhite = ' '; + int visibleChars = 0; + bool lastWordWasUUID = false; + int styleBeforeDCKeyword = SCE_C_DEFAULT; + bool continuationLine = false; + + if (initStyle == SCE_C_PREPROCESSOR) { + // Set continuationLine if last character of previous line is '\' + int lineCurrent = styler.GetLine(startPos); + if (lineCurrent > 0) { + int chBack = styler.SafeGetCharAt(startPos-1, 0); + int chBack2 = styler.SafeGetCharAt(startPos-2, 0); + int lineEndChar = '!'; + if (chBack2 == '\r' && chBack == '\n') { + lineEndChar = styler.SafeGetCharAt(startPos-3, 0); + } else if (chBack == '\n' || chBack == '\r') { + lineEndChar = chBack2; + } + continuationLine = lineEndChar == '\\'; + } + } + + // look back to set chPrevNonWhite properly for better regex colouring + if (startPos > 0) { + int back = startPos; + while (--back && IsSpaceEquiv(styler.StyleAt(back))) + ; + if (styler.StyleAt(back) == SCE_C_OPERATOR) { + chPrevNonWhite = styler.SafeGetCharAt(back); + } + } + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart) { + if (sc.state == SCE_C_STRING) { + // Prevent SCE_C_STRINGEOL from leaking back to previous line which + // ends with a line continuation by locking in the state upto this position. + sc.SetState(SCE_C_STRING); + } + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + lastWordWasUUID = false; + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continuationLine = true; + continue; + } + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_C_OPERATOR: + sc.SetState(SCE_C_DEFAULT); + break; + case SCE_C_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (!setWord.Contains(sc.ch)) { + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_IDENTIFIER: + if (!setWord.Contains(sc.ch) || (sc.ch == '.')) { + char s[1000]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (keywords.InList(s)) { + lastWordWasUUID = strcmp(s, "uuid") == 0; + sc.ChangeState(SCE_C_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_C_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_C_GLOBALCLASS); + } + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_PREPROCESSOR: + if (sc.atLineStart && !continuationLine) { + sc.SetState(SCE_C_DEFAULT); + } else if (stylingWithinPreprocessor) { + if (IsASpace(sc.ch)) { + sc.SetState(SCE_C_DEFAULT); + } + } else { + if (sc.Match('/', '*') || sc.Match('/', '/')) { + sc.SetState(SCE_C_DEFAULT); + } + } + break; + case SCE_C_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT); + } + break; + case SCE_C_COMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_C_COMMENTDOC; + sc.SetState(SCE_C_COMMENTDOCKEYWORD); + } + } + break; + case SCE_C_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_COMMENTLINEDOC: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_C_COMMENTLINEDOC; + sc.SetState(SCE_C_COMMENTDOCKEYWORD); + } + } + break; + case SCE_C_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_C_COMMENTDOC) && sc.Match('*', '/')) { + sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT); + } else if (!setDoxygen.Contains(sc.ch)) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) { + sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR); + } + sc.SetState(styleBeforeDCKeyword); + } + break; + case SCE_C_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_C_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_C_DEFAULT); + } + break; + case SCE_C_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_C_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_C_DEFAULT); + } + break; + case SCE_C_REGEX: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } else if (sc.ch == '/') { + sc.Forward(); + while ((sc.ch < 0x80) && islower(sc.ch)) + sc.Forward(); // gobble regex flags + sc.SetState(SCE_C_DEFAULT); + } else if (sc.ch == '\\') { + // Gobble up the quoted character + if (sc.chNext == '\\' || sc.chNext == '/') { + sc.Forward(); + } + } + break; + case SCE_C_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_VERBATIM: + if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_C_DEFAULT); + } + } + break; + case SCE_C_UUID: + if (sc.ch == '\r' || sc.ch == '\n' || sc.ch == ')') { + sc.SetState(SCE_C_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_C_DEFAULT) { + if (sc.Match('@', '\"')) { + sc.SetState(SCE_C_VERBATIM); + sc.Forward(); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + if (lastWordWasUUID) { + sc.SetState(SCE_C_UUID); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_C_NUMBER); + } + } else if (setWordStart.Contains(sc.ch) || (sc.ch == '@')) { + if (lastWordWasUUID) { + sc.SetState(SCE_C_UUID); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_C_IDENTIFIER); + } + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style + sc.SetState(SCE_C_COMMENTDOC); + } else { + sc.SetState(SCE_C_COMMENT); + } + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) + // Support of Qt/Doxygen doc. style + sc.SetState(SCE_C_COMMENTLINEDOC); + else + sc.SetState(SCE_C_COMMENTLINE); + } else if (sc.ch == '/' && setOKBeforeRE.Contains(chPrevNonWhite)) { + sc.SetState(SCE_C_REGEX); // JavaScript's RegEx + } else if (sc.ch == '\"') { + sc.SetState(SCE_C_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_C_CHARACTER); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_C_PREPROCESSOR); + // Skip whitespace between # and preprocessor word + do { + sc.Forward(); + } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); + if (sc.atLineEnd) { + sc.SetState(SCE_C_DEFAULT); + } + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_C_OPERATOR); + } + } + + if (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) { + chPrevNonWhite = sc.ch; + visibleChars++; + } + continuationLine = false; + } + sc.Complete(); +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_C_COMMENT || + style == SCE_C_COMMENTDOC || + style == SCE_C_COMMENTDOCKEYWORD || + style == SCE_C_COMMENTDOCKEYWORDERROR; +} + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". +static void FoldCppDoc(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev) && (stylePrev != SCE_C_COMMENTLINEDOC)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && (styleNext != SCE_C_COMMENTLINEDOC) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (foldComment && (style == SCE_C_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelNext++; + } else if (chNext2 == '}') { + levelNext--; + } + } + } + if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) { + if (ch == '#') { + unsigned int j = i + 1; + while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (styler.Match(j, "region") || styler.Match(j, "if")) { + levelNext++; + } else if (styler.Match(j, "end")) { + levelNext--; + } + } + } + if (style == SCE_C_OPERATOR) { + if (ch == '{') { + // Measure the minimum before a '{' to allow + // folding on "} else {" + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + if (atEOL) { + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + visibleChars = 0; + } + if (!IsASpace(ch)) + visibleChars++; + } +} + +static const char * const cppWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + "Documentation comment keywords", + "Unused", + "Global classes and typedefs", + 0, + }; + +static void ColouriseCppDocSensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseCppDoc(startPos, length, initStyle, keywordlists, styler, true); +} + +static void ColouriseCppDocInsensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseCppDoc(startPos, length, initStyle, keywordlists, styler, false); +} + +LexerModule lmCPP(SCLEX_CPP, ColouriseCppDocSensitive, "cpp", FoldCppDoc, cppWordLists); +LexerModule lmCPPNoCase(SCLEX_CPPNOCASE, ColouriseCppDocInsensitive, "cppnocase", FoldCppDoc, cppWordLists); diff --git a/scintilla/src/LexCSS.cxx b/scintilla/src/LexCSS.cxx new file mode 100644 index 00000000..88e14545 --- /dev/null +++ b/scintilla/src/LexCSS.cxx @@ -0,0 +1,303 @@ +// Scintilla source code edit control +/** @file LexCSS.cxx + ** Lexer for Cascading Style Sheets + ** Written by Jakub Vrána + ** Improved by Philippe Lhoste (CSS2) + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + +static inline bool IsAWordChar(const unsigned int ch) { + return (isalnum(ch) || ch == '-' || ch == '_' || ch >= 161); // _ is not in fact correct CSS word-character +} + +inline bool IsCssOperator(const char ch) { + if (!isalnum(ch) && + (ch == '{' || ch == '}' || ch == ':' || ch == ',' || ch == ';' || + ch == '.' || ch == '#' || ch == '!' || ch == '@' || + /* CSS2 */ + ch == '*' || ch == '>' || ch == '+' || ch == '=' || ch == '~' || ch == '|' || + ch == '[' || ch == ']' || ch == '(' || ch == ')')) { + return true; + } + return false; +} + +static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { + WordList &keywords = *keywordlists[0]; + WordList &pseudoClasses = *keywordlists[1]; + WordList &keywords2 = *keywordlists[2]; + + StyleContext sc(startPos, length, initStyle, styler); + + int lastState = -1; // before operator + int lastStateC = -1; // before comment + int op = ' '; // last operator + + for (; sc.More(); sc.Forward()) { + if (sc.state == SCE_CSS_COMMENT && sc.Match('*', '/')) { + if (lastStateC == -1) { + // backtrack to get last state: + // comments are like whitespace, so we must return to the previous state + unsigned int i = startPos; + for (; i > 0; i--) { + if ((lastStateC = styler.StyleAt(i-1)) != SCE_CSS_COMMENT) { + if (lastStateC == SCE_CSS_OPERATOR) { + op = styler.SafeGetCharAt(i-1); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + if (i == 0) + lastState = SCE_CSS_DEFAULT; + } + break; + } + } + if (i == 0) + lastStateC = SCE_CSS_DEFAULT; + } + sc.Forward(); + sc.ForwardSetState(lastStateC); + } + + if (sc.state == SCE_CSS_COMMENT) + continue; + + if (sc.state == SCE_CSS_DOUBLESTRING || sc.state == SCE_CSS_SINGLESTRING) { + if (sc.ch != (sc.state == SCE_CSS_DOUBLESTRING ? '\"' : '\'')) + continue; + unsigned int i = sc.currentPos; + while (i && styler[i-1] == '\\') + i--; + if ((sc.currentPos - i) % 2 == 1) + continue; + sc.ForwardSetState(SCE_CSS_VALUE); + } + + if (sc.state == SCE_CSS_OPERATOR) { + if (op == ' ') { + unsigned int i = startPos; + op = styler.SafeGetCharAt(i-1); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + } + switch (op) { + case '@': + if (lastState == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_DIRECTIVE); + break; + case '*': + if (lastState == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_TAG); + break; + case '>': + case '+': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_CLASS + || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_DEFAULT); + break; + case '[': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_ATTRIBUTE); + break; + case ']': + if (lastState == SCE_CSS_ATTRIBUTE) + sc.SetState(SCE_CSS_TAG); + break; + case '{': + if (lastState == SCE_CSS_DIRECTIVE) + sc.SetState(SCE_CSS_DEFAULT); + else if (lastState == SCE_CSS_TAG) + sc.SetState(SCE_CSS_IDENTIFIER); + break; + case '}': + if (lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_VALUE || lastState == SCE_CSS_IMPORTANT || + lastState == SCE_CSS_IDENTIFIER || lastState == SCE_CSS_IDENTIFIER2) + sc.SetState(SCE_CSS_DEFAULT); + break; + case ':': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_PSEUDOCLASS); + else if (lastState == SCE_CSS_IDENTIFIER || lastState == SCE_CSS_IDENTIFIER2 || lastState == SCE_CSS_UNKNOWN_IDENTIFIER) + sc.SetState(SCE_CSS_VALUE); + break; + case '.': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_CLASS); + break; + case '#': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_ID); + break; + case ',': + if (lastState == SCE_CSS_TAG) + sc.SetState(SCE_CSS_DEFAULT); + break; + case ';': + if (lastState == SCE_CSS_DIRECTIVE) + sc.SetState(SCE_CSS_DEFAULT); + else if (lastState == SCE_CSS_VALUE || lastState == SCE_CSS_IMPORTANT) + sc.SetState(SCE_CSS_IDENTIFIER); + break; + case '!': + if (lastState == SCE_CSS_VALUE) + sc.SetState(SCE_CSS_IMPORTANT); + break; + } + } + + if (IsAWordChar(sc.ch)) { + if (sc.state == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_TAG); + continue; + } + + if (IsAWordChar(sc.chPrev) && ( + sc.state == SCE_CSS_IDENTIFIER || sc.state == SCE_CSS_IDENTIFIER2 + || sc.state == SCE_CSS_UNKNOWN_IDENTIFIER + || sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS + || sc.state == SCE_CSS_IMPORTANT + )) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + char *s2 = s; + while (*s2 && !IsAWordChar(*s2)) + s2++; + switch (sc.state) { + case SCE_CSS_IDENTIFIER: + if (!keywords.InList(s2)) { + if (keywords2.InList(s2)) { + sc.ChangeState(SCE_CSS_IDENTIFIER2); + } else { + sc.ChangeState(SCE_CSS_UNKNOWN_IDENTIFIER); + } + } + break; + case SCE_CSS_UNKNOWN_IDENTIFIER: + if (keywords.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER); + else if (keywords2.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER2); + break; + case SCE_CSS_PSEUDOCLASS: + if (!pseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_UNKNOWN_PSEUDOCLASS); + break; + case SCE_CSS_UNKNOWN_PSEUDOCLASS: + if (pseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_PSEUDOCLASS); + break; + case SCE_CSS_IMPORTANT: + if (strcmp(s2, "important") != 0) + sc.ChangeState(SCE_CSS_VALUE); + break; + } + } + + if (sc.ch != '.' && sc.ch != ':' && sc.ch != '#' && (sc.state == SCE_CSS_CLASS || sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS || sc.state == SCE_CSS_ID)) + sc.SetState(SCE_CSS_TAG); + + if (sc.Match('/', '*')) { + lastStateC = sc.state; + sc.SetState(SCE_CSS_COMMENT); + sc.Forward(); + } else if (sc.state == SCE_CSS_VALUE && (sc.ch == '\"' || sc.ch == '\'')) { + sc.SetState((sc.ch == '\"' ? SCE_CSS_DOUBLESTRING : SCE_CSS_SINGLESTRING)); + } else if (IsCssOperator(static_cast(sc.ch)) + && (sc.state != SCE_CSS_ATTRIBUTE || sc.ch == ']') + && (sc.state != SCE_CSS_VALUE || sc.ch == ';' || sc.ch == '}' || sc.ch == '!') + && (sc.state != SCE_CSS_DIRECTIVE || sc.ch == ';' || sc.ch == '{') + ) { + if (sc.state != SCE_CSS_OPERATOR) + lastState = sc.state; + sc.SetState(SCE_CSS_OPERATOR); + op = sc.ch; + } + } + + sc.Complete(); +} + +static void FoldCSSDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + bool inComment = (styler.StyleAt(startPos-1) == SCE_CSS_COMMENT); + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styler.StyleAt(i); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment) { + if (!inComment && (style == SCE_CSS_COMMENT)) + levelCurrent++; + else if (inComment && (style != SCE_CSS_COMMENT)) + levelCurrent--; + inComment = (style == SCE_CSS_COMMENT); + } + if (style == SCE_CSS_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const cssWordListDesc[] = { + "CSS1 Keywords", + "Pseudo classes", + "CSS2 Keywords", + 0 +}; + +LexerModule lmCss(SCLEX_CSS, ColouriseCssDoc, "css", FoldCSSDoc, cssWordListDesc); diff --git a/scintilla/src/LexCaml.cxx b/scintilla/src/LexCaml.cxx new file mode 100644 index 00000000..6d6eee75 --- /dev/null +++ b/scintilla/src/LexCaml.cxx @@ -0,0 +1,399 @@ +// Scintilla source code edit control +/** @file LexCaml.cxx + ** Lexer for Objective Caml. + **/ +// Copyright 2005 by Robert Roessler +// The License.txt file describes the conditions under which this software may be distributed. +/* Release History + 20050204 Initial release. + 20050205 Quick compiler standards/"cleanliness" adjustment. + 20050206 Added cast for IsLeadByte(). + 20050209 Changes to "external" build support. + 20050306 Fix for 1st-char-in-doc "corner" case. + 20050502 Fix for [harmless] one-past-the-end coloring. + 20050515 Refined numeric token recognition logic. + 20051125 Added 2nd "optional" keywords class. + 20051129 Support "magic" (read-only) comments for RCaml. + 20051204 Swtich to using StyleContext infrastructure. +*/ + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +// Since the Microsoft __iscsym[f] funcs are not ANSI... +inline int iscaml(int c) {return isalnum(c) || c == '_';} +inline int iscamlf(int c) {return isalpha(c) || c == '_';} +inline int iscamld(int c) {return isdigit(c) || c == '_';} + +static const int baseT[24] = { + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A - L */ + 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16 /* M - X */ +}; + +#ifdef BUILD_AS_EXTERNAL_LEXER +/* + (actually seems to work!) +*/ +#include "WindowAccessor.h" +#include "ExternalLexer.h" + +#if PLAT_WIN +#include +#endif + +static void ColouriseCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void FoldCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void InternalLexOrFold(int lexOrFold, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props); + +static const char* LexerName = "caml"; + +#ifdef TRACE +void Platform::DebugPrintf(const char *format, ...) { + char buffer[2000]; + va_list pArguments; + va_start(pArguments, format); + vsprintf(buffer,format,pArguments); + va_end(pArguments); + Platform::DebugDisplay(buffer); +} +#else +void Platform::DebugPrintf(const char *, ...) { +} +#endif + +bool Platform::IsDBCSLeadByte(int codePage, char ch) { + return ::IsDBCSLeadByteEx(codePage, ch) != 0; +} + +long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, lParam); +} + +long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, + reinterpret_cast(lParam)); +} + +void EXT_LEXER_DECL Fold(unsigned int lexer, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Fold + InternalLexOrFold(1, startPos, length, initStyle, words, window, props); + +} + +int EXT_LEXER_DECL GetLexerCount() +{ + return 1; // just us [Objective] Caml lexers here! +} + +void EXT_LEXER_DECL GetLexerName(unsigned int Index, char *name, int buflength) +{ + // below useless evaluation(s) to supress "not used" warnings + Index; + // return as much of our lexer name as will fit (what's up with Index?) + if (buflength > 0) { + buflength--; + int n = strlen(LexerName); + if (n > buflength) + n = buflength; + memcpy(name, LexerName, n), name[n] = '\0'; + } +} + +void EXT_LEXER_DECL Lex(unsigned int lexer, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Lex + InternalLexOrFold(0, startPos, length, initStyle, words, window, props); +} + +static void InternalLexOrFold(int foldOrLex, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props) +{ + // create and initialize a WindowAccessor (including contained PropSet) + PropSet ps; + ps.SetMultiple(props); + WindowAccessor wa(window, ps); + // create and initialize WordList(s) + int nWL = 0; + for (; words[nWL]; nWL++) ; // count # of WordList PTRs needed + WordList** wl = new WordList* [nWL + 1];// alloc WordList PTRs + int i = 0; + for (; i < nWL; i++) { + wl[i] = new WordList(); // (works or THROWS bad_alloc EXCEPTION) + wl[i]->Set(words[i]); + } + wl[i] = 0; + // call our "internal" folder/lexer (... then do Flush!) + if (foldOrLex) + FoldCamlDoc(startPos, length, initStyle, wl, wa); + else + ColouriseCamlDoc(startPos, length, initStyle, wl, wa); + wa.Flush(); + // clean up before leaving + for (i = nWL - 1; i >= 0; i--) + delete wl[i]; + delete [] wl; +} + +static +#endif /* BUILD_AS_EXTERNAL_LEXER */ + +void ColouriseCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) +{ + // initialize styler + StyleContext sc(startPos, length, initStyle, styler); + // set up [initial] state info (terminating states that shouldn't "bleed") + int nesting = 0; + if (sc.state < SCE_CAML_STRING) + sc.state = SCE_CAML_DEFAULT; + if (sc.state >= SCE_CAML_COMMENT) + nesting = (sc.state & 0x0f) - SCE_CAML_COMMENT; + + int chBase = 0, chToken = 0, chLit = 0; + WordList& keywords = *keywordlists[0]; + WordList& keywords2 = *keywordlists[1]; + WordList& keywords3 = *keywordlists[2]; + const int useMagic = styler.GetPropertyInt("lexer.caml.magic", 0); + + // foreach char in range... + while (sc.More()) { + // set up [per-char] state info + int state2 = -1; // (ASSUME no state change) + int chColor = sc.currentPos - 1;// (ASSUME standard coloring range) + bool advance = true; // (ASSUME scanner "eats" 1 char) + + // step state machine + switch (sc.state & 0x0f) { + case SCE_CAML_DEFAULT: + chToken = sc.currentPos; // save [possible] token start (JIC) + // it's wide open; what do we have? + if (iscamlf(sc.ch)) + state2 = SCE_CAML_IDENTIFIER; + else if (sc.Match('`') && iscamlf(sc.chNext)) + state2 = SCE_CAML_TAGNAME; + else if (sc.Match('#') && isdigit(sc.chNext)) + state2 = SCE_CAML_LINENUM; + else if (isdigit(sc.ch)) { + state2 = SCE_CAML_NUMBER, chBase = 10; + if (sc.Match('0') && strchr("bBoOxX", sc.chNext)) + chBase = baseT[tolower(sc.chNext) - 'a'], sc.Forward(); + } else if (sc.Match('\'')) /* (char literal?) */ + state2 = SCE_CAML_CHAR, chLit = 0; + else if (sc.Match('\"')) + state2 = SCE_CAML_STRING; + else if (sc.Match('(', '*')) + state2 = SCE_CAML_COMMENT, + sc.ch = ' ', // (make SURE "(*)" isn't seen as a closed comment) + sc.Forward(); + else if (strchr("!?~" /* Caml "prefix-symbol" */ + "=<>@^|&+-*/$%" /* Caml "infix-symbol" */ + "()[]{};,:.#", sc.ch)) /* Caml "bracket" or ;,:.# */ + state2 = SCE_CAML_OPERATOR; + break; + + case SCE_CAML_IDENTIFIER: + // [try to] interpret as [additional] identifier char + if (!(iscaml(sc.ch) || sc.Match('\''))) { + const int n = sc.currentPos - chToken; + if (n < 24) { + // length is believable as keyword, [re-]construct token + char t[24]; + for (int i = -n; i < 0; i++) + t[n + i] = static_cast(sc.GetRelative(i)); + t[n] = '\0'; + // special-case "_" token as KEYWORD + if ((n == 1 && sc.chPrev == '_') || keywords.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD); + else if (keywords2.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD2); + else if (keywords3.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD3); + } + state2 = SCE_CAML_DEFAULT, advance = false; + } + break; + + case SCE_CAML_TAGNAME: + // [try to] interpret as [additional] tagname char + if (!(iscaml(sc.ch) || sc.Match('\''))) + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + /*case SCE_CAML_KEYWORD: + case SCE_CAML_KEYWORD2: + case SCE_CAML_KEYWORD3: + // [try to] interpret as [additional] keyword char + if (!iscaml(ch)) + state2 = SCE_CAML_DEFAULT, advance = false; + break;*/ + + case SCE_CAML_LINENUM: + // [try to] interpret as [additional] linenum directive char + if (!isdigit(sc.ch)) + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + case SCE_CAML_OPERATOR: { + // [try to] interpret as [additional] operator char + const char* o = 0; + if (iscaml(sc.ch) || isspace(sc.ch) /* ident or whitespace */ + || (o = strchr(")]};,\'\"`#", sc.ch),o)/* "termination" chars */ + || !strchr("!$%&*+-./:<=>?@^|~", sc.ch)/* "operator" chars */) { + // check for INCLUSIVE termination + if (o && strchr(")]};,", sc.ch)) { + if ((sc.Match(')') && sc.chPrev == '(') + || (sc.Match(']') && sc.chPrev == '[')) + // special-case "()" and "[]" tokens as KEYWORDS + sc.ChangeState(SCE_CAML_KEYWORD); + chColor++; + } else + advance = false; + state2 = SCE_CAML_DEFAULT; + } + break; + } + + case SCE_CAML_NUMBER: + // [try to] interpret as [additional] numeric literal char + // N.B. - improperly accepts "extra" digits in base 2 or 8 literals + if (iscamld(sc.ch) || IsADigit(sc.ch, chBase)) + break; + // how about an integer suffix? + if ((sc.Match('l') || sc.Match('L') || sc.Match('n')) + && (iscamld(sc.chPrev) || IsADigit(sc.chPrev, chBase))) + break; + // or a floating-point literal? + if (chBase == 10) { + // with a decimal point? + if (sc.Match('.') && iscamld(sc.chPrev)) + break; + // with an exponent? (I) + if ((sc.Match('e') || sc.Match('E')) + && (iscamld(sc.chPrev) || sc.chPrev == '.')) + break; + // with an exponent? (II) + if ((sc.Match('+') || sc.Match('-')) + && (sc.chPrev == 'e' || sc.chPrev == 'E')) + break; + } + // it looks like we have run out of number + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + case SCE_CAML_CHAR: + // [try to] interpret as [additional] char literal char + if (sc.Match('\\')) { + chLit = 1; // (definitely IS a char literal) + if (sc.chPrev == '\\') + sc.ch = ' '; // (so termination test isn't fooled) + // should we be terminating - one way or another? + } else if ((sc.Match('\'') && sc.chPrev != '\\') || sc.atLineEnd) { + state2 = SCE_CAML_DEFAULT; + if (sc.Match('\'')) + chColor++; + else + sc.ChangeState(SCE_CAML_IDENTIFIER); + // ... maybe a char literal, maybe not + } else if (chLit < 1 && sc.currentPos - chToken >= 2) + sc.ChangeState(SCE_CAML_IDENTIFIER), advance = false; + break; + + case SCE_CAML_STRING: + // [try to] interpret as [additional] string literal char + if (sc.Match('\\') && sc.chPrev == '\\') + sc.ch = ' '; // (so '\\' doesn't cause us trouble) + else if (sc.Match('\"') && sc.chPrev != '\\') + state2 = SCE_CAML_DEFAULT, chColor++; + break; + + case SCE_CAML_COMMENT: + case SCE_CAML_COMMENT1: + case SCE_CAML_COMMENT2: + case SCE_CAML_COMMENT3: + // we're IN a comment - does this start a NESTED comment? + if (sc.Match('(', '*')) + state2 = sc.state + 1, chToken = sc.currentPos, + sc.ch = ' ', // (make SURE "(*)" isn't seen as a closed comment) + sc.Forward(), nesting++; + // [try to] interpret as [additional] comment char + else if (sc.Match(')') && sc.chPrev == '*') { + if (nesting) + state2 = (sc.state & 0x0f) - 1, chToken = 0, nesting--; + else + state2 = SCE_CAML_DEFAULT; + chColor++; + // enable "magic" (read-only) comment AS REQUIRED + } else if (useMagic && sc.currentPos - chToken == 4 + && sc.Match('c') && sc.chPrev == 'r' && sc.GetRelative(-2) == '@') + sc.state |= 0x10; // (switch to read-only comment style) + break; + } + + // handle state change and char coloring as required + if (state2 >= 0) + styler.ColourTo(chColor, sc.state), sc.ChangeState(state2); + // move to next char UNLESS re-scanning current char + if (advance) + sc.Forward(); + } + + // do any required terminal char coloring (JIC) + sc.Complete(); +} + +#ifdef BUILD_AS_EXTERNAL_LEXER +static +#endif /* BUILD_AS_EXTERNAL_LEXER */ +void FoldCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) +{ + // below useless evaluation(s) to supress "not used" warnings + startPos || length || initStyle || keywordlists[0] || styler.Length(); +} + +static const char * const camlWordListDesc[] = { + "Keywords", // primary Objective Caml keywords + "Keywords2", // "optional" keywords (typically from Pervasives) + "Keywords3", // "optional" keywords (typically typenames) + 0 +}; + +#ifndef BUILD_AS_EXTERNAL_LEXER +LexerModule lmCaml(SCLEX_CAML, ColouriseCamlDoc, "caml", FoldCamlDoc, camlWordListDesc); +#endif /* BUILD_AS_EXTERNAL_LEXER */ diff --git a/scintilla/src/LexCmake.cxx b/scintilla/src/LexCmake.cxx new file mode 100644 index 00000000..3dd48f4e --- /dev/null +++ b/scintilla/src/LexCmake.cxx @@ -0,0 +1,453 @@ +// Scintilla source code edit control +/** @file LexCmake.cxx + ** Lexer for Cmake + **/ +// Copyright 2007 by Cristian Adam +// based on the NSIS lexer +// The License.txt file describes the conditions under which this software may be distributed. +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + +static bool isCmakeNumber(char ch) +{ + return(ch >= '0' && ch <= '9'); +} + +static bool isCmakeChar(char ch) +{ + return(ch == '.' ) || (ch == '_' ) || isCmakeNumber(ch) || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool isCmakeLetter(char ch) +{ + return(ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool CmakeNextLineHasElse(unsigned int start, unsigned int end, Accessor &styler) +{ + int nNextLine = -1; + for ( unsigned int i = start; i < end; i++ ) { + char cNext = styler.SafeGetCharAt( i ); + if ( cNext == '\n' ) { + nNextLine = i+1; + break; + } + } + + if ( nNextLine == -1 ) // We never foudn the next line... + return false; + + for ( unsigned int firstChar = nNextLine; firstChar < end; firstChar++ ) { + char cNext = styler.SafeGetCharAt( firstChar ); + if ( cNext == ' ' ) + continue; + if ( cNext == '\t' ) + continue; + if ( styler.Match(firstChar, "ELSE") || styler.Match(firstChar, "else")) + return true; + break; + } + + return false; +} + +static int calculateFoldCmake(unsigned int start, unsigned int end, int foldlevel, Accessor &styler, bool bElse) +{ + // If the word is too long, it is not what we are looking for + if ( end - start > 20 ) + return foldlevel; + + int newFoldlevel = foldlevel; + + char s[20]; // The key word we are looking for has atmost 13 characters + for (unsigned int i = 0; i < end - start + 1 && i < 19; i++) { + s[i] = static_cast( styler[ start + i ] ); + s[i + 1] = '\0'; + } + + if ( CompareCaseInsensitive(s, "IF") == 0 || CompareCaseInsensitive(s, "WHILE") == 0 + || CompareCaseInsensitive(s, "MACRO") == 0 || CompareCaseInsensitive(s, "FOREACH") == 0 + || CompareCaseInsensitive(s, "ELSEIF") == 0 ) + newFoldlevel++; + else if ( CompareCaseInsensitive(s, "ENDIF") == 0 || CompareCaseInsensitive(s, "ENDWHILE") == 0 + || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0) + newFoldlevel--; + else if ( bElse && CompareCaseInsensitive(s, "ELSEIF") == 0 ) + newFoldlevel++; + else if ( bElse && CompareCaseInsensitive(s, "ELSE") == 0 ) + newFoldlevel++; + + return newFoldlevel; +} + +static int classifyWordCmake(unsigned int start, unsigned int end, WordList *keywordLists[], Accessor &styler ) +{ + char word[100] = {0}; + char lowercaseWord[100] = {0}; + + WordList &Commands = *keywordLists[0]; + WordList &Parameters = *keywordLists[1]; + WordList &UserDefined = *keywordLists[2]; + + for (unsigned int i = 0; i < end - start + 1 && i < 99; i++) { + word[i] = static_cast( styler[ start + i ] ); + lowercaseWord[i] = static_cast(tolower(word[i])); + } + + // Check for special words... + if ( CompareCaseInsensitive(word, "MACRO") == 0 || CompareCaseInsensitive(word, "ENDMACRO") == 0 ) + return SCE_CMAKE_MACRODEF; + + if ( CompareCaseInsensitive(word, "IF") == 0 || CompareCaseInsensitive(word, "ENDIF") == 0 ) + return SCE_CMAKE_IFDEFINEDEF; + + if ( CompareCaseInsensitive(word, "ELSEIF") == 0 || CompareCaseInsensitive(word, "ELSE") == 0 ) + return SCE_CMAKE_IFDEFINEDEF; + + if ( CompareCaseInsensitive(word, "WHILE") == 0 || CompareCaseInsensitive(word, "ENDWHILE") == 0) + return SCE_CMAKE_WHILEDEF; + + if ( CompareCaseInsensitive(word, "FOREACH") == 0 || CompareCaseInsensitive(word, "ENDFOREACH") == 0) + return SCE_CMAKE_FOREACHDEF; + + if ( Commands.InList(lowercaseWord) ) + return SCE_CMAKE_COMMANDS; + + if ( Parameters.InList(word) ) + return SCE_CMAKE_PARAMETERS; + + + if ( UserDefined.InList(word) ) + return SCE_CMAKE_USERDEFINED; + + if ( strlen(word) > 3 ) { + if ( word[1] == '{' && word[strlen(word)-1] == '}' ) + return SCE_CMAKE_VARIABLE; + } + + // To check for numbers + if ( isCmakeNumber( word[0] ) ) { + bool bHasSimpleCmakeNumber = true; + for (unsigned int j = 1; j < end - start + 1 && j < 99; j++) { + if ( !isCmakeNumber( word[j] ) ) { + bHasSimpleCmakeNumber = false; + break; + } + } + + if ( bHasSimpleCmakeNumber ) + return SCE_CMAKE_NUMBER; + } + + return SCE_CMAKE_DEFAULT; +} + +static void ColouriseCmakeDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) +{ + int state = SCE_CMAKE_DEFAULT; + if ( startPos > 0 ) + state = styler.StyleAt(startPos-1); // Use the style from the previous line, usually default, but could be commentbox + + styler.StartAt( startPos ); + styler.GetLine( startPos ); + + unsigned int nLengthDoc = startPos + length; + styler.StartSegment( startPos ); + + char cCurrChar; + bool bVarInString = false; + bool bClassicVarInString = false; + + unsigned int i; + for ( i = startPos; i < nLengthDoc; i++ ) { + cCurrChar = styler.SafeGetCharAt( i ); + char cNextChar = styler.SafeGetCharAt(i+1); + + switch (state) { + case SCE_CMAKE_DEFAULT: + if ( cCurrChar == '#' ) { // we have a comment line + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_COMMENT; + break; + } + if ( cCurrChar == '"' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGDQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + if ( cCurrChar == '\'' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGRQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + if ( cCurrChar == '`' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGLQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + + // CMake Variable + if ( cCurrChar == '$' || isCmakeChar(cCurrChar)) { + styler.ColourTo(i-1,state); + state = SCE_CMAKE_VARIABLE; + + // If it is a number, we must check and set style here first... + if ( isCmakeNumber(cCurrChar) && (cNextChar == '\t' || cNextChar == ' ' || cNextChar == '\r' || cNextChar == '\n' ) ) + styler.ColourTo( i, SCE_CMAKE_NUMBER); + + break; + } + + break; + case SCE_CMAKE_COMMENT: + if ( cNextChar == '\n' || cNextChar == '\r' ) { + // Special case: + if ( cCurrChar == '\\' ) { + styler.ColourTo(i-2,state); + styler.ColourTo(i,SCE_CMAKE_DEFAULT); + } + else { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + } + } + break; + case SCE_CMAKE_STRINGDQ: + case SCE_CMAKE_STRINGLQ: + case SCE_CMAKE_STRINGRQ: + + if ( styler.SafeGetCharAt(i-1) == '\\' && styler.SafeGetCharAt(i-2) == '$' ) + break; // Ignore the next character, even if it is a quote of some sort + + if ( cCurrChar == '"' && state == SCE_CMAKE_STRINGDQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cCurrChar == '`' && state == SCE_CMAKE_STRINGLQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cCurrChar == '\'' && state == SCE_CMAKE_STRINGRQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cNextChar == '\r' || cNextChar == '\n' ) { + int nCurLine = styler.GetLine(i+1); + int nBack = i; + // We need to check if the previous line has a \ in it... + bool bNextLine = false; + + while ( nBack > 0 ) { + if ( styler.GetLine(nBack) != nCurLine ) + break; + + char cTemp = styler.SafeGetCharAt(nBack, 'a'); // Letter 'a' is safe here + + if ( cTemp == '\\' ) { + bNextLine = true; + break; + } + if ( cTemp != '\r' && cTemp != '\n' && cTemp != '\t' && cTemp != ' ' ) + break; + + nBack--; + } + + if ( bNextLine ) { + styler.ColourTo(i+1,state); + } + if ( bNextLine == false ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + } + } + break; + + case SCE_CMAKE_VARIABLE: + + // CMake Variable: + if ( cCurrChar == '$' ) + state = SCE_CMAKE_DEFAULT; + else if ( cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' ) ) + state = SCE_CMAKE_DEFAULT; + else if ( (isCmakeChar(cCurrChar) && !isCmakeChar( cNextChar) && cNextChar != '}') || cCurrChar == '}' ) { + state = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler ); + styler.ColourTo( i, state); + state = SCE_CMAKE_DEFAULT; + } + else if ( !isCmakeChar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' ) { + if ( classifyWordCmake( styler.GetStartSegment(), i-1, keywordLists, styler) == SCE_CMAKE_NUMBER ) + styler.ColourTo( i-1, SCE_CMAKE_NUMBER ); + + state = SCE_CMAKE_DEFAULT; + + if ( cCurrChar == '"' ) { + state = SCE_CMAKE_STRINGDQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '`' ) { + state = SCE_CMAKE_STRINGLQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '\'' ) { + state = SCE_CMAKE_STRINGRQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '#' ) { + state = SCE_CMAKE_COMMENT; + } + } + break; + } + + if ( state == SCE_CMAKE_COMMENT) { + styler.ColourTo(i,state); + } + else if ( state == SCE_CMAKE_STRINGDQ || state == SCE_CMAKE_STRINGLQ || state == SCE_CMAKE_STRINGRQ ) { + bool bIngoreNextDollarSign = false; + + if ( bVarInString && cCurrChar == '$' ) { + bVarInString = false; + bIngoreNextDollarSign = true; + } + else if ( bVarInString && cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' || cNextChar == '"' || cNextChar == '`' || cNextChar == '\'' ) ) { + styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR); + bVarInString = false; + bIngoreNextDollarSign = false; + } + + else if ( bVarInString && !isCmakeChar(cNextChar) ) { + int nWordState = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler); + if ( nWordState == SCE_CMAKE_VARIABLE ) + styler.ColourTo( i, SCE_CMAKE_STRINGVAR); + bVarInString = false; + } + // Covers "${TEST}..." + else if ( bClassicVarInString && cNextChar == '}' ) { + styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR); + bClassicVarInString = false; + } + + // Start of var in string + if ( !bIngoreNextDollarSign && cCurrChar == '$' && cNextChar == '{' ) { + styler.ColourTo( i-1, state); + bClassicVarInString = true; + bVarInString = false; + } + else if ( !bIngoreNextDollarSign && cCurrChar == '$' ) { + styler.ColourTo( i-1, state); + bVarInString = true; + bClassicVarInString = false; + } + } + } + + // Colourise remaining document + styler.ColourTo(nLengthDoc-1,state); +} + +static void FoldCmakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) +{ + // No folding enabled, no reason to continue... + if ( styler.GetPropertyInt("fold") == 0 ) + return; + + bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) == 1; + + int lineCurrent = styler.GetLine(startPos); + unsigned int safeStartPos = styler.LineStart( lineCurrent ); + + bool bArg1 = true; + int nWordStart = -1; + + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + + for (unsigned int i = safeStartPos; i < startPos + length; i++) { + char chCurr = styler.SafeGetCharAt(i); + + if ( bArg1 ) { + if ( nWordStart == -1 && (isCmakeLetter(chCurr)) ) { + nWordStart = i; + } + else if ( isCmakeLetter(chCurr) == false && nWordStart > -1 ) { + int newLevel = calculateFoldCmake( nWordStart, i-1, levelNext, styler, foldAtElse); + + if ( newLevel == levelNext ) { + if ( foldAtElse ) { + if ( CmakeNextLineHasElse(i, startPos + length, styler) ) + levelNext--; + } + } + else + levelNext = newLevel; + bArg1 = false; + } + } + + if ( chCurr == '\n' ) { + if ( bArg1 && foldAtElse) { + if ( CmakeNextLineHasElse(i, startPos + length, styler) ) + levelNext--; + } + + // If we are on a new line... + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext ) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + styler.SetLevel(lineCurrent, lev); + + lineCurrent++; + levelCurrent = levelNext; + bArg1 = true; // New line, lets look at first argument again + nWordStart = -1; + } + } + + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + styler.SetLevel(lineCurrent, lev); +} + +static const char * const cmakeWordLists[] = { + "Commands", + "Parameters", + "UserDefined", + 0, + 0,}; + +LexerModule lmCmake(SCLEX_CMAKE, ColouriseCmakeDoc, "cmake", FoldCmakeDoc, cmakeWordLists); diff --git a/scintilla/src/LexConf.cxx b/scintilla/src/LexConf.cxx new file mode 100644 index 00000000..3325b341 --- /dev/null +++ b/scintilla/src/LexConf.cxx @@ -0,0 +1,184 @@ +// Scintilla source code edit control +/** @file LexConf.cxx + ** Lexer for Apache Configuration Files. + ** + ** First working version contributed by Ahmad Zawawi on October 28, 2000. + ** i created this lexer because i needed something pretty when dealing + ** when Apache Configuration files... + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) +{ + int state = SCE_CONF_DEFAULT; + char chNext = styler[startPos]; + int lengthDoc = startPos + length; + // create a buffer large enough to take the largest chunk... + char *buffer = new char[length]; + int bufferCount = 0; + + // this assumes that we have 2 keyword list in conf.properties + WordList &directives = *keywordLists[0]; + WordList ¶ms = *keywordLists[1]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_CONF_DEFAULT: + if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { + // whitespace is simply ignored here... + styler.ColourTo(i,SCE_CONF_DEFAULT); + break; + } else if( ch == '#' ) { + // signals the start of a comment... + state = SCE_CONF_COMMENT; + styler.ColourTo(i,SCE_CONF_COMMENT); + } else if( ch == '.' /*|| ch == '/'*/) { + // signals the start of a file... + state = SCE_CONF_EXTENSION; + styler.ColourTo(i,SCE_CONF_EXTENSION); + } else if( ch == '"') { + state = SCE_CONF_STRING; + styler.ColourTo(i,SCE_CONF_STRING); + } else if( ispunct(ch) ) { + // signals an operator... + // no state jump necessary for this + // simple case... + styler.ColourTo(i,SCE_CONF_OPERATOR); + } else if( isalpha(ch) ) { + // signals the start of an identifier + bufferCount = 0; + buffer[bufferCount++] = static_cast(tolower(ch)); + state = SCE_CONF_IDENTIFIER; + } else if( isdigit(ch) ) { + // signals the start of a number + bufferCount = 0; + buffer[bufferCount++] = ch; + //styler.ColourTo(i,SCE_CONF_NUMBER); + state = SCE_CONF_NUMBER; + } else { + // style it the default style.. + styler.ColourTo(i,SCE_CONF_DEFAULT); + } + break; + + case SCE_CONF_COMMENT: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_CONF_DEFAULT; + } else { + styler.ColourTo(i,SCE_CONF_COMMENT); + } + break; + + case SCE_CONF_EXTENSION: + // if we find a non-alphanumeric char, + // we simply go to default state + // else we're still dealing with an extension... + if( isalnum(ch) || (ch == '_') || + (ch == '-') || (ch == '$') || + (ch == '/') || (ch == '.') || (ch == '*') ) + { + styler.ColourTo(i,SCE_CONF_EXTENSION); + } else { + state = SCE_CONF_DEFAULT; + chNext = styler[i--]; + } + break; + + case SCE_CONF_STRING: + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || (ch == '\n') || (ch == '\r') ) { + state = SCE_CONF_DEFAULT; + } + styler.ColourTo(i,SCE_CONF_STRING); + break; + + case SCE_CONF_IDENTIFIER: + // stay in CONF_IDENTIFIER state until we find a non-alphanumeric + if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { + buffer[bufferCount++] = static_cast(tolower(ch)); + } else { + state = SCE_CONF_DEFAULT; + buffer[bufferCount] = '\0'; + + // check if the buffer contains a keyword, and highlight it if it is a keyword... + if(directives.InList(buffer)) { + styler.ColourTo(i-1,SCE_CONF_DIRECTIVE ); + } else if(params.InList(buffer)) { + styler.ColourTo(i-1,SCE_CONF_PARAMETER ); + } else if(strchr(buffer,'/') || strchr(buffer,'.')) { + styler.ColourTo(i-1,SCE_CONF_EXTENSION); + } else { + styler.ColourTo(i-1,SCE_CONF_DEFAULT); + } + + // push back the faulty character + chNext = styler[i--]; + + } + break; + + case SCE_CONF_NUMBER: + // stay in CONF_NUMBER state until we find a non-numeric + if( isdigit(ch) || ch == '.') { + buffer[bufferCount++] = ch; + } else { + state = SCE_CONF_DEFAULT; + buffer[bufferCount] = '\0'; + + // Colourize here... + if( strchr(buffer,'.') ) { + // it is an IP address... + styler.ColourTo(i-1,SCE_CONF_IP); + } else { + // normal number + styler.ColourTo(i-1,SCE_CONF_NUMBER); + } + + // push back a character + chNext = styler[i--]; + } + break; + + } + } + delete []buffer; +} + +static const char * const confWordListDesc[] = { + "Directives", + "Parameters", + 0 +}; + +LexerModule lmConf(SCLEX_CONF, ColouriseConfDoc, "conf", 0, confWordListDesc); diff --git a/scintilla/src/LexCrontab.cxx b/scintilla/src/LexCrontab.cxx new file mode 100644 index 00000000..f04ff4b8 --- /dev/null +++ b/scintilla/src/LexCrontab.cxx @@ -0,0 +1,218 @@ +// Scintilla source code edit control +/** @file LexCrontab.cxx + ** Lexer to use with extended crontab files used by a powerful + ** Windows scheduler/event monitor/automation manager nnCron. + ** (http://nemtsev.eserv.ru/) + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordList +*keywordLists[], Accessor &styler) +{ + int state = SCE_NNCRONTAB_DEFAULT; + char chNext = styler[startPos]; + int lengthDoc = startPos + length; + // create a buffer large enough to take the largest chunk... + char *buffer = new char[length]; + int bufferCount = 0; + // used when highliting environment variables inside quoted string: + bool insideString = false; + + // this assumes that we have 3 keyword list in conf.properties + WordList §ion = *keywordLists[0]; + WordList &keyword = *keywordLists[1]; + WordList &modifier = *keywordLists[2]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_NNCRONTAB_DEFAULT: + if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { + // whitespace is simply ignored here... + styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT); + break; + } else if( ch == '#' && styler.SafeGetCharAt(i+1) == '(') { + // signals the start of a task... + state = SCE_NNCRONTAB_TASK; + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } + else if( ch == '\\' && (styler.SafeGetCharAt(i+1) == ' ' || + styler.SafeGetCharAt(i+1) == '\t')) { + // signals the start of an extended comment... + state = SCE_NNCRONTAB_COMMENT; + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } else if( ch == '#' ) { + // signals the start of a plain comment... + state = SCE_NNCRONTAB_COMMENT; + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } else if( ch == ')' && styler.SafeGetCharAt(i+1) == '#') { + // signals the end of a task... + state = SCE_NNCRONTAB_TASK; + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } else if( ch == '"') { + state = SCE_NNCRONTAB_STRING; + styler.ColourTo(i,SCE_NNCRONTAB_STRING); + } else if( ch == '%') { + // signals environment variables + state = SCE_NNCRONTAB_ENVIRONMENT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + } else if( ch == '<' && styler.SafeGetCharAt(i+1) == '%') { + // signals environment variables + state = SCE_NNCRONTAB_ENVIRONMENT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + } else if( ch == '*' ) { + // signals an asterisk + // no state jump necessary for this simple case... + styler.ColourTo(i,SCE_NNCRONTAB_ASTERISK); + } else if( isalpha(ch) || ch == '<' ) { + // signals the start of an identifier + bufferCount = 0; + buffer[bufferCount++] = ch; + state = SCE_NNCRONTAB_IDENTIFIER; + } else if( isdigit(ch) ) { + // signals the start of a number + bufferCount = 0; + buffer[bufferCount++] = ch; + state = SCE_NNCRONTAB_NUMBER; + } else { + // style it the default style.. + styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT); + } + break; + + case SCE_NNCRONTAB_COMMENT: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_NNCRONTAB_DEFAULT; + } else { + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } + break; + + case SCE_NNCRONTAB_TASK: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_NNCRONTAB_DEFAULT; + } else { + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } + break; + + case SCE_NNCRONTAB_STRING: + if( ch == '%' ) { + state = SCE_NNCRONTAB_ENVIRONMENT; + insideString = true; + styler.ColourTo(i-1,SCE_NNCRONTAB_STRING); + break; + } + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || + (ch == '\n') || (ch == '\r') ) { + state = SCE_NNCRONTAB_DEFAULT; + } + styler.ColourTo(i,SCE_NNCRONTAB_STRING); + break; + + case SCE_NNCRONTAB_ENVIRONMENT: + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( ch == '%' && insideString ) { + state = SCE_NNCRONTAB_STRING; + insideString = false; + break; + } + if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\') + || (ch == '\n') || (ch == '\r') || (ch == '>') ) { + state = SCE_NNCRONTAB_DEFAULT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + break; + } + styler.ColourTo(i+1,SCE_NNCRONTAB_ENVIRONMENT); + break; + + case SCE_NNCRONTAB_IDENTIFIER: + // stay in CONF_IDENTIFIER state until we find a non-alphanumeric + if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || + (ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') || + (ch == '@') ) { + buffer[bufferCount++] = ch; + } else { + state = SCE_NNCRONTAB_DEFAULT; + buffer[bufferCount] = '\0'; + + // check if the buffer contains a keyword, + // and highlight it if it is a keyword... + if(section.InList(buffer)) { + styler.ColourTo(i,SCE_NNCRONTAB_SECTION ); + } else if(keyword.InList(buffer)) { + styler.ColourTo(i-1,SCE_NNCRONTAB_KEYWORD ); + } // else if(strchr(buffer,'/') || strchr(buffer,'.')) { + // styler.ColourTo(i-1,SCE_NNCRONTAB_EXTENSION); + // } + else if(modifier.InList(buffer)) { + styler.ColourTo(i-1,SCE_NNCRONTAB_MODIFIER ); + } else { + styler.ColourTo(i-1,SCE_NNCRONTAB_DEFAULT); + } + // push back the faulty character + chNext = styler[i--]; + } + break; + + case SCE_NNCRONTAB_NUMBER: + // stay in CONF_NUMBER state until we find a non-numeric + if( isdigit(ch) /* || ch == '.' */ ) { + buffer[bufferCount++] = ch; + } else { + state = SCE_NNCRONTAB_DEFAULT; + buffer[bufferCount] = '\0'; + // Colourize here... (normal number) + styler.ColourTo(i-1,SCE_NNCRONTAB_NUMBER); + // push back a character + chNext = styler[i--]; + } + break; + } + } + delete []buffer; +} + +static const char * const cronWordListDesc[] = { + "Section keywords and Forth words", + "nnCrontab keywords", + "Modifiers", + 0 +}; + +LexerModule lmNncrontab(SCLEX_NNCRONTAB, ColouriseNncrontabDoc, "nncrontab", 0, cronWordListDesc); diff --git a/scintilla/src/LexCsound.cxx b/scintilla/src/LexCsound.cxx new file mode 100644 index 00000000..67656988 --- /dev/null +++ b/scintilla/src/LexCsound.cxx @@ -0,0 +1,207 @@ +// Scintilla source code edit control +/** @file LexCsound.cxx + ** Lexer for Csound (Orchestra & Score) + ** Written by Georg Ritter - + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || + ch == '_' || ch == '?'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' || + ch == '%' || ch == '@' || ch == '$' || ch == '?'); +} + +static inline bool IsCsoundOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '%' || ch == ':') + return true; + return false; +} + +static void ColouriseCsoundDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &opcode = *keywordlists[0]; + WordList &headerStmt = *keywordlists[1]; + WordList &otherKeyword = *keywordlists[2]; + + // Do not leak onto next line + if (initStyle == SCE_CSOUND_STRINGEOL) + initStyle = SCE_CSOUND_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_CSOUND_OPERATOR) { + if (!IsCsoundOperator(static_cast(sc.ch))) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + }else if (sc.state == SCE_CSOUND_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } else if (sc.state == SCE_CSOUND_IDENTIFIER) { + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (opcode.InList(s)) { + sc.ChangeState(SCE_CSOUND_OPCODE); + } else if (headerStmt.InList(s)) { + sc.ChangeState(SCE_CSOUND_HEADERSTMT); + } else if (otherKeyword.InList(s)) { + sc.ChangeState(SCE_CSOUND_USERKEYWORD); + } else if (s[0] == 'p') { + sc.ChangeState(SCE_CSOUND_PARAM); + } else if (s[0] == 'a') { + sc.ChangeState(SCE_CSOUND_ARATE_VAR); + } else if (s[0] == 'k') { + sc.ChangeState(SCE_CSOUND_KRATE_VAR); + } else if (s[0] == 'i') { // covers both i-rate variables and i-statements + sc.ChangeState(SCE_CSOUND_IRATE_VAR); + } else if (s[0] == 'g') { + sc.ChangeState(SCE_CSOUND_GLOBAL_VAR); + } + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + else if (sc.state == SCE_CSOUND_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + else if ((sc.state == SCE_CSOUND_ARATE_VAR) || + (sc.state == SCE_CSOUND_KRATE_VAR) || + (sc.state == SCE_CSOUND_IRATE_VAR)) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_CSOUND_DEFAULT) { + if (sc.ch == ';'){ + sc.SetState(SCE_CSOUND_COMMENT); + } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) { + sc.SetState(SCE_CSOUND_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_CSOUND_IDENTIFIER); + } else if (IsCsoundOperator(static_cast(sc.ch))) { + sc.SetState(SCE_CSOUND_OPERATOR); + } else if (sc.ch == 'p') { + sc.SetState(SCE_CSOUND_PARAM); + } else if (sc.ch == 'a') { + sc.SetState(SCE_CSOUND_ARATE_VAR); + } else if (sc.ch == 'k') { + sc.SetState(SCE_CSOUND_KRATE_VAR); + } else if (sc.ch == 'i') { // covers both i-rate variables and i-statements + sc.SetState(SCE_CSOUND_IRATE_VAR); + } else if (sc.ch == 'g') { + sc.SetState(SCE_CSOUND_GLOBAL_VAR); + } + } + } + sc.Complete(); +} + +static void FoldCsoundInstruments(unsigned int startPos, int length, int /* initStyle */, WordList *[], + Accessor &styler) { + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int stylePrev = 0; + int styleNext = styler.StyleAt(startPos); + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if ((stylePrev != SCE_CSOUND_OPCODE) && (style == SCE_CSOUND_OPCODE)) { + char s[20]; + unsigned int j = 0; + while ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) { + s[j] = styler[i + j]; + j++; + } + s[j] = '\0'; + + if (strcmp(s, "instr") == 0) + levelCurrent++; + if (strcmp(s, "endin") == 0) + levelCurrent--; + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + stylePrev = style; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + + +static const char * const csoundWordListDesc[] = { + "Opcodes", + "Header Statements", + "User keywords", + 0 +}; + +LexerModule lmCsound(SCLEX_CSOUND, ColouriseCsoundDoc, "csound", FoldCsoundInstruments, csoundWordListDesc); diff --git a/scintilla/src/LexD.cxx b/scintilla/src/LexD.cxx new file mode 100644 index 00000000..994ce9da --- /dev/null +++ b/scintilla/src/LexD.cxx @@ -0,0 +1,354 @@ +/** @file LexD.cxx + ** Lexer for D. + ** + ** Copyright (c) 2006 by Waldemar Augustyn + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +/*/ Nested comments require keeping the value of the nesting level for every + position in the document. But since scintilla always styles line by line, + we only need to store one value per line. The non-negative number indicates + nesting level at the end of the line. +/*/ + +// We use custom qualifiers since it is not clear what D allows. + +static bool IsWordStart(int ch) { + return isascii(ch) && (isalpha(ch) || ch == '_'); +} + +static bool IsWord(int ch) { + return isascii(ch) && (isalnum(ch) || ch == '_'); +} + +static bool IsDoxygen(int ch) { + if (isascii(ch) && islower(ch)) + return true; + if (ch == '$' || ch == '@' || ch == '\\' || + ch == '&' || ch == '#' || ch == '<' || ch == '>' || + ch == '{' || ch == '}' || ch == '[' || ch == ']') + return true; + return false; +} + + +static void ColouriseDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler, bool caseSensitive) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + int styleBeforeDCKeyword = SCE_D_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + int curLine = styler.GetLine(startPos); + int curNcLevel = curLine > 0? styler.GetLineState(curLine-1): 0; + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart) { + if (sc.state == SCE_D_STRING) { + // Prevent SCE_D_STRINGEOL from leaking back to previous line which + // ends with a line continuation by locking in the state upto this position. + sc.SetState(SCE_D_STRING); + } + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_D_OPERATOR: + sc.SetState(SCE_D_DEFAULT); + break; + case SCE_D_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (!IsWord(sc.ch) && sc.ch != '.') { + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_IDENTIFIER: + if (!IsWord(sc.ch)) { + char s[1000]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (keywords.InList(s)) { + sc.ChangeState(SCE_D_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_D_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_D_TYPEDEF); + } + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_D_COMMENTDOC; + sc.SetState(SCE_D_COMMENTDOCKEYWORD); + } + } + break; + case SCE_D_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENTLINEDOC: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_D_COMMENTLINEDOC; + sc.SetState(SCE_D_COMMENTDOCKEYWORD); + } + } + break; + case SCE_D_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_D_COMMENTDOC) && sc.Match('*', '/')) { + sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } else if (!IsDoxygen(sc.ch)) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) { + sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR); + } + sc.SetState(styleBeforeDCKeyword); + } + break; + case SCE_D_COMMENTNESTED: + if (sc.Match('+', '/')) { + if (curNcLevel > 0) + curNcLevel -= 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.Forward(); + if (curNcLevel == 0) { + sc.ForwardSetState(SCE_D_DEFAULT); + } + } + else if (sc.Match('/','+')) { + curNcLevel += 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.Forward(); + } + break; + case SCE_D_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_D_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_D_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } + break; + } + + // Determine if a new state should be entered. + if (sc.state == SCE_D_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_D_NUMBER); + } else if (IsWordStart(sc.ch)) { + sc.SetState(SCE_D_IDENTIFIER); + } else if (sc.Match('/','+')) { + curNcLevel += 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.SetState(SCE_D_COMMENTNESTED); + sc.Forward(); + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style + sc.SetState(SCE_D_COMMENTDOC); + } else { + sc.SetState(SCE_D_COMMENT); + } + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) + // Support of Qt/Doxygen doc. style + sc.SetState(SCE_D_COMMENTLINEDOC); + else + sc.SetState(SCE_D_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_D_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_D_CHARACTER); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_D_OPERATOR); + } + } + } + sc.Complete(); +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_D_COMMENT || + style == SCE_D_COMMENTDOC || + style == SCE_D_COMMENTDOCKEYWORD || + style == SCE_D_COMMENTDOCKEYWORDERROR; +} + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". +static void FoldDoc(unsigned int startPos, int length, int initStyle, Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldAtElse = styler.GetPropertyInt("lexer.d.fold.at.else", + styler.GetPropertyInt("fold.at.else", 0)) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (style == SCE_D_OPERATOR) { + if (ch == '{') { + // Measure the minimum before a '{' to allow + // folding on "} else {" + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + if (atEOL) { + if (foldComment) { // Handle nested comments + int nc; + nc = styler.GetLineState(lineCurrent); + nc -= lineCurrent>0? styler.GetLineState(lineCurrent-1): 0; + levelNext += nc; + } + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + visibleChars = 0; + } + if (!IsASpace(ch)) + visibleChars++; + } +} + +static void FoldDDoc(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + FoldDoc(startPos, length, initStyle, styler); +} + +static const char * const dWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + "Documentation comment keywords", + "Type definitions and aliases", + 0, + }; + +static void ColouriseDDoc(unsigned int startPos, int length, + int initStyle, WordList *keywordlists[], Accessor &styler) { + ColouriseDoc(startPos, length, initStyle, keywordlists, styler, true); +} + +LexerModule lmD(SCLEX_D, ColouriseDDoc, "d", FoldDDoc, dWordLists); diff --git a/scintilla/src/LexEScript.cxx b/scintilla/src/LexEScript.cxx new file mode 100644 index 00000000..9de3a3ea --- /dev/null +++ b/scintilla/src/LexEScript.cxx @@ -0,0 +1,270 @@ +// Scintilla source code edit control +/** @file LexESCRIPT.cxx + ** Lexer for ESCRIPT + **/ +// Copyright 2003 by Patrizio Bekerle (patrizio@bekerle.com) + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + + + +static void ColouriseESCRIPTDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + + // Do not leak onto next line + /*if (initStyle == SCE_ESCRIPT_STRINGEOL) + initStyle = SCE_ESCRIPT_DEFAULT;*/ + + StyleContext sc(startPos, length, initStyle, styler); + + bool caseSensitive = styler.GetPropertyInt("escript.case.sensitive", 0) != 0; + + for (; sc.More(); sc.Forward()) { + + /*if (sc.atLineStart && (sc.state == SCE_ESCRIPT_STRING)) { + // Prevent SCE_ESCRIPT_STRINGEOL from leaking back to previous line + sc.SetState(SCE_ESCRIPT_STRING); + }*/ + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_ESCRIPT_OPERATOR || sc.state == SCE_ESCRIPT_BRACE) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } else if (sc.state == SCE_ESCRIPT_NUMBER) { + if (!IsADigit(sc.ch) || sc.ch != '.') { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + +// sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD3); + // sc.state = SCE_ESCRIPT_IDENTIFIER; + } + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENT) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTDOC) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTLINE) { + if (sc.atLineEnd) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ESCRIPT_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_ESCRIPT_NUMBER); + } else if (IsAWordStart(sc.ch) || (sc.ch == '#')) { + sc.SetState(SCE_ESCRIPT_IDENTIFIER); + } else if (sc.Match('/', '*')) { + sc.SetState(SCE_ESCRIPT_COMMENT); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + sc.SetState(SCE_ESCRIPT_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ESCRIPT_STRING); + //} else if (isoperator(static_cast(sc.ch))) { + } else if (sc.ch == '+' || sc.ch == '-' || sc.ch == '*' || sc.ch == '/' || sc.ch == '=' || sc.ch == '<' || sc.ch == '>' || sc.ch == '&' || sc.ch == '|' || sc.ch == '!' || sc.ch == '?' || sc.ch == ':') { + sc.SetState(SCE_ESCRIPT_OPERATOR); + } else if (sc.ch == '{' || sc.ch == '}') { + sc.SetState(SCE_ESCRIPT_BRACE); + } + } + + } + sc.Complete(); +} + + +static int classifyFoldPointESCRIPT(const char* s, const char* prevWord) { + int lev = 0; + if (strcmp(prevWord, "end") == 0) return lev; + if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "elseif") == 0) + return -1; + + if (strcmp(s, "for") == 0 || strcmp(s, "foreach") == 0 + || strcmp(s, "program") == 0 || strcmp(s, "function") == 0 + || strcmp(s, "while") == 0 || strcmp(s, "case") == 0 + || strcmp(s, "if") == 0 ) { + lev = 1; + } else if ( strcmp(s, "endfor") == 0 || strcmp(s, "endforeach") == 0 + || strcmp(s, "endprogram") == 0 || strcmp(s, "endfunction") == 0 + || strcmp(s, "endwhile") == 0 || strcmp(s, "endcase") == 0 + || strcmp(s, "endif") == 0 ) { + lev = -1; + } + + return lev; +} + + +static bool IsStreamCommentStyle(int style) { + return style == SCE_ESCRIPT_COMMENT || + style == SCE_ESCRIPT_COMMENTDOC || + style == SCE_ESCRIPT_COMMENTLINE; +} + +static void FoldESCRIPTDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) { + //~ bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + // Do not know how to fold the comment at the moment. + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldComment = true; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + int lastStart = 0; + char prevWord[32] = ""; + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelCurrent++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + + if (foldComment && (style == SCE_ESCRIPT_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelCurrent++; + } else if (chNext2 == '}') { + levelCurrent--; + } + } + } + + if (stylePrev == SCE_ESCRIPT_DEFAULT && style == SCE_ESCRIPT_WORD3) + { + // Store last word start point. + lastStart = i; + } + + if (style == SCE_ESCRIPT_WORD3) { + if(iswordchar(ch) && !iswordchar(chNext)) { + char s[32]; + unsigned int j; + for(j = 0; ( j < 31 ) && ( j < i-lastStart+1 ); j++) { + s[j] = static_cast(tolower(styler[lastStart + j])); + } + s[j] = '\0'; + levelCurrent += classifyFoldPointESCRIPT(s, prevWord); + strcpy(prevWord, s); + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + strcpy(prevWord, ""); + } + + if (!isspacechar(ch)) + visibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + + + +static const char * const ESCRIPTWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; + +LexerModule lmESCRIPT(SCLEX_ESCRIPT, ColouriseESCRIPTDoc, "escript", FoldESCRIPTDoc, ESCRIPTWordLists); diff --git a/scintilla/src/LexEiffel.cxx b/scintilla/src/LexEiffel.cxx new file mode 100644 index 00000000..6bc8b16a --- /dev/null +++ b/scintilla/src/LexEiffel.cxx @@ -0,0 +1,234 @@ +// Scintilla source code edit control +/** @file LexEiffel.cxx + ** Lexer for Eiffel. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static inline bool isEiffelOperator(unsigned int ch) { + // '.' left out as it is used to make up numbers + return ch == '*' || ch == '/' || ch == '\\' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '{' || ch == '}' || ch == '~' || + ch == '[' || ch == ']' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || + ch == '.' || ch == '^' || ch == '%' || ch == ':' || + ch == '!' || ch == '@' || ch == '?'; +} + +static inline bool IsAWordChar(unsigned int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsAWordStart(unsigned int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static void ColouriseEiffelDoc(unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_EIFFEL_STRINGEOL) { + if (sc.ch != '\r' && sc.ch != '\n') { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_OPERATOR) { + sc.SetState(SCE_EIFFEL_DEFAULT); + } else if (sc.state == SCE_EIFFEL_WORD) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (!keywords.InList(s)) { + sc.ChangeState(SCE_EIFFEL_IDENTIFIER); + } + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_COMMENTLINE) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_STRING) { + if (sc.ch == '%') { + sc.Forward(); + } else if (sc.ch == '\"') { + sc.Forward(); + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_CHARACTER) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_EIFFEL_STRINGEOL); + } else if (sc.ch == '%') { + sc.Forward(); + } else if (sc.ch == '\'') { + sc.Forward(); + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } + + if (sc.state == SCE_EIFFEL_DEFAULT) { + if (sc.ch == '-' && sc.chNext == '-') { + sc.SetState(SCE_EIFFEL_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_EIFFEL_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_EIFFEL_CHARACTER); + } else if (IsADigit(sc.ch) || (sc.ch == '.')) { + sc.SetState(SCE_EIFFEL_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_EIFFEL_WORD); + } else if (isEiffelOperator(sc.ch)) { + sc.SetState(SCE_EIFFEL_OPERATOR); + } + } + } + sc.Complete(); +} + +static bool IsEiffelComment(Accessor &styler, int pos, int len) { + return len>1 && styler[pos]=='-' && styler[pos+1]=='-'; +} + +static void FoldEiffelDocIndent(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + int lengthDoc = startPos + length; + + // Backtrack to previous line in case need to fix its fold status + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + int spaceFlags = 0; + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsEiffelComment); + char chNext = styler[startPos]; + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) { + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsEiffelComment); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsEiffelComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + } + } +} + +static void FoldEiffelDocKeyWords(unsigned int startPos, int length, int /* initStyle */, WordList *[], + Accessor &styler) { + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int stylePrev = 0; + int styleNext = styler.StyleAt(startPos); + // lastDeferred should be determined by looking back to last keyword in case + // the "deferred" is on a line before "class" + bool lastDeferred = false; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if ((stylePrev != SCE_EIFFEL_WORD) && (style == SCE_EIFFEL_WORD)) { + char s[20]; + unsigned int j = 0; + while ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) { + s[j] = styler[i + j]; + j++; + } + s[j] = '\0'; + + if ( + (strcmp(s, "check") == 0) || + (strcmp(s, "debug") == 0) || + (strcmp(s, "deferred") == 0) || + (strcmp(s, "do") == 0) || + (strcmp(s, "from") == 0) || + (strcmp(s, "if") == 0) || + (strcmp(s, "inspect") == 0) || + (strcmp(s, "once") == 0) + ) + levelCurrent++; + if (!lastDeferred && (strcmp(s, "class") == 0)) + levelCurrent++; + if (strcmp(s, "end") == 0) + levelCurrent--; + lastDeferred = strcmp(s, "deferred") == 0; + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + stylePrev = style; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const eiffelWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmEiffel(SCLEX_EIFFEL, ColouriseEiffelDoc, "eiffel", FoldEiffelDocIndent, eiffelWordListDesc); +LexerModule lmEiffelkw(SCLEX_EIFFELKW, ColouriseEiffelDoc, "eiffelkw", FoldEiffelDocKeyWords, eiffelWordListDesc); diff --git a/scintilla/src/LexErlang.cxx b/scintilla/src/LexErlang.cxx new file mode 100644 index 00000000..b75a766e --- /dev/null +++ b/scintilla/src/LexErlang.cxx @@ -0,0 +1,522 @@ +// Scintilla source code edit control +/** @file LexErlang.cxx + ** Lexer for Erlang. + ** Written by Peter-Henry Mander, based on Matlab lexer by José Fonseca + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +/* + TODO: + o _Param should be a new lexical type +*/ + +static int is_radix(int radix, int ch) { + int digit; + if ( 16 < radix || 2 > radix ) { + return 0; + } + if ( isdigit(ch) ) { + digit = ch - '0'; + } else if ( isxdigit(ch) ) { + digit = toupper(ch) - 'A' + 10; + } else { + return 0; + } + if ( digit < radix ) { + return 1; + } else { + return 0; + } +} + +typedef enum { + STATE_NULL, + ATOM_UNQUOTED, + ATOM_QUOTED, + ATOM_FUN_NAME, + NODE_NAME_UNQUOTED, + NODE_NAME_QUOTED, + MACRO_START, + MACRO_UNQUOTED, + MACRO_QUOTED, + RECORD_START, + RECORD_UNQUOTED, + RECORD_QUOTED, + NUMERAL_START, + NUMERAL_SIGNED, + NUMERAL_RADIX_LITERAL, + NUMERAL_SPECULATIVE_MANTISSA, + NUMERAL_FLOAT_MANTISSA, + NUMERAL_FLOAT_EXPONENT, + NUMERAL_FLOAT_SIGNED_EXPONENT, + PARSE_ERROR +} atom_parse_state_t; + +static void ColouriseErlangDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + atom_parse_state_t parse_state = STATE_NULL; + int radix_digits = 0; + int exponent_digits = 0; + for (; sc.More(); sc.Forward()) { + if ( STATE_NULL != parse_state ) { + switch (parse_state) { + case STATE_NULL: + sc.SetState(SCE_ERLANG_DEFAULT); + break; + case ATOM_UNQUOTED: + if ( '@' == sc.ch ){ + parse_state = NODE_NAME_UNQUOTED; + } else if ( !isalnum(sc.ch) && sc.ch != '_' ) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_ERLANG_KEYWORD); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + if ( '/' == sc.ch ) { + parse_state = ATOM_FUN_NAME; + } else { + sc.ChangeState(SCE_ERLANG_ATOM); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } + } + break; + case ATOM_QUOTED: + if ( '@' == sc.ch ){ + parse_state = NODE_NAME_QUOTED; + } else if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_ATOM); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case ATOM_FUN_NAME: + if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_FUNCTION_NAME); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NODE_NAME_QUOTED: + if ( '@' == sc.ch ) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_NODE_NAME); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NODE_NAME_UNQUOTED: + if ( '@' == sc.ch ) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if ( !isalnum(sc.ch) && sc.ch != '_' ) { + sc.ChangeState(SCE_ERLANG_NODE_NAME); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case RECORD_START: + if ( '\'' == sc.ch ) { + parse_state = RECORD_QUOTED; + } else if (isalpha(sc.ch) && islower(sc.ch)) { + parse_state = RECORD_UNQUOTED; + } else { // error + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case RECORD_QUOTED: + if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_RECORD); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case RECORD_UNQUOTED: + if ( !isalpha(sc.ch) && '_' != sc.ch ) { + sc.ChangeState(SCE_ERLANG_RECORD); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case MACRO_START: + if ( '\'' == sc.ch ) { + parse_state = MACRO_QUOTED; + } else if (isalpha(sc.ch)) { + parse_state = MACRO_UNQUOTED; + } else { // error + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case MACRO_UNQUOTED: + if ( !isalpha(sc.ch) && '_' != sc.ch ) { + sc.ChangeState(SCE_ERLANG_MACRO); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case MACRO_QUOTED: + if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_MACRO); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_START: + if ( isdigit(sc.ch) ) { + radix_digits *= 10; + radix_digits += sc.ch - '0'; // Assuming ASCII here! + } else if ( '#' == sc.ch ) { + if ( 2 > radix_digits || 16 < radix_digits) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + parse_state = NUMERAL_RADIX_LITERAL; + } + } else if ( '.' == sc.ch && isdigit(sc.chNext)) { + radix_digits = 0; + parse_state = NUMERAL_FLOAT_MANTISSA; + } else if ( 'e' == sc.ch || 'E' == sc.ch ) { + exponent_digits = 0; + parse_state = NUMERAL_FLOAT_EXPONENT; + } else { + radix_digits = 0; + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_RADIX_LITERAL: + if ( !is_radix(radix_digits,sc.ch) ) { + radix_digits = 0; + if ( !isalnum(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + } + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_FLOAT_MANTISSA: + if ( 'e' == sc.ch || 'E' == sc.ch ) { + exponent_digits = 0; + parse_state = NUMERAL_FLOAT_EXPONENT; + } else if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_FLOAT_EXPONENT: + if ( '-' == sc.ch || '+' == sc.ch ) { + parse_state = NUMERAL_FLOAT_SIGNED_EXPONENT; + } else if ( !isdigit(sc.ch) ) { + if ( 0 < exponent_digits ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + } + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + ++exponent_digits; + } + break; + case NUMERAL_FLOAT_SIGNED_EXPONENT: + if ( !isdigit(sc.ch) ) { + if ( 0 < exponent_digits ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + } + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + ++exponent_digits; + } + break; + case NUMERAL_SIGNED: + if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if ( '.' == sc.ch ) { + parse_state = NUMERAL_FLOAT_MANTISSA; + } + break; + case NUMERAL_SPECULATIVE_MANTISSA: + if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_OPERATOR); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + parse_state = NUMERAL_FLOAT_MANTISSA; + } + break; + case PARSE_ERROR: + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + break; + } + } else if (sc.state == SCE_ERLANG_OPERATOR) { + if (sc.chPrev == '.') { + if (sc.ch == '*' || sc.ch == '/' || sc.ch == '\\' || sc.ch == '^') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_VARIABLE) { + if (!isalnum(sc.ch) && sc.ch != '_') { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_STRING) { + if (sc.ch == '\"' && sc.chPrev != '\\') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_CHARACTER ) { + if ( sc.chPrev == '\\' ) { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else if ( sc.ch != '\\' ) { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } + } + + if (sc.state == SCE_ERLANG_DEFAULT) { + if (sc.ch == '%') { + sc.SetState(SCE_ERLANG_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ERLANG_STRING); + } else if (sc.ch == '#') { + parse_state = RECORD_START; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (sc.ch == '?') { + parse_state = MACRO_START; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (sc.ch == '$') { + sc.SetState(SCE_ERLANG_CHARACTER); + } else if (sc.ch == '\'') { + parse_state = ATOM_QUOTED; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if ( isdigit(sc.ch) ) { + parse_state = NUMERAL_START; + radix_digits = sc.ch - '0'; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if ( '.' == sc.ch ) { + parse_state = NUMERAL_SPECULATIVE_MANTISSA; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (isalpha(sc.ch) && isupper(sc.ch)) { + sc.SetState(SCE_ERLANG_VARIABLE); + } else if (isalpha(sc.ch)) { + parse_state = ATOM_UNQUOTED; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (isoperator(static_cast(sc.ch)) || sc.ch == '\\') { + sc.SetState(SCE_ERLANG_OPERATOR); + } + } + } + sc.Complete(); +} + +static int ClassifyFoldPointErlang( + Accessor &styler, + int styleNext, + int keyword_start +) { + int lev = 0; + if ( styler.Match(keyword_start,"case") + || ( + styler.Match(keyword_start,"fun") + && SCE_ERLANG_FUNCTION_NAME != styleNext) + || styler.Match(keyword_start,"if") + || styler.Match(keyword_start,"query") + || styler.Match(keyword_start,"receive") + ) { + ++lev; + } else if ( styler.Match(keyword_start,"end") ) { + --lev; + } + return lev; +} + + +static void FoldErlangDoc( + unsigned int startPos, int length, int initStyle, + WordList** /*keywordlists*/, Accessor &styler +) { + unsigned int endPos = startPos + length; + //~ int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler.SafeGetCharAt(startPos); + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + int keyword_start = 0; + + bool fold_keywords = true; + bool fold_comments = true; + bool fold_braces = true; + bool fold_function_clauses = false; + bool fold_clauses = false; + + //int clause_level = 0; + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if ( (stylePrev != SCE_ERLANG_KEYWORD) && (style == SCE_ERLANG_KEYWORD) ) { + keyword_start = i; + } + if ( fold_keywords ) { + if ( (stylePrev == SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_ATOM) + ) { + levelCurrent += ClassifyFoldPointErlang(styler,styleNext,keyword_start); + } + } + + if ( fold_comments ) { + if (style == SCE_ERLANG_COMMENT) { + if ((ch == '%') && (chNext == '{')) { + levelCurrent++; + } else if ((ch == '%') && (chNext == '}')) { + levelCurrent--; + } + } + } + + if ( fold_function_clauses ) { + if ( (SC_FOLDLEVELBASE == levelCurrent) /*&& (style == SCE_ERLANG_OPERATOR)*/ ) { + if ( (ch == '-') && (chNext == '>')) { + //~ fprintf(stderr,"levelCurrent=%d\n", levelCurrent); + //++clause_level; + //~ if ( 0 < clause_level ) + ++levelCurrent; + } + } + //~ if ( (stylePrev != SCE_ERLANG_RECORD) + //~ && (style != SCE_ERLANG_NUMBER) + //~ && (style != SCE_ERLANG_STRING) + //~ && (style != SCE_ERLANG_COMMENT) + //~ ) { + if ( (SC_FOLDLEVELBASE+1 == levelCurrent) && (ch == '.') ) { + //--clause_level; + //~ if ( 0 == clause_level ) + --levelCurrent; + } + //~ } + } + + if ( fold_clauses ) { + if ( (0 < levelCurrent) && (style == SCE_ERLANG_OPERATOR) ) { + if ((ch == '-') && (chNext == '>')) { + levelCurrent++; + } + if ( (ch == ';') ) { + levelCurrent--; + } + } + if ( (stylePrev != SCE_ERLANG_RECORD) + && (style != SCE_ERLANG_NUMBER) + && (style != SCE_ERLANG_STRING) + && (style != SCE_ERLANG_COMMENT) + ) { + if ( (ch == '.') ) { + levelCurrent--; + } + } + if ( (stylePrev == SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_ATOM) + && ( + styler.Match(keyword_start,"end") // 'end' counted twice if fold_keywords too + || styler.Match(keyword_start,"after") ) + ) { + levelCurrent--; + } + } + + if ( fold_braces ) { + if (style == SCE_ERLANG_OPERATOR) { + if ( (ch == '{') || (ch == '(') || (ch == '[') ) { + levelCurrent++; + } else if ( (ch == '}') || (ch == ')') || (ch == ']') ) { + levelCurrent--; + } + } + } + + if (atEOL) { + int lev = levelPrev; + //~ if (visibleChars == 0 && foldCompact) + //~ lev |= SC_FOLDLEVELWHITEFLAG; + //~ if ((levelCurrent > levelPrev) && (visibleChars > 0)) + if ((levelCurrent > levelPrev)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + //~ visibleChars = 0; + } + //~ if (!isspacechar(ch)) + //~ visibleChars++; + + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const erlangWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmErlang( + SCLEX_ERLANG, + ColouriseErlangDoc, + "erlang", + FoldErlangDoc, + erlangWordListDesc); + diff --git a/scintilla/src/LexFlagship.cxx b/scintilla/src/LexFlagship.cxx new file mode 100644 index 00000000..335726ec --- /dev/null +++ b/scintilla/src/LexFlagship.cxx @@ -0,0 +1,226 @@ +// Scintilla source code edit control +/** @file LexFlagShip.cxx + ** Lexer for FlagShip + ** (Syntactically compatible to other XBase dialects, like dBase, Clipper, Fox etc.) + **/ +// Copyright 2005 by Randy Butler +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static bool IsFlagShipComment(Accessor &styler, int pos, int len) { + return len>0 && styler[pos]=='\''; +} + +static inline bool IsTypeCharacter(int ch) { + return ch == '%' || ch == '&' || ch == '@' || ch == '!' || ch == '#' || ch == '$'; +} + +// Extended to accept accented characters +static inline bool IsAWordChar(int ch) { + return ch >= 0x80 || + (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(int ch) { + return ch >= 0x80 || + (isalnum(ch) || ch == '_'); +} + +static inline bool IsADateCharacter(const int ch) { + return (ch < 0x80) && + (isalnum(ch) || ch == '|' || ch == '-' || ch == '/' || ch == ':' || ch == ' ' || ch == '\t'); +} + + +static void ColouriseFlagShipDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + //bool FSScriptSyntax = true; + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + styler.StartAt(startPos); + + int visibleChars = 0; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_FS_OPERATOR) { + sc.SetState(SCE_FS_DEFAULT); + } else if (sc.state == SCE_FS_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD4); + }// Else, it is really an identifier... + sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_STRING) { + // VB doubles quotes to preserve them, so just end this string + // state now as a following quote will start again + if (sc.ch == '\"') { + if (tolower(sc.chNext) == 'c') { + sc.Forward(); + } + sc.ForwardSetState(SCE_FS_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_FS_STRINGEOL); + sc.ForwardSetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_COMMENT) { + if (sc.Match('*', '/')) { // new code + sc.Forward(); + sc.ForwardSetState(SCE_FS_DEFAULT); + //if (sc.atLineEnd) { // old code + // sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_COMMENTLINE) { //new code + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_FS_DEFAULT); + visibleChars = 0; + } + } else if (sc.state == SCE_FS_PREPROCESSOR) { + if (sc.atLineEnd) { + sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_DATE) { + if (sc.ch == '#' || !IsADateCharacter(sc.chNext)) { + sc.ForwardSetState(SCE_FS_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_FS_DEFAULT) { + if (sc.Match('/', '*')) { // New code + sc.SetState(SCE_FS_COMMENT); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + //if (sc.ch == '\'') { // Old code + // sc.SetState(SCE_FS_COMMENT); // old code + } else if (sc.Match('/', '/')) { // New code + sc.SetState(SCE_FS_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_FS_STRING); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_FS_PREPROCESSOR); + } else if (sc.ch == '#') { + int n = 1; + int chSeek = ' '; + while ((n < 100) && (chSeek == ' ' || chSeek == '\t')) { + chSeek = sc.GetRelative(n); + n++; + } + if (IsADigit(chSeek)) { + sc.SetState(SCE_FS_DATE); + } else { + sc.SetState(SCE_FS_OPERATOR); + } + } else if (sc.ch == '&' && tolower(sc.chNext) == 'h') { + sc.SetState(SCE_FS_NUMBER); + } else if (sc.ch == '&' && tolower(sc.chNext) == 'o') { + sc.SetState(SCE_FS_NUMBER); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_FS_NUMBER); + } else if (IsAWordStart(sc.ch) || (sc.ch == '[')) { + sc.SetState(SCE_FS_IDENTIFIER); + } else if (isoperator(static_cast(sc.ch)) || (sc.ch == '\\')) { + sc.SetState(SCE_FS_OPERATOR); + } + } + + if (sc.atLineEnd) { + visibleChars = 0; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +static void FoldFlagShipDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + + int endPos = startPos + length; + + // Backtrack to previous line in case need to fix its fold status + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + int spaceFlags = 0; + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsFlagShipComment); + char chNext = styler[startPos]; + for (int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) { + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsFlagShipComment); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsFlagShipComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + } + } +} + + +static const char * const FSWordListDesc[] = { + "Keywords", + "functions", + "user2", + "user3", + 0 +}; + +LexerModule lmFlagShip(SCLEX_FLAGSHIP, ColouriseFlagShipDoc, "flagship", FoldFlagShipDoc, FSWordListDesc); + + + diff --git a/scintilla/src/LexForth.cxx b/scintilla/src/LexForth.cxx new file mode 100644 index 00000000..9be7d644 --- /dev/null +++ b/scintilla/src/LexForth.cxx @@ -0,0 +1,348 @@ +// Scintilla source code edit control +/** @file LexCrontab.cxx + ** Lexer to use with extended crontab files used by a powerful + ** Windows scheduler/event monitor/automation manager nnCron. + ** (http://nemtsev.eserv.ru/) + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +bool is_whitespace(int ch){ + return ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '; +} + +bool is_blank(int ch){ + return ch == '\t' || ch == ' '; +} +//#define FORTH_DEBUG +#ifdef FORTH_DEBUG +static FILE *f_debug; +#define log(x) fputs(f_debug,x); +#else +#define log(x) +#endif + +#define STATE_LOCALE +#define BL ' ' + +static Accessor *st; +static int cur_pos,pos1,pos2,pos0,lengthDoc; +char *buffer; + +char getChar(bool is_bl){ + char ch=st->SafeGetCharAt(cur_pos); + if(is_bl) if(is_whitespace(ch)) ch=BL; + return ch; +} + +char getCharBL(){ + char ch=st->SafeGetCharAt(cur_pos); + return ch; +} +bool is_eol(char ch){ + return ch=='\n' || ch=='\r'; +} + +int parse(char ch, bool skip_eol){ +// pos1 - start pos of word +// pos2 - pos after of word +// pos0 - start pos + char c=0; + int len; + bool is_bl=ch==BL; + pos0=pos1=pos2=cur_pos; + for(;cur_pos9 && base>10) digit-=7; + if(digit<0) return false; + if(digit>=base) return false; + } + return true; +} + +bool is_number(char *s){ + if(strncmp(s,"0x",2)==0) return _is_number(s+2,16); + return _is_number(s,10); +} + +static void ColouriseForthDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) +{ + st=&styler; + cur_pos=startPos; + lengthDoc = startPos + length; + buffer = new char[length]; + +#ifdef FORTH_DEBUG + f_debug=fopen("c:\\sci.log","at"); +#endif + + WordList &control = *keywordLists[0]; + WordList &keyword = *keywordLists[1]; + WordList &defword = *keywordLists[2]; + WordList &preword1 = *keywordLists[3]; + WordList &preword2 = *keywordLists[4]; + WordList &strings = *keywordLists[5]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + while(parse(BL,true)!=0){ + if(pos0!=pos1){ + styler.ColourTo(pos0,SCE_FORTH_DEFAULT); + styler.ColourTo(pos1-1,SCE_FORTH_DEFAULT); + } + if(strcmp("\\",buffer)==0){ + styler.ColourTo(pos1,SCE_FORTH_COMMENT); + parse(1,false); + styler.ColourTo(pos2,SCE_FORTH_COMMENT); + }else if(strcmp("(",buffer)==0){ + styler.ColourTo(pos1,SCE_FORTH_COMMENT); + parse(')',true); + if(cur_pos +// The License.txt file describes the conditions under which this software may be distributed. +/***************************************/ +#include +#include +#include +#include +#include +/***************************************/ +#include "Platform.h" +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" +/***********************************************/ +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%'); +} +/**********************************************/ +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch)); +} +/***************************************/ +inline bool IsABlank(unsigned int ch) { + return (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ; +} +/***************************************/ +inline bool IsALineEnd(char ch) { + return ((ch == '\n') || (ch == '\r')) ; +} +/***************************************/ +unsigned int GetContinuedPos(unsigned int pos, Accessor &styler) { + while (!IsALineEnd(styler.SafeGetCharAt(pos++))) continue; + if (styler.SafeGetCharAt(pos) == '\n') pos++; + while (IsABlank(styler.SafeGetCharAt(pos++))) continue; + char chCur = styler.SafeGetCharAt(pos); + if (chCur == '&') { + while (IsABlank(styler.SafeGetCharAt(++pos))) continue; + return pos; + } else { + return pos; + } +} +/***************************************/ +static void ColouriseFortranDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler, bool isFixFormat) { + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + /***************************************/ + int posLineStart = 0, numNonBlank = 0, prevState = 0; + int endPos = startPos + length; + /***************************************/ + // backtrack to the nearest keyword + while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_F_WORD)) { + startPos--; + } + startPos = styler.LineStart(styler.GetLine(startPos)); + initStyle = styler.StyleAt(startPos - 1); + StyleContext sc(startPos, endPos-startPos, initStyle, styler); + /***************************************/ + for (; sc.More(); sc.Forward()) { + // remember the start position of the line + if (sc.atLineStart) { + posLineStart = sc.currentPos; + numNonBlank = 0; + sc.SetState(SCE_F_DEFAULT); + } + if (!IsASpaceOrTab(sc.ch)) numNonBlank ++; + /***********************************************/ + // Handle the fix format generically + int toLineStart = sc.currentPos - posLineStart; + if (isFixFormat && (toLineStart < 6 || toLineStart > 72)) { + if (toLineStart == 0 && (tolower(sc.ch) == 'c' || sc.ch == '*') || sc.ch == '!') { + sc.SetState(SCE_F_COMMENT); + while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end + } else if (toLineStart > 72) { + sc.SetState(SCE_F_COMMENT); + while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end + } else if (toLineStart < 5) { + if (IsADigit(sc.ch)) + sc.SetState(SCE_F_LABEL); + else + sc.SetState(SCE_F_DEFAULT); + } else if (toLineStart == 5) { + if (!IsASpace(sc.ch) && sc.ch != '0') { + sc.SetState(SCE_F_CONTINUATION); + sc.ForwardSetState(prevState); + } else + sc.SetState(SCE_F_DEFAULT); + } + continue; + } + /***************************************/ + // Handle line continuation generically. + if (!isFixFormat && sc.ch == '&') { + char chTemp = ' '; + int j = 1; + while (IsABlank(chTemp) && j<132) { + chTemp = static_cast(sc.GetRelative(j)); + j++; + } + if (chTemp == '!') { + sc.SetState(SCE_F_CONTINUATION); + if (sc.chNext == '!') sc.ForwardSetState(SCE_F_COMMENT); + } else if (chTemp == '\r' || chTemp == '\n') { + int currentState = sc.state; + sc.SetState(SCE_F_CONTINUATION); + sc.ForwardSetState(SCE_F_DEFAULT); + while (IsASpace(sc.ch) && sc.More()) sc.Forward(); + if (sc.ch == '&') { + sc.SetState(SCE_F_CONTINUATION); + sc.Forward(); + } + sc.SetState(currentState); + } + } + /***************************************/ + // Determine if the current state should terminate. + if (sc.state == SCE_F_OPERATOR) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_NUMBER) { + if (!(IsAWordChar(sc.ch) || sc.ch=='\'' || sc.ch=='\"' || sc.ch=='.')) { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '%')) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_F_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_F_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_F_WORD3); + } + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_COMMENT || sc.state == SCE_F_PREPROCESSOR) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_STRING1) { + prevState = sc.state; + if (sc.ch == '\'') { + if (sc.chNext == '\'') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_STRING2) { + prevState = sc.state; + if (sc.atLineEnd) { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } else if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } + } else if (sc.state == SCE_F_OPERATOR2) { + if (sc.ch == '.') { + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_CONTINUATION) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_LABEL) { + if (!IsADigit(sc.ch)) { + sc.SetState(SCE_F_DEFAULT); + } else { + if (isFixFormat && sc.currentPos-posLineStart > 4) + sc.SetState(SCE_F_DEFAULT); + else if (numNonBlank > 5) + sc.SetState(SCE_F_DEFAULT); + } + } + /***************************************/ + // Determine if a new state should be entered. + if (sc.state == SCE_F_DEFAULT) { + if (sc.ch == '!') { + if (sc.chNext == '$') { + sc.SetState(SCE_F_PREPROCESSOR); + } else { + sc.SetState(SCE_F_COMMENT); + } + } else if ((!isFixFormat) && IsADigit(sc.ch) && numNonBlank == 1) { + sc.SetState(SCE_F_LABEL); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_F_NUMBER); + } else if ((tolower(sc.ch) == 'b' || tolower(sc.ch) == 'o' || + tolower(sc.ch) == 'z') && (sc.chNext == '\"' || sc.chNext == '\'')) { + sc.SetState(SCE_F_NUMBER); + sc.Forward(); + } else if (sc.ch == '.' && isalpha(sc.chNext)) { + sc.SetState(SCE_F_OPERATOR2); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_F_IDENTIFIER); + } else if (sc.ch == '\"') { + sc.SetState(SCE_F_STRING2); + } else if (sc.ch == '\'') { + sc.SetState(SCE_F_STRING1); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_F_OPERATOR); + } + } + } + sc.Complete(); +} +/***************************************/ +// To determine the folding level depending on keywords +static int classifyFoldPointFortran(const char* s, const char* prevWord, const char chNextNonBlank) { + int lev = 0; + if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "elseif") == 0) + return -1; + if (strcmp(s, "associate") == 0 || strcmp(s, "block") == 0 + || strcmp(s, "blockdata") == 0 || strcmp(s, "select") == 0 + || strcmp(s, "do") == 0 || strcmp(s, "enum") ==0 + || strcmp(s, "function") == 0 || strcmp(s, "interface") == 0 + || strcmp(s, "module") == 0 || strcmp(s, "program") == 0 + || strcmp(s, "subroutine") == 0 || strcmp(s, "then") == 0 + || (strcmp(s, "type") == 0 && chNextNonBlank != '(') ){ + if (strcmp(prevWord, "end") == 0) + lev = 0; + else + lev = 1; + } else if (strcmp(s, "end") == 0 && chNextNonBlank != '=' + || strcmp(s, "endassociate") == 0 || strcmp(s, "endblock") == 0 + || strcmp(s, "endblockdata") == 0 || strcmp(s, "endselect") == 0 + || strcmp(s, "enddo") == 0 || strcmp(s, "endenum") ==0 + || strcmp(s, "endif") == 0 || strcmp(s, "endforall") == 0 + || strcmp(s, "endfunction") == 0 || strcmp(s, "endinterface") == 0 + || strcmp(s, "endmodule") == 0 || strcmp(s, "endprogram") == 0 + || strcmp(s, "endsubroutine") == 0 || strcmp(s, "endtype") == 0 + || strcmp(s, "endwhere") == 0 + || strcmp(s, "procedure") == 0 ) { // Take care of the module procedure statement + lev = -1; + } else if (strcmp(prevWord, "end") == 0 && strcmp(s, "if") == 0){ // end if + lev = 0; + } + return lev; +} +// Folding the code +static void FoldFortranDoc(unsigned int startPos, int length, int initStyle, + Accessor &styler, bool isFixFormat) { + // + // bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + // Do not know how to fold the comment at the moment. + // + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + char chNextNonBlank; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + /***************************************/ + int lastStart = 0; + char prevWord[32] = ""; + char Label[6] = ""; + // Variables for do label folding. + static int doLabels[100]; + static int posLabel=-1; + /***************************************/ + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + chNextNonBlank = chNext; + unsigned int j=i+1; + while(IsABlank(chNextNonBlank) && j(tolower(styler[lastStart+k])); + } + s[k] = '\0'; + // Handle the forall and where statement and structure. + if (strcmp(s, "forall") == 0 || strcmp(s, "where") == 0) { + if (strcmp(prevWord, "end") != 0) { + j = i + 1; + char chBrace = '(', chSeek = ')', ch1 = styler.SafeGetCharAt(j); + // Find the position of the first ( + while (ch1 != chBrace && j -1) { + levelCurrent--; + posLabel--; + } + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + strcpy(prevWord, ""); + } + /***************************************/ + if (!isspacechar(ch)) visibleChars++; + } + /***************************************/ + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} +/***************************************/ +static const char * const FortranWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; +/***************************************/ +static void ColouriseFortranDocFreeFormat(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, false); +} +/***************************************/ +static void ColouriseFortranDocFixFormat(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, true); +} +/***************************************/ +static void FoldFortranDocFreeFormat(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + FoldFortranDoc(startPos, length, initStyle,styler, false); +} +/***************************************/ +static void FoldFortranDocFixFormat(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + FoldFortranDoc(startPos, length, initStyle,styler, true); +} +/***************************************/ +LexerModule lmFortran(SCLEX_FORTRAN, ColouriseFortranDocFreeFormat, "fortran", FoldFortranDocFreeFormat, FortranWordLists); +LexerModule lmF77(SCLEX_F77, ColouriseFortranDocFixFormat, "f77", FoldFortranDocFixFormat, FortranWordLists); diff --git a/scintilla/src/LexGen.py b/scintilla/src/LexGen.py new file mode 100644 index 00000000..3a302cc6 --- /dev/null +++ b/scintilla/src/LexGen.py @@ -0,0 +1,241 @@ +# LexGen.py - implemented 2002 by Neil Hodgson neilh@scintilla.org +# Released to the public domain. + +# Regenerate the Scintilla and SciTE source files that list +# all the lexers and all the properties files. +# Should be run whenever a new lexer is added or removed. +# Requires Python 2.4 or later +# Most files are regenerated in place with templates stored in comments. +# The VS .NET project file is generated into a different file as the +# VS .NET environment will not retain comments when modifying the file. +# The files are copied to a string apart from sections between a +# ++Autogenerated comment and a --Autogenerated comment which is +# generated by the CopyWithInsertion function. After the whole +# string is instantiated, it is compared with the target file and +# if different the file is rewritten. +# Does not regenerate the Visual C++ 6 project files but does the VS .NET +# project file. + +import string +import sys +import os +import glob + +# EOL constants +CR = "\r" +LF = "\n" +CRLF = "\r\n" +if sys.platform == "win32": + NATIVE = CRLF +else: + # Yes, LF is the native EOL even on Mac OS X. CR is just for + # Mac OS <=9 (a.k.a. "Mac Classic") + NATIVE = LF + +# Automatically generated sections contain start and end comments, +# a definition line and the results. +# The results are replaced by regenerating based on the definition line. +# The definition line is a comment prefix followed by "**". +# If there is a digit after the ** then this indicates which list to use +# and the digit and next character are not part of the definition +# Backslash is used as an escape within the definition line. +# The part between \( and \) is repeated for each item in the list. +# \* is replaced by each list item. \t, and \n are tab and newline. +def CopyWithInsertion(input, commentPrefix, retainDefs, eolType, *lists): + copying = 1 + listid = 0 + output = [] + for line in input.splitlines(0): + isStartGenerated = line.startswith(commentPrefix + "++Autogenerated") + if copying and not isStartGenerated: + output.append(line) + if isStartGenerated: + if retainDefs: + output.append(line) + copying = 0 + definition = "" + elif not copying and line.startswith(commentPrefix + "**"): + if retainDefs: + output.append(line) + definition = line[len(commentPrefix + "**"):] + listid = 0 + if definition[0] in string.digits: + listid = int(definition[:1]) + definition = definition[2:] + # Hide double slashes as a control character + definition = definition.replace("\\\\", "\001") + # Do some normal C style transforms + definition = definition.replace("\\n", "\n") + definition = definition.replace("\\t", "\t") + # Get the doubled backslashes back as single backslashes + definition = definition.replace("\001", "\\") + startRepeat = definition.find("\\(") + endRepeat = definition.find("\\)") + intro = definition[:startRepeat] + out = "" + if intro.endswith("\n"): + pos = 0 + else: + pos = len(intro) + out += intro + middle = definition[startRepeat+2:endRepeat] + for i in lists[listid]: + item = middle.replace("\\*", i) + if pos and (pos + len(item) >= 80): + out += "\\\n" + pos = 0 + out += item + pos += len(item) + if item.endswith("\n"): + pos = 0 + outro = definition[endRepeat+2:] + out += outro + out = out.replace("\n", eolType) # correct EOLs in generated content + output.append(out) + elif line.startswith(commentPrefix + "--Autogenerated"): + copying = 1 + if retainDefs: + output.append(line) + output = [line.rstrip(" \t") for line in output] # trim trailing whitespace + return eolType.join(output) + eolType + +def UpdateFile(filename, updated): + """ If the file is different to updated then copy updated + into the file else leave alone so CVS and make don't treat + it as modified. """ + try: + infile = open(filename, "rb") + except IOError: # File is not there yet + out = open(filename, "wb") + out.write(updated) + out.close() + print "New", filename + return + original = infile.read() + infile.close() + if updated != original: + os.unlink(filename) + out = open(filename, "wb") + out.write(updated) + out.close() + print "Changed", filename + #~ else: + #~ print "Unchanged", filename + +def Generate(inpath, outpath, commentPrefix, eolType, *lists): + """Generate 'outpath' from 'inpath'. + + "eolType" indicates the type of EOLs to use in the generated + file. It should be one of following constants: LF, CRLF, + CR, or NATIVE. + """ + #print "generate '%s' -> '%s' (comment prefix: %r, eols: %r)"\ + # % (inpath, outpath, commentPrefix, eolType) + try: + infile = open(inpath, "r") + except IOError: + print "Can not open", inpath + return + original = infile.read() + infile.close() + updated = CopyWithInsertion(original, commentPrefix, + inpath == outpath, eolType, *lists) + UpdateFile(outpath, updated) + +def Regenerate(filename, commentPrefix, eolType, *lists): + """Regenerate the given file. + + "eolType" indicates the type of EOLs to use in the generated + file. It should be one of following constants: LF, CRLF, + CR, or NATIVE. + """ + Generate(filename, filename, commentPrefix, eolType, *lists) + +def FindModules(lexFile): + modules = [] + f = open(lexFile) + for l in f.readlines(): + if l.startswith("LexerModule"): + l = l.replace("(", " ") + modules.append(l.split()[1]) + return modules + +knownIrregularProperties = [ + "fold", + "styling.within.preprocessor", + "tab.timmy.whinge.level", + "asp.default.language", + "html.tags.case.sensitive", + "ps.level", + "ps.tokenize", + "sql.backslash.escapes", + "nsis.uservars", + "nsis.ignorecase" +] + +def FindProperties(lexFile): + properties = set() + f = open(lexFile) + for l in f.readlines(): + if "GetProperty" in l: + l = l.strip() + if not l.startswith("//"): # Drop comments + propertyName = l.split("\"")[1] + if propertyName.lower() == propertyName: + # Only allow lower case property names + if propertyName in knownIrregularProperties or \ + propertyName.startswith("fold.") or \ + propertyName.startswith("lexer."): + properties.add(propertyName) + return properties + +def ciCompare(a,b): + return cmp(a.lower(), b.lower()) + +def RegenerateAll(): + root="../../" + + # Find all the lexer source code files + lexFilePaths = glob.glob(root + "scintilla/src/Lex*.cxx") + lexFiles = [os.path.basename(f)[:-4] for f in lexFilePaths] + print lexFiles + lexerModules = [] + lexerProperties = set() + for lexFile in lexFilePaths: + lexerModules.extend(FindModules(lexFile)) + lexerProperties.update(FindProperties(lexFile)) + lexerModules.sort(ciCompare) + lexerProperties.remove("fold.comment.python") + lexerProperties = list(lexerProperties) + lexerProperties.sort(ciCompare) + + # Find all the SciTE properties files + otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"] + propFilePaths = glob.glob(root + "scite/src/*.properties") + propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps] + propFiles.sort(ciCompare) + print propFiles + + # Find all the menu command IDs in the SciTE header + SciTEHeader = file(root + "scite/src/SciTE.h") + lines = SciTEHeader.read().split("\n") + SciTEHeader.close() + ids = [id for id in [l.split()[1] for l in lines if l.startswith("#define")] if id.startswith("IDM_")] + #print ids + + Regenerate(root + "scintilla/src/KeyWords.cxx", "//", NATIVE, lexerModules) + Regenerate(root + "scintilla/win32/makefile", "#", NATIVE, lexFiles) + Regenerate(root + "scintilla/win32/scintilla.mak", "#", NATIVE, lexFiles) + Regenerate(root + "scintilla/win32/scintilla_vc6.mak", "#", NATIVE, lexFiles) + # Use Unix EOLs for gtk Makefiles so they work for Linux users when + # extracted from the Scintilla source ZIP (typically created on + # Windows). + Regenerate(root + "scintilla/gtk/makefile", "#", LF, lexFiles) + Regenerate(root + "scintilla/gtk/scintilla.mak", "#", NATIVE, lexFiles) + Regenerate(root + "scite/win32/makefile", "#", NATIVE, lexFiles, propFiles) + Regenerate(root + "scite/win32/scite.mak", "#", NATIVE, lexFiles, propFiles) + Regenerate(root + "scite/src/SciTEProps.cxx", "//", NATIVE, lexerProperties, ids) + Generate(root + "scite/boundscheck/vcproj.gen", + root + "scite/boundscheck/SciTE.vcproj", "#", NATIVE, lexFiles) + +RegenerateAll() diff --git a/scintilla/src/LexGui4Cli.cxx b/scintilla/src/LexGui4Cli.cxx new file mode 100644 index 00000000..417d1f2b --- /dev/null +++ b/scintilla/src/LexGui4Cli.cxx @@ -0,0 +1,309 @@ +// Scintilla source code edit control +// Copyright 1998-2002 by Neil Hodgson +/* +This is the Lexer for Gui4Cli, included in SciLexer.dll +- by d. Keletsekis, 2/10/2003 + +To add to SciLexer.dll: +1. Add the values below to INCLUDE\Scintilla.iface +2. Run the include/HFacer.py script +3. Run the src/lexGen.py script + +val SCE_GC_DEFAULT=0 +val SCE_GC_COMMENTLINE=1 +val SCE_GC_COMMENTBLOCK=2 +val SCE_GC_GLOBAL=3 +val SCE_GC_EVENT=4 +val SCE_GC_ATTRIBUTE=5 +val SCE_GC_CONTROL=6 +val SCE_GC_COMMAND=7 +val SCE_GC_STRING=8 +val SCE_GC_OPERATOR=9 +*/ + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define debug Platform::DebugPrintf + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch =='\\'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); +} + +inline bool isGCOperator(int ch) +{ if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '%' || + ch == '[' || ch == ']' || ch == '<' || ch == '>' || + ch == ',' || ch == ';' || ch == ':') + return true; + return false; +} + +#define isSpace(x) ((x)==' ' || (x)=='\t') +#define isNL(x) ((x)=='\n' || (x)=='\r') +#define isSpaceOrNL(x) (isSpace(x) || isNL(x)) +#define BUFFSIZE 500 +#define isFoldPoint(x) ((styler.LevelAt(x) & SC_FOLDLEVELNUMBERMASK) == 1024) + +static void colorFirstWord(WordList *keywordlists[], Accessor &styler, + StyleContext *sc, char *buff, int length, int) +{ + int c = 0; + while (sc->More() && isSpaceOrNL(sc->ch)) + { sc->Forward(); + } + styler.ColourTo(sc->currentPos - 1, sc->state); + + if (!IsAWordChar(sc->ch)) // comment, marker, etc.. + return; + + while (sc->More() && !isSpaceOrNL(sc->ch) && (c < length-1) && !isGCOperator(sc->ch)) + { buff[c] = static_cast(sc->ch); + ++c; sc->Forward(); + } + buff[c] = '\0'; + char *p = buff; + while (*p) // capitalize.. + { if (islower(*p)) *p = static_cast(toupper(*p)); + ++p; + } + + WordList &kGlobal = *keywordlists[0]; // keyword lists set by the user + WordList &kEvent = *keywordlists[1]; + WordList &kAttribute = *keywordlists[2]; + WordList &kControl = *keywordlists[3]; + WordList &kCommand = *keywordlists[4]; + + int state = 0; + // int level = styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK; + // debug ("line = %d, level = %d", line, level); + + if (kGlobal.InList(buff)) state = SCE_GC_GLOBAL; + else if (kAttribute.InList(buff)) state = SCE_GC_ATTRIBUTE; + else if (kControl.InList(buff)) state = SCE_GC_CONTROL; + else if (kCommand.InList(buff)) state = SCE_GC_COMMAND; + else if (kEvent.InList(buff)) state = SCE_GC_EVENT; + + if (state) + { sc->ChangeState(state); + styler.ColourTo(sc->currentPos - 1, sc->state); + sc->ChangeState(SCE_GC_DEFAULT); + } + else + { sc->ChangeState(SCE_GC_DEFAULT); + styler.ColourTo(sc->currentPos - 1, sc->state); + } +} + +// Main colorizing function called by Scintilla +static void +ColouriseGui4CliDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) +{ + styler.StartAt(startPos); + + int quotestart = 0, oldstate, currentline = styler.GetLine(startPos); + styler.StartSegment(startPos); + bool noforward; + char buff[BUFFSIZE+1]; // buffer for command name + + StyleContext sc(startPos, length, initStyle, styler); + buff[0] = '\0'; // cbuff = 0; + + if (sc.state != SCE_GC_COMMENTBLOCK) // colorize 1st word.. + colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + + while (sc.More()) + { noforward = 0; + + switch (sc.ch) + { + case '/': + if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_STRING) + break; + if (sc.chNext == '/') // line comment + { sc.SetState (SCE_GC_COMMENTLINE); + sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + } + else if (sc.chNext == '*') // block comment + { sc.SetState(SCE_GC_COMMENTBLOCK); + sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + } + else + styler.ColourTo(sc.currentPos, sc.state); + break; + + case '*': // end of comment block, or operator.. + if (sc.state == SCE_GC_STRING) + break; + if (sc.state == SCE_GC_COMMENTBLOCK && sc.chNext == '/') + { sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState (SCE_GC_DEFAULT); + } + else + styler.ColourTo(sc.currentPos, sc.state); + break; + + case '\'': case '\"': // strings.. + if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_COMMENTLINE) + break; + if (sc.state == SCE_GC_STRING) + { if (sc.ch == quotestart) // match same quote char.. + { styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState(SCE_GC_DEFAULT); + quotestart = 0; + } } + else + { styler.ColourTo(sc.currentPos - 1, sc.state); + sc.ChangeState(SCE_GC_STRING); + quotestart = sc.ch; + } + break; + + case ';': // end of commandline character + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && + sc.state != SCE_GC_STRING) + { + styler.ColourTo(sc.currentPos - 1, sc.state); + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(SCE_GC_DEFAULT); + sc.Forward(); + colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + noforward = 1; // don't move forward - already positioned at next char.. + } + break; + + case '+': case '-': case '=': case '!': // operators.. + case '<': case '>': case '&': case '|': case '$': + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && + sc.state != SCE_GC_STRING) + { + styler.ColourTo(sc.currentPos - 1, sc.state); + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(SCE_GC_DEFAULT); + } + break; + + case '\\': // escape - same as operator, but also mark in strings.. + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE) + { + oldstate = sc.state; + styler.ColourTo(sc.currentPos - 1, sc.state); + sc.Forward(); // mark also the next char.. + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(oldstate); + } + break; + + case '\n': case '\r': + ++currentline; + if (sc.state == SCE_GC_COMMENTLINE) + { styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState (SCE_GC_DEFAULT); + } + else if (sc.state != SCE_GC_COMMENTBLOCK) + { colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + noforward = 1; // don't move forward - already positioned at next char.. + } + break; + +// case ' ': case '\t': +// default : + } + + if (!noforward) sc.Forward(); + + } + sc.Complete(); +} + +// Main folding function called by Scintilla - (based on props (.ini) files function) +static void FoldGui4Cli(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) +{ + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + bool headerPoint = false; + + for (unsigned int i = startPos; i < endPos; i++) + { + char ch = chNext; + chNext = styler[i+1]; + + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (style == SCE_GC_EVENT || style == SCE_GC_GLOBAL) + { headerPoint = true; // fold at events and globals + } + + if (atEOL) + { int lev = SC_FOLDLEVELBASE+1; + + if (headerPoint) + lev = SC_FOLDLEVELBASE; + + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + + if (headerPoint) + lev |= SC_FOLDLEVELHEADERFLAG; + + if (lev != styler.LevelAt(lineCurrent)) // set level, if not already correct + { styler.SetLevel(lineCurrent, lev); + } + + lineCurrent++; // re-initialize our flags + visibleChars = 0; + headerPoint = false; + } + + if (!(isspacechar(ch))) // || (style == SCE_GC_COMMENTLINE) || (style != SCE_GC_COMMENTBLOCK))) + visibleChars++; + } + + int lev = headerPoint ? SC_FOLDLEVELBASE : SC_FOLDLEVELBASE+1; + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, lev | flagsNext); +} + +// I have no idea what these are for.. probably accessible by some message. +static const char * const gui4cliWordListDesc[] = { + "Globals", "Events", "Attributes", "Control", "Commands", + 0 +}; + +// Declare language & pass our function pointers to Scintilla +LexerModule lmGui4Cli(SCLEX_GUI4CLI, ColouriseGui4CliDoc, "gui4cli", FoldGui4Cli, gui4cliWordListDesc); + +#undef debug + diff --git a/scintilla/src/LexHTML.cxx b/scintilla/src/LexHTML.cxx new file mode 100644 index 00000000..f9959ab7 --- /dev/null +++ b/scintilla/src/LexHTML.cxx @@ -0,0 +1,2061 @@ +// Scintilla source code edit control +/** @file LexHTML.cxx + ** Lexer for HTML. + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START) +#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START) +#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START) + +enum script_type { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML, eScriptSGML, eScriptSGMLblock }; +enum script_mode { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc }; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline int MakeLowerCase(int ch) { + if (ch < 'A' || ch > 'Z') + return ch; + else + return ch - 'A' + 'a'; +} + +static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int end, char *s, size_t len) { + size_t i = 0; + for (; (i < end - start + 1) && (i < len-1); i++) { + s[i] = static_cast(MakeLowerCase(styler[start + i])); + } + s[i] = '\0'; +} + +static script_type segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, script_type prevValue) { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + //Platform::DebugPrintf("Scripting indicator [%s]\n", s); + //Don + //if (strstr(s, "src")) // External script + //return eScriptNone; + //nod + if (strstr(s, "vbs")) + return eScriptVBS; + if (strstr(s, "pyth")) + return eScriptPython; + if (strstr(s, "javas")) + return eScriptJS; + if (strstr(s, "jscr")) + return eScriptJS; + if (strstr(s, "php")) + return eScriptPHP; + if (strstr(s, "xml")) + return eScriptXML; + + return prevValue; +} + +static int PrintScriptingIndicatorOffset(Accessor &styler, unsigned int start, unsigned int end) { + int iResult = 0; + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (0 == strncmp(s, "php", 3)) { + iResult = 3; + } + + return iResult; +} + +static script_type ScriptOfState(int state) { + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + return eScriptPython; + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + return eScriptVBS; + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { + return eScriptJS; + } else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) { + return eScriptPHP; + } else if ((state >= SCE_H_SGML_DEFAULT) && (state < SCE_H_SGML_BLOCK_DEFAULT)) { + return eScriptSGML; + } else if (state == SCE_H_SGML_BLOCK_DEFAULT) { + return eScriptSGMLblock; + } else { + return eScriptNone; + } +} + +static int statePrintForState(int state, script_mode inScriptType) { + int StateToPrint; + + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON); + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS); + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS); + } else { + StateToPrint = state; + } + + return StateToPrint; +} + +static int stateForPrintState(int StateToPrint) { + int state; + + if ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) { + state = StateToPrint - SCE_HA_PYTHON; + } else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) { + state = StateToPrint - SCE_HA_VBS; + } else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_REGEX)) { + state = StateToPrint - SCE_HA_JS; + } else { + state = StateToPrint; + } + + return state; +} + +static inline bool IsNumber(unsigned int start, Accessor &styler) { + return IsADigit(styler[start]) || (styler[start] == '.') || + (styler[start] == '-') || (styler[start] == '#'); +} + +static inline bool isStringState(int state) { + bool bResult; + + switch (state) { + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HJA_DOUBLESTRING: + case SCE_HJA_SINGLESTRING: + case SCE_HB_STRING: + case SCE_HBA_STRING: + case SCE_HP_STRING: + case SCE_HP_CHARACTER: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + case SCE_HPA_STRING: + case SCE_HPA_CHARACTER: + case SCE_HPA_TRIPLE: + case SCE_HPA_TRIPLEDOUBLE: + case SCE_HPHP_HSTRING: + case SCE_HPHP_SIMPLESTRING: + case SCE_HPHP_HSTRING_VARIABLE: + case SCE_HPHP_COMPLEX_VARIABLE: + bResult = true; + break; + default : + bResult = false; + break; + } + return bResult; +} + +static inline bool stateAllowsTermination(int state) { + bool allowTermination = !isStringState(state); + if (allowTermination) { + switch (state) { + case SCE_HB_COMMENTLINE: + case SCE_HPHP_COMMENT: + case SCE_HP_COMMENTLINE: + case SCE_HPA_COMMENTLINE: + allowTermination = false; + } + } + return allowTermination; +} + +// not really well done, since it's only comments that should lex the %> and <% +static inline bool isCommentASPState(int state) { + bool bResult; + + switch (state) { + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTLINE: + case SCE_HJ_COMMENTDOC: + case SCE_HB_COMMENTLINE: + case SCE_HP_COMMENTLINE: + case SCE_HPHP_COMMENT: + case SCE_HPHP_COMMENTLINE: + bResult = true; + break; + default : + bResult = false; + break; + } + return bResult; +} + +static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + bool wordIsNumber = IsNumber(start, styler); + char chAttr = SCE_H_ATTRIBUTEUNKNOWN; + if (wordIsNumber) { + chAttr = SCE_H_NUMBER; + } else { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (keywords.InList(s)) + chAttr = SCE_H_ATTRIBUTE; + } + if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords) + // No keywords -> all are known + chAttr = SCE_H_ATTRIBUTE; + styler.ColourTo(end, chAttr); +} + +static int classifyTagHTML(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler, bool &tagDontFold, + bool caseSensitive) { + char s[30 + 2]; + // Copy after the '<' + unsigned int i = 0; + for (unsigned int cPos = start; cPos <= end && i < 30; cPos++) { + char ch = styler[cPos]; + if ((ch != '<') && (ch != '/')) { + s[i++] = caseSensitive ? ch : static_cast(MakeLowerCase(ch)); + } + } + + //The following is only a quick hack, to see if this whole thing would work + //we first need the tagname with a trailing space... + s[i] = ' '; + s[i+1] = '\0'; + + //...to find it in the list of no-container-tags + // (There are many more. We will need a keywordlist in the property file for this) + tagDontFold = (NULL != strstr("meta link img area br hr input ",s)); + + //now we can remove the trailing space + s[i] = '\0'; + + bool isScript = false; + char chAttr = SCE_H_TAGUNKNOWN; + if (s[0] == '!') { + chAttr = SCE_H_SGML_DEFAULT; + } else if (s[0] == '/') { // Closing tag + if (keywords.InList(s + 1)) + chAttr = SCE_H_TAG; + } else { + if (keywords.InList(s)) { + chAttr = SCE_H_TAG; + isScript = 0 == strcmp(s, "script"); + } + } + if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords) { + // No keywords -> all are known + chAttr = SCE_H_TAG; + isScript = 0 == strcmp(s, "script"); + } + styler.ColourTo(end, chAttr); + return isScript ? SCE_H_SCRIPT : chAttr; +} + +static void classifyWordHTJS(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler, script_mode inScriptType) { + char chAttr = SCE_HJ_WORD; + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HJ_NUMBER; + else { + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + if (keywords.InList(s)) + chAttr = SCE_HJ_KEYWORD; + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); +} + +static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, script_mode inScriptType) { + char chAttr = SCE_HB_IDENTIFIER; + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HB_NUMBER; + else { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (keywords.InList(s)) { + chAttr = SCE_HB_WORD; + if (strcmp(s, "rem") == 0) + chAttr = SCE_HB_COMMENTLINE; + } + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + if (chAttr == SCE_HB_COMMENTLINE) + return SCE_HB_COMMENTLINE; + else + return SCE_HB_DEFAULT; +} + +static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord, script_mode inScriptType) { + bool wordIsNumber = IsADigit(styler[start]); + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + char chAttr = SCE_HP_IDENTIFIER; + if (0 == strcmp(prevWord, "class")) + chAttr = SCE_HP_CLASSNAME; + else if (0 == strcmp(prevWord, "def")) + chAttr = SCE_HP_DEFNAME; + else if (wordIsNumber) + chAttr = SCE_HP_NUMBER; + else if (keywords.InList(s)) + chAttr = SCE_HP_WORD; + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + strcpy(prevWord, s); +} + +// Update the word colour to default or keyword +// Called when in a PHP word +static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char chAttr = SCE_HPHP_DEFAULT; + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1])); + if (wordIsNumber) + chAttr = SCE_HPHP_NUMBER; + else { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (keywords.InList(s)) + chAttr = SCE_HPHP_WORD; + } + styler.ColourTo(end, chAttr); +} + +static bool isWordHSGML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + return keywords.InList(s); +} + +static bool isWordCdata(unsigned int start, unsigned int end, Accessor &styler) { + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + return (0 == strcmp(s, "[CDATA[")); +} + +// Return the first state to reach when entering a scripting language +static int StateForScript(script_type scriptLanguage) { + int Result; + switch (scriptLanguage) { + // Modif by Don + /* + case eScriptVBS: + Result = SCE_HB_START; + break; + */ + case eScriptJS: + Result = SCE_HJ_START; + break; + // Fidom by Don + case eScriptPython: + Result = SCE_HP_START; + break; + case eScriptPHP: + Result = SCE_HPHP_DEFAULT; + break; + case eScriptXML: + Result = SCE_H_TAGUNKNOWN; + break; + case eScriptSGML: + Result = SCE_H_SGML_DEFAULT; + break; + default : + // Modif by Don + //Result = SCE_HJ_START; + Result = SCE_HB_START; + // Fidom by Don + break; + } + return Result; +} + +static inline bool ishtmlwordchar(char ch) { + return !isascii(ch) || + (isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'); +} + +static inline bool issgmlwordchar(char ch) { + return !isascii(ch) || + (isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['); +} + +static inline bool IsPhpWordStart(const unsigned char ch) { + return (isascii(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); +} + +static inline bool IsPhpWordChar(char ch) { + return IsADigit(ch) || IsPhpWordStart(ch); +} + +static bool InTagState(int state) { + return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || + state == SCE_H_SCRIPT || + state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || + state == SCE_H_NUMBER || state == SCE_H_OTHER || + state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; +} + +static bool IsCommentState(const int state) { + return state == SCE_H_COMMENT || state == SCE_H_SGML_COMMENT; +} + +static bool IsScriptCommentState(const int state) { + return state == SCE_HJ_COMMENT || state == SCE_HJ_COMMENTLINE || state == SCE_HJA_COMMENT || + state == SCE_HJA_COMMENTLINE || state == SCE_HB_COMMENTLINE || state == SCE_HBA_COMMENTLINE; +} + +static bool isLineEnd(char ch) { + return ch == '\r' || ch == '\n'; +} + +static bool isOKBeforeRE(char ch) { + return (ch == '(') || (ch == '=') || (ch == ','); +} + +static bool isPHPStringState(int state) { + return + (state == SCE_HPHP_HSTRING) || + (state == SCE_HPHP_SIMPLESTRING) || + (state == SCE_HPHP_HSTRING_VARIABLE) || + (state == SCE_HPHP_COMPLEX_VARIABLE); +} + +static int FindPhpStringDelimiter(char *phpStringDelimiter, const int phpStringDelimiterSize, int i, const int lengthDoc, Accessor &styler) { + int j; + while (i < lengthDoc && (styler[i] == ' ' || styler[i] == '\t')) + i++; + phpStringDelimiter[0] = '\n'; + for (j = i; j < lengthDoc && styler[j] != '\n' && styler[j] != '\r'; j++) { + if (j - i < phpStringDelimiterSize - 2) + phpStringDelimiter[j-i+1] = styler[j]; + else + i++; + } + phpStringDelimiter[j-i+1] = '\0'; + return j; +} + +static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; // SGML (DTD) keywords + + // Lexer for HTML requires more lexical states (7 bits worth) than most lexers + styler.StartAt(startPos, STYLE_MAX); + char prevWord[200]; + prevWord[0] = '\0'; + char phpStringDelimiter[200]; // PHP is not limited in length, we are + phpStringDelimiter[0] = '\0'; + int StateToPrint = initStyle; + int state = stateForPrintState(StateToPrint); + + // If inside a tag, it may be a script tag, so reread from the start to ensure any language tags are seen + if (InTagState(state)) { + while ((startPos > 0) && (InTagState(styler.StyleAt(startPos - 1)))) { + startPos--; + length++; + } + state = SCE_H_DEFAULT; + } + // String can be heredoc, must find a delimiter first + while (startPos > 0 && isPHPStringState(state) && state != SCE_HPHP_SIMPLESTRING) { + startPos--; + length++; + state = styler.StyleAt(startPos); + } + styler.StartAt(startPos, STYLE_MAX); + + int lineCurrent = styler.GetLine(startPos); + int lineState; + if (lineCurrent > 0) { + lineState = styler.GetLineState(lineCurrent); + } else { + // Default client and ASP scripting language is JavaScript + lineState = eScriptJS << 8; + // Don + //lineState |= styler.GetPropertyInt("asp.default.language", eScriptJS) << 4; + lineState |= styler.GetPropertyInt("asp.default.language", eScriptVBS) << 4; + //nod + } + script_mode inScriptType = script_mode((lineState >> 0) & 0x03); // 2 bits of scripting mode + bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag + bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag + bool tagDontFold = false; //some HTML tags should not be folded + script_type aspScript = script_type((lineState >> 4) & 0x0F); // 4 bits of script name + script_type clientScript = script_type((lineState >> 8) & 0x0F); // 4 bits of script name + int beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state + + script_type scriptLanguage = ScriptOfState(state); + + const bool foldHTML = styler.GetPropertyInt("fold.html", 0) != 0; + const bool fold = foldHTML && styler.GetPropertyInt("fold", 0); + const bool foldHTMLPreprocessor = foldHTML && styler.GetPropertyInt("fold.html.preprocessor", 1); + const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + const bool caseSensitive = styler.GetPropertyInt("html.tags.case.sensitive", 0) != 0; + + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + int visibleChars = 0; + + char chPrev = ' '; + char ch = ' '; + char chPrevNonWhite = ' '; + // look back to set chPrevNonWhite properly for better regex colouring + if (scriptLanguage == eScriptJS && startPos > 0) { + int back = startPos; + int style = 0; + while (--back) { + style = styler.StyleAt(back); + if (style < SCE_HJ_DEFAULT || style > SCE_HJ_COMMENTDOC) + // includes SCE_HJ_COMMENT & SCE_HJ_COMMENTLINE + break; + } + if (style == SCE_HJ_SYMBOLS) { + chPrevNonWhite = styler.SafeGetCharAt(back); + } + } + + styler.StartSegment(startPos); + const int lengthDoc = startPos + length; + for (int i = startPos; i < lengthDoc; i++) { + const char chPrev2 = chPrev; + chPrev = ch; + if (!isspacechar(ch) && state != SCE_HJ_COMMENT && + state != SCE_HJ_COMMENTLINE && state != SCE_HJ_COMMENTDOC) + chPrevNonWhite = ch; + ch = styler[i]; + char chNext = styler.SafeGetCharAt(i + 1); + const char chNext2 = styler.SafeGetCharAt(i + 2); + + // Handle DBCS codepages + if (styler.IsLeadByte(ch)) { + chPrev = ' '; + i += 1; + continue; + } + + if ((!isspacechar(ch) || !foldCompact) && fold) + visibleChars++; + + // decide what is the current state to print (depending of the script tag) + StateToPrint = statePrintForState(state, inScriptType); + + // handle script folding + if (fold) { + switch (scriptLanguage) { + case eScriptJS: + case eScriptPHP: + //not currently supported case eScriptVBS: + + if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC) && (!isStringState(state))) { + //Platform::DebugPrintf("state=%d, StateToPrint=%d, initStyle=%d\n", state, StateToPrint, initStyle); + //if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) { + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + break; + case eScriptPython: + if (state != SCE_HP_COMMENTLINE) { + if ((ch == ':') && ((chNext == '\n') || (chNext == '\r' && chNext2 == '\n'))) { + levelCurrent++; + } else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) { + // check if the number of tabs is lower than the level + int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8; + for (int j = 0; Findlevel > 0; j++) { + char chTmp = styler.SafeGetCharAt(i + j + 1); + if (chTmp == '\t') { + Findlevel -= 8; + } else if (chTmp == ' ') { + Findlevel--; + } else { + break; + } + } + + if (Findlevel > 0) { + levelCurrent -= Findlevel / 8; + if (Findlevel % 8) + levelCurrent--; + } + } + } + break; + default: + break; + } + } + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // New line -> record any line state onto /next/ line + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + + styler.SetLevel(lineCurrent, lev); + visibleChars = 0; + levelPrev = levelCurrent; + } + lineCurrent++; + styler.SetLineState(lineCurrent, + ((inScriptType & 0x03) << 0) | + ((tagOpened & 0x01) << 2) | + ((tagClosing & 0x01) << 3) | + ((aspScript & 0x0F) << 4) | + ((clientScript & 0x0F) << 8) | + ((beforePreProc & 0xFF) << 12)); + } + + // generic end of script processing + else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { + // Check if it's the end of the script tag (or any other HTML tag) + switch (state) { + // in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!) + case SCE_H_DOUBLESTRING: + case SCE_H_SINGLESTRING: + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + //case SCE_HJ_COMMENTLINE: // removed as this is a common thing done to hide + // the end of script marker from some JS interpreters. + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HJ_REGEX: + case SCE_HB_STRING: + case SCE_HP_STRING: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + break; + default : + // check if the closing tag is a script tag + if (state == SCE_HJ_COMMENTLINE) { + char tag[7]; // room for the