/* EditorWindowController.h - editor controller interface for Popup.app Copyright (C) 2003, 2004 Rob Burns 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., 675 Mass Ave, Cambridge, MA 02111, USA. */ #ifndef _EDITORWINDOWCONTROLLER_H_ #define _EDITORWINDOWCONTROLLER_H_ #ifdef __APPLE__ #import #include "GNUstep.h" #else #include #include #endif @class StackModel; @interface EditorWindowController : NSWindowController { id scheduleView; id cardsView; id notes; id quizButton; id practiceButton; id addButton; id deleteButton; id insertButton; id removeButton; id searchField; id searchButton; id status; StackModel *stack; int currentFoundIndex; NSMutableArray *foundRows; BOOL displayingAllCards; NSCell *_cc; NSCell *_ec; NSText *_to; } - (void) dealloc; - (id) initWithStack: (StackModel *)aStack; - (void) awakeFromNib; - (void) scheduledQuizAlert: (NSNotification *)notification; // **************** // Property methods // **************** - (StackModel *)cardStack; - (NSTableView *)cardsView; - (BOOL) displayingAllCards; // ************** // Action methods // ************** - (void) showInspector: (id)sender; - (void) reloadScheduleView: (id)sender; - (void) findString: (id)sender; - (void) addEntry: (id)sender; - (void) deleteEntry: (id)sender; - (void) cut: (id)sender; - (void) copy: (id)sender; - (void) paste: (id)sender; - (void) insertCardsAtTimeZero: (id)sender; // *************** // Private methods // *************** - (void) _updateStatus; - (void) _editHeader: (id)sender; - (void) _nextFound: (id)sender; - (void) _setupCardsView; // *************************** // NSWindowController methdods // *************************** - (NSString *) windowTitleForDocumentDisplayName: (NSString *)displayName; - (BOOL) shouldCloseDocument; - (BOOL) validateMenuItem: (id )menuitem; - (void) windowDidBecomeKey: (NSNotification *)aNotification; // **************************** // NSTableView delegate methods // **************************** - (void) tableViewSelectionDidChange: (NSNotification *)aNotification; - (BOOL) tableView: (NSTableView *)aTableView shouldEditTableColumn: (NSTableColumn *)aTableColumn row: (int) index; - (void) tableView: (NSTableView *)aTableView willDisplayCell: (id)aCell forTableColumn: (NSTableColumn *)aTableColumn row: (int)rowIndex; // ****************************** // NSOutlineView delegate methods // ****************************** - (void) outlineView: (NSOutlineView *)aOutlineView willDisplayCell: (id)aCell forTableColumn: (NSTableColumn *)aTableColumn item: (id)item; - (void) outlineViewSelectionDidChange: (NSNotification *)aNotification; // ************************************** // NSWindow field editor delagate methods // ************************************** - (void) textDidEndEditing: (NSNotification *)aNotification; @end #endif // _EDITORWINDOWCONTROLLER_H_