mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
parent
9b67c93ef9
commit
d21f7cbf5c
258
PowerEditor/Test/FunctionList/hollywood/unitTest
Normal file
258
PowerEditor/Test/FunctionList/hollywood/unitTest
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
/****************************************************************
|
||||||
|
** **
|
||||||
|
** Name: AsyncFX **
|
||||||
|
** Author: Andreas Falkenhahn **
|
||||||
|
** Version: 1.2 **
|
||||||
|
** Date: 17.01.19 **
|
||||||
|
** Interpreter: Hollywood 8.0 **
|
||||||
|
** Licence: Sample program for Hollywood **
|
||||||
|
** Function: Demonstrates asynchronous transition effects **
|
||||||
|
** **
|
||||||
|
** History: **
|
||||||
|
** **
|
||||||
|
** 1.2: (07.01.19) **
|
||||||
|
** **
|
||||||
|
** - uses the new @DIRECTORY preprocessor command now which **
|
||||||
|
** will automatically link all pics when compiling **
|
||||||
|
** **
|
||||||
|
** 1.1: (29.03.13) **
|
||||||
|
** **
|
||||||
|
** - added BeginRefresh()/EndRefresh() section for optimized **
|
||||||
|
** drawing on supported systems **
|
||||||
|
** **
|
||||||
|
** 1.0: (17.09.08) **
|
||||||
|
** **
|
||||||
|
** - initial release **
|
||||||
|
** **
|
||||||
|
****************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Important! Check if the used Hollywood version is at least
|
||||||
|
** version 8.0!
|
||||||
|
*/
|
||||||
|
@VERSION 8,0
|
||||||
|
|
||||||
|
@DIRECTORY 1, "pics"
|
||||||
|
|
||||||
|
@SPRITE 1, "buttons.png", {Frames = 2, Width = 137, Height = 24, Transparency = $ff0000}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Initial display dimensions
|
||||||
|
*/
|
||||||
|
@DISPLAY {Width = 800, Height = 600}
|
||||||
|
|
||||||
|
/* check if a picture is already on screen */
|
||||||
|
Function p_CheckPic(x)
|
||||||
|
|
||||||
|
For Local k = 0 To 15
|
||||||
|
If p[k].brush = x Then Return(True)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return(False)
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
/* select a random effect */
|
||||||
|
Function p_ChooseFX(use_globfx)
|
||||||
|
|
||||||
|
Local found = False
|
||||||
|
Local type
|
||||||
|
|
||||||
|
; do we want a global effect or a new effect for every object?
|
||||||
|
If (use_globfx = True) And (bstate = 2) Then Return(globfx)
|
||||||
|
|
||||||
|
While found = False
|
||||||
|
|
||||||
|
type = GetRandomFX(True)
|
||||||
|
|
||||||
|
; no #SCROLL effects please! They'd corrupt the display because we aren't using layers!
|
||||||
|
Switch type
|
||||||
|
Case #SCROLLWEST
|
||||||
|
Case #SCROLLEAST
|
||||||
|
Case #SCROLLNORTH
|
||||||
|
Case #SCROLLSOUTH
|
||||||
|
Case #SCROLLNORTHEAST
|
||||||
|
Case #SCROLLSOUTHEAST
|
||||||
|
Case #SCROLLSOUTHWEST
|
||||||
|
Case #SCROLLNORTHWEST
|
||||||
|
Default
|
||||||
|
found = True
|
||||||
|
EndSwitch
|
||||||
|
|
||||||
|
Wend
|
||||||
|
|
||||||
|
Return(type)
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
/* start new transition effect */
|
||||||
|
Function p_TOFunc(msg)
|
||||||
|
|
||||||
|
Local t
|
||||||
|
Local k = msg.userdata
|
||||||
|
|
||||||
|
; choose a new global effect if we're in static mode!
|
||||||
|
If (k = 0) And (bstate = 2) Then globfx = p_ChooseFX(False)
|
||||||
|
|
||||||
|
; randomly choose a new picture but it must not be on screen!
|
||||||
|
Repeat
|
||||||
|
t = Rnd(num)
|
||||||
|
Until p_CheckPic(t) = False
|
||||||
|
|
||||||
|
; remember picture
|
||||||
|
p[k].brush = t
|
||||||
|
|
||||||
|
; go!
|
||||||
|
p[k].drawfunc = DisplayBrushFX(p[k].brush + 1, p[k].x * 200, p[k].y * 150, {Async = True, Type = p_ChooseFX(True), Parameter = #WHITE})
|
||||||
|
p[k].active = True
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
Function p_SyncedRestart()
|
||||||
|
|
||||||
|
For Local k = 0 To 15 Do p_TOFunc({userdata = k})
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
/* our main loop */
|
||||||
|
Function p_MainLoop()
|
||||||
|
|
||||||
|
BeginRefresh
|
||||||
|
|
||||||
|
For Local k = 0 To 15
|
||||||
|
|
||||||
|
If p[k].active = True
|
||||||
|
|
||||||
|
If AsyncDrawFrame(p[k].drawfunc) = True
|
||||||
|
|
||||||
|
p[k].active = False
|
||||||
|
|
||||||
|
If bstate = 2
|
||||||
|
|
||||||
|
; We're in static mode --> make sure our FX are absolutely sync'ed
|
||||||
|
|
||||||
|
If k = 15 Then SetTimeout(Nil, p_SyncedRestart, 1000)
|
||||||
|
|
||||||
|
p[k].cleartimeout = False
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
; FX has finished!
|
||||||
|
; --> wait 1 second and then display next pic
|
||||||
|
; note that we have to use SetTimeout() because we are in a callback and must
|
||||||
|
; not call functions that block the system (e.g. do not use Wait() in a callback!)
|
||||||
|
|
||||||
|
p[k].timeout = SetTimeout(Nil, p_TOFunc, 1000, k)
|
||||||
|
p[k].cleartimeout = True
|
||||||
|
EndIf
|
||||||
|
EndIf
|
||||||
|
EndIf
|
||||||
|
Next
|
||||||
|
|
||||||
|
EndRefresh
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
/* start all effects */
|
||||||
|
Function p_Start16FX()
|
||||||
|
|
||||||
|
; start from new!
|
||||||
|
For Local k = 0 To 15
|
||||||
|
p[k].drawfunc = DisplayBrushFX(p[k].brush + 1, p[k].x * 200, p[k].y * 150, {Async = True, Type = p_ChooseFX(True), Parameter = #WHITE})
|
||||||
|
p[k].active = True
|
||||||
|
Next
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
/* scan files and start the transition effects */
|
||||||
|
Function p_Init()
|
||||||
|
|
||||||
|
Local t
|
||||||
|
|
||||||
|
; count files
|
||||||
|
num = CountDirectoryEntries(1)
|
||||||
|
|
||||||
|
; load brushes
|
||||||
|
For Local k = 1 to num Do LoadBrush(k, GetDirectoryEntry(1, PadNum(k, 2) .. ".jpg"))
|
||||||
|
|
||||||
|
p = {}
|
||||||
|
|
||||||
|
For Local k = 0 To 15 Do p[k] = {brush = -1}
|
||||||
|
|
||||||
|
; generate initial picture layout
|
||||||
|
For Local k = 0 To 15
|
||||||
|
Repeat
|
||||||
|
t = Rnd(num)
|
||||||
|
Until p_CheckPic(t) = False
|
||||||
|
p[k].brush = t
|
||||||
|
Next
|
||||||
|
|
||||||
|
Local k = 0
|
||||||
|
|
||||||
|
; generate x & y coordinates for our FX
|
||||||
|
For Local y = 0 To 3
|
||||||
|
|
||||||
|
For Local x = 0 To 3
|
||||||
|
|
||||||
|
p[k].x = x
|
||||||
|
p[k].y = y
|
||||||
|
|
||||||
|
k = k + 1
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
; start all FX at once
|
||||||
|
p_Start16FX()
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
/* this function gets called when the user presses a button */
|
||||||
|
Function p_EventFunc(msg)
|
||||||
|
|
||||||
|
If msg.id = bstate Then Return
|
||||||
|
|
||||||
|
bstate = msg.id
|
||||||
|
|
||||||
|
; update button state
|
||||||
|
DisplaySprite(1, 654, 570, bstate)
|
||||||
|
|
||||||
|
; cancel all async drawings or clear timeouts
|
||||||
|
For Local k = 0 To 15
|
||||||
|
|
||||||
|
If p[k].active = True
|
||||||
|
CancelAsyncDraw(p[k].drawfunc)
|
||||||
|
p[k].active = False
|
||||||
|
Else
|
||||||
|
If p[k].cleartimeout = True Then ClearTimeout(p[k].timeout)
|
||||||
|
EndIf
|
||||||
|
Next
|
||||||
|
|
||||||
|
; clear screen
|
||||||
|
Box(0, 0, 800, 600, #BLACK)
|
||||||
|
|
||||||
|
; choose a new global effect if we're in static mode
|
||||||
|
If bstate = 2 Then globfx = p_ChooseFX(False)
|
||||||
|
|
||||||
|
p_Start16FX()
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
p_Init()
|
||||||
|
|
||||||
|
SetFillStyle(#FILLCOLOR)
|
||||||
|
|
||||||
|
SetInterval(Nil, p_MainLoop, 1000 \ 50) ; 50 fps
|
||||||
|
|
||||||
|
bstate = 1
|
||||||
|
|
||||||
|
MakeButton(1, #SIMPLEBUTTON, 654, 570, 64, 24, {OnMouseUp = p_EventFunc})
|
||||||
|
MakeButton(2, #SIMPLEBUTTON, 727, 570, 64, 24, {OnMouseUp = p_EventFunc})
|
||||||
|
|
||||||
|
DisplaySprite(1, 654, 570)
|
||||||
|
|
||||||
|
EscapeQuit(True)
|
||||||
|
|
||||||
|
Repeat
|
||||||
|
WaitEvent
|
||||||
|
Forever
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
{"leaves":["p_CheckPic","p_ChooseFX","p_TOFunc","p_SyncedRestart","p_MainLoop","p_Start16FX","p_Init","p_EventFunc"],"root":"unitTest"}
|
@ -97,6 +97,7 @@
|
|||||||
<association id= "visualprolog.xml" langID= "84"/>
|
<association id= "visualprolog.xml" langID= "84"/>
|
||||||
<association id= "typescript.xml" langID= "85"/>
|
<association id= "typescript.xml" langID= "85"/>
|
||||||
<association id= "gdscript.xml" langID= "88"/>
|
<association id= "gdscript.xml" langID= "88"/>
|
||||||
|
<association id= "hollywood.xml" langID= "89"/>
|
||||||
|
|
||||||
If you create your own parse rule of supported languages (above) for your specific need,
|
If you create your own parse rule of supported languages (above) for your specific need,
|
||||||
you can copy it without modifying the original one, and make it point to your rule.
|
you can copy it without modifying the original one, and make it point to your rule.
|
||||||
|
27
PowerEditor/installer/functionList/hollywood.xml
Normal file
27
PowerEditor/installer/functionList/hollywood.xml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!-- ==========================================================================\
|
||||||
|
|
|
||||||
|
| To learn how to make your own language parser, please check the following
|
||||||
|
| link:
|
||||||
|
| https://npp-user-manual.org/docs/function-list/
|
||||||
|
|
|
||||||
|
\=========================================================================== -->
|
||||||
|
<NotepadPlus>
|
||||||
|
<functionList>
|
||||||
|
<!-- ================================================ [ Hollywood ] -->
|
||||||
|
|
||||||
|
<parser
|
||||||
|
displayName="Hollywood"
|
||||||
|
id ="hollywood_function"
|
||||||
|
>
|
||||||
|
<function
|
||||||
|
mainExpr="((^|\s+|[{,])([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\s*[=:]|^|[\s;\}]+)\s*function(\s+[A-Za-z_][\w$:.]*)?\s*\([^\)\(]*\)[\n\s]"
|
||||||
|
>
|
||||||
|
<functionName>
|
||||||
|
<nameExpr expr="[A-Za-z_$][\w$:.]*\s*[=]|[A-Za-z_$][\w$:.]*\s*\(" />
|
||||||
|
<nameExpr expr="([A-Za-z_$][\w$:.]*\.)*[A-Za-z_$][\w$:.]*" />
|
||||||
|
</functionName>
|
||||||
|
</function>
|
||||||
|
</parser>
|
||||||
|
</functionList>
|
||||||
|
</NotepadPlus>
|
@ -97,6 +97,7 @@
|
|||||||
<association id= "visualprolog.xml" langID= "84"/>
|
<association id= "visualprolog.xml" langID= "84"/>
|
||||||
<association id= "typescript.xml" langID= "85"/>
|
<association id= "typescript.xml" langID= "85"/>
|
||||||
<association id= "gdscript.xml" langID= "88"/>
|
<association id= "gdscript.xml" langID= "88"/>
|
||||||
|
<association id= "hollywood.xml" langID= "89"/>
|
||||||
|
|
||||||
If you create your own parse rule of supported languages (above) for your specific need,
|
If you create your own parse rule of supported languages (above) for your specific need,
|
||||||
you can copy it without modifying the original one, and make it point to your rule.
|
you can copy it without modifying the original one, and make it point to your rule.
|
||||||
|
@ -554,6 +554,23 @@ License: GPL2
|
|||||||
<WordsStyle name="COMMENT BLOCK2" styleID="15" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
<WordsStyle name="COMMENT BLOCK2" styleID="15" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
||||||
<WordsStyle name="COMMENT BLOCK3" styleID="16" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
<WordsStyle name="COMMENT BLOCK3" styleID="16" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
||||||
</LexerType>
|
</LexerType>
|
||||||
|
<LexerType name="hollywood" desc="Hollywood" ext="">
|
||||||
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT" styleID="1" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT BLOCK" styleID="2" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="NUMBER" styleID="3" fgColor="8CD0D3" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="KEYWORD" styleID="4" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="instre1"/>
|
||||||
|
<WordsStyle name="CORE API" styleID="5" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="instre2"/>
|
||||||
|
<WordsStyle name="PLUGIN API" styleID="6" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="type1"/>
|
||||||
|
<WordsStyle name="PLUGIN METHOD" styleID="7" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="type2"/>
|
||||||
|
<WordsStyle name="STRING" styleID="8" fgColor="C89191" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="STRING BLOCK" styleID="9" fgColor="C89191" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="PREPROCESSOR" styleID="10" fgColor="DFDFDF" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" />
|
||||||
|
<WordsStyle name="OPERATOR" styleID="11" fgColor="DCDCDC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="IDENTIFIER" styleID="12" fgColor="DCDCDC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="CONSTANT" styleID="13" fgColor="DCA3A3" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="HEXNUMBER" styleID="14" fgColor="8CD0D3" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
</LexerType>
|
||||||
<LexerType name="html" desc="HTML" ext="">
|
<LexerType name="html" desc="HTML" ext="">
|
||||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
<WordsStyle name="COMMENT" styleID="9" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="3" fontSize="" />
|
<WordsStyle name="COMMENT" styleID="9" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="3" fontSize="" />
|
||||||
|
@ -524,6 +524,23 @@ Installation:
|
|||||||
<WordsStyle name="COMMENTBLOCK2" styleID="15" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="2" fontSize="" />
|
<WordsStyle name="COMMENTBLOCK2" styleID="15" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="2" fontSize="" />
|
||||||
<WordsStyle name="COMMENTBLOCK3" styleID="16" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="2" fontSize="" />
|
<WordsStyle name="COMMENTBLOCK3" styleID="16" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="2" fontSize="" />
|
||||||
</LexerType>
|
</LexerType>
|
||||||
|
<LexerType name="hollywood" desc="Hollywood" ext="">
|
||||||
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="839496" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT" styleID="1" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT BLOCK" styleID="2" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="NUMBER" styleID="3" fgColor="2AA198" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="KEYWORD" styleID="4" fgColor="859900" bgColor="002B36" fontName="" fontStyle="1" fontSize="" keywordClass="instre1"/>
|
||||||
|
<WordsStyle name="CORE API" styleID="5" fgColor="859900" bgColor="002B36" fontName="" fontStyle="1" fontSize="" keywordClass="instre2"/>
|
||||||
|
<WordsStyle name="PLUGIN API" styleID="6" fgColor="859900" bgColor="002B36" fontName="" fontStyle="1" fontSize="" keywordClass="type1"/>
|
||||||
|
<WordsStyle name="PLUGIN METHOD" styleID="7" fgColor="859900" bgColor="002B36" fontName="" fontStyle="1" fontSize="" keywordClass="type2"/>
|
||||||
|
<WordsStyle name="STRING" styleID="8" fgColor="2AA198" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="STRING BLOCK" styleID="9" fgColor="2AA198" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="PREPROCESSOR" styleID="10" fgColor="CB4B16" bgColor="002B36" fontName="" fontStyle="1" fontSize="" />
|
||||||
|
<WordsStyle name="OPERATOR" styleID="11" fgColor="839496" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="IDENTIFIER" styleID="12" fgColor="839496" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="CONSTANT" styleID="13" fgColor="DC322F" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="HEXNUMBER" styleID="14" fgColor="2AA198" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
</LexerType>
|
||||||
<LexerType name="html" desc="HTML" ext="">
|
<LexerType name="html" desc="HTML" ext="">
|
||||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="839496" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="839496" bgColor="002B36" fontName="" fontStyle="0" fontSize="" />
|
||||||
<WordsStyle name="COMMENT" styleID="9" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="2" fontSize="" />
|
<WordsStyle name="COMMENT" styleID="9" fgColor="586E75" bgColor="002B36" fontName="" fontStyle="2" fontSize="" />
|
||||||
|
@ -535,6 +535,24 @@ License: GPL2
|
|||||||
<WordsStyle name="COMMENT BLOCK2" styleID="15" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
<WordsStyle name="COMMENT BLOCK2" styleID="15" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
||||||
<WordsStyle name="COMMENT BLOCK3" styleID="16" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
<WordsStyle name="COMMENT BLOCK3" styleID="16" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" fontSize="" />
|
||||||
</LexerType>
|
</LexerType>
|
||||||
|
</LexerType>
|
||||||
|
<LexerType name="hollywood" desc="Hollywood" ext="">
|
||||||
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT" styleID="1" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT BLOCK" styleID="2" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="NUMBER" styleID="3" fgColor="8CD0D3" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="KEYWORD" styleID="4" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="instre1"/>
|
||||||
|
<WordsStyle name="CORE API" styleID="5" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="instre2"/>
|
||||||
|
<WordsStyle name="PLUGIN API" styleID="6" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="type1"/>
|
||||||
|
<WordsStyle name="PLUGIN METHOD" styleID="7" fgColor="E3CEAB" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" keywordClass="type2"/>
|
||||||
|
<WordsStyle name="STRING" styleID="8" fgColor="C89191" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="STRING BLOCK" styleID="9" fgColor="C89191" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="PREPROCESSOR" styleID="10" fgColor="CEDF99" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" />
|
||||||
|
<WordsStyle name="OPERATOR" styleID="11" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="IDENTIFIER" styleID="12" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="CONSTANT" styleID="13" fgColor="9F9D6D" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="HEXNUMBER" styleID="14" fgColor="939393" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
</LexerType>
|
||||||
<LexerType name="html" desc="HTML" ext="">
|
<LexerType name="html" desc="HTML" ext="">
|
||||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
|
||||||
<WordsStyle name="COMMENT" styleID="9" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="3" fontSize="" />
|
<WordsStyle name="COMMENT" styleID="9" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="3" fontSize="" />
|
||||||
|
@ -33,7 +33,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
|
|||||||
L_CSOUND, L_ERLANG, L_ESCRIPT, L_FORTH, L_LATEX, \
|
L_CSOUND, L_ERLANG, L_ESCRIPT, L_FORTH, L_LATEX, \
|
||||||
L_MMIXAL, L_NIM, L_NNCRONTAB, L_OSCRIPT, L_REBOL, \
|
L_MMIXAL, L_NIM, L_NNCRONTAB, L_OSCRIPT, L_REBOL, \
|
||||||
L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG,\
|
L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG,\
|
||||||
L_TYPESCRIPT, L_JSON5, L_MSSQL, L_GDSCRIPT,\
|
L_TYPESCRIPT, L_JSON5, L_MSSQL, L_GDSCRIPT, L_HOLLYWOOD,\
|
||||||
// Don't use L_JS, use L_JAVASCRIPT instead
|
// Don't use L_JS, use L_JAVASCRIPT instead
|
||||||
// The end of enumated language type, so it should be always at the end
|
// The end of enumated language type, so it should be always at the end
|
||||||
L_EXTERNAL};
|
L_EXTERNAL};
|
||||||
|
@ -3727,6 +3727,8 @@ LangType Notepad_plus::menuID2LangType(int cmdID)
|
|||||||
return L_TYPESCRIPT;
|
return L_TYPESCRIPT;
|
||||||
case IDM_LANG_GDSCRIPT:
|
case IDM_LANG_GDSCRIPT:
|
||||||
return L_GDSCRIPT;
|
return L_GDSCRIPT;
|
||||||
|
case IDM_LANG_HOLLYWOOD:
|
||||||
|
return L_HOLLYWOOD;
|
||||||
case IDM_LANG_USER:
|
case IDM_LANG_USER:
|
||||||
return L_USER;
|
return L_USER;
|
||||||
default:
|
default:
|
||||||
|
@ -929,6 +929,7 @@ BEGIN
|
|||||||
MENUITEM "GDScript", IDM_LANG_GDSCRIPT
|
MENUITEM "GDScript", IDM_LANG_GDSCRIPT
|
||||||
MENUITEM "Gui4Cli", IDM_LANG_GUI4CLI
|
MENUITEM "Gui4Cli", IDM_LANG_GUI4CLI
|
||||||
MENUITEM "Haskell", IDM_LANG_HASKELL
|
MENUITEM "Haskell", IDM_LANG_HASKELL
|
||||||
|
MENUITEM "Hollywood", IDM_LANG_HOLLYWOOD
|
||||||
MENUITEM "HTML", IDM_LANG_HTML
|
MENUITEM "HTML", IDM_LANG_HTML
|
||||||
MENUITEM "INI file", IDM_LANG_INI
|
MENUITEM "INI file", IDM_LANG_INI
|
||||||
MENUITEM "Inno Setup", IDM_LANG_INNO
|
MENUITEM "Inno Setup", IDM_LANG_INNO
|
||||||
@ -1048,6 +1049,7 @@ BEGIN
|
|||||||
POPUP "H"
|
POPUP "H"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Haskell", IDM_LANG_HASKELL
|
MENUITEM "Haskell", IDM_LANG_HASKELL
|
||||||
|
MENUITEM "Hollywood", IDM_LANG_HOLLYWOOD
|
||||||
MENUITEM "HTML", IDM_LANG_HTML
|
MENUITEM "HTML", IDM_LANG_HTML
|
||||||
END
|
END
|
||||||
POPUP "I"
|
POPUP "I"
|
||||||
|
@ -3549,6 +3549,7 @@ void Notepad_plus::command(int id)
|
|||||||
case IDM_LANG_VISUALPROLOG:
|
case IDM_LANG_VISUALPROLOG:
|
||||||
case IDM_LANG_TYPESCRIPT:
|
case IDM_LANG_TYPESCRIPT:
|
||||||
case IDM_LANG_GDSCRIPT:
|
case IDM_LANG_GDSCRIPT:
|
||||||
|
case IDM_LANG_HOLLYWOOD:
|
||||||
case IDM_LANG_USER :
|
case IDM_LANG_USER :
|
||||||
{
|
{
|
||||||
setLanguage(menuID2LangType(id));
|
setLanguage(menuID2LangType(id));
|
||||||
|
@ -7779,6 +7779,9 @@ int NppParameters::langTypeToCommandID(LangType lt) const
|
|||||||
case L_GDSCRIPT:
|
case L_GDSCRIPT:
|
||||||
id = IDM_LANG_GDSCRIPT; break;
|
id = IDM_LANG_GDSCRIPT; break;
|
||||||
|
|
||||||
|
case L_HOLLYWOOD:
|
||||||
|
id = IDM_LANG_HOLLYWOOD; break;
|
||||||
|
|
||||||
case L_SEARCHRESULT :
|
case L_SEARCHRESULT :
|
||||||
id = -1; break;
|
id = -1; break;
|
||||||
|
|
||||||
|
@ -155,6 +155,7 @@ LanguageNameInfo ScintillaEditView::_langNameInfoArray[L_EXTERNAL + 1] = {
|
|||||||
{TEXT("json5"), TEXT("json5"), TEXT("JSON5 file"), L_JSON5, "json"},
|
{TEXT("json5"), TEXT("json5"), TEXT("JSON5 file"), L_JSON5, "json"},
|
||||||
{TEXT("mssql"), TEXT("mssql"), TEXT("Microsoft Transact-SQL (SQL Server) file"), L_MSSQL, "mssql"},
|
{TEXT("mssql"), TEXT("mssql"), TEXT("Microsoft Transact-SQL (SQL Server) file"), L_MSSQL, "mssql"},
|
||||||
{TEXT("gdscript"), TEXT("GDScript"), TEXT("GDScript file"), L_GDSCRIPT, "gdscript"},
|
{TEXT("gdscript"), TEXT("GDScript"), TEXT("GDScript file"), L_GDSCRIPT, "gdscript"},
|
||||||
|
{TEXT("hollywood"), TEXT("Hollywood"), TEXT("Hollywood script"), L_HOLLYWOOD, "hollywood"},
|
||||||
{TEXT("ext"), TEXT("External"), TEXT("External"), L_EXTERNAL, "null"}
|
{TEXT("ext"), TEXT("External"), TEXT("External"), L_EXTERNAL, "null"}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1814,6 +1815,9 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
|||||||
case L_GDSCRIPT:
|
case L_GDSCRIPT:
|
||||||
setGDScriptLexer(); break;
|
setGDScriptLexer(); break;
|
||||||
|
|
||||||
|
case L_HOLLYWOOD:
|
||||||
|
setHollywoodLexer(); break;
|
||||||
|
|
||||||
case L_TEXT :
|
case L_TEXT :
|
||||||
default :
|
default :
|
||||||
if (typeDoc >= L_EXTERNAL && typeDoc < NppParameters::getInstance().L_END)
|
if (typeDoc >= L_EXTERNAL && typeDoc < NppParameters::getInstance().L_END)
|
||||||
|
@ -1032,6 +1032,10 @@ protected:
|
|||||||
setLexer(L_VISUALPROLOG, LIST_0 | LIST_1 | LIST_2 | LIST_3);
|
setLexer(L_VISUALPROLOG, LIST_0 | LIST_1 | LIST_2 | LIST_3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setHollywoodLexer() {
|
||||||
|
setLexer(L_HOLLYWOOD, LIST_0 | LIST_1 | LIST_2 | LIST_3);
|
||||||
|
};
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
|
|
||||||
void setSearchResultLexer() {
|
void setSearchResultLexer() {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -540,6 +540,7 @@
|
|||||||
#define IDM_LANG_JSON5 (IDM_LANG + 85)
|
#define IDM_LANG_JSON5 (IDM_LANG + 85)
|
||||||
#define IDM_LANG_MSSQL (IDM_LANG + 86)
|
#define IDM_LANG_MSSQL (IDM_LANG + 86)
|
||||||
#define IDM_LANG_GDSCRIPT (IDM_LANG + 87)
|
#define IDM_LANG_GDSCRIPT (IDM_LANG + 87)
|
||||||
|
#define IDM_LANG_HOLLYWOOD (IDM_LANG + 88)
|
||||||
|
|
||||||
#define IDM_LANG_EXTERNAL (IDM_LANG + 165)
|
#define IDM_LANG_EXTERNAL (IDM_LANG + 165)
|
||||||
#define IDM_LANG_EXTERNAL_LIMIT (IDM_LANG + 179)
|
#define IDM_LANG_EXTERNAL_LIMIT (IDM_LANG + 179)
|
||||||
|
@ -524,6 +524,23 @@
|
|||||||
<WordsStyle name="COMMENT BLOCK2" styleID="15" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
<WordsStyle name="COMMENT BLOCK2" styleID="15" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
<WordsStyle name="COMMENT BLOCK3" styleID="16" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
<WordsStyle name="COMMENT BLOCK3" styleID="16" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
</LexerType>
|
</LexerType>
|
||||||
|
<LexerType name="hollywood" desc="Hollywood" ext="">
|
||||||
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="COMMENT BLOCK" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="NUMBER" styleID="3" fgColor="939393" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="KEYWORD" styleID="4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="instre1"/>
|
||||||
|
<WordsStyle name="CORE API" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="instre2"/>
|
||||||
|
<WordsStyle name="PLUGIN API" styleID="6" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="type1"/>
|
||||||
|
<WordsStyle name="PLUGIN METHOD" styleID="7" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="type2"/>
|
||||||
|
<WordsStyle name="STRING" styleID="8" fgColor="939393" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="STRING BLOCK" styleID="9" fgColor="939393" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="PREPROCESSOR" styleID="10" fgColor="D98C00" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||||
|
<WordsStyle name="OPERATOR" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="IDENTIFIER" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="CONSTANT" styleID="13" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
<WordsStyle name="HEXNUMBER" styleID="14" fgColor="939393" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
</LexerType>
|
||||||
<LexerType name="html" desc="HTML" ext="">
|
<LexerType name="html" desc="HTML" ext="">
|
||||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||||
<WordsStyle name="COMMENT" styleID="9" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
<WordsStyle name="COMMENT" styleID="9" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user