2001-11-12 14:15:20 +00:00
|
|
|
/*
|
|
|
|
Controller.h
|
|
|
|
|
|
|
|
Application controller class
|
|
|
|
|
|
|
|
Copyright (C) 2001 Dusk to Dawn Computing, Inc.
|
|
|
|
|
|
|
|
Author: Jeff Teunissen <deek@d2dc.net>
|
|
|
|
Date: 5 Nov 2001
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
*/
|
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#ifndef Controller_h
|
|
|
|
#define Controller_h
|
|
|
|
|
2001-11-12 14:15:20 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "Config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#include <Foundation/NSObject.h>
|
|
|
|
#include <Foundation/NSNotification.h>
|
|
|
|
#include <Foundation/NSString.h>
|
|
|
|
#include <AppKit/NSApplication.h>
|
|
|
|
#include <AppKit/NSNibDeclarations.h>
|
2001-11-05 19:58:25 +00:00
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#include "BundleController.h"
|
|
|
|
#include "PrefsController.h"
|
2001-11-22 07:28:01 +00:00
|
|
|
|
2002-05-29 11:21:25 +00:00
|
|
|
typedef enum {CNoMode = 0, COpenMode, CCreateMode} CMode;
|
|
|
|
|
2001-11-22 07:28:01 +00:00
|
|
|
@interface Controller: NSObject <BundleDelegate>
|
2001-11-05 19:58:25 +00:00
|
|
|
{
|
2002-05-26 11:24:00 +00:00
|
|
|
IBOutlet BundleController *bundleController;
|
|
|
|
IBOutlet PrefsController *prefsController;
|
2002-05-29 11:21:25 +00:00
|
|
|
IBOutlet CMode fileMode;
|
2002-07-06 03:00:28 +00:00
|
|
|
IBOutlet NSString *fileName;
|
2001-11-05 19:58:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// App delegate methods
|
|
|
|
- (BOOL) application: (NSApplication *) app openFile: (NSString *) filename;
|
|
|
|
- (BOOL) applicationShouldTerminate: (NSApplication *) app;
|
|
|
|
- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *) app;
|
|
|
|
|
|
|
|
// Notifications
|
|
|
|
- (void) applicationDidFinishLaunching: (NSNotification *) not;
|
|
|
|
- (void) applicationWillFinishLaunching: (NSNotification *) not;
|
|
|
|
- (void) applicationWillTerminate: (NSNotification *) not;
|
|
|
|
|
|
|
|
// Action methods
|
2002-05-29 07:13:42 +00:00
|
|
|
- (IBAction) showPreferencesPanel: (id) sender;
|
|
|
|
|
2002-07-06 03:00:28 +00:00
|
|
|
// Open/Create Project
|
2002-05-29 07:13:42 +00:00
|
|
|
- (IBAction) newProject: (id) sender;
|
2002-01-28 21:22:21 +00:00
|
|
|
- (IBAction) openProject: (id) sender;
|
2002-05-29 11:21:25 +00:00
|
|
|
|
|
|
|
// Private (for Project)
|
|
|
|
- (CMode) fileMode;
|
2002-07-06 03:00:28 +00:00
|
|
|
- (NSString *) fileName;
|
2001-11-05 19:58:25 +00:00
|
|
|
@end
|
2003-05-06 21:52:58 +00:00
|
|
|
|
|
|
|
#endif//Controller_h
|