Utilize "Multiple Views" Capability of Scintilla

Old Topics related to the original "AutoGUI" ahk script editor.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Utilize "Multiple Views" Capability of Scintilla

Post by kczx3 » 27 Mar 2019, 07:16

Instead of creating an instance of the Scintilla control for every open document, you can utilize the Multiple Views functionality instead to save on memory.

It is simple reference counting and all settings applied are for each separate document. So the lexer and any other settings can be different for each "document".

User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Utilize "Multiple Views" Capability of Scintilla

Post by Alguimist » 29 Mar 2019, 19:26

Some time ago I noticed that Notepad++ reuses the same instance of Scintilla in all tabs, while Programmer's Notepad do not. And so I didn't bother to further investigate the subject.

But, as you mention, it sounds like a good suggestion, and I will soon do some tests.

If it's worth implementing, I'll have to revise and test the whole editor code. And that may be the occasion to adapt AutoGUI to AHK v2 - which I have not adhered to yet - as a new project. I'm also considering to extirpate the GUI designer from AutoGUI, turning it into a separate tool. What do you think about that?

User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Utilize "Multiple Views" Capability of Scintilla

Post by kczx3 » 29 Mar 2019, 20:19

See here for my very basic intro to utilizing multiple views within a control, as well as sharing a document between two Scintilla controls. https://www.autohotkey.com/boards/viewtopic.php?f=6&t=63034&p=270320#p269269

Regarding the GUI designer, I can’t say that I have an opinion to sway you either way. I don’t use it at all. I simply use the code editor of AutoGUI.

need4speed
Posts: 143
Joined: 22 Apr 2016, 06:50

Re: Utilize "Multiple Views" Capability of Scintilla

Post by need4speed » 07 Jun 2019, 14:37

Alguimist wrote:
29 Mar 2019, 19:26
I'm also considering to extirpate the GUI designer from AutoGUI, turning it into a separate tool. What do you think about that?
good idea :thumbup:

User avatar
boiler
Posts: 16772
Joined: 21 Dec 2014, 02:44

Re: Utilize "Multiple Views" Capability of Scintilla

Post by boiler » 03 Nov 2019, 17:33

If you are still considering implementing multiple views capability, and it allows you accomplish this:
kczx3 wrote:
29 Mar 2019, 20:19
...sharing a document between two Scintilla controls.
...I just wanted to pass along that I think it would be a great addition to your editor. The lack of being able to view and edit the same document in two different (in-sync) panes is the only reason why I am using VS Code instead of one of the AHK-specific editors. It's such a valuable feature when working on large scripts, it would make it the hands-down AHK editor of choice in my view. It would make it very easy to recommend having it be the editor bundled with AHK as sort of an AHK IDE as has been proposed.

User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Utilize "Multiple Views" Capability of Scintilla

Post by kczx3 » 04 Nov 2019, 12:01

I'd like to someday take a stab at it. I was working on it within my SQLiteViewer application however I've had trouble conceptualizing the reference counting AND keeping track of tab indices. Harder than it looks I think.

User avatar
boiler
Posts: 16772
Joined: 21 Dec 2014, 02:44

Re: Utilize "Multiple Views" Capability of Scintilla

Post by boiler » 04 Nov 2019, 14:52

That would be great. Good luck with it.

Post Reply

Return to “Old Topics”