mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Adding inspector and interface for image inspector
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17269 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d3489bacaa
commit
84ccb3b773
7 changed files with 245 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-07-20 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormImageInspector.[hm]: Added. Implements image inspector.
|
||||
* Resources/GormImageInspector.gorm: Added interface file.
|
||||
|
||||
2003-07-20 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.m: (-[GormDocument saveGormDocument:]) added
|
||||
|
|
|
@ -117,6 +117,7 @@ Gorm_RESOURCE_FILES = \
|
|||
Resources/GormViewSizeInspector.gorm \
|
||||
Resources/GormCustomClassInspector.gorm \
|
||||
Resources/GormSoundInspector.gorm \
|
||||
Resources/GormImageInspector.gorm \
|
||||
Resources/GormPreferences.gorm \
|
||||
Resources/GormPrefHeaders.gorm \
|
||||
Resources/GormPrefGeneral.gorm \
|
||||
|
@ -133,6 +134,7 @@ Gorm_HEADERS = \
|
|||
GormCustomClassInspector.h \
|
||||
GormScrollViewAttributesInspector.h \
|
||||
GormSoundInspector.h \
|
||||
GormImageInspector.h \
|
||||
GormMatrixEditor.h \
|
||||
GormPalettesManager.h \
|
||||
GormViewEditor.h \
|
||||
|
@ -186,6 +188,7 @@ Gorm_OBJC_FILES = \
|
|||
GormOutlineView.m \
|
||||
GormCustomClassInspector.m \
|
||||
GormSoundInspector.m \
|
||||
GormImageInspector.m \
|
||||
GormScrollViewEditor.m \
|
||||
GormImageEditor.m \
|
||||
GormSoundEditor.m \
|
||||
|
|
14
GormImageInspector.h
Normal file
14
GormImageInspector.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* All Rights reserved */
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <InterfaceBuilder/IBInspector.h>
|
||||
|
||||
@interface GormImageInspector : IBInspector
|
||||
{
|
||||
id name;
|
||||
id imageView;
|
||||
id width;
|
||||
id height;
|
||||
id _currentImage;
|
||||
}
|
||||
@end
|
65
GormImageInspector.m
Normal file
65
GormImageInspector.m
Normal file
|
@ -0,0 +1,65 @@
|
|||
/* All Rights reserved */
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "GormImageInspector.h"
|
||||
#include "GormPrivate.h"
|
||||
|
||||
@implementation GormImageInspector
|
||||
+ (void) initialize
|
||||
{
|
||||
if (self == [GormImageInspector class])
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
// initialize all member variables...
|
||||
// none...
|
||||
|
||||
// load the gui...
|
||||
if (![NSBundle loadNibNamed: @"GormImageInspector"
|
||||
owner: self])
|
||||
{
|
||||
NSLog(@"Could not open gorm GormImageInspector");
|
||||
return nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(handleNotification:)
|
||||
name: IBSelectionChangedNotification
|
||||
object: nil];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
}
|
||||
|
||||
- (void) handleNotification: (NSNotification*)aNotification
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setObject: (id)aobject
|
||||
{
|
||||
NSImage *image = [aobject normalImage];
|
||||
NSSize size = [image size];
|
||||
|
||||
object = aobject;
|
||||
[imageView setImageAlignment: NSImageAlignCenter];
|
||||
[imageView setImageFrameStyle: NSImageFrameGrayBezel];
|
||||
[imageView setImageScaling: NSScaleNone];
|
||||
[imageView setImage: [aobject normalImage]];
|
||||
[name setStringValue: [image name]];
|
||||
[width setDoubleValue: size.width];
|
||||
[height setDoubleValue: size.height];
|
||||
}
|
||||
@end
|
|
@ -382,6 +382,8 @@ extern NSString *GormDidDeleteClassNotification;
|
|||
- (void) setInWrapper: (BOOL)flag;
|
||||
- (BOOL) isInWrapper;
|
||||
- (NSString *)inspectorClassName;
|
||||
- (NSImage *)image;
|
||||
- (NSImage *)normalImage;
|
||||
@end
|
||||
|
||||
@interface GormDocument (PrivateMethodsForImagesAndSounds)
|
||||
|
|
156
Resources/GormImageInspector.gorm/data.classes
Normal file
156
Resources/GormImageInspector.gorm/data.classes
Normal file
|
@ -0,0 +1,156 @@
|
|||
{
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"activateContextHelpMode:",
|
||||
"alignCenter:",
|
||||
"alignJustified:",
|
||||
"alignLeft:",
|
||||
"alignRight:",
|
||||
"arrangeInFront:",
|
||||
"cancel:",
|
||||
"capitalizeWord:",
|
||||
"changeColor:",
|
||||
"changeFont:",
|
||||
"checkSpelling:",
|
||||
"close:",
|
||||
"complete:",
|
||||
"copy:",
|
||||
"copyFont:",
|
||||
"copyRuler:",
|
||||
"cut:",
|
||||
"delete:",
|
||||
"deleteBackward:",
|
||||
"deleteForward:",
|
||||
"deleteToBeginningOfLine:",
|
||||
"deleteToBeginningOfParagraph:",
|
||||
"deleteToEndOfLine:",
|
||||
"deleteToEndOfParagraph:",
|
||||
"deleteToMark:",
|
||||
"deleteWordBackward:",
|
||||
"deleteWordForward:",
|
||||
"deminiaturize:",
|
||||
"deselectAll:",
|
||||
"fax:",
|
||||
"hide:",
|
||||
"hideOtherApplications:",
|
||||
"indent:",
|
||||
"loosenKerning:",
|
||||
"lowerBaseline:",
|
||||
"lowercaseWord:",
|
||||
"makeKeyAndOrderFront:",
|
||||
"miniaturize:",
|
||||
"miniaturizeAll:",
|
||||
"moveBackward:",
|
||||
"moveBackwardAndModifySelection:",
|
||||
"moveDown:",
|
||||
"moveDownAndModifySelection:",
|
||||
"moveForward:",
|
||||
"moveForwardAndModifySelection:",
|
||||
"moveLeft:",
|
||||
"moveRight:",
|
||||
"moveToBeginningOfDocument:",
|
||||
"moveToBeginningOfLine:",
|
||||
"moveToBeginningOfParagraph:",
|
||||
"moveToEndOfDocument:",
|
||||
"moveToEndOfLine:",
|
||||
"moveToEndOfParagraph:",
|
||||
"moveUp:",
|
||||
"moveUpAndModifySelection:",
|
||||
"moveWordBackward:",
|
||||
"moveWordBackwardAndModifySelection:",
|
||||
"moveWordForward:",
|
||||
"moveWordForwardAndModifySelection:",
|
||||
"newDocument:",
|
||||
"ok:",
|
||||
"openDocument:",
|
||||
"orderBack:",
|
||||
"orderFront:",
|
||||
"orderFrontColorPanel:",
|
||||
"orderFrontDataLinkPanel:",
|
||||
"orderFrontFontPanel:",
|
||||
"orderFrontHelpPanel:",
|
||||
"orderFrontStandardAboutPanel:",
|
||||
"orderFrontStandardInfoPanel:",
|
||||
"orderOut:",
|
||||
"pageDown:",
|
||||
"pageUp:",
|
||||
"paste:",
|
||||
"pasteAsPlainText:",
|
||||
"pasteAsRichText:",
|
||||
"pasteFont:",
|
||||
"pasteRuler:",
|
||||
"performClose:",
|
||||
"performMiniaturize:",
|
||||
"performZoom:",
|
||||
"print:",
|
||||
"raiseBaseline:",
|
||||
"revertDocumentToSaved:",
|
||||
"runPageLayout:",
|
||||
"runToolbarCustomizationPalette:",
|
||||
"saveAllDocuments:",
|
||||
"saveDocument:",
|
||||
"saveDocumentAs:",
|
||||
"saveDocumentTo:",
|
||||
"scrollLineDown:",
|
||||
"scrollLineUp:",
|
||||
"scrollPageDown:",
|
||||
"scrollPageUp:",
|
||||
"scrollViaScroller:",
|
||||
"selectAll:",
|
||||
"selectLine:",
|
||||
"selectNextKeyView:",
|
||||
"selectParagraph:",
|
||||
"selectPreviousKeyView:",
|
||||
"selectText:",
|
||||
"selectText:",
|
||||
"selectToMark:",
|
||||
"selectWord:",
|
||||
"showContextHelp:",
|
||||
"showGuessPanel:",
|
||||
"showHelp:",
|
||||
"showWindow:",
|
||||
"stop:",
|
||||
"subscript:",
|
||||
"superscript:",
|
||||
"swapWithMark:",
|
||||
"takeDoubleValueFrom:",
|
||||
"takeFloatValueFrom:",
|
||||
"takeIntValueFrom:",
|
||||
"takeObjectValueFrom:",
|
||||
"takeStringValueFrom:",
|
||||
"terminate:",
|
||||
"tightenKerning:",
|
||||
"toggle:",
|
||||
"toggleContinuousSpellChecking:",
|
||||
"toggleRuler:",
|
||||
"toggleToolbarShown:",
|
||||
"toggleTraditionalCharacterShape:",
|
||||
"transpose:",
|
||||
"transposeWords:",
|
||||
"turnOffKerning:",
|
||||
"turnOffLigatures:",
|
||||
"underline:",
|
||||
"unhide:",
|
||||
"unhideAllApplications:",
|
||||
"unscript:",
|
||||
"uppercaseWord:",
|
||||
"useAllLigatures:",
|
||||
"useStandardKerning:",
|
||||
"useStandardLigatures:",
|
||||
"yank:",
|
||||
"zoom:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
GormImageInspector = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
height,
|
||||
width,
|
||||
imageView,
|
||||
name
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
}
|
BIN
Resources/GormImageInspector.gorm/objects.gorm
Normal file
BIN
Resources/GormImageInspector.gorm/objects.gorm
Normal file
Binary file not shown.
Loading…
Reference in a new issue