1 /* 2 ** Toolbox.h 3 ** 4 ** Copyright (c) 2003 5 ** 6 ** Author: Yen-Ju <yjchenx@hotmail.com> 7 ** 8 ** This program is free software; you can redistribute it and/or modify 9 ** it under the terms of the GNU General Public License as published by 10 ** the Free Software Foundation; either version 2 of the License, or 11 ** (at your option) any later version. 12 ** 13 ** This program is distributed in the hope that it will be useful, 14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ** GNU General Public License for more details. 17 ** 18 ** You should have received a copy of the GNU General Public License 19 ** along with this program; if not, write to the Free Software 20 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 */ 22 23 #ifndef _Toolbox_H_Toolbox 24 #define _Toolbox_H_Toolbox 25 26 #include <Foundation/Foundation.h> 27 28 @class ExtendedBrowser; 29 @class NSWindow; 30 @class NSView; 31 @class NSPanel; 32 @class NSPopUpButton; 33 @class NSTextField; 34 @class ItemPanel; 35 @class ItemImportPanel; 36 @class ToolboxWindow; 37 @class BundleLoader; 38 @class ItemHelpPanel; 39 40 @interface Toolbox : NSObject 41 { 42 ToolboxWindow *window; 43 ExtendedBrowser *browserView; 44 id currentBundle; 45 NSView *currentView; 46 BundleLoader *loader; 47 ItemHelpPanel *helpPanel; 48 49 /* Model */ 50 NSMutableArray *dataSource; 51 52 /* Item panel */ 53 ItemPanel *itemPanel; 54 NSPopUpButton *itemCategoryButton; 55 NSTextField *itemNameField; 56 NSTextField *itemLocationField; 57 NSPopUpButton *itemBundleButton; 58 59 /* Item Import Panel */ 60 ItemImportPanel *importPanel; 61 NSPopUpButton *importCategoryButton; 62 NSPopUpButton *importBundleButton; 63 NSTextField *importLocationField; 64 NSPopUpButton *importItemButton; 65 NSTextField *importDescriptionField; 66 67 /* Used by Import Panel */ 68 NSArray *defaultItems; /* use mutable array if memory leak */ 69 } 70 71 /* Menu actions */ 72 - (void) orderFrontItemInfoPanel: (id) sender; 73 - (void) orderFrontItemHelpPanel: (id) sender; 74 - (void) reload: (id) sender; 75 76 - (void) addCategory: (id) sender; 77 - (void) deleteCategory: (id) sender; 78 - (void) addItem: (id) sender; 79 - (void) deleteItem: (id) sender; 80 - (void) importItem: (id) sender; 81 82 /* Item panel */ 83 - (void) itemOKAction: (id) sender; 84 - (void) itemCancelAction: (id) sender; 85 - (void) itemButtonAction: (id) sender; // For pop-up button 86 87 /* Item import panel */ 88 - (void) importOKAction: (id) sender; 89 - (void) importCancelAction: (id) sender; 90 - (void) importButtonAction: (id) sender; // For pop-up button 91 92 /* Browser action */ 93 - (void) browserAction: (id) sender; 94 95 @end 96 97 #endif /* _Toolbox_H_Toolbox */ 98