/* AbiSuite * Copyright (C) 2004 RŽmi Payette * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ #ifndef APPLESPELL_CHECKER_H #define APPLESPELL_CHECKER_H #include "spell_manager.h" class AppleSpellChecker : public SpellChecker { friend class SpellManager; public: virtual ~AppleSpellChecker(); virtual bool addToCustomDict (const UT_UCSChar *word, size_t len); virtual void ignoreWord (const UT_UCSChar *toCorrect, size_t toCorrectLen); // ignore word list is handled internally by osx in _checkWord inline virtual bool isIgnored (const UT_UCSChar * pWord, size_t len) const {return false;} protected: AppleSpellChecker(); private: bool _requestDictionary (const char * szLang); SpellChecker::SpellCheckResult _checkWord (const UT_UCSChar * word, size_t len); UT_GenericVector * _suggestWord (const UT_UCSChar * word, size_t len); void *m_checker; // Pointer to NSSpellChecker.. Void so I don't have to include cocoa.h int m_tag; void *m_lang; // Pointer to NSString. Same reason as m_checker }; #endif