I want to re-activate my feature request, because it is IMHO a really helpful feature with a minimum of codechanges (I guess).
Scintilla is able to handle one document in multiple Editorgadgets. Scintilla handles text and the Gadget, which displays the text, separately. One can connect one Document instance to any number of scintilla gadgets. I tried to "hack" the IDE to connect the current document (sourcecode) to a own Scintilla Gadget, but unfortunately it is not possible due to memory accessvialoation. I can read the documentpointer, but the IDE and my program are separate processes, so it is not allowed for my Scintilla gadget to handle the document of the IDE.
So this will only work if you (Freak or Fred) open a second view (Scintialla Gadget) in the IDE panel and connect the current document (sourcecode) to this second view in the same process.
I have no idea if this second view interferes with existing functions of the PB-IDE, or whether there is to write additional code, but in principle it looks very very simple.
- Open second view
- Get the documentpointer of the current sourcecode
- Connect the document to the second view
For more informations see this section in the Scintilla docs please:
http://www.scintilla.org/ScintillaDoc.h ... tipleViewsHere is a very simple example how it works (I exdented the Scintilla example):
Compile this code and enter some new text in one of the two Scintilla Gadgets. You will see that both Gadgets are handling the same document instance in realtime.
Code:
EnableExplicit
Procedure MakeScintillaText(text.s)
Static sciText.s
CompilerIf #PB_Compiler_Unicode
sciText = Space(StringByteLength(text, #PB_UTF8))
PokeS(@sciText, text, -1, #PB_UTF8)
CompilerElse
sciText = text
CompilerEndIf
ProcedureReturn @sciText
EndProcedure
If OpenWindow(0, 0, 0, 320, 180, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If InitScintilla()
ScintillaGadget(0, 10, 10, 300, 70, 0)
ScintillaGadget(1, 10, 100, 300, 70, 0)
; Ausgabe auf rote Farbe setzen
ScintillaSendMessage(0, #SCI_STYLESETFORE, 0, RGB(255, 0, 0))
; Anfänglichen Text des ScintillaGadgets festlegen
ScintillaSendMessage(0, #SCI_SETTEXT, 0, MakeScintillaText("Please type in some text in the top Scintilla Gadget"))
; Hinzufügen einer zweiten Zeile mit einem vorherigen Zeilenumbruch
Define Text$
Define *DocPointer
ScintillaSendMessage(0, #SCI_APPENDTEXT, Len(Text$), MakeScintillaText(Text$))
*DocPointer = ScintillaSendMessage(0, #SCI_GETDOCPOINTER, 0, 0)
Debug *DocPointer
ScintillaSendMessage(1, #SCI_SETDOCPOINTER, 0, *DocPointer)
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

Because this feature has not been implemented for many years
I would pay for it!