AiksaurusGTK Developer's Guide
This document discusses how to use AiksaurusGTK in your own programs. It does
not cover the Aiksaurus core library. If you want to use the Aiksaurus
core library to do something like create a new interface to Aiksaurus in something
other than GTK, you should read the core library documentation instead.
Overview
AiksaurusGTK allows you to easily create a modal thesaurus dialog within your
application. This is almost certainly what you want if you're doing any kind of
text editing software -- the user selects the word, then pops up the thesaurus
and chooses a replacement.
Interface Reference
The interface is fairly self-explanatory:
- AiksaurusGTK::AiksaurusGTK()
- Construct an AiksaurusGTK object. Generally the first thing you do
when you're ready to pop up the thesaurus.
- void AiksaurusGTK::setTitle(const char* title)
- Set the title of the thesaurus window. This lets you customize the
dialog, i.e. say something like "AbiWord Thesaurus" or "Evolution Thesaurus".
The default title is simply "Aiksaurus".
- void AiksaurusGTK::setInitialMessage(const char* message)
- If the thesaurus is activated with no word selected, you can pass this
initial message to the user. You should look at gtkAiksaur.t.cpp to see how
the standalone program uses this.
- void hideReplacebar()
- If you want to have no "replace-with" bar on your thesaurus, you can use this.
This probably isn't what you want if you're wanting to have the thesaurus integrated
with your project -- it was added mainly for the standalone version.
- const char* runThesaurus(const char* word)
- Call this function to pop up the thesaurus dialog in a modal setting.
'word' is the word you want to be searched for initially. Return value
is the user's new selection.
Distribution Issues
Adding AiksaurusGTK to your program will incur you two dependencies:
one on AiksaurusGTK and one on Aiksaurus itself. These packages both
have configure scripts and should be easy to turn into RPMs or DEBs or
binaries or whatever you want to package them as.
Copyright © 2001 by Jared Davis.
This documentation may be freely distributed and modified without restriction.