Code area gadget?

BlitzMax Forums/MaxGUI Module/Code area gadget?

JoshK(Posted 2009) [#1]
Is anyone interested in working on a code area proxy gadget? This would be based on the text area gadget, but would support undo and automatic syntax highlighting. I don't want to write the whole thing myself, but I will set it up and post it if others are interested in helping.


SebHoll(Posted 2009) [#2]
I did some work on the exact proxy gadget you decribed a while back, in my infant MaxGUI days. Most of it's there syntax highlighting wise, but it's not very modular. The code is probably horrible - I've come a long way since then, but I'll have a look for it for you if it's of any interest.


JoshK(Posted 2009) [#3]
The hard part is the syntax highlighting and undo, because as I am sure you know, the syntax highlighting creates an undo step.

If you post it, I will look, but it's probably easier to start from scratch.


ziggy(Posted 2009) [#4]
why don't you make max port of scintilla? If I were to write BLIde using max, I would go that way.


Ked(Posted 2009) [#5]
I vote for the BlitzMax port of Scintilla.


JoshK(Posted 2009) [#6]
Because no one but me is proving Klepto with any feedback on his scintilla implementation, and so far it has some pretty bad bugs. I would prefer that his implementation just works, but if that doesn't happen, this is my backup plan.


Ked(Posted 2009) [#7]
But Klepto's version is Win32 only. The source code of Scintilla has individual folders for GTK, Win32, and Mac. I think Scintilla would be a better way to go than to just do some highlighting in a text area.


_Skully(Posted 2009) [#8]
Why would syntax highlighting create an undo step?

even so.. couldn't you just make the undo/redo action pass through syntax highlighting to the next "significant" event?


klepto2(Posted 2009) [#9]
He is referring to the current textarea integrated in maxgui where the underlying richedit control creates undosteps for each style change. MSDN says this could be turned off but the steps provided by msdn doesn't work correctly.

The bugs in my scintilla code are hardly based on the scintilla source. I think i have missed some small thing in converting the messages from scintilla which makes it maybe buggy.


_Skully(Posted 2009) [#10]
Can you examine the undo data and follow through syntax highlights to the next non-syntax highlighted undo step or is it on auto-pilot?


JoshK(Posted 2009) [#11]
It wasn't easy last time I attempted it.

I don't know, I'll see how the Scintilla implementation shapes up. One way or another I need a code editor with highlighting and undo within a couple months.


_Skully(Posted 2009) [#12]
I'm guessing for Lua ;)

I'll be coming to talking to you about your 3d engine after this TileMax project is done. I've had a 3d space game in my head for years and so far I like what I see with it's capabilities (little off topic ;)

I guess its really about differentiating between syntax highlighting and formatting, but since its code you don't really do any formatting other than the syntax highlighting anyway. So if you can disable formatting by the user and "preview" the undo information you will know to pass over to the next undo / redo action when requested.