/*
**  Toolbox.h
**
**  Copyright (c) 2003
**
**  Author: Yen-Ju  <yjchenx@hotmail.com>
**
**  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 _Toolbox_H_Toolbox
#define _Toolbox_H_Toolbox

#include <Foundation/Foundation.h>

@class ExtendedBrowser;
@class NSWindow;
@class NSView;
@class NSPanel;
@class NSPopUpButton;
@class NSTextField;
@class ItemPanel;
@class ItemImportPanel;
@class ToolboxWindow;
@class BundleLoader;
@class ItemHelpPanel;

@interface Toolbox : NSObject
{
  ToolboxWindow *window;
  ExtendedBrowser *browserView;
  id currentBundle;
  NSView *currentView;
  BundleLoader *loader;
  ItemHelpPanel *helpPanel;

  /* Model */
  NSMutableArray *dataSource;

  /* Item panel */
  ItemPanel *itemPanel;
  NSPopUpButton *itemCategoryButton;
  NSTextField *itemNameField;
  NSTextField *itemLocationField;
  NSPopUpButton *itemBundleButton;

  /* Item Import Panel */
  ItemImportPanel *importPanel;
  NSPopUpButton *importCategoryButton;
  NSPopUpButton *importBundleButton;
  NSTextField *importLocationField;
  NSPopUpButton *importItemButton;
  NSTextField *importDescriptionField;

  /* Used by Import Panel */
  NSArray *defaultItems; /* use mutable array if memory leak */
}

/* Menu actions */
- (void) orderFrontItemInfoPanel: (id) sender;
- (void) orderFrontItemHelpPanel: (id) sender;
- (void) reload: (id) sender;

- (void) addCategory: (id) sender;
- (void) deleteCategory: (id) sender;
- (void) addItem: (id) sender;
- (void) deleteItem: (id) sender;
- (void) importItem: (id) sender;

/* Item panel */
- (void) itemOKAction: (id) sender;
- (void) itemCancelAction: (id) sender;
- (void) itemButtonAction: (id) sender; // For pop-up button 

/* Item import panel */
- (void) importOKAction: (id) sender;
- (void) importCancelAction: (id) sender;
- (void) importButtonAction: (id) sender; // For pop-up button

/* Browser action */
- (void) browserAction: (id) sender;

@end

#endif /* _Toolbox_H_Toolbox */
