1 /************************************************************************/ 2 /* */ 3 /* Spell tool and spelling checking definitions. */ 4 /* */ 5 /************************************************************************/ 6 7 # ifndef APP_SPELL_TOOL_H 8 # define APP_SPELL_TOOL_H 9 10 # include <indSpellChecker.h> 11 12 # include "appFrame.h" 13 # include "appInspector.h" 14 15 typedef struct LocaleName 16 { 17 const char * lnLocale; 18 const char * lnLocaleName; 19 } LocaleName; 20 21 typedef struct SpellToolResources 22 { 23 char * astrDictionary; 24 char * astrLearn; 25 char * astrForget; 26 char * astrGuesses; 27 char * astrIgnore; 28 char * astrFindNext; 29 char * astrGuess; 30 char * astrCorrect; 31 char * astrPrivateDictionaries; 32 char * astrSystemDictionaries; 33 char * astrNoDicts; 34 35 char * astrErrors[SCerr_COUNT]; 36 37 LocaleName * astrLocaleNames; 38 int astrLocaleNameCount; 39 } SpellToolResources; 40 41 /************************************************************************/ 42 /* */ 43 /* Represents a spell tool. */ 44 /* */ 45 /************************************************************************/ 46 47 typedef struct SpellTool 48 { 49 EditApplication * astApplication; 50 AppInspector * astInspector; 51 52 const SpellToolResources * astResources; 53 54 APP_WIDGET astDictionaryFrame; 55 AppOptionmenu astDictionaryOptionmenu; 56 57 APP_WIDGET astLearnButton; 58 APP_WIDGET astForgetButton; 59 APP_WIDGET astGuessButton; 60 APP_WIDGET astIgnoreButton; 61 APP_WIDGET astFindNextButton; 62 63 APP_WIDGET astCorrectButton; 64 APP_WIDGET astGuessList; 65 APP_WIDGET astWordText; 66 67 SpellChecker * astSpellChecker; /* Not owned by the tool */ 68 int astCurrentDictionary; 69 int astReadOnly; 70 int astGotAlternative; 71 } SpellTool; 72 73 /************************************************************************/ 74 /* */ 75 /* Subroutine declarations. */ 76 /* */ 77 /************************************************************************/ 78 79 extern void appEnableSpellTool( void * voidast, 80 int enabled ); 81 82 extern void appFillSpellTool( SpellChecker * sc, 83 SpellTool * ast, 84 const SpellToolResources * astr, 85 AppInspector * ai, 86 int subjectPage, 87 InspectorSubject * is, 88 APP_WIDGET pageWidget, 89 const InspectorSubjectResources * isr ); 90 91 extern void appSpellToolGetResourceTable( 92 EditApplication * ea, 93 SpellToolResources * astr, 94 InspectorSubjectResources * isr ); 95 96 extern void appSpellToolSetReadOnly( SpellTool * ast, 97 int readonly ); 98 99 extern void appInitSpellTool( SpellTool * ast ); 100 extern void appCleanSpellTool( SpellTool * ast ); 101 102 extern void appSpellToolFillChoosers( SpellTool * ast, 103 const SpellToolResources * astr ); 104 105 extern void appFinishSpellTool( SpellTool * ast, 106 const SpellToolResources * astr ); 107 108 # endif /* APP_SPELL_TOOL_H */ 109