ProjectManager  0.2
ProjectWindowController.h
1 /*
2  ProjectWindowController.h
3 
4  Interface declaration of the ProjectWindowController class for the
5  ProjectManager application.
6 
7  Copyright (C) 2005, 2006 Saso Kiselkov
8 
9  This program is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23 
24 #import <AppKit/NSWindowController.h>
25 #import <AppKit/NSMenu.h>
26 
27 @class NSArray,
28  NSBox,
29  NSMutableDictionary,
30  NSNotification,
31  NSPopUpButton,
32  NSString,
33  NSTextView,
34  NSToolbar,
35  NSToolbarItem;
36 @class ProjectDocument;
37 @protocol ProjectModule;
38 
39 @interface ProjectWindowController : NSWindowController
40 {
41  id myWindow;
42  NSBox * box;
43 
44  NSObject <ProjectModule> * currentModule;
45 
46  NSToolbar * toolbar;
47  NSToolbarItem * switcherItem, * logItem;
48  NSPopUpButton * moduleSwitcher;
49  NSTextView * log;
50 
51  // weak reference
52  ProjectDocument * owner;
53 }
54 
55 - initWithWindowNibName: (NSString *) nibName
56  ownerDocument: (ProjectDocument *) anOwner;
57 
58 - (void) switchView: sender;
59 
60 - (void) selectModule: (unsigned int) moduleNumber;
61 
62 - (void) setCurrentModule: (id <ProjectModule>) aModule;
63 - (id <ProjectModule>) currentModule;
64 
65 // toolbar delegate methods
66 - (NSToolbarItem*)toolbar: (NSToolbar*) toolbar
67  itemForItemIdentifier: (NSString*) itemIdentifier
68 willBeInsertedIntoToolbar: (BOOL) flag;
69 - (NSArray*) toolbarAllowedItemIdentifiers: (NSToolbar*) toolbar;
70 - (NSArray*) toolbarDefaultItemIdentifiers: (NSToolbar*) toolbar;
71 - (BOOL) validateToolbarItem: (NSToolbarItem *)toolbarItem;
72 
73 // notifications
74 - (void) projectNameChanged: (NSNotification *) notif;
75 
76 - (void) logMessage: (NSString *) aMessage;
77 
78 @end
This class is the principal document class for project files.
Definition: ProjectDocument.h:44
Definition: ProjectWindowController.h:40
NSObject< ProjectModule > * currentModule
Returns the currently visible project module.
Definition: ProjectWindowController.h:44
This protocol declares methods which project modules must implement.
Definition: ProjectModule.h:44