home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------------------------------
- //
- // AnalogClockInspector
- //
- // Inherits From: ClockInspector
- //
- // Declared In: AnalogClockInspector.h
- //
- // Disclaimer
- //
- // You may freely copy, distribute and reuse this software and its
- // associated documentation. I disclaim any warranty of any kind,
- // expressed or implied, as to its fitness for any particular use.
- //
- //----------------------------------------------------------------------------------------------------
- #import "AnalogClockInspector.h"
- #import "AnalogClock.h"
-
-
- @implementation AnalogClockInspector
-
- //----------------------------------------------------------------------------------------------------
- // Private Methods
- //----------------------------------------------------------------------------------------------------
- + (const char*) _nib
- {
- return "AnalogClockInspector";
- }
-
-
- - _validateOptions
- {
- [[options findCellWithTag:1] setEnabled: [[options findCellWithTag: 0] state]];
- return self;
- }
-
-
- //----------------------------------------------------------------------------------------------------
- // Reverting Attributes
- //----------------------------------------------------------------------------------------------------
- - revertOptions
- {
- [[options findCellWithTag:0] setState:[object isDisplayEnabled]];
- [[options findCellWithTag:1] setState:[object wantsSeconds]];
- [[options findCellWithTag: 2] setState:[object isDraggable]];
- [[options findCellWithTag: 3] setState:[object willAcceptDrop]];
- [[options findCellWithTag: 4] setState:[object _timerMode]];
- [[options findCellWithTag: 5] setState:[object activateOnAwake]];
- [self _validateOptions];
- return self;
- }
-
-
- - revertDisplay
- {
- [colorOrImage selectCellWithTag: [object _backgroundIsColor]];
- [backgroundColor setColor: [object backgroundColor]];
- [backgroundImage image: [object backgroundImage]];
- [clockfaceimage image: [object clockFace]];
- [hourAndMinuteHandcolor setColor: [object hourAndMinuteHandColor]];
- [secondHandcolor setColor: [object secondHandColor]];
- return self;
- }
-
-
- //----------------------------------------------------------------------------------------------------
- // Setting Attributes
- //----------------------------------------------------------------------------------------------------
- - setClockOptions: sender
- {
- [object setDisplayEnabled: [[options findCellWithTag:0] state]];
- [object wantsSeconds: [[options findCellWithTag:1] state]];
- [object isDraggable: [[options findCellWithTag:2] state]];
- [object willAcceptDrop: [[options findCellWithTag:3] state]];
- [object _timerMode: [[options findCellWithTag:4] state]];
- [object activateOnAwake: [[options findCellWithTag:5] state]];
- [self _validateOptions];
- return [self ok:nil];
- }
-
-
- - setClockFaceImage: sender
- {
- [object clockFace: [clockfaceimage image]];
- return [self ok:nil];
- }
-
-
- - setHourAndMinuteHandColor: sender
- {
- [object hourAndMinuteHandColor: [sender color]];
- return [self ok:nil];
- }
-
-
- - setSecondHandColor: sender
- {
- [object secondHandColor: [sender color]];
- return [self ok:nil];
- }
-
-
- @end