More UI enhancements - not really functional yet

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@7819 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Robert Slover 2000-10-15 18:24:09 +00:00
parent 849b5f0d12
commit e5f22cafc2
5 changed files with 201 additions and 23 deletions

View file

@ -46,6 +46,8 @@ NSString *FileShouldOpenNotification = @"FileShouldOpenNotification";
NSString *ctitle = [[sender selectedCellInColumn:0] stringValue];
NSString *ctitlef = [[project projectPath] stringByAppendingPathComponent:ltitle];
[project browserDidSelectFileNamed:ltitle];
if ([ctitle isEqualToString:@"Classes"]) {
NSString *f = [NSString stringWithContentsOfFile:ctitlef];

View file

@ -97,8 +97,17 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
id methodPopup;
id projectAttributeInspectorView;
NSTextField *installPathField;
NSTextField *toolField;
NSTextField *ccOptField;
NSTextField *ldOptField;
id projectProjectInspectorView;
NSTextField *projectTypeField;
id projectFileInspectorView;
NSTextField *fileNameField;
NSButton *changeFileNameButton;
id buildTargetPanel;
id buildTargetHostField;
@ -108,7 +117,7 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
NSString *projectPath;
NSMutableDictionary *projectDict;
NSDictionary *rootCategories; // Needs to be initialised by subclasses!
NSDictionary *rootCategories; // Needs to be initialised by subclasses!
NSMutableDictionary *buildOptions;
}
@ -169,6 +178,8 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
// ==== Miscellaneous
//===========================================================================================
- (void)browserDidSelectFileNamed:(NSString *)fileName;
- (void)editSelectedFile:(NSString *)file;
- (void)structureEditedFile:(id)sender;
@ -178,6 +189,7 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
- (void)addFile:(NSString *)file forKey:(NSString *)key;
- (void)removeFile:(NSString *)file forKey:(NSString *)key;
- (BOOL)removeSelectedFilePermanently:(BOOL)yn;
- (void)renameFile:(NSString *)aFile;
- (BOOL)assignProjectDict:(NSDictionary *)aDict;
- (NSDictionary *)projectDict;

View file

