spellcheck

28 views
Skip to first unread message

seasoned_geek

unread,
Aug 5, 2021, 4:14:00 PM8/5/21
to scintilla-interest
All,

Please forgive if I'm just being thick, but I cannot find in the doc or in any C++ code example (as of yet) just how to use Scintilla and spellcheck. Sorry if I'm dragging everyone down a rabbit hole, but I searched all of the doc I could find and in here.


Back in 2013 there was this conversation on spell-checking
https://groups.google.com/g/scintilla-interest/c/VFX2oG2olQo/m/Pen2Zx6DFCYJ

Back in 2017 there was this thread that mentioned spell-checking
https://groups.google.com/g/scintilla-interest/c/sYmMFnslNFE/m/xjrzThqBCQAJ

Seems to indicate some spellcheck capabilities
https://groups.google.com/g/scintilla-interest/c/oQ_AeYX4Tzs/m/W3old6YECgAJ


in MainMenu.xib there is this line
 <menuItem title="Spelling and Grammar" id="216">
as well as some other that seem to indicate some spell checking and grammar capabilities.

ScintillaEditBase seems to indicate spellcheck support to some extent
qt/ScintillaEditBase/ScintillaEditBase.cpp:514:                case QTextCharFormat::SpellCheckUnderline:

What I cannot find is how to set a dictionary and turn spellcheck on for a text buffer.

I even looked in the Lexilla doc because I assumed the lexer for plain text would be what implemented such a thing.

Just trying to code up some tiny examples to let ideas percolate in my mind.

Thanks in advance.

Neil Hodgson

unread,
Aug 5, 2021, 6:41:38 PM8/5/21
to Scintilla mailing list
seasoned_geek:

> Please forgive if I'm just being thick, but I cannot find in the doc or in any C++ code example (as of yet) just how to use Scintilla and spellcheck.

> in MainMenu.xib there is this line
> <menuItem title="Spelling and Grammar" id="216">
> as well as some other that seem to indicate some spell checking and grammar capabilities.

ScintillaTest is for demonstrating and testing. Those menu items aren’t connected to an implementation.

> ScintillaEditBase seems to indicate spellcheck support to some extent
> qt/ScintillaEditBase/ScintillaEditBase.cpp:514: case QTextCharFormat::SpellCheckUnderline:

That is inside code that checks for East Asian text input and is just looking at the way that some input choices may be styled.

> What I cannot find is how to set a dictionary and turn spellcheck on for a text buffer.

This is not implemented in Scintilla.

Spell checking has to be implemented by the application.

You could look at
https://sourceforge.net/projects/scihun/

Neil

seasoned_geek

unread,
Aug 5, 2021, 6:57:24 PM8/5/21
to scintilla-interest
Thank you for your prompt response Neil.

Soon as I get done doing battle with cmake for the new library I will be moving towards that little example program.

Stan Day

unread,
Aug 9, 2021, 5:26:55 PM8/9/21
to scintilla...@googlegroups.com
I use Delphi so I was able to find some Hunspell wrappers for it. I am using the NHunspell wrapper now since it lets me use OXT files which can contain several dictionaries at one time. Be aware it's a real booger to implement (it was for me anyway). Once it's done it's nice.

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-inter...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/59c9d5d4-efe7-4910-9cc6-70f42518c251n%40googlegroups.com.

Roland Hughes

unread,
Aug 9, 2021, 5:49:47 PM8/9/21
to scintilla...@googlegroups.com

Gee, thanks for the pep talk. <Grin>

Actually, I've spent the past couple of days doing battle with CMake. I'm not good with it and there aren't any good straight forward tutorials. All of the official documentation was written to be expert friendly. If you already know exactly what you need to do it is very good at showing you the correct syntax. It duth sucketh at showing you what you need to do. Most everything you find using CMake, like the CopperSpice stuff itself, is soooo involved you can't get a simple "This is how you create a reusable library that other projects using CMake can properly import."

I think I officially succeeded at that about 3 minutes before I saw your message. Now just to get tiny Example1 to build and run.

In my fork of Scintilla for CsScintilla (which will hopefully get rolled into the baseline) I've created almost automated scripts for clean build from scratch and they are in the copperspice subdir. The scripts to create Debian and RPM packages are taken from my RedDiamond project and will get fixed once I have all 5+ examples building in a somewhat automated fashion.

Example1 is the most basic baby step. Putting the Widget on a MainWindow with a File menu. No syntax highlighting or anything else. Just the tiniest of fundamentals. DMAPP went a bit far for me.

Every example will increase slightly in complexity so someone can first crawl, then walk, and finally run.

The very last Example was theoretically going to be adding spellcheck for a .txt file. It's a pipe dream right now.

Once I know those work I will finish the packaging scripts.

Thanks for the info though.

Roland

You received this message because you are subscribed to a topic in the Google Groups "scintilla-interest" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scintilla-interest/pDMmMUWEX-E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scintilla-inter...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/CABmf%3Dn0oP6nbNmrYAC0r6zcL5%2BU-1nhakUh8ZQksRDp0hJLDhw%40mail.gmail.com.
-- 
Roland Hughes, President
Logikal Solutions
(630)-205-1593

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com
http://www.interestingauthors.com/blog
Reply all
Reply to author
Forward
0 new messages