• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_CocoaDialog_Spell.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998,1999 AbiSource, Inc.
00003  * Copyright (C) 2001, 2003 Hubert Figuiere
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301 USA.
00019  */
00020 
00021 #ifndef AP_COCOADIALOG_SPELL_H
00022 #define AP_COCOADIALOG_SPELL_H
00023 
00024 #ifdef ENABLE_SPELL
00025 
00026 #include "ap_Dialog_Spell.h"
00027 
00028 #import "xap_Cocoa_NSTableUtils.h"
00029 
00030 class XAP_CocoaFrame;
00031 @class AP_CocoaDialog_Spell_Controller;
00032 
00033 
00034 /*****************************************************************/
00035 
00036 class AP_CocoaDialog_Spell: public AP_Dialog_Spell
00037 {
00038 public:
00039     AP_CocoaDialog_Spell(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid);
00040     virtual ~AP_CocoaDialog_Spell(void);
00041 
00042     virtual void            runModal(XAP_Frame * pFrame);
00043 
00044     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id dlgid);
00045 
00046     // callbacks can fire these events
00047     virtual void event_Change(void);
00048     virtual void event_ChangeAll(void);
00049     virtual void event_Ignore(void);
00050     virtual void event_IgnoreAll(void);
00051     virtual void event_AddToDict(void);
00052     virtual void event_Cancel(void);
00053     virtual void event_SuggestionSelected(int row, int column);
00054     virtual void event_ReplacementChanged(void);
00055 
00056 private:
00057     void        _populateWindowData(void);
00058     void        _storeWindowData(void);
00059 
00060     void _showMisspelledWord(void);
00061 
00062     AP_CocoaDialog_Spell_Controller* m_dlg;
00063     XAP_StringListDataSource* m_suggestionList;
00064 };
00065 
00066 
00067 @interface AP_CocoaDialog_Spell_Controller : NSWindowController <XAP_CocoaDialogProtocol>
00068 {
00069     IBOutlet NSButton *_addBtn;
00070     IBOutlet NSButton *_cancelBtn;
00071     IBOutlet NSButton *_changeAllBtn;
00072     IBOutlet NSButton *_changeBtn;
00073     IBOutlet NSButton *_ignoreAllBtn;
00074     IBOutlet NSButton *_ignoreBtn;
00075     IBOutlet NSTextField *_replData;
00076     IBOutlet NSTextField *_replLabel;
00077     IBOutlet NSTableView *_suggestionList;
00078     IBOutlet NSTextView *_unknownData;
00079     IBOutlet NSTextField *_unknownLabel;
00080     AP_CocoaDialog_Spell* _xap;
00081 }
00082 - (IBAction)addToDictAction:(id)sender;
00083 - (IBAction)cancelAction:(id)sender;
00084 - (IBAction)changeAction:(id)sender;
00085 - (IBAction)changeAllAction:(id)sender;
00086 - (IBAction)ignoreAction:(id)sender;
00087 - (IBAction)ignoreAllAction:(id)sender;
00088 - (IBAction)replacementChanged:(id)sender;
00089 - (void)suggestionSelected:(id)sender;
00090 
00091 - (void)setMisspelled:(NSAttributedString*)attr scroll:(float)offset;
00092 - (void)setReplace:(NSString*)str;
00093 - (void)selectSuggestion:(int)idx;
00094 - (void)reloadSuggestionList;
00095 - (void)setSuggestionList:(id)list;
00096 - (NSString*)replace;
00097 @end
00098 
00099 #endif
00100 
00101 #endif /* AP_COCOADIALOG_SPELL_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1