Beginnings of new sound view and a correction for an issue in the class inspector.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19226 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-05-01 15:45:47 +00:00
parent 47bb6523c7
commit 5c2cb798da
10 changed files with 124 additions and 7 deletions

View file

@ -1,3 +1,19 @@
2004-05-01 11:46 Gregory John Casamento <greg_casamento@yahoo.com>
* GormSoundView.[hm]: New class to visualize the sound being
inspected.
* GormSoundInspector.m: Modifications so that it can now use
a GormSoundView.
* GormSoundInspector.gorm: Added soundView to .gorm file
and made appropriate connections.
2004-05-01 11:18 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassInspector.m: Corrected a problem with the
wrong name being sent to the class manager. This was causing
an error to be printed by the class manager. This problem
had no effect, but was annoying.
2004-05-01 09:44 Gregory John Casamento <greg_casamento@yahoo.com>
* Gorm.m: Added implementation for unhide: to bring forward the

View file

@ -169,7 +169,8 @@ Gorm_HEADERS = \
GormGeneralPref.h \
GormFunctions.h \
GormShelfPref.h \
GormColorsPref.h
GormColorsPref.h \
GormSoundView.h
Gorm_OBJC_FILES = \
Gorm.m \
@ -215,7 +216,8 @@ Gorm_OBJC_FILES = \
GormGeneralPref.m \
GormFunctions.m \
GormShelfPref.m \
GormColorsPref.m
GormColorsPref.m \
GormSoundView.m
-include GNUmakefile.preamble

View file

@ -116,9 +116,9 @@ objectValueForTableColumn: (NSTableColumn *)tc
// collapse the class in question if it's being edited and make
// certain that names in the list are kept in sync.
[document collapseClass: name];
[document collapseClass: [inspector _currentClass]];
[document reloadClasses];
[document selectClass: name];
[document selectClass: [inspector _currentClass]];
}
// set methods
@ -160,9 +160,9 @@ objectValueForTableColumn: (NSTableColumn *)tc
// collapse the class in question if it's being edited and make
// certain that names in the list are kept in sync.
[document collapseClass: name];
[document collapseClass: [inspector _currentClass]];
[document reloadClasses];
[document selectClass: name];
[document selectClass: [inspector _currentClass]];
}
// set method

View file

@ -1458,7 +1458,7 @@
}
else
{
NSLog(@"This should never happen... an instance without an associated class.");
NSLog(@"This should never happen... an instance without an associated class: %@",className);
break;
}
}

View file

@ -30,10 +30,12 @@
#include <InterfaceBuilder/InterfaceBuilder.h>
@class GormClassManager;
@class GormSoundView;
@interface GormSoundInspector : IBInspector
{
NSSound *_currentSound;
GormSoundView *soundView;
}
- (void) stop: (id)sender;
- (void) play: (id)sender;

View file

@ -32,6 +32,7 @@
#include "GormClassManager.h"
#include "GormDocument.h"
#include "GormPrivate.h"
#include "GormSoundView.h"
@implementation GormSoundInspector
+ (void) initialize
@ -99,6 +100,7 @@
RELEASE(_currentSound);
_currentSound = [[NSSound alloc] initWithContentsOfFile: [sndobject soundPath]
byReference: YES];
[soundView setSound: _currentSound];
RETAIN(_currentSound);
NSDebugLog(@"Loaded sound");
}

37
GormSoundView.h Normal file
View file

@ -0,0 +1,37 @@
/** <title>GormSoundView</title>
<abstract>Visualizes a sound.<abstract>
Copyright (C) 2004 Free Software Foundation, Inc.
Author: Gregory John Casamento <greg_casamento@yahoo.com>
Date: May 2004
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* All Rights reserved */
#include <AppKit/AppKit.h>
@interface GormSoundView : NSView
{
NSSound *_sound;
}
- (void)setSound: (NSSound *)sound;
- (NSSound *)sound;
@end

50
GormSoundView.m Normal file
View file

@ -0,0 +1,50 @@
/** <title>GormSoundView</title>
<abstract>Visualizes a sound.<abstract>
Copyright (C) 2004 Free Software Foundation, Inc.
Author: Gregory John Casamento <greg_casamento@yahoo.com>
Date: May 2004
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* All Rights reserved */
#include <AppKit/AppKit.h>
#include "GormSoundView.h"
@implementation GormSoundView
- (void) setSound: (NSSound *)sound
{
NSLog(@"Set sound...");
ASSIGN(_sound,sound);
[self setNeedsDisplay: YES];
}
- (NSSound *)sound
{
return _sound;
}
- (void) drawRect: (NSRect)aRect
{
[super drawRect: aRect];
}
@end

View file

@ -149,7 +149,15 @@
"stop:"
);
Outlets = (
soundView
);
Super = IBInspector;
};
GormSoundView = {
Actions = (
);
Outlets = (
);
Super = NSView;
};
}