March 03, 2021, 02:52:09 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
BlitzMax / BlitzMax NG
»
MaxGUI
»
MaxGUI Scintilla TextArea
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: MaxGUI Scintilla TextArea (Read 374 times)
degac
Full Member
Posts: 170
MaxGUI Scintilla TextArea
«
on:
January 11, 2021, 05:15:35 PM »
Hi
I would like to know if there are somewhere some examples about using Scintilla/Textarea in MaxGUI.
I tried to read the MaxIDE code, but too big to read and understand.
Moreover I'm quite sure Scintilla has some interesting feature (like folding) - but I don't know if these are enabled (I didn't found a command about Folding for example and many TextAreaXXXXX commands are not documented in the source code).
Thanks
Logged
If there's a problem, there's at least one solution.
www.blitzmax.org
Dabz
Sr. Member
Posts: 408
Is it cos I is ginger?
Re: MaxGUI Scintilla TextArea
«
Reply #1 on:
January 11, 2021, 06:13:27 PM »
Dig around in my old editor code:-
https://sourceforge.net/p/bamboobasic/code/ci/master/tree/Editors/Win/Editor/
I had it all working perfectly, though, it was all written donkeys ago so some stuff might of changed... Be warned though, it is a good lump of code!
EDIT: Oh, and if your interested in Linux, then there is Vala code in there that uses Gtk.SourceView, I had that tee'd up canny as well, so well worth a look if your planning on motoring over to that side, see Editors/PI/ Editor/main.vala
Not as expansive as the Windows one, but, worked out well!
Dabz
Logged
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Henri
Sr. Member
Posts: 294
Re: MaxGUI Scintilla TextArea
«
Reply #2 on:
January 11, 2021, 07:37:05 PM »
Hi,
I literally just browsed the scintilla folder for the first time so I can't offer superior insight, but what I see from a glance is that scintilla source code seems to be fully included so all the raw functionally is there, but not all functionality have been wrapped (for example SetFoldLevel is missing ). What functions are currently wrapped can be found inside maxgui.mod/maxguitextareascintilla.mod/win32.bmx (for Windows, but are the same in all)
I did manage to create a scintilla gadget so thats something :-) For folding to work you would need to enable fold-style for default folding behaviour and SetFoldLevel function to set individual lines for custom fold behavior.
Code: BlitzMax
Import
maxgui.maxguitextareascintilla
Local
window:TGadget = CreateWindow
(
"Scintilla"
,
0
,
0
,
300
,
200
,
Null
, WINDOW_DEFAULT | WINDOW_CENTER
)
Local
g:TGadget =
New
TWindowsScintillaTextArea.Create
(
window,
0
,
""
)
Repeat
WaitEvent
(
)
Select
EventID
(
)
Case
EVENT_WINDOWCLOSE
End
EndSelect
Forever
-Henri
Logged
- Got 01100011 problems, but the bit ain't 00000001
degac
Full Member
Posts: 170
Re: MaxGUI Scintilla TextArea
«
Reply #3 on:
January 11, 2021, 07:56:24 PM »
Many thanks to both!
I have something to explore now!
Thanks!
Logged
If there's a problem, there's at least one solution.
www.blitzmax.org
Henri
Sr. Member
Posts: 294
Re: MaxGUI Scintilla TextArea
«
Reply #4 on:
January 17, 2021, 11:05:25 PM »
@Dabz
What happened to Bamboo basic ? Seems like you put a lot of effort on the editor..
-Henri
Logged
- Got 01100011 problems, but the bit ain't 00000001
Dabz
Sr. Member
Posts: 408
Is it cos I is ginger?
Re: MaxGUI Scintilla TextArea
«
Reply #5 on:
January 18, 2021, 05:49:22 AM »
Quote
What happened to Bamboo basic ? Seems like you put a lot of effort on the editor..
To be honest, it was just one of them, I've always fancied writing my own language, and a combination of hating php syntax, it seemed a good idea to make a transpiler setup for such a thing, and my intention was to only write a command line thing... It was initially just going to be an "interest" at first. But then I started playing with wxMax, then someone suggested Vala for Pi/x86 Linux (Max on Linux was already getting a bit scruffy then), that pricked my ears up, there wasn't much in the way of resources back then for Vala or its bindings to C libs, so that was something nice to explore, because I like doing that, sleeves up yadda yadda. I did get it complete, there wasn't much uptake in it and well, moved on really eventually, and just whacked the whole lot up on source forge.
It's all probably written terrible, I'm no compiler writer, but, I had the idea on how it would work in my head, coded it, and, it worked, good enough for me, and the editors, well, I always start off anything with the best intentions of keeping it tight and neat... Week in, monkey at a typewriter approach kicked in and I just went for it, Vala, wasnt entirely sure what I was doing as I was learning as I was going, if it I clicked build in geany, and it built, and then ran, and it ran and did exactly what I was wanting... That was good enough for me!
hehehe
So yeah, thats pretty much it Henri matey!
Dabz
Logged
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Henri
Sr. Member
Posts: 294
Re: MaxGUI Scintilla TextArea
«
Reply #6 on:
January 18, 2021, 02:38:12 PM »
Sweet :-)
I'm dabbling on an editor myself (in wxMax) when I have some spare time.
At the moment there are a lot of work related projects to do so we'll see..
-Henri
Logged
- Got 01100011 problems, but the bit ain't 00000001
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
BlitzMax / BlitzMax NG
»
MaxGUI
»
MaxGUI Scintilla TextArea
SimplePortal 2.3.6 © 2008-2014, SimplePortal