diff --git a/Editor/WILDFieldInfoViewController.h b/Editor/WILDFieldInfoViewController.h index 41e43bd6..76f11b7e 100644 --- a/Editor/WILDFieldInfoViewController.h +++ b/Editor/WILDFieldInfoViewController.h @@ -18,7 +18,7 @@ NSButton* mDontWrapSwitch; NSButton* mDontSearchSwitch; NSButton* mHorizontalScrollerSwitch; - NSButton* mVerticalalScrollerSwitch; + NSButton* mVerticalScrollerSwitch; } @property (retain) IBOutlet NSPopUpButton* stylePopUp; diff --git a/Editor/WILDPartInfoViewController.h b/Editor/WILDPartInfoViewController.h index 3168fed8..8be7b3a9 100644 --- a/Editor/WILDPartInfoViewController.h +++ b/Editor/WILDPartInfoViewController.h @@ -26,6 +26,11 @@ NSTextField * partNumberField; NSTextField * partNumberLabel; NSTextView * contentsTextField; + NSColorWell * fillColorWell; + NSColorWell * lineColorWell; + NSColorWell * shadowColorWell; + NSSlider * shadowBlurRadiusSlider; + NSSlider * shadowOffsetSlider; } @property(retain) IBOutlet NSButton * scriptEditorButton; @@ -37,6 +42,11 @@ @property(retain) IBOutlet NSTextField * partNumberField; @property(retain) IBOutlet NSTextField * partNumberLabel; @property(retain) IBOutlet NSTextView * contentsTextField; +@property(retain) IBOutlet NSColorWell * fillColorWell; +@property(retain) IBOutlet NSColorWell * lineColorWell; +@property(retain) IBOutlet NSColorWell * shadowColorWell; +@property(retain) IBOutlet NSSlider * shadowBlurRadiusSlider; +@property(retain) IBOutlet NSSlider * shadowOffsetSlider; -(id) initWithPart: (WILDPart*)inPart ofCardView: (WILDCardView*)owningView; @@ -44,4 +54,10 @@ -(IBAction) doEnabledSwitchToggled:(id)sender; -(IBAction) doVisibleSwitchToggled:(id)sender; +-(IBAction) doShadowBlurRadiusChanged:(id)sender; +-(IBAction) doShadowOffsetChanged:(id)sender; +-(IBAction) doShadowColorChanged:(id)sender; +-(IBAction) doLineColorChanged:(id)sender; +-(IBAction) doFillColorChanged:(id)sender; + @end diff --git a/Editor/WILDPartInfoViewController.m b/Editor/WILDPartInfoViewController.m index 260f42f9..a798a7f7 100644 --- a/Editor/WILDPartInfoViewController.m +++ b/Editor/WILDPartInfoViewController.m @@ -22,6 +22,12 @@ @implementation WILDPartInfoViewController @synthesize idField; @synthesize partNumberField; @synthesize partNumberLabel; +@synthesize fillColorWell; +@synthesize lineColorWell; +@synthesize shadowColorWell; +@synthesize shadowBlurRadiusSlider; +@synthesize shadowOffsetSlider; + -(id) initWithPart: (WILDPart*)inPart ofCardView: (WILDCardView*)owningView { @@ -49,6 +55,9 @@ -(void) dealloc DESTROY(partNumberField); DESTROY(partNumberLabel); DESTROY(contentsTextField); + DESTROY(fillColorWell); + DESTROY(lineColorWell); + DESTROY(shadowColorWell); [super dealloc]; } @@ -70,6 +79,12 @@ -(void) loadView [enabledSwitch setState: [part isEnabled]]; [visibleSwitch setState: [part visible]]; + [fillColorWell setColor: [part fillColor]]; + [lineColorWell setColor: [part lineColor]]; + [shadowColorWell setColor: [part shadowColor]]; + [shadowBlurRadiusSlider setDoubleValue: [part shadowBlurRadius]]; + [shadowOffsetSlider setDoubleValue: [part shadowOffset].width]; + if( contentsTextField ) { WILDPartContents* theContents = nil; @@ -117,6 +132,60 @@ -(IBAction) doEnabledSwitchToggled:(id)sender } +-(IBAction) doFillColorChanged:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartWillChangeNotification object: part]; + + [part setFillColor: [fillColorWell color]]; + + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartDidChangeNotification object: part]; + [part updateChangeCount: NSChangeDone]; +} + +-(IBAction) doLineColorChanged:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartWillChangeNotification object: part]; + + [part setLineColor: [lineColorWell color]]; + + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartDidChangeNotification object: part]; + [part updateChangeCount: NSChangeDone]; +} + + +-(IBAction) doShadowColorChanged:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartWillChangeNotification object: part]; + + [part setShadowColor: [shadowColorWell color]]; + + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartDidChangeNotification object: part]; + [part updateChangeCount: NSChangeDone]; +} + + +-(IBAction) doShadowOffsetChanged:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartWillChangeNotification object: part]; + + [part setShadowOffset: NSMakeSize([shadowOffsetSlider doubleValue],-[shadowOffsetSlider doubleValue])]; + + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartDidChangeNotification object: part]; + [part updateChangeCount: NSChangeDone]; +} + + +-(IBAction) doShadowBlurRadiusChanged:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartWillChangeNotification object: part]; + + [part setShadowBlurRadius: [shadowBlurRadiusSlider doubleValue]]; + + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPartDidChangeNotification object: part]; + [part updateChangeCount: NSChangeDone]; +} + + -(void) controlTextDidChange: (NSNotification *)notif { if( [notif object] == nameField ) diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 677ca47a..7d71ad54 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -3,12 +3,12 @@ 1070 11A511 - 1881 + 1617 1138 566.00 com.apple.InterfaceBuilder.CocoaPlugin - 1881 + 1617 YES @@ -26,8 +26,11 @@ com.apple.InterfaceBuilder.CocoaPlugin - PluginDependencyRecalculationVersion - + YES + + YES + + YES @@ -849,16 +852,9 @@ YES - Button Info… - - 2147483647 - - - - - - Field Info… - + Get Info + i + 1048576 2147483647 @@ -1703,7 +1699,7 @@ - + 256 YES @@ -1713,8 +1709,6 @@ {{18, 16}, {345, 20}} - - 16394 100 @@ -1723,7 +1717,6 @@ 268 {{17, 44}, {347, 34}} - YES @@ -1758,8 +1751,6 @@ {381, 98} - - {{0, 0}, {1366, 746}} @@ -2449,22 +2440,6 @@ 579 - - - showButtonInfoPanel: - - - - 604 - - - - showFieldInfoPanel: - - - - 605 - showCardInfoPanel: @@ -2713,15 +2688,21 @@ 791 + + + showInfoPanel: + + + + 798 + YES 0 - - YES - + @@ -3821,7 +3802,6 @@ YES - @@ -3853,11 +3833,6 @@ - - 584 - - - 585 @@ -4212,7 +4187,6 @@ 581.IBPluginDependency 582.IBPluginDependency 583.IBPluginDependency - 584.IBPluginDependency 585.IBPluginDependency 590.IBPluginDependency 592.IBPluginDependency @@ -4465,7 +4439,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin @@ -4480,7 +4453,7 @@ - 797 + 798 diff --git a/English.lproj/WILDButtonInfoViewController.xib b/English.lproj/WILDButtonInfoViewController.xib index 6782ba36..f21ecca1 100644 --- a/English.lproj/WILDButtonInfoViewController.xib +++ b/English.lproj/WILDButtonInfoViewController.xib @@ -11,16 +11,19 @@ 1617 - NSTextField - NSCustomObject - NSMenu - NSMenuItem NSPopUpButton - NSCustomView + NSMenuItem + NSMenu NSButtonCell - NSPopUpButtonCell NSButton NSTextFieldCell + NSColorWell + NSSlider + NSSliderCell + NSCustomObject + NSCustomView + NSPopUpButtonCell + NSTextField com.apple.InterfaceBuilder.CocoaPlugin @@ -40,23 +43,225 @@ 268 - + 268 - {{79, 87}, {76, 26}} + {{321, 21}, {90, 21}} - - _NS:179 + + 2 + _NS:51 YES - - -2076049856 - 2048 + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + {{276, 24}, {42, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Blur: LucidaGrande 13 1044 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{187, 20}, {90, 21}} + + + + 2 + _NS:51 + YES + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + + NSColor pasteboard type + + {{82, 20}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{22, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Shadow: + + + + + + + + + 268 + + NSColor pasteboard type + + {{184, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{124, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Offset: + + + + + + + + + 268 + {{124, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Line: + + + + + + + + + 268 + + NSColor pasteboard type + + {{82, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{79, 154}, {76, 26}} + + + + 2 + _NS:179 + YES + + -2076049856 + 2048 + _NS:179 109199615 @@ -254,10 +459,11 @@ 268 - {{79, 117}, {179, 26}} + {{79, 184}, {179, 26}} + 2 _NS:179 YES @@ -375,13 +581,39 @@ 2 + + + 268 + {{222, 150}, {110, 32}} + + + + 2 + _NS:161 + YES + + 67239424 + 134217728 + Contents… + + _NS:161 + + -2038284033 + 129 + + + 200 + 25 + + 268 - {{326, 83}, {89, 32}} + {{326, 150}, {89, 32}} + 2 _NS:161 YES @@ -402,10 +634,11 @@ 268 - {{326, 113}, {89, 32}} + {{326, 180}, {89, 32}} + 2 _NS:161 YES @@ -423,13 +656,33 @@ 25 + + + 268 + {{22, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Fill: + + + + + + 268 - {{22, 93}, {60, 17}} + {{22, 160}, {60, 17}} + 2 YES 68288064 @@ -437,33 +690,18 @@ Family: - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - + + 268 - {{17, 123}, {60, 17}} + {{17, 190}, {60, 17}} + 2 YES 68288064 @@ -478,10 +716,11 @@ 268 - {{17, 171}, {60, 17}} + {{17, 238}, {60, 17}} + 2 YES 68288064 @@ -496,10 +735,11 @@ 268 - {{82, 169}, {327, 22}} + {{82, 236}, {327, 22}} + 2 YES -1804468671 @@ -528,10 +768,11 @@ 268 - {{80, 18}, {150, 18}} + {{80, 85}, {150, 18}} + 2 YES -2080244224 @@ -557,10 +798,11 @@ 268 - {{234, 19}, {177, 17}} + {{234, 85}, {177, 18}} - + + 2 YES -2080244224 @@ -581,10 +823,11 @@ 268 - {{234, 38}, {177, 18}} + {{234, 105}, {177, 18}} + 2 YES -2080244224 @@ -605,10 +848,11 @@ 268 - {{234, 58}, {177, 18}} + {{234, 125}, {177, 18}} + 2 YES -2080244224 @@ -629,10 +873,11 @@ 268 - {{80, 38}, {150, 18}} + {{80, 105}, {150, 18}} + 2 YES -2080244224 @@ -653,10 +898,11 @@ 268 - {{80, 58}, {150, 18}} + {{80, 125}, {150, 18}} + 2 YES -2080244224 @@ -677,10 +923,11 @@ 268 - {{139, 149}, {51, 14}} + {{139, 216}, {51, 14}} + 2 YES 68288064 @@ -699,10 +946,11 @@ 268 - {{257, 149}, {119, 14}} + {{257, 216}, {119, 14}} + 2 YES 68288064 @@ -717,10 +965,11 @@ 268 - {{192, 149}, {66, 14}} + {{192, 216}, {66, 14}} + 2 YES 70385217 @@ -739,10 +988,11 @@ 268 - {{376, 149}, {36, 14}} + {{376, 216}, {36, 14}} + 2 YES 70385217 @@ -757,10 +1007,11 @@ 268 - {{79, 149}, {58, 14}} + {{79, 216}, {58, 14}} + 2 YES 70385217 @@ -775,10 +1026,11 @@ 268 - {{17, 149}, {60, 14}} + {{17, 216}, {60, 14}} + 2 YES 68288064 @@ -791,10 +1043,12 @@ - {429, 211} + {429, 278} + YES + 2 NSView @@ -1016,6 +1270,94 @@ 110 + + + doShowIconPicker: + + + + 113 + + + + fillColorWell + + + + 137 + + + + lineColorWell + + + + 138 + + + + shadowColorWell + + + + 139 + + + + shadowOffsetSlider + + + + 140 + + + + shadowBlurRadiusSlider + + + + 141 + + + + doFillColorChanged: + + + + 142 + + + + doLineColorChanged: + + + + 143 + + + + doShadowColorChanged: + + + + 144 + + + + doShadowOffsetChanged: + + + + 145 + + + + doShadowBlurRadiusChanged: + + + + 146 + @@ -1067,6 +1409,17 @@ + + + + + + + + + + + @@ -1488,6 +1841,125 @@ + + 111 + + + + + + + + 112 + + + + + 114 + + + + + 115 + + + + + + + + 116 + + + + + 117 + + + + + + + + 118 + + + + + 119 + + + + + 120 + + + + + + + + 121 + + + + + 122 + + + + + 129 + + + + + + + + 130 + + + + + 131 + + + + + + + + 132 + + + + + 133 + + + + + + + + 134 + + + + + + + + 135 + + + + + 136 + + + @@ -1495,14 +1967,37 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1565,7 +2060,7 @@ - 110 + 146 @@ -1655,7 +2150,12 @@ NSViewController id + id + id id + id + id + id id @@ -1663,10 +2163,30 @@ doEnabledSwitchToggled: id + + doFillColorChanged: + id + + + doLineColorChanged: + id + doScriptEditorButton: id + + doShadowBlurRadiusChanged: + id + + + doShadowColorChanged: + id + + + doShadowOffsetChanged: + id + doVisibleSwitchToggled: id @@ -1675,12 +2195,17 @@ NSTextView NSButton + NSColorWell NSTextField + NSColorWell NSTextField NSTextField NSTextField NSTextField NSButton + NSSlider + NSColorWell + NSSlider NSButton @@ -1692,10 +2217,18 @@ enabledSwitch NSButton + + fillColorWell + NSColorWell + idField NSTextField + + lineColorWell + NSColorWell + nameField NSTextField @@ -1716,6 +2249,18 @@ scriptEditorButton NSButton + + shadowBlurRadiusSlider + NSSlider + + + shadowColorWell + NSColorWell + + + shadowOffsetSlider + NSSlider + visibleSwitch NSButton diff --git a/English.lproj/WILDFieldInfoViewController.xib b/English.lproj/WILDFieldInfoViewController.xib index 9da583ac..63ff6bd5 100644 --- a/English.lproj/WILDFieldInfoViewController.xib +++ b/English.lproj/WILDFieldInfoViewController.xib @@ -11,16 +11,19 @@ 1617 - NSTextField - NSCustomObject - NSMenu - NSMenuItem NSPopUpButton - NSCustomView + NSMenuItem + NSMenu NSButtonCell - NSPopUpButtonCell NSButton NSTextFieldCell + NSColorWell + NSSlider + NSSliderCell + NSCustomObject + NSCustomView + NSPopUpButtonCell + NSTextField com.apple.InterfaceBuilder.CocoaPlugin @@ -40,22 +43,243 @@ 268 + + + 268 + {{321, 21}, {90, 21}} + + + + 2 + _NS:51 + YES + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + {{276, 24}, {42, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Blur: + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{187, 20}, {90, 21}} + + + + 2 + _NS:51 + YES + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + + NSColor pasteboard type + + {{82, 20}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{22, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Shadow: + + + + + + + + + 268 + + NSColor pasteboard type + + {{184, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{124, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Offset: + + + + + + + + + 268 + {{124, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Line: + + + + + + + + + 268 + + NSColor pasteboard type + + {{82, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{22, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Fill: + + + + + + 268 - {{79, 142}, {179, 26}} + {{79, 212}, {179, 26}} + _NS:179 YES -2076049856 2048 - - LucidaGrande - 13 - 1044 - + _NS:179 109199615 @@ -121,8 +345,9 @@ 268 - {{326, 138}, {89, 32}} + {{326, 208}, {89, 32}} + _NS:161 YES @@ -144,8 +369,9 @@ 268 - {{17, 148}, {60, 17}} + {{17, 218}, {60, 17}} + YES @@ -154,31 +380,16 @@ Style: - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - + + 268 - {{17, 196}, {60, 17}} + {{17, 266}, {60, 17}} + YES @@ -194,8 +405,9 @@ 268 - {{82, 194}, {327, 22}} + {{82, 264}, {327, 22}} + YES @@ -225,8 +437,9 @@ 268 - {{80, 67}, {150, 18}} + {{80, 137}, {150, 18}} + YES @@ -253,9 +466,10 @@ 268 - {{234, 25}, {177, 18}} + {{234, 95}, {177, 18}} - + + YES -2080244224 @@ -276,8 +490,9 @@ 268 - {{234, 45}, {177, 18}} + {{234, 115}, {177, 18}} + YES @@ -299,8 +514,9 @@ 268 - {{234, 67}, {177, 18}} + {{234, 137}, {177, 18}} + YES @@ -322,8 +538,9 @@ 268 - {{80, 25}, {150, 18}} + {{80, 95}, {150, 18}} + YES @@ -345,8 +562,9 @@ 268 - {{80, 45}, {150, 18}} + {{80, 115}, {150, 18}} + YES @@ -368,8 +586,9 @@ 268 - {{251, 88}, {160, 18}} + {{251, 158}, {160, 18}} + YES @@ -391,8 +610,9 @@ 268 - {{234, 110}, {177, 18}} + {{234, 180}, {177, 18}} + YES @@ -414,8 +634,9 @@ 268 - {{80, 88}, {150, 18}} + {{80, 158}, {150, 18}} + YES @@ -437,8 +658,9 @@ 268 - {{80, 110}, {150, 18}} + {{80, 180}, {150, 18}} + YES @@ -460,8 +682,9 @@ 268 - {{139, 174}, {51, 14}} + {{139, 244}, {51, 14}} + YES @@ -481,8 +704,9 @@ 268 - {{257, 174}, {119, 14}} + {{257, 244}, {119, 14}} + YES @@ -498,8 +722,9 @@ 268 - {{192, 174}, {66, 14}} + {{192, 244}, {66, 14}} + YES @@ -519,8 +744,9 @@ 268 - {{376, 174}, {36, 14}} + {{376, 244}, {36, 14}} + YES @@ -536,8 +762,9 @@ 268 - {{79, 174}, {58, 14}} + {{79, 244}, {58, 14}} + YES @@ -553,8 +780,9 @@ 268 - {{17, 174}, {60, 14}} + {{17, 244}, {60, 14}} + YES @@ -568,8 +796,9 @@ - {429, 236} + {429, 306} + NSView @@ -824,6 +1053,86 @@ 138 + + + doFillColorChanged: + + + + 156 + + + + doLineColorChanged: + + + + 157 + + + + doShadowColorChanged: + + + + 158 + + + + doShadowOffsetChanged: + + + + 159 + + + + doShadowBlurRadiusChanged: + + + + 160 + + + + fillColorWell + + + + 161 + + + + lineColorWell + + + + 162 + + + + shadowColorWell + + + + 163 + + + + shadowOffsetSlider + + + + 164 + + + + shadowBlurRadiusSlider + + + + 165 + @@ -876,6 +1185,16 @@ + + + + + + + + + + @@ -1180,6 +1499,112 @@ + + 139 + + + + + + + + 140 + + + + + 141 + + + + + + + + 142 + + + + + + + + 143 + + + + + 144 + + + + + + + + 145 + + + + + 146 + + + + + + + + 147 + + + + + + + + 148 + + + + + + + + 149 + + + + + 150 + + + + + 151 + + + + + 152 + + + + + 153 + + + + + 154 + + + + + 155 + + + @@ -1199,8 +1624,25 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1238,9 +1680,244 @@ - 138 + 165 + + + + + WILDFieldInfoViewController + WILDPartInfoViewController + + id + id + id + id + id + id + id + id + id + + + + doAutoSelectSwitchToggled: + id + + + doDontSearchSwitchToggled: + id + + + doDontWrapSwitchToggled: + id + + + doHorizontalScrollerSwitchToggled: + id + + + doLockTextSwitchToggled: + id + + + doMultipleLinesSwitchToggled: + id + + + doSharedTextSwitchToggled: + id + + + doStylePopUpChanged: + id + + + doVerticalScrollerSwitchToggled: + id + + + + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSPopUpButton + NSButton + + + + autoSelectSwitch + NSButton + + + dontSearchSwitch + NSButton + + + dontWrapSwitch + NSButton + + + horizontalScrollerSwitch + NSButton + + + lockTextSwitch + NSButton + + + multipleLinesSwitch + NSButton + + + sharedTextSwitch + NSButton + + + stylePopUp + NSPopUpButton + + + verticalScrollerSwitch + NSButton + + + + IBProjectSource + ./Classes/WILDFieldInfoViewController.h + + + + WILDPartInfoViewController + NSViewController + + id + id + id + id + id + id + id + id + + + + doEnabledSwitchToggled: + id + + + doFillColorChanged: + id + + + doLineColorChanged: + id + + + doScriptEditorButton: + id + + + doShadowBlurRadiusChanged: + id + + + doShadowColorChanged: + id + + + doShadowOffsetChanged: + id + + + doVisibleSwitchToggled: + id + + + + NSTextView + NSButton + NSColorWell + NSTextField + NSColorWell + NSTextField + NSTextField + NSTextField + NSTextField + NSButton + NSSlider + NSColorWell + NSSlider + NSButton + + + + contentsTextField + NSTextView + + + enabledSwitch + NSButton + + + fillColorWell + NSColorWell + + + idField + NSTextField + + + lineColorWell + NSColorWell + + + nameField + NSTextField + + + numberField + NSTextField + + + partNumberField + NSTextField + + + partNumberLabel + NSTextField + + + scriptEditorButton + NSButton + + + shadowBlurRadiusSlider + NSSlider + + + shadowColorWell + NSColorWell + + + shadowOffsetSlider + NSSlider + + + visibleSwitch + NSButton + + + + IBProjectSource + ./Classes/WILDPartInfoViewController.h + + + - 0 IBCocoaFramework YES diff --git a/English.lproj/WILDMoviePlayerInfoViewController.xib b/English.lproj/WILDMoviePlayerInfoViewController.xib index 939f9471..323f2b7d 100644 --- a/English.lproj/WILDMoviePlayerInfoViewController.xib +++ b/English.lproj/WILDMoviePlayerInfoViewController.xib @@ -11,12 +11,15 @@ 1617 - NSCustomView NSTextField - NSTextFieldCell - NSButtonCell NSCustomObject + NSSliderCell + NSCustomView + NSButtonCell + NSSlider NSButton + NSColorWell + NSTextFieldCell com.apple.InterfaceBuilder.CocoaPlugin @@ -36,10 +39,233 @@ 268 + + + 268 + {{321, 21}, {90, 21}} + + + 2 + _NS:51 + YES + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + {{276, 24}, {42, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Blur: + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{187, 20}, {90, 21}} + + + + 2 + _NS:51 + YES + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + + NSColor pasteboard type + + {{82, 20}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{22, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Shadow: + + + + + + + + + 268 + + NSColor pasteboard type + + {{184, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{124, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Offset: + + + + + + + + + 268 + {{124, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Line: + + + + + + + + + 268 + + NSColor pasteboard type + + {{82, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{22, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Fill: + + + + + + 268 - {{315, 63}, {100, 32}} + {{315, 137}, {100, 32}} @@ -49,11 +275,7 @@ 67239424 134217728 Choose… - - LucidaGrande - 13 - 1044 - + _NS:161 -2038284033 @@ -67,7 +289,7 @@ 268 - {{315, 93}, {100, 32}} + {{315, 167}, {100, 32}} @@ -91,7 +313,7 @@ 268 - {{17, 73}, {60, 17}} + {{17, 147}, {60, 17}} @@ -102,30 +324,14 @@ Movie: - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - + + 268 - {{17, 151}, {60, 17}} + {{17, 225}, {60, 17}} @@ -143,7 +349,7 @@ 268 - {{82, 69}, {231, 22}} + {{82, 143}, {231, 22}} @@ -175,7 +381,7 @@ 268 - {{82, 149}, {327, 22}} + {{82, 223}, {327, 22}} @@ -194,7 +400,7 @@ 268 - {{80, 18}, {150, 18}} + {{80, 92}, {150, 18}} @@ -223,7 +429,7 @@ 268 - {{80, 38}, {150, 18}} + {{80, 112}, {150, 18}} @@ -247,7 +453,7 @@ 268 - {{139, 129}, {51, 14}} + {{139, 203}, {51, 14}} @@ -269,7 +475,7 @@ 268 - {{257, 129}, {119, 14}} + {{257, 203}, {119, 14}} @@ -287,7 +493,7 @@ 268 - {{192, 129}, {66, 14}} + {{192, 203}, {66, 14}} @@ -309,7 +515,7 @@ 268 - {{376, 129}, {36, 14}} + {{376, 203}, {36, 14}} @@ -327,7 +533,7 @@ 268 - {{79, 129}, {58, 14}} + {{79, 203}, {58, 14}} @@ -345,7 +551,7 @@ 268 - {{17, 129}, {60, 14}} + {{17, 203}, {60, 14}} @@ -361,7 +567,7 @@ - {429, 191} + {429, 265} @@ -498,6 +704,86 @@ 117 + + + doFillColorChanged: + + + + 135 + + + + doLineColorChanged: + + + + 136 + + + + doShadowColorChanged: + + + + 137 + + + + doShadowOffsetChanged: + + + + 138 + + + + doShadowBlurRadiusChanged: + + + + 139 + + + + fillColorWell + + + + 140 + + + + lineColorWell + + + + 141 + + + + shadowColorWell + + + + 142 + + + + shadowOffsetSlider + + + + 143 + + + + shadowBlurRadiusSlider + + + + 144 + @@ -543,6 +829,16 @@ + + + + + + + + + + @@ -728,6 +1024,112 @@ + + 118 + + + + + + + + 119 + + + + + 120 + + + + + + + + 121 + + + + + + + + 122 + + + + + 123 + + + + + + + + 124 + + + + + 125 + + + + + + + + 126 + + + + + + + + 127 + + + + + + + + 128 + + + + + 129 + + + + + 130 + + + + + 131 + + + + + 132 + + + + + 133 + + + + + 134 + + + @@ -743,8 +1145,25 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -768,7 +1187,7 @@ - 117 + 144 @@ -807,7 +1226,12 @@ NSViewController id + id + id id + id + id + id id @@ -815,10 +1239,30 @@ doEnabledSwitchToggled: id + + doFillColorChanged: + id + + + doLineColorChanged: + id + doScriptEditorButton: id + + doShadowBlurRadiusChanged: + id + + + doShadowColorChanged: + id + + + doShadowOffsetChanged: + id + doVisibleSwitchToggled: id @@ -827,12 +1271,17 @@ NSTextView NSButton + NSColorWell NSTextField + NSColorWell NSTextField NSTextField NSTextField NSTextField NSButton + NSSlider + NSColorWell + NSSlider NSButton @@ -844,10 +1293,18 @@ enabledSwitch NSButton + + fillColorWell + NSColorWell + idField NSTextField + + lineColorWell + NSColorWell + nameField NSTextField @@ -868,6 +1325,18 @@ scriptEditorButton NSButton + + shadowBlurRadiusSlider + NSSlider + + + shadowColorWell + NSColorWell + + + shadowOffsetSlider + NSSlider + visibleSwitch NSButton diff --git a/English.lproj/WILDPartInfoViewController.xib b/English.lproj/WILDPartInfoViewController.xib index f1c63335..083d740b 100644 --- a/English.lproj/WILDPartInfoViewController.xib +++ b/English.lproj/WILDPartInfoViewController.xib @@ -11,12 +11,15 @@ 1617 - NSCustomView NSTextField - NSTextFieldCell - NSButtonCell NSCustomObject + NSSliderCell + NSCustomView + NSButtonCell + NSSlider NSButton + NSColorWell + NSTextFieldCell com.apple.InterfaceBuilder.CocoaPlugin @@ -36,23 +39,243 @@ 268 + + + 268 + {{321, 21}, {90, 21}} + + + 2 + _NS:51 + YES + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + {{276, 24}, {42, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Blur: + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{187, 20}, {90, 21}} + + + + 2 + _NS:51 + YES + + -2079981824 + 0 + + _NS:51 + + 10 + 0.0 + 3 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + + NSColor pasteboard type + + {{82, 20}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{22, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Shadow: + + + + + + + + + 268 + + NSColor pasteboard type + + {{184, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{124, 23}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Offset: + + + + + + + + + 268 + {{124, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Line: + + + + + + + + + 268 + + NSColor pasteboard type + + {{82, 51}, {44, 23}} + + + + 2 + _NS:3921 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{22, 54}, {60, 17}} + + + + 2 + YES + + 68288064 + 71304192 + Fill: + + + + + + 268 - {{326, 29}, {89, 32}} + {{326, 104}, {89, 32}} + _NS:161 YES 67239424 134217728 Script… - - LucidaGrande - 13 - 1044 - + _NS:161 -2038284033 @@ -66,7 +289,7 @@ 268 - {{17, 84}, {60, 17}} + {{17, 159}, {60, 17}} @@ -77,30 +300,14 @@ Name: - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - + + 268 - {{82, 82}, {327, 22}} + {{82, 157}, {327, 22}} @@ -132,7 +339,7 @@ 268 - {{80, 18}, {227, 18}} + {{80, 93}, {227, 18}} @@ -161,7 +368,7 @@ 268 - {{80, 38}, {227, 18}} + {{80, 113}, {227, 18}} @@ -185,7 +392,7 @@ 268 - {{139, 62}, {51, 14}} + {{139, 137}, {51, 14}} @@ -207,7 +414,7 @@ 268 - {{257, 62}, {119, 14}} + {{257, 137}, {119, 14}} @@ -225,7 +432,7 @@ 268 - {{192, 62}, {66, 14}} + {{192, 137}, {66, 14}} @@ -247,7 +454,7 @@ 268 - {{376, 62}, {36, 14}} + {{376, 137}, {36, 14}} @@ -265,7 +472,7 @@ 268 - {{79, 62}, {58, 14}} + {{79, 137}, {58, 14}} @@ -283,7 +490,7 @@ 268 - {{17, 62}, {60, 14}} + {{17, 137}, {60, 14}} @@ -299,7 +506,7 @@ - {429, 124} + {429, 199} @@ -412,6 +619,86 @@ 38 + + + doFillColorChanged: + + + + 56 + + + + doShadowColorChanged: + + + + 57 + + + + doLineColorChanged: + + + + 58 + + + + doShadowOffsetChanged: + + + + 59 + + + + doShadowBlurRadiusChanged: + + + + 60 + + + + fillColorWell + + + + 61 + + + + lineColorWell + + + + 62 + + + + shadowColorWell + + + + 63 + + + + shadowOffsetSlider + + + + 64 + + + + shadowBlurRadiusSlider + + + + 65 + @@ -454,6 +741,16 @@ + + + + + + + + + + @@ -600,6 +897,112 @@ + + 39 + + + + + + + + 40 + + + + + 41 + + + + + + + + 42 + + + + + + + + 43 + + + + + 44 + + + + + + + + 45 + + + + + 46 + + + + + + + + 47 + + + + + + + + 48 + + + + + + + + 49 + + + + + 50 + + + + + 51 + + + + + 52 + + + + + 53 + + + + + 54 + + + + + 55 + + + @@ -623,8 +1026,25 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -634,7 +1054,7 @@ - 38 + 65 @@ -643,7 +1063,12 @@ NSViewController id + id + id id + id + id + id id @@ -651,10 +1076,30 @@ doEnabledSwitchToggled: id + + doFillColorChanged: + id + + + doLineColorChanged: + id + doScriptEditorButton: id + + doShadowBlurRadiusChanged: + id + + + doShadowColorChanged: + id + + + doShadowOffsetChanged: + id + doVisibleSwitchToggled: id @@ -663,12 +1108,17 @@ NSTextView NSButton + NSColorWell NSTextField + NSColorWell NSTextField NSTextField NSTextField NSTextField NSButton + NSSlider + NSColorWell + NSSlider NSButton @@ -680,10 +1130,18 @@ enabledSwitch NSButton + + fillColorWell + NSColorWell + idField NSTextField + + lineColorWell + NSColorWell + nameField NSTextField @@ -704,6 +1162,18 @@ scriptEditorButton NSButton + + shadowBlurRadiusSlider + NSSlider + + + shadowColorWell + NSColorWell + + + shadowOffsetSlider + NSSlider + visibleSwitch NSButton diff --git a/Presentation/WILDCardViewController.m b/Presentation/WILDCardViewController.m index d03fd4d2..fbc3129b 100644 --- a/Presentation/WILDCardViewController.m +++ b/Presentation/WILDCardViewController.m @@ -244,15 +244,9 @@ -(BOOL) validateMenuItem: (NSMenuItem *)menuItem [menuItem setState: ([menuItem tag] == [[WILDTools sharedTools] currentTool]) ? NSOnState : NSOffState]; return YES; } - else if( [menuItem action] == @selector(showButtonInfoPanel:) ) + else if( [menuItem action] == @selector(showInfoPanel:) ) { - return( [[WILDTools sharedTools] numberOfSelectedClients] > 0 - && [[WILDTools sharedTools] currentTool] == WILDButtonTool ); - } - else if( [menuItem action] == @selector(showFieldInfoPanel:) ) - { - return( [[WILDTools sharedTools] numberOfSelectedClients] > 0 - && [[WILDTools sharedTools] currentTool] == WILDFieldTool ); + return( [[WILDTools sharedTools] numberOfSelectedClients] > 0 ); } else if( [menuItem action] == @selector(bringObjectCloser:) || [menuItem action] == @selector(sendObjectFarther:) @@ -769,31 +763,13 @@ -(void) stackDidChange: (NSNotification*)notif } --(IBAction) showButtonInfoPanel: (id)sender +-(IBAction) showInfoPanel: (id)sender { - NSArray* allSels = [[[WILDTools sharedTools] clients] allObjects]; - for( WILDPartView* currView in allSels ) - { - WILDPart* thePart = [currView part]; - WILDButtonInfoWindowController* buttonInfo = [[[WILDButtonInfoWindowController alloc] initWithPart: thePart ofCardView: (WILDCardView*) [self view]] autorelease]; - [[[[[self view] window] windowController] document] addWindowController: buttonInfo]; - [buttonInfo showWindow: self]; - } + WILDPartView* currView = [[[WILDTools sharedTools] clients] anyObject]; + [currView showInfoPanel: sender]; } --(IBAction) showFieldInfoPanel: (id)sender -{ - NSArray* allSels = [[[WILDTools sharedTools] clients] allObjects]; - for( WILDPartView* currView in allSels ) - { - WILDPart* thePart = [currView part]; - WILDFieldInfoWindowController* fieldInfo = [[[WILDFieldInfoWindowController alloc] initWithPart: thePart ofCardView: (WILDCardView*) [self view]] autorelease]; - [[[[[self view] window] windowController] document] addWindowController: fieldInfo]; - [fieldInfo showWindow: self]; - } -} - -(IBAction) showCardInfoPanel: (id)sender { WILDCardInfoWindowController* cardInfo = [[[WILDCardInfoWindowController alloc] initWithCard: mCurrentCard ofCardView: (WILDCardView*) [self view]] autorelease]; diff --git a/Stacksmith-Info.plist b/Stacksmith-Info.plist index d29c9af4..03a89c27 100644 --- a/Stacksmith-Info.plist +++ b/Stacksmith-Info.plist @@ -80,7 +80,7 @@ NSMainNibFile MainMenu NSPrincipalClass - WILDApplication + NSApplication NSServices SUFeedURL diff --git a/Stacksmith.xcodeproj/project.pbxproj b/Stacksmith.xcodeproj/project.pbxproj index f7641de4..694dd326 100644 --- a/Stacksmith.xcodeproj/project.pbxproj +++ b/Stacksmith.xcodeproj/project.pbxproj @@ -418,7 +418,6 @@ 558DCB5511553EAC002C9195 /* WILDButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 558DCB5411553EAC002C9195 /* WILDButtonCell.m */; }; 558DCD21115571FE002C9195 /* WILDNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 558DCD20115571FE002C9195 /* WILDNotifications.m */; }; 558DCD7E11557B6D002C9195 /* WILDPartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 558DCD7D11557B6D002C9195 /* WILDPartView.m */; }; - 558DCDAB11557E28002C9195 /* WILDApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 558DCDAA11557E28002C9195 /* WILDApplication.m */; }; 558DCFBF1155B9B1002C9195 /* WILDPictureView.m in Sources */ = {isa = PBXBuildFile; fileRef = 558DCFBE1155B9B1002C9195 /* WILDPictureView.m */; }; 558DCFE51156209A002C9195 /* WILDCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 558DCFE41156209A002C9195 /* WILDCardView.m */; }; 558F89E7138B06F900E26275 /* WILDGuidelineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F89E6138B06F900E26275 /* WILDGuidelineView.m */; }; @@ -456,6 +455,8 @@ 55C2B69D115EA2CD008B094D /* NSView+SizeWindowForViewSize.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C2B69C115EA2CD008B094D /* NSView+SizeWindowForViewSize.m */; }; 55C88B011332CDA300ACB615 /* WILDCardInfoWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C88B001332CDA300ACB615 /* WILDCardInfoWindowController.m */; }; 55C88B041332D05B00ACB615 /* WILDCardInfoWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55C88B021332D05B00ACB615 /* WILDCardInfoWindowController.xib */; }; + 55C8D04F13EF0DD700B502C5 /* UKWindowBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8D04E13EF0DD700B502C5 /* UKWindowBodyView.m */; }; + 55C8D05213EF604000B502C5 /* NSColor+ULICGColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8D05113EF604000B502C5 /* NSColor+ULICGColor.m */; }; 55CBB796117BA3A400A0CACF /* WILDCardWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CBB795117BA3A400A0CACF /* WILDCardWindowController.m */; }; 55D30F7F115832AB001C9DEC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55D30F7E115832AB001C9DEC /* Carbon.framework */; }; 55D6B259115C16E700D17619 /* WILDTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 55D6B258115C16E700D17619 /* WILDTextView.m */; }; @@ -1145,8 +1146,6 @@ 558DCD20115571FE002C9195 /* WILDNotifications.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WILDNotifications.m; path = Presentation/WILDNotifications.m; sourceTree = ""; }; 558DCD7C11557B6D002C9195 /* WILDPartView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WILDPartView.h; sourceTree = ""; }; 558DCD7D11557B6D002C9195 /* WILDPartView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WILDPartView.m; sourceTree = ""; }; - 558DCDA911557E28002C9195 /* WILDApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WILDApplication.h; sourceTree = ""; }; - 558DCDAA11557E28002C9195 /* WILDApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WILDApplication.m; sourceTree = ""; }; 558DCFBD1155B9B1002C9195 /* WILDPictureView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WILDPictureView.h; sourceTree = ""; }; 558DCFBE1155B9B1002C9195 /* WILDPictureView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WILDPictureView.m; sourceTree = ""; }; 558DCFE31156209A002C9195 /* WILDCardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WILDCardView.h; sourceTree = ""; }; @@ -1206,6 +1205,10 @@ 55C88AFF1332CDA300ACB615 /* WILDCardInfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WILDCardInfoWindowController.h; sourceTree = ""; }; 55C88B001332CDA300ACB615 /* WILDCardInfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WILDCardInfoWindowController.m; sourceTree = ""; }; 55C88B031332D05B00ACB615 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/WILDCardInfoWindowController.xib; sourceTree = ""; }; + 55C8D04D13EF0DD700B502C5 /* UKWindowBodyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UKWindowBodyView.h; path = ../UliKit/UKWindowBodyView.h; sourceTree = ""; }; + 55C8D04E13EF0DD700B502C5 /* UKWindowBodyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UKWindowBodyView.m; path = ../UliKit/UKWindowBodyView.m; sourceTree = ""; }; + 55C8D05013EF604000B502C5 /* NSColor+ULICGColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSColor+ULICGColor.h"; path = "../UliKit/NSColor+ULICGColor.h"; sourceTree = ""; }; + 55C8D05113EF604000B502C5 /* NSColor+ULICGColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSColor+ULICGColor.m"; path = "../UliKit/NSColor+ULICGColor.m"; sourceTree = ""; }; 55C9F958136E1E940096FC4D /* Sparkle.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sparkle.xcodeproj; path = ../Sparkle/Sparkle.xcodeproj; sourceTree = ""; }; 55CBB794117BA3A400A0CACF /* WILDCardWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WILDCardWindowController.h; path = Document/WILDCardWindowController.h; sourceTree = ""; }; 55CBB795117BA3A400A0CACF /* WILDCardWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WILDCardWindowController.m; path = Document/WILDCardWindowController.m; sourceTree = ""; }; @@ -1361,8 +1364,6 @@ isa = PBXGroup; children = ( 5503472F1370A18800AE7681 /* StacksmithVersion.h */, - 558DCDA911557E28002C9195 /* WILDApplication.h */, - 558DCDAA11557E28002C9195 /* WILDApplication.m */, 552558FC114BDE7C00279B03 /* WILDAppDelegate.h */, 552558FD114BDE7C00279B03 /* WILDAppDelegate.m */, 55ED946F131D930500DB60D6 /* WILDLicensePanelController.h */, @@ -1762,6 +1763,10 @@ 55ACBBA0132291AD0088609D /* NSWindow+ULIZoomEffect.m */, 55D794BD134E700600FA2DA4 /* NSWindow+centerHorizontallyAndVertically.h */, 55D794BE134E700600FA2DA4 /* NSWindow+centerHorizontallyAndVertically.m */, + 55C8D04D13EF0DD700B502C5 /* UKWindowBodyView.h */, + 55C8D04E13EF0DD700B502C5 /* UKWindowBodyView.m */, + 55C8D05013EF604000B502C5 /* NSColor+ULICGColor.h */, + 55C8D05113EF604000B502C5 /* NSColor+ULICGColor.m */, ); name = Utilities; sourceTree = ""; @@ -2705,7 +2710,6 @@ 558DCB5511553EAC002C9195 /* WILDButtonCell.m in Sources */, 558DCD21115571FE002C9195 /* WILDNotifications.m in Sources */, 558DCD7E11557B6D002C9195 /* WILDPartView.m in Sources */, - 558DCDAB11557E28002C9195 /* WILDApplication.m in Sources */, 558DCFBF1155B9B1002C9195 /* WILDPictureView.m in Sources */, 558DCFE51156209A002C9195 /* WILDCardView.m in Sources */, 55E509E71156B06D001D0762 /* ULIMultiMap.m in Sources */, @@ -2836,6 +2840,8 @@ 55E9FD9913E747B20089B81F /* WILDIconPickerViewController.m in Sources */, 5585034013E8866300FD244C /* WILDFieldInfoViewController.m in Sources */, 5585034313E8867200FD244C /* WILDMoviePlayerInfoViewController.m in Sources */, + 55C8D04F13EF0DD700B502C5 /* UKWindowBodyView.m in Sources */, + 55C8D05213EF604000B502C5 /* NSColor+ULICGColor.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WILDAppDelegate.h b/WILDAppDelegate.h index 1cd9e8f6..e82b536a 100644 --- a/WILDAppDelegate.h +++ b/WILDAppDelegate.h @@ -13,6 +13,7 @@ { BOOL mPeeking; BOOL mBackgroundEditMode; + id mFlagsChangedEventMonitor; } diff --git a/WILDAppDelegate.m b/WILDAppDelegate.m index 9b1ce7e1..7894ddc7 100644 --- a/WILDAppDelegate.m +++ b/WILDAppDelegate.m @@ -27,7 +27,6 @@ @implementation WILDAppDelegate - -(void) initializeParser { LEOInitInstructionArray(); @@ -57,9 +56,40 @@ -(void) initializeParser #endif } + +-(NSEvent*) handleFlagsChangedEvent: (NSEvent*)inEvent +{ + if( !mPeeking && ([inEvent modifierFlags] & NSAlternateKeyMask) + && ([inEvent modifierFlags] & NSCommandKeyMask) ) + { + mPeeking = YES; + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPeekingStateChangedNotification + object: nil userInfo: + [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithBool: mPeeking], WILDPeekingStateKey, + nil]]; + } + else if( mPeeking ) + { + mPeeking = NO; + [[NSNotificationCenter defaultCenter] postNotificationName: WILDPeekingStateChangedNotification + object: nil userInfo: + [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithBool: mPeeking], WILDPeekingStateKey, + nil]]; + } + + return inEvent; +} + + -(void) applicationWillFinishLaunching:(NSNotification *)notification { [self initializeParser]; + + mFlagsChangedEventMonitor = [[NSEvent addLocalMonitorForEventsMatchingMask: NSFlagsChangedMask handler: ^(NSEvent* inEvent){ return [self handleFlagsChangedEvent: inEvent]; }] retain]; + + [[NSColorPanel sharedColorPanel] setShowsAlpha: YES]; } -(void) applicationDidFinishLaunching:(NSNotification *)notification // This gets called *after* application:openFile: diff --git a/WILDPart.h b/WILDPart.h index 18a8b9df..60e0e742 100644 --- a/WILDPart.h +++ b/WILDPart.h @@ -63,6 +63,10 @@ WILDObjectID mIconID; NSInteger mFamily; NSColor* mFillColor; + NSColor* mLineColor; + NSColor* mShadowColor; + NSSize mShadowOffset; + CGFloat mShadowBlurRadius; NSInteger mBevel; WILDLayer* mOwner; // Layer that this part belongs to. WILDStack* mStack; // Stack this part belongs to. @@ -85,6 +89,11 @@ @property (assign) BOOL hasVerticalScroller; @property (copy) NSString* mediaPath; @property (assign) QTTime currentTime; +@property (retain) NSColor* lineColor; +@property (retain) NSColor* fillColor; +@property (retain) NSColor* shadowColor; +@property (assign) NSSize shadowOffset; +@property (assign) CGFloat shadowBlurRadius; -(id) initWithXMLElement: (NSXMLElement*)elem forStack: (WILDStack*)inStack; diff --git a/WILDPart.m b/WILDPart.m index 4b7c2c91..2bbc3a9b 100644 --- a/WILDPart.m +++ b/WILDPart.m @@ -43,6 +43,11 @@ @implementation WILDPart @synthesize currentTime = mCurrentTime; @synthesize hasHorizontalScroller = mHasHorizontalScroller; @synthesize hasVerticalScroller = mHasVerticalScroller; +@synthesize lineColor = mLineColor; +@synthesize fillColor = mFillColor; +@synthesize shadowColor = mShadowColor; +@synthesize shadowOffset = mShadowOffset; +@synthesize shadowBlurRadius = mShadowBlurRadius; -(id) initWithXMLElement: (NSXMLElement*)elem forStack: (WILDStack*)inStack { @@ -100,6 +105,20 @@ -(id) initWithXMLElement: (NSXMLElement*)elem forStack: (WILDStack*)inStack mIconID = WILDIntegerFromSubElementInElement( @"icon", elem ); mControllerVisible = WILDBoolFromSubElementInElement( @"controllerVisible", elem, NO ); + mFillColor = [WILDColorFromSubElementInElement( @"fillColor", elem ) retain]; + if( !mFillColor ) + mFillColor = [[NSColor whiteColor] retain]; + mLineColor = [WILDColorFromSubElementInElement( @"lineColor", elem ) retain]; + if( !mLineColor ) + mLineColor = [[NSColor blackColor] retain]; + mShadowColor = [WILDColorFromSubElementInElement( @"shadowColor", elem ) retain]; + if( !mShadowColor ) + mShadowColor = [[NSColor clearColor] retain]; + mShadowOffset = WILDSizeFromSubElementInElement( @"shadowOffset", elem ); + mShadowBlurRadius = WILDIntegerFromSubElementInElement( @"shadowBlurRadius", elem ); + if( mShadowBlurRadius < 0 ) + mShadowBlurRadius = 0; + mIDForScripts = kLEOObjectIDINVALID; } @@ -117,6 +136,8 @@ -(void) dealloc DESTROY_DEALLOC(mTextFontName); DESTROY_DEALLOC(mTextStyles); DESTROY_DEALLOC(mFillColor); + DESTROY_DEALLOC(mLineColor); + DESTROY_DEALLOC(mShadowColor); DESTROY_DEALLOC(mMediaPath); mStack = UKInvalidPointer; @@ -936,34 +957,39 @@ -(NSString*) xmlString [outString appendString: @"\t\n"]; - [outString appendFormat: @"\t\t%ld\n", mID]; - [outString appendFormat: @"\t\t%@\n", [self partType]]; - [outString appendFormat: @"\t\t%@\n", mLayer]; - [outString appendFormat: @"\t\t%@\n", (mVisible ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mEnabled ? @"" : @"")]; - [outString appendFormat: @"\t\t\n\t\t\t%d\n\t\t\t%d\n\t\t\t%d\n\t\t\t%d\n\t\t\n", - (int)NSMinX(mRectangle), (int)NSMinY(mRectangle), (int)NSMaxX(mRectangle), (int)NSMaxY(mRectangle)]; - [outString appendFormat: @"\t\t\n", [self style]]; - [outString appendFormat: @"\t\t%@\n", (mShowName ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mHighlight ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mAutoHighlight ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mSharedHighlight ? @"" : @"")]; - [outString appendFormat: @"\t\t%d\n", mFamily]; - [outString appendFormat: @"\t\t%d\n", mTitleWidth]; - [outString appendFormat: @"\t\t%ld\n", mIconID]; - - [outString appendFormat: @"\t\t%@\n", (mDontWrap ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mDontSearch ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mSharedText ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mFixedLineHeight ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mAutoTab ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mLockText ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mAutoSelect ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mMultipleLines ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mShowLines ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mWideMargins ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", QTStringFromTime(mCurrentTime)]; - [outString appendFormat: @"\t\t%@\n", (mControllerVisible ? @"" : @"")]; + WILDAppendLongLongXML( outString, 2, mID, @"id" ); + WILDAppendStringXML( outString, 2, [self partType], @"type" ); + WILDAppendStringXML( outString, 2, mLayer, @"layer" ); + WILDAppendBoolXML( outString, 2, mVisible, @"visible" ); + WILDAppendBoolXML( outString, 2, mEnabled, @"enabled" ); + WILDAppendRectXML( outString, 2, mRectangle, @"rect" ); + WILDAppendStringXML( outString, 2, [self style], @"style" ); + WILDAppendBoolXML( outString, 2, mShowName, @"showName" ); + WILDAppendBoolXML( outString, 2, mHighlight, @"highlight" ); + WILDAppendBoolXML( outString, 2, mAutoHighlight, @"autoHighlight" ); + WILDAppendBoolXML( outString, 2, mSharedHighlight, @"sharedHighlight" ); + WILDAppendLongXML( outString, 2, mFamily, @"family" ); + WILDAppendLongXML( outString, 2, mTitleWidth, @"titleWidth" ); + WILDAppendLongLongXML( outString, 2, mIconID, @"icon" ); + + WILDAppendBoolXML( outString, 2, mDontWrap, @"dontWrap" ); + WILDAppendBoolXML( outString, 2, mDontSearch, @"dontSearch" ); + WILDAppendBoolXML( outString, 2, mSharedText, @"sharedText" ); + WILDAppendBoolXML( outString, 2, mFixedLineHeight, @"fixedLineHeight" ); + WILDAppendBoolXML( outString, 2, mAutoTab, @"autoTab" ); + WILDAppendBoolXML( outString, 2, mLockText, @"lockText" ); + WILDAppendBoolXML( outString, 2, mAutoSelect, @"autoSelect" ); + WILDAppendBoolXML( outString, 2, mMultipleLines, @"multipleLines" ); + WILDAppendBoolXML( outString, 2, mShowLines, @"showLines" ); + WILDAppendBoolXML( outString, 2, mWideMargins, @"wideMargins" ); + WILDAppendStringXML( outString, 2, QTStringFromTime(mCurrentTime), @"currentTime" ); + WILDAppendBoolXML( outString, 2, mControllerVisible, @"controllerVisible" ); + + WILDAppendColorXML( outString, 2, mFillColor, @"fillColor" ); + WILDAppendColorXML( outString, 2, mLineColor, @"lineColor" ); + WILDAppendColorXML( outString, 2, mShadowColor, @"shadowColor" ); + WILDAppendSizeXML( outString, 2, mShadowOffset, @"shadowOffset" ); + WILDAppendLongXML( outString, 2, mShadowBlurRadius, @"shadowBlurRadius" ); if( [mSelectedLines count] > 0 ) { @@ -971,7 +997,7 @@ -(NSString*) xmlString NSInteger lineIdx = [mSelectedLines firstIndex]; do { - [outString appendFormat: @"\t\t\t%ld\n", lineIdx +1]; + WILDAppendLongXML( outString, 3, lineIdx +1, @"integer" ); } while( (lineIdx = [mSelectedLines indexGreaterThanIndex: lineIdx]) != NSNotFound ); [outString appendString: @"\t\t\n"]; @@ -982,24 +1008,20 @@ -(NSString*) xmlString textAlignment = @"center"; if( mTextAlignment == NSRightTextAlignment ) textAlignment = @"right"; - [outString appendFormat: @"\t\t%@\n", textAlignment]; - [outString appendFormat: @"\t\t%@\n", mTextFontName]; - [outString appendFormat: @"\t\t%d\n", mTextFontSize]; + WILDAppendStringXML( outString, 2, textAlignment, @"textAlign" ); + WILDAppendStringXML( outString, 2, mTextFontName, @"font" ); + WILDAppendLongXML( outString, 2, mTextFontSize, @"textSize" ); for( NSString* styleName in mTextStyles ) - [outString appendFormat: @"\t\t%@\n", styleName]; - [outString appendFormat: @"\t\t%@\n", (mHasHorizontalScroller ? @"" : @"")]; - [outString appendFormat: @"\t\t%@\n", (mHasVerticalScroller ? @"" : @"")]; - - NSMutableString* nameStr = WILDStringEscapedForXML(mName); - [outString appendFormat: @"\t\t%@\n", nameStr]; - - NSMutableString* mediaPathStr = WILDStringEscapedForXML(mMediaPath); - if( [mediaPathStr length] > 0 ) - [outString appendFormat: @"\t\t%@\n", mediaPathStr]; - - NSMutableString* scriptStr = WILDStringEscapedForXML(mScript); - [outString appendFormat: @"\t\t\n", scriptStr]; + WILDAppendStringXML( outString, 2, styleName, @"textStyle" ); + WILDAppendBoolXML( outString, 2, mHasHorizontalScroller, @"hasHorizontalScroller" ); + WILDAppendBoolXML( outString, 2, mHasVerticalScroller, @"hasVerticalScroller" ); + WILDAppendStringXML( outString, 2, mName, @"name" ); + if( [mMediaPath length] > 0 ) + WILDAppendStringXML( outString, 2, mMediaPath, @"mediaPath" ); + + WILDAppendStringXML( outString, 2, mScript, @"script" ); + [outString appendString: @"\t\n"]; return outString; diff --git a/WILDPartView.m b/WILDPartView.m index 78d3fd72..afebae6a 100644 --- a/WILDPartView.m +++ b/WILDPartView.m @@ -24,6 +24,7 @@ #import "WILDButtonView.h" #import "WILDScrollView.h" #import "WILDMovieView.h" +#import "NSColor+ULICGColor.h" #import #import @@ -311,19 +312,40 @@ -(NSRect) layoutRectForRect: (NSRect)newBox NSString* theStyle = [mPart style]; if( [[mPart partType] isEqualToString: @"moviePlayer"] ) ; // No special behaviours for movie players. - else if( [theStyle isEqualToString: @"default"] || [theStyle isEqualToString: @"standard"] ) - { - layoutBox.origin.x += 6; - layoutBox.origin.y += 5; - layoutBox.size.width -= 12; - layoutBox.size.height -= 7; - } - else if( [theStyle isEqualToString: @"popup"] ) + else if( [[mPart partType] isEqualToString: @"field"] ) + ; // No special behaviours for movie players. + else if( [[mPart partType] isEqualToString: @"button"] ) { - layoutBox.origin.x += 3 +[mPart titleWidth]; - layoutBox.origin.y += 3; - layoutBox.size.width -= 6 +[mPart titleWidth]; - layoutBox.size.height -= 6; + if( [theStyle isEqualToString: @"default"] || [theStyle isEqualToString: @"standard"] ) + { + #if 0 + layoutBox.origin.x += 6; + layoutBox.origin.y += 5; + layoutBox.size.width -= 12; + layoutBox.size.height -= 7; + #else + NSEdgeInsets insets = [mMainView alignmentRectInsets]; + layoutBox.origin.x += insets.left; + layoutBox.origin.y += 3; + layoutBox.size.height -= 3; + layoutBox.size.width -= insets.left +insets.right; + #endif + } + else if( [theStyle isEqualToString: @"popup"] ) + { + #if 0 + layoutBox.origin.x += 3 +[mPart titleWidth]; + layoutBox.origin.y += 3; + layoutBox.size.width -= 6 +[mPart titleWidth]; + layoutBox.size.height -= 6; + #else + NSEdgeInsets insets = [mMainView alignmentRectInsets]; + layoutBox.origin.x += [mPart titleWidth] +insets.left; + layoutBox.origin.y += 3; + layoutBox.size.height -= 3; + layoutBox.size.width -= insets.left +insets.right +[mPart titleWidth]; + #endif + } } return layoutBox; @@ -750,6 +772,30 @@ -(void) resizeViewUsingHandle: (WILDPartGrabHandle)inHandle } +-(IBAction) showInfoPanel: (id)sender +{ + [mCurrentPopover close]; + DESTROY(mCurrentPopover); + + NSViewController* infoController = nil; + if( [[mPart partType] isEqualToString: @"button"] ) + infoController = [[WILDButtonInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; + else if( [[mPart partType] isEqualToString: @"field"] ) + infoController = [[WILDFieldInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; + else if( [[mPart partType] isEqualToString: @"moviePlayer"] ) + infoController = [[WILDMoviePlayerInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; + else + infoController = [[WILDPartInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; + [infoController autorelease]; + + mCurrentPopover = [[NSPopover alloc] init]; + [mCurrentPopover setBehavior: NSPopoverBehaviorTransient]; + [mCurrentPopover setDelegate: self]; + [mCurrentPopover setContentViewController: infoController]; + [mCurrentPopover showRelativeToRect: self.bounds ofView: self preferredEdge: NSMinYEdge]; +} + + -(void) mouseDown: (NSEvent*)event { BOOL isMyTool = [self myToolIsCurrent]; @@ -766,25 +812,7 @@ -(void) mouseDown: (NSEvent*)event if( [event clickCount] == 2 && mSelected ) { - [mCurrentPopover close]; - DESTROY(mCurrentPopover); - - NSViewController* infoController = nil; - if( [[mPart partType] isEqualToString: @"button"] ) - infoController = [[WILDButtonInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; - else if( [[mPart partType] isEqualToString: @"field"] ) - infoController = [[WILDFieldInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; - else if( [[mPart partType] isEqualToString: @"moviePlayer"] ) - infoController = [[WILDMoviePlayerInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; - else - infoController = [[WILDPartInfoViewController alloc] initWithPart: mPart ofCardView: [self enclosingCardView]]; - [infoController autorelease]; - - mCurrentPopover = [[NSPopover alloc] init]; - [mCurrentPopover setBehavior: NSPopoverBehaviorTransient]; - [mCurrentPopover setDelegate: self]; - [mCurrentPopover setContentViewController: infoController]; - [mCurrentPopover showRelativeToRect: self.bounds ofView: self preferredEdge: NSMinYEdge]; + [self showInfoPanel: self]; } else { @@ -1064,7 +1092,7 @@ -(void) currentToolDidChange: (NSNotification*)notification -(void) savePart { if( [[mPart partType] isEqualToString: @"moviePlayer"] ) - [mPart setCurrentTime: [[mMainView movie] currentTime]]; + [mPart setCurrentTime: [(QTMovie*)[mMainView movie] currentTime]]; } @@ -1143,6 +1171,18 @@ -(void) loadPopupButton: (WILDPart*)currPart withCardContents: (WILDPartContents [bt setAction: @selector(updateOnClick:)]; [bt setEnabled: [currPart isEnabled]]; + NSColor * shadowColor = [currPart shadowColor]; + if( [shadowColor alphaComponent] > 0.0 ) + { + CGColorRef theColor = [shadowColor CGColor]; + [[self layer] setShadowColor: theColor]; + [[self layer] setShadowOpacity: 1.0]; + [[self layer] setShadowOffset: [currPart shadowOffset]]; + [[self layer] setShadowRadius: [currPart shadowBlurRadius]]; + } + else + [[self layer] setShadowOpacity: 0.0]; + NSArray* popupItems = ([contents text] != nil) ? [contents listItems] : [bgContents listItems]; for( NSString* itemName in popupItems ) { @@ -1219,32 +1259,14 @@ -(void) loadPushButton: (WILDPart*)currPart withCardContents: (WILDPartContents* [bt setButtonType: NSMomentaryPushInButton]; } else if( [[currPart style] isEqualToString: @"rectangle"] - || [[currPart style] isEqualToString: @"shadow"] || [[currPart style] isEqualToString: @"roundrect"] || [[currPart style] isEqualToString: @"oval"] ) { WILDButtonCell* ourCell = [[[WILDButtonCell alloc] initTextCell: @""] autorelease]; [bt setCell: ourCell]; - [[bt cell] setBackgroundColor: [NSColor whiteColor]]; + [[bt cell] setBackgroundColor: [currPart fillColor]]; [bt setBordered: YES]; - - if( [[currPart style] isEqualToString: @"shadow"] - || [[currPart style] isEqualToString: @"roundrect"] ) - { - CGColorRef theColor = CGColorCreateGenericRGB( 0.4, 0.4, 0.4, 1.0 ); - [[bt layer] setShadowColor: theColor]; - [[bt layer] setShadowOpacity: 0.8]; - [[bt layer] setShadowOffset: CGSizeMake( 1, -1 )]; - [[bt layer] setShadowRadius: 0.0]; - CFRelease( theColor ); - - // Compensate for shadow - partRect.size.width -= 1; - partRect.size.height -= 1; - partRect.origin.y += 1; - [bt setFrame: partRect]; - } - + if( [[currPart style] isEqualToString: @"roundrect"] || [[currPart style] isEqualToString: @"standard"] || [[currPart style] isEqualToString: @"default"] ) @@ -1282,6 +1304,18 @@ -(void) loadPushButton: (WILDPart*)currPart withCardContents: (WILDPartContents* canHaveIcon = NO; } + NSColor * shadowColor = [currPart shadowColor]; + if( [shadowColor alphaComponent] > 0.0 ) + { + CGColorRef theColor = [shadowColor CGColor]; + [[self layer] setShadowColor: theColor]; + [[self layer] setShadowOpacity: 1.0]; + [[self layer] setShadowOffset: [currPart shadowOffset]]; + [[self layer] setShadowRadius: [currPart shadowBlurRadius]]; + } + else + [[self layer] setShadowOpacity: 0.0]; + [bt setFont: [currPart textFont]]; if( [currPart showName] ) [bt setTitle: [currPart name]]; @@ -1374,24 +1408,20 @@ -(void) loadEditField: (WILDPart*)currPart withCardContents: (WILDPartContents*) [sv setBorderType: NSNoBorder]; [sv setDrawsBackground: NO]; [tv setDrawsBackground: NO]; - [sv setHasVerticalScroller: NO]; } else if( [[currPart style] isEqualToString: @"opaque"] ) { [sv setBorderType: NSNoBorder]; - [sv setHasVerticalScroller: NO]; [sv setBackgroundColor: [NSColor whiteColor]]; } else if( [[currPart style] isEqualToString: @"standard"] ) { [sv setBorderType: NSBezelBorder]; - [sv setHasVerticalScroller: NO]; [sv setBackgroundColor: [NSColor whiteColor]]; } else if( [[currPart style] isEqualToString: @"roundrect"] ) { [sv setBorderType: NSBezelBorder]; - [sv setHasVerticalScroller: NO]; [sv setBackgroundColor: [NSColor whiteColor]]; } else if( [[currPart style] isEqualToString: @"scrolling"] ) @@ -1399,34 +1429,29 @@ -(void) loadEditField: (WILDPart*)currPart withCardContents: (WILDPartContents*) txBox.size.width -= 15; [sv setBorderType: NSLineBorder]; [sv setBackgroundColor: [NSColor whiteColor]]; - [sv setHasVerticalScroller: YES]; } else { - if( [[currPart style] isEqualToString: @"shadow"] ) - { - CGColorRef theColor = CGColorCreateGenericRGB( 0.4, 0.4, 0.4, 1.0 ); - [[sv layer] setShadowColor: theColor]; - [[sv layer] setShadowOpacity: 0.8]; - [[sv layer] setShadowOffset: CGSizeMake( 2, -2 )]; - [[sv layer] setShadowRadius: 0.0]; - CFRelease( theColor ); - - txBox.size.width -= 2; - txBox.size.height -= 2; - txBox.origin.y += 2; - - partRect.size.width -= 2; - partRect.size.height -= 2; - partRect.origin.y += 2; - [sv setFrame: partRect]; - } [sv setBorderType: NSLineBorder]; [sv setBackgroundColor: [NSColor whiteColor]]; - [sv setHasVerticalScroller: [currPart hasVerticalScroller]]; - [sv setHasHorizontalScroller: [currPart hasHorizontalScroller]]; } - [sv setHasHorizontalScroller: NO]; + [sv setVerticalScrollElasticity: [currPart hasVerticalScroller] ? NSScrollElasticityAutomatic : NSScrollElasticityNone]; + [sv setHasVerticalScroller: [currPart hasVerticalScroller]]; + [sv setHorizontalScrollElasticity: [currPart hasHorizontalScroller] ? NSScrollElasticityAutomatic : NSScrollElasticityNone]; + [sv setHasHorizontalScroller: [currPart hasHorizontalScroller]]; + + NSColor * shadowColor = [currPart shadowColor]; + if( [shadowColor alphaComponent] > 0.0 ) + { + CGColorRef theColor = [shadowColor CGColor]; + [[sv layer] setShadowColor: theColor]; + [[sv layer] setShadowOpacity: 1.0]; + [[sv layer] setShadowOffset: [currPart shadowOffset]]; + [[sv layer] setShadowRadius: [currPart shadowBlurRadius]]; + } + else + [[sv layer] setShadowOpacity: 0.0]; + [tv setFrame: txBox]; [sv setDocumentView: tv]; [sv setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; @@ -1490,30 +1515,33 @@ -(void) loadListField: (WILDPart*)currPart withCardContents: (WILDPartContents*) [sv setBorderType: NSNoBorder]; [tv setBackgroundColor: [NSColor whiteColor]]; } - else if( [[currPart style] isEqualToString: @"scrolling"] ) + else if( [[currPart style] isEqualToString: @"standard"] ) { - txBox.size.width -= 15; - [sv setBorderType: NSLineBorder]; + [sv setBorderType: NSBezelBorder]; [tv setBackgroundColor: [NSColor whiteColor]]; - [sv setHasVerticalScroller: YES]; } else { - if( [[currPart style] isEqualToString: @"shadow"] ) - { - CGColorRef theColor = CGColorCreateGenericRGB( 0.4, 0.4, 0.4, 1.0 ); - [[sv layer] setShadowColor: theColor]; - [[sv layer] setShadowOpacity: 0.8]; - [[sv layer] setShadowOffset: CGSizeMake( 2, -2 )]; - [[sv layer] setShadowRadius: 0.0]; - CFRelease( theColor ); - } [sv setBorderType: NSLineBorder]; [sv setBackgroundColor: [NSColor whiteColor]]; - [sv setHasVerticalScroller: NO]; } - [sv setHasHorizontalScroller: [currPart hasHorizontalScroller]]; + [sv setVerticalScrollElasticity: [currPart hasVerticalScroller] ? NSScrollElasticityAutomatic : NSScrollElasticityNone]; [sv setHasVerticalScroller: [currPart hasVerticalScroller]]; + [sv setHorizontalScrollElasticity: [currPart hasHorizontalScroller] ? NSScrollElasticityAutomatic : NSScrollElasticityNone]; + [sv setHasHorizontalScroller: [currPart hasHorizontalScroller]]; + + NSColor * shadowColor = [currPart shadowColor]; + if( [shadowColor alphaComponent] > 0.0 ) + { + CGColorRef theColor = [shadowColor CGColor]; + [[sv layer] setShadowColor: theColor]; + [[sv layer] setShadowOpacity: 1.0]; + [[sv layer] setShadowOffset: [currPart shadowOffset]]; + [[sv layer] setShadowRadius: [currPart shadowBlurRadius]]; + } + else + [[sv layer] setShadowOpacity: 0.0]; + [tv setFrame: txBox]; [tc setWidth: txBox.size.width]; [tc setMaxWidth: 1000000.0]; @@ -1540,8 +1568,8 @@ -(void) loadField: (WILDPart*)currPart withCardContents: (WILDPartContents*)cont [self loadListField: currPart withCardContents: contents withBgContents: bgContents forBackgroundEditing: backgroundEditMode]; } else if( [[currPart style] isEqualToString: @"transparent"] || [[currPart style] isEqualToString: @"opaque"] - || [[currPart style] isEqualToString: @"rectangle"] || [[currPart style] isEqualToString: @"shadow"] - || [[currPart style] isEqualToString: @"scrolling"] || [[currPart style] isEqualToString: @"standard"] + || [[currPart style] isEqualToString: @"rectangle"] + || [[currPart style] isEqualToString: @"standard"] || [[currPart style] isEqualToString: @"roundrect"] ) { [self loadEditField: currPart withCardContents: contents withBgContents: bgContents forBackgroundEditing: backgroundEditMode]; @@ -1570,6 +1598,19 @@ -(void) loadMoviePlayer: (WILDPart*)currPart withCardContents: (WILDPartContents QTMovie * mov = [QTMovie movieWithFile: movPath error: &outError]; [mov setCurrentTime: [currPart currentTime]]; [mpv setMovie: mov]; + + NSColor * shadowColor = [currPart shadowColor]; + if( [shadowColor alphaComponent] > 0.0 ) + { + CGColorRef theColor = [shadowColor CGColor]; + [[self layer] setShadowColor: theColor]; + [[self layer] setShadowOpacity: 1.0]; + [[self layer] setShadowOffset: [currPart shadowOffset]]; + [[self layer] setShadowRadius: [currPart shadowBlurRadius]]; + } + else + [[self layer] setShadowOpacity: 0.0]; + [mpv setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; [mpv setPreservesAspectRatio: YES]; [mpv setControllerVisible: [currPart controllerVisible]];