[sword-devel] UI for Windows Question...

Troy A. Griffitts sword-devel@crosswire.org
Fri, 14 Mar 2003 17:18:07 -0700


Costas,
	The filters are usually handled by the engine.  The client of the 
engine typically constructs an SWMgr like so:

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

This tell the module manager to apply all the filter necessary to always 
render to you HTMLHREF markup.  If you're using RTF then FMT_RTF will be 
what you want to pass in.  I'm not sure if we've exposed a mechanism for 
this yet, but it should be fairly trivial.

To see what global options are available (also a function of filters), 
there are methods in SWMgr to iterate those, their range of values, and 
calls to set and get their current value.  The manager will then apply 
the appropriate filters, e.g.

mgr->setGlobalOption("Strong's Numbers", "on");


   If you look in sword/bindings/cls/test2 (if you haven't yet done so) 
you should find good example code that uses these controls in an end 
user interface.  I also think searching isn't exposed yet, but again, 
having the framework in place, it's just a matter of adding the desired 
methods.  Please let me know if you need any help.  I should have more 
time in the coming weeks to spend on SWORD.

	-Troy.



Costas Stergiou wrote:
> Hi Troy,
> i looked over the clx code and indeed, what i was asking seems to be there
> already. I think though, that there is no support for the filters. Am I
> missing
> something or i may not understand how to use them from the objects
> exposed via the flatapi.
> Thanks very much,
> Costas
> 
> ----- Original Message -----
> From: "Troy A. Griffitts" <scribe@crosswire.org>
> To: <sword-devel@crosswire.org>
> Sent: Friday, March 14, 2003 9:46 AM
> Subject: Re: [sword-devel] UI for Windows Question...
> 
> 
> 
>>Costas,
>>Not sure I quite got through with my email.  I'll paste my earlier
>>reply below and give a little background in case you're not sure.
>>
>>Kylix is basically Delphi for Linux.  The latest release of Kylix
>>includes C++ support, making it basically, C++Builder for Linux, as well.
>>CLX is Borland's new control architecture which is planned to replace
>>VCL (their current architecture).
>>CLX is crossplatform and in its current incarnation uses Qt behind the
>>scenes on both Window and Linux.
>>CLX controls can be used in C++Builder, Delphi (I believe, versions 6
>>and later), and Kylix.
>>
>>Just to reiterate.  We have basic CLX components for SWORD.
>>
>>-Troy.
>>
>>
>>________________________________
>>Costas,
>>     My apologies for not responding sooner.  We have CLX components for
>>Kylix created as a binding to the sword api.  There is actually a fairly
>>extensive demo using these components to produce a usable study tool
>>(create by Terry Biggs).  We also had someone successfully compile and
>>use these components on windows.  He had some trouble at first declaring
>>the external dll and such, but I can hunt down his email and get that to
>>you if you decide to try these and have problems, yourself.
>>
>>See: sword/binding/clx
>>
>>     -Troy.
>>
>>
>>Costas I. Stergiou wrote:
>>
>>>I would certainly need some help here because my tries to compile the
>>>lib have been in vain (this is not strange since I am not a C++
>>>developer).
>>>When you say 'c++ module', what exactly do you mean? .obj files, .dll,
>>>something else?
>>>Costas
>>>
>>>B>
>>>
>>>>I have been working with Borland C++ Builder (BCB) for a few years. And
>>>
> I was
> 
>>>>using a lot of Delphi-tools. That is no problem at all. The BCB compiles
>>>>delphi code. And as far as I know you can compile C/C++ code with
>>>
> Delphi. So
> 
>>>>it shouldn't be a problem to compile diatheke or another C++ code and
>>>
> use it
> 
>>>>in Delphi. If you need help to build a c++ module, which can be used in
>>>>Delphi, i can help you.
>>>>
>>>>And another point: With kylix it should be possible to write C++ or
>>>
> Delphi and
> 
>>>>compile it for windows and Linux. And kylix is free!
>>>>
>>>>Shalom,
>>>>Philippus
>>>>_______________________________________________
>>>>sword-devel mailing list
>>>>sword-devel@crosswire.org
>>>>http://www.crosswire.org/mailman/listinfo/sword-devel
>>>>
>>>
>>>
>>>_______________________________________________
>>>sword-devel mailing list
>>>sword-devel@crosswire.org
>>>http://www.crosswire.org/mailman/listinfo/sword-devel
>>
>>
>>_______________________________________________
>>sword-devel mailing list
>>sword-devel@crosswire.org
>>http://www.crosswire.org/mailman/listinfo/sword-devel
>>
> 
> 
> _______________________________________________
> sword-devel mailing list
> sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel