[sword-devel] Basic Questions

Scribe sword-devel@crosswire.org
Wed, 11 Sep 2002 17:24:39 -0700 (MST)

> I am trying to write a simple sword GUI for MacOSX. I've quite easily 
> got a simple bible reader with search windows working. However to do 
> this I just use OSXs rtf renderer, this is very easy but gives me little 
> control. I want to do things like having clickable links for references 
> and strongs.

woohoo.  I'm excited that there is still momentum behind a mac ui.  Do you 
have an HTML control that you can use for rendering?  If so, there are a 
complete set of filters to output html as rendertext from a module.

> I was wondering what is the best data to parse to achieve this, that I 
> can get from sword. Can I get away with a small subset of thml?

Have a look at swmgr.  But I believe you can do something like:

        mgr = new SWMgr(new MarkupFilterMgr(FMT_HTMLHREF));

when creating your swmgr.  All modules from that swmgr will output 
rendertext as html with links.

> Oh and are there special keys - for instance how do I get the text 
> information about a module?


> Is there also a way to stop searches?

module->terminateSearch = true;

If you set this variable (presumably from another thread), then the search 
should terminate prematurely and return the entries found thus far.

Hope this helps.  Please let me know if I can help at all, in any way.


> Cheers, Will