@ -236,6 +236,147 @@
[buildTargetArgsField setAction:@selector(setArguments:)];
[_c_view addSubview:[buildTargetArgsField autorelease]];
/*
* Model the standard inspector UI
*
*/
projectAttributeInspectorView = [[NSBox alloc] init];
[projectAttributeInspectorView setFrame:NSMakeRect(-2,-2,284,334)];
[projectAttributeInspectorView setTitlePosition:NSNoTitle];
[projectAttributeInspectorView setBorderType:NSNoBorder];
[projectAttributeInspectorView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,280,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Install in:"];
[projectAttributeInspectorView addSubview:[textField autorelease]];
installPathField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
[installPathField setAlignment: NSLeftTextAlignment];
[installPathField setBordered: YES];
[installPathField setEditable: YES];
[installPathField setBezeled: YES];
[installPathField setDrawsBackground: YES];
[installPathField setStringValue:@""];
[projectAttributeInspectorView addSubview:installPathField];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,256,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Build tool:"];
[projectAttributeInspectorView addSubview:[textField autorelease]];
toolField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,256,176,21)];
[toolField setAlignment: NSLeftTextAlignment];
[toolField setBordered: YES];
[toolField setEditable: YES];
[toolField setBezeled: YES];
[toolField setDrawsBackground: YES];
[toolField setStringValue:@""];
[projectAttributeInspectorView addSubview:toolField];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,232,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"CC options:"];
[projectAttributeInspectorView addSubview:[textField autorelease]];
ccOptField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,232,176,21)];
[ccOptField setAlignment: NSLeftTextAlignment];
[ccOptField setBordered: YES];
[ccOptField setEditable: YES];
[ccOptField setBezeled: YES];
[ccOptField setDrawsBackground: YES];
[ccOptField setStringValue:@""];
[projectAttributeInspectorView addSubview:ccOptField];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,204,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"LD options:"];
[projectAttributeInspectorView addSubview:[textField autorelease]];
ldOptField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,204,176,21)];
[ldOptField setAlignment: NSLeftTextAlignment];
[ldOptField setBordered: YES];
[ldOptField setEditable: YES];
[ldOptField setBezeled: YES];
[ldOptField setDrawsBackground: YES];
[ldOptField setStringValue:@""];
[projectAttributeInspectorView addSubview:ldOptField];
projectProjectInspectorView = [[NSBox alloc] init];
[projectProjectInspectorView setFrame:NSMakeRect(-2,-2,284,334)];
[projectProjectInspectorView setTitlePosition:NSNoTitle];
[projectProjectInspectorView setBorderType:NSNoBorder];
[projectProjectInspectorView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,280,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Project Type:"];
[projectProjectInspectorView addSubview:[textField autorelease]];
projectTypeField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
[projectTypeField setAlignment: NSLeftTextAlignment];
[projectTypeField setBordered: NO];
[projectTypeField setEditable: NO];
[projectTypeField setBezeled: NO];
[projectTypeField setDrawsBackground: NO];
[projectTypeField setStringValue:@""];
[projectProjectInspectorView addSubview:projectTypeField];
projectFileInspectorView = [[NSBox alloc] init];
[projectFileInspectorView setFrame:NSMakeRect(-2,-2,284,334)];
[projectFileInspectorView setTitlePosition:NSNoTitle];
[projectFileInspectorView setBorderType:NSNoBorder];
[projectFileInspectorView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,280,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Filename:"];
[projectFileInspectorView addSubview:[textField autorelease]];
fileNameField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
[fileNameField setAlignment: NSLeftTextAlignment];
[fileNameField setBordered: NO];
[fileNameField setEditable: NO];
[fileNameField setBezeled: NO];
[fileNameField setDrawsBackground: NO];
[fileNameField setStringValue:@""];
[projectFileInspectorView addSubview:fileNameField];
changeFileNameButton = [[NSButton alloc] initWithFrame:NSMakeRect(84,240,104,21)];
[changeFileNameButton setTitle:@"Rename..."];
[changeFileNameButton setTarget:self];
[changeFileNameButton setAction:@selector(renameFile:)];
[projectFileInspectorView addSubview:changeFileNameButton];
/*
*
*/
// Redisplay!
[browser loadColumnZero];
}
@ -280,20 +421,32 @@
- (void)dealloc
{
[projectName release];
[projectPath release];
[projectDict release];
[projectName release];
[projectPath release];
[projectDict release];
[filePopup release];
[methodPopup release];
[browserController release];
[projectWindow release];
[buildTargetPanel release];
[buildOptions release];
[projectAttributeInspectorView release];
[installPathField release];
[toolField release];
[ccOptField release];
[ldOptField release];
[projectTypeField release];
[filePopup release];
[methodPopup release];
[browserController release];
[projectWindow release];
[buildTargetPanel release];
[buildOptions release];
[super dealloc];
[projectProjectInspectorView release];
[projectFileInspectorView release];
[fileNameField release];
[changeFileNameButton release];
[super dealloc];
}
//===========================================================================================
@ -366,23 +519,23 @@
- (id)delegate
{
return delegate;
return delegate;
}
- (void)setDelegate:(id)aDelegate
{
delegate = aDelegate;
delegate = aDelegate;
}
- (void)setProjectBuilder:(id<ProjectBuilder>)aBuilder
{
[projectManager autorelease];
projectManager = [aBuilder retain];
[projectManager autorelease];
projectManager = [aBuilder retain];
}
- (id<ProjectBuilder>)projectBuilder
{
return projectManager;
return projectManager;
}
//===========================================================================================
@ -433,6 +586,11 @@
// ==== Miscellaneous
//===========================================================================================
- (void)browserDidSelectFileNamed:(NSString *)fileName
{
[fileNameField setStringValue:fileName];
}
- (void)editSelectedFile:(NSString *)file
{
// NSLayoutManager *_lm = [textView layoutManager];
@ -572,6 +730,10 @@
return YES;
}
- (void)renameFile:(NSString *)aFile
{
}
- (BOOL)assignProjectDict:(NSDictionary *)aDict
{
NSAssert(aDict,@"No valid project dictionary!");

View file

@ -355,8 +355,10 @@ static PCProjectBuilder *_builder;
* This is just a quick hack for now...
*/
/*
[logOutput setString:@""];
/*
[logOutput scrollRangeToVisible:NSMakeRange([[logOutput textStorage] length], 0)];
[errorOutput setString:@""];
[errorOutput scrollRangeToVisible:NSMakeRange([[errorOutput textStorage] length], 0)];

View file

@ -44,8 +44,7 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
- (void)_initUI
{
NSView *_c_view;
unsigned int style = NSTitledWindowMask | NSClosableWindowMask |
NSResizableWindowMask;
unsigned int style = NSTitledWindowMask | NSClosableWindowMask;
NSRect _w_frame;
NSBox *line;
@ -65,7 +64,8 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
[inspector setFrameAutosaveName:@"Inspector"];
_c_view = [inspector contentView];
inspectorPopup = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(80,352,128,20)];
_w_frame = NSMakeRect(80,352,128,20);
inspectorPopup = [[NSPopUpButton alloc] initWithFrame:_w_frame];
[inspectorPopup addItemWithTitle:@"None"];
[inspectorPopup setTarget:self];
[inspectorPopup setAction:@selector(inspectorPopupDidChange:)];