Added forward delarations to AppKit.h for NSSecureTextField and NSSecureTextFieldCell.

Also added category for NSSecureTextFieldCell to GMAppKit.h and .m.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9316 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2001-03-10 01:31:19 +00:00
parent 508e9a34e3
commit 2847addc5d
3 changed files with 29 additions and 6 deletions

View file

@ -56,7 +56,7 @@
// Controls
@class NSControl, NSButton, NSTextField, NSScroller, NSBox, NSForm, NSMatrix;
@class NSPopUpButton, NSProgressIndicator, NSSlider, NSBrowser, NSForm;
@class NSComboBox;
@class NSComboBox, NSSecureTextField;
// Cells
@class NSCell, NSActionCell, NSButtonCell, NSTextFieldCell, NSFormCell;
@class NSSliderCell, NSMenuCell, NSBrowserCell, NSFormCell;
@ -69,7 +69,7 @@
@class NSFont, NSFontManager, NSFontPanel;
@class NSPageLayout, NSPrinter, NSPrintInfo, NSPrintOperation, NSPrintPanel;
@class NSParagraphStyle, NSMutableParagraphStyle, NSPasteboard, NSSelection;
@class NSSpellChecker, NSSpellServer, NSTextTab;
@class NSSpellChecker, NSSpellServer, NSTextTab, NSSecureTextFieldCell;
#include <AppKit/NSActionCell.h>
#include <AppKit/NSAffineTransform.h>
@ -167,4 +167,4 @@
#include <AppKit/PSOperators.h>
#endif /* _GNUstep_H_AppKit */
#endif _GNUstep_H_AppKit

View file

@ -76,6 +76,9 @@
@interface NSTextField (GMArchiverMethods) <ModelCoding>
@end
@interface NSSecureTextFieldCell (GMArchiverMethods) <ModelCoding>
@end
@interface NSView (GMArchiverMethods) <ModelCoding>
@end

View file

@ -519,7 +519,8 @@ void __dummy_GMAppKit_functionForLinking() {}
[archiver encodeObject:[self documentView] withName:@"documentView"];
[archiver encodeBOOL:[self copiesOnScroll] withName:@"copiesOnScroll"];
[archiver encodeBOOL:[self drawsBackground] withName:@"drawsBackground"];
if([self respondsToSelector: @selector(drawsBackground)])
[archiver encodeBOOL:[self drawsBackground] withName:@"drawsBackground"];
[archiver encodeObject:[self backgroundColor] withName:@"backgroundColor"];
}
@ -529,7 +530,8 @@ void __dummy_GMAppKit_functionForLinking() {}
[self setDocumentView:[unarchiver decodeObjectWithName:@"documentView"]];
[self setCopiesOnScroll:[unarchiver decodeBOOLWithName:@"copiesOnScroll"]];
[self setDrawsBackground:[unarchiver decodeBOOLWithName:@"drawsBackground"]];
if([self respondsToSelector: @selector(setDrawsBackground:)])
[self setDrawsBackground:[unarchiver decodeBOOLWithName:@"drawsBackground"]];
[self setBackgroundColor:[unarchiver decodeObjectWithName:@"backgroundColor"]];
return self;
}
@ -1019,7 +1021,6 @@ void __dummy_GMAppKit_functionForLinking() {}
@end /* NSResponder (GMArchiverMethods) */
@implementation NSTextField (GMArchiverMethods)
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
@ -1042,6 +1043,25 @@ void __dummy_GMAppKit_functionForLinking() {}
@end /* NSTextField (GMArchiverMethods) */
@implementation NSSecureTextFieldCell (GMArchiverMethods)
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
{
[super encodeWithModelArchiver:archiver];
if([self respondsToSelector: @selector(echosBullets)])
[archiver encodeBOOL:[self echosBullets] withName:@"echosBullets"];
}
- (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver
{
self = [super initWithModelUnarchiver:unarchiver];
if([self respondsToSelector: @selector(setEchosBullets:)])
[self setEchosBullets:[unarchiver decodeBOOLWithName:@"echosBullets"]];
return self;
}
@end /* NSSecureTextFieldCell (GMArchiverMethods) */
@implementation NSView (GMArchiverMethods)