/* ** AttributesViewer.h ** ** Copyright (c) 2004 ** ** Author: Yen-Ju Chen ** ** 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 __AttributesViewer__ #define __AttributesViewer__ #include #include "Node.h" @interface AttributesViewer: NSObject { IBOutlet NSOutlineView *outlineView; IBOutlet NSPanel *viewer; IBOutlet NSPopUpButton *numberPopUpButton, *datePopUpButton; NSString *title; unsigned int uid; NSMutableDictionary *attributes; Node *root; /* Word completion */ NSMutableSet *allNamesOfAttributes; unsigned int editedStringLength; /* track the word length to know deletion */ } + (id) sharedViewer; #if 0 - (void) setTitleOfViewer: (NSString *) title; - (void) setTitleOfAttributes: (NSString *) title; #endif - (void) setUniqueNumber: (unsigned int) uid; - (NSDictionary *) attributes; - (void) makeViewerKeyAndOrderFront: (id) sender; /* actions */ - (void) okAction: (id) sender; - (void) cancelAction: (id) sender; - (void) newCategoryAction: (id) sender; - (void) newAttributeAction: (id) sender; - (void) numberPopUpButtonAction: (id) sender; - (void) datePopUpButtonAction: (id) sender; - (void) cut: (id) sender; - (void) copy: (id) sender; - (void) paste: (id) sender; @end #endif /* _-AttributesViewer__ */