January 16, 2021, 09:44:34 PM
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 105 times)
degac
Full Member
Posts: 169
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: 348
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: 288
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: 169
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
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