mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Added inspector for NSColorWell and added some stubbed methods to GormFontViewController
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17044 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1136d398d1
commit
f614f555d1
6 changed files with 115 additions and 64 deletions
|
@ -1,3 +1,12 @@
|
|||
2003-06-26 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/2Controls/GormNSColorWellInspector.gorm: Redid the
|
||||
inspector for this..
|
||||
* Palettes/2Controls/inspectors.m: Implemented GormColorWellInspector
|
||||
to allow the modification of color wells in Gorm.
|
||||
* GormFontViewController.m: Added stubbed versions of the methods
|
||||
mouseDragged and flagsChanged.
|
||||
|
||||
2003-06-25 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/2Controls/GormNSProgressIndicatorInspector.gorm: Added
|
||||
|
|
|
@ -100,4 +100,14 @@
|
|||
}
|
||||
*/
|
||||
|
||||
- (void) mouseDragged: (NSEvent *)event
|
||||
{
|
||||
// here to make certain we don't crash..
|
||||
}
|
||||
|
||||
- (void) flagsChanged: (NSEvent *)event
|
||||
{
|
||||
// here to make certain we don't crash..
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -42,6 +42,7 @@ PALETTE_NAME = 2Controls
|
|||
GormNSSliderInspector.gorm \
|
||||
GormNSStepperInspector.gorm \
|
||||
GormNSTextFieldInspector.gorm \
|
||||
GormNSColorWellInspector.gorm \
|
||||
GormNSProgressIndicatorInspector.gorm
|
||||
|
||||
2Controls_STANDARD_INSTALL = no
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
"orderFront:",
|
||||
"orderFrontColorPanel:",
|
||||
"orderFrontDataLinkPanel:",
|
||||
"orderFrontFontPanel:",
|
||||
"orderFrontHelpPanel:",
|
||||
"orderFrontStandardAboutPanel:",
|
||||
"orderFrontStandardInfoPanel:",
|
||||
|
@ -137,79 +138,27 @@
|
|||
"useStandardKerning:",
|
||||
"useStandardLigatures:",
|
||||
"yank:",
|
||||
"zoom:"
|
||||
"zoom:",
|
||||
"tagSelected:",
|
||||
"borderedSelected:",
|
||||
"disabledSelected:",
|
||||
"initialColorSelected:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
GormColorWellInspector = {
|
||||
Actions = (
|
||||
"tagSelected:",
|
||||
"borderedSelected:",
|
||||
"disabledSelected:",
|
||||
"initialColorSelected:"
|
||||
);
|
||||
Outlets = (
|
||||
bordered,
|
||||
disabled,
|
||||
initialColor,
|
||||
optionMatrix
|
||||
tagValue
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
IBInspector = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
okButton,
|
||||
revertButton,
|
||||
window
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
NSApplication = {
|
||||
Outlets = (
|
||||
delegate
|
||||
);
|
||||
Super = NSResponder;
|
||||
};
|
||||
NSButton = {
|
||||
Super = NSControl;
|
||||
};
|
||||
NSControl = {
|
||||
Actions = (
|
||||
"takeDoubleValueFrom:",
|
||||
"takeFloatValueFrom:",
|
||||
"takeIntValueFrom:",
|
||||
"takeObjectValueFrom:",
|
||||
"takeStringValueFrom:"
|
||||
);
|
||||
Outlets = (
|
||||
target
|
||||
);
|
||||
Super = NSView;
|
||||
};
|
||||
NSMenu = {
|
||||
Super = NSObject;
|
||||
};
|
||||
NSMenuItem = {
|
||||
Outlets = (
|
||||
target
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
NSResponder = {
|
||||
Super = NSObject;
|
||||
};
|
||||
NSSlider = {
|
||||
Super = NSControl;
|
||||
};
|
||||
NSTextField = {
|
||||
Outlets = (
|
||||
delegate
|
||||
);
|
||||
Super = NSControl;
|
||||
};
|
||||
NSView = {
|
||||
Super = NSResponder;
|
||||
};
|
||||
NSWindow = {
|
||||
Outlets = (
|
||||
delegate
|
||||
);
|
||||
Super = NSResponder;
|
||||
};
|
||||
}
|
Binary file not shown.
|
@ -1430,3 +1430,85 @@
|
|||
[object setMaxValue: [maxValue doubleValue]];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSColorWell (IBObjectAdditions)
|
||||
- (NSString *) inspectorClassName
|
||||
{
|
||||
return @"GormColorWellInspector";
|
||||
}
|
||||
@end
|
||||
|
||||
@interface GormColorWellInspector : IBInspector
|
||||
{
|
||||
id initialColor;
|
||||
id disabled;
|
||||
id bordered;
|
||||
id tagValue;
|
||||
}
|
||||
- (void) initialColorSelected: (id)sender;
|
||||
- (void) disabledSelected: (id)sender;
|
||||
- (void) borderedSelected: (id)sender;
|
||||
- (void) tagSelected: (id)sender;
|
||||
@end
|
||||
|
||||
@implementation GormColorWellInspector
|
||||
- init
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
if ([NSBundle loadNibNamed: @"GormNSColorWellInspector"
|
||||
owner: self] == NO)
|
||||
{
|
||||
|
||||
NSDictionary *table;
|
||||
NSBundle *bundle;
|
||||
table = [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"];
|
||||
bundle = [NSBundle mainBundle];
|
||||
if ([bundle loadNibFile: @"GormNSColorWellInspector"
|
||||
externalNameTable: table
|
||||
withZone: [self zone]] == NO)
|
||||
{
|
||||
NSLog(@"Could not open gorm GormNSColorWellInspector");
|
||||
NSLog(@"self %@", self);
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) _getValuesFromObject
|
||||
{
|
||||
[disabled setState: (![object isEnabled])?NSOnState:NSOffState];
|
||||
[bordered setState: [object isBordered]?NSOnState:NSOffState];
|
||||
[initialColor setColor: [object color]];
|
||||
[tagValue setIntValue: [object tag]];
|
||||
}
|
||||
|
||||
- (void) setObject: (id)anObject
|
||||
{
|
||||
[super setObject: anObject];
|
||||
[self _getValuesFromObject];
|
||||
}
|
||||
|
||||
- (void) initialColorSelected: (id) sender
|
||||
{
|
||||
[object setColor: [initialColor color]];
|
||||
}
|
||||
|
||||
- (void) disabledSelected: (id)sender;
|
||||
{
|
||||
[object setEnabled: ([disabled state] != NSOnState)];
|
||||
}
|
||||
|
||||
- (void) borderedSelected: (id)sender;
|
||||
{
|
||||
[object setBordered: ([bordered state] == NSOnState)];
|
||||
}
|
||||
|
||||
- (void) tagSelected: (id)sender;
|
||||
{
|
||||
[object setTag: [tagValue intValue]];
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue