2009-02-22 22:28:09 +00:00
|
|
|
//
|
|
|
|
// PositionSlider.m
|
|
|
|
// Cog
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 2/22/09.
|
|
|
|
// Copyright 2009 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "PositionSlider.h"
|
|
|
|
#import "TimeField.h"
|
|
|
|
|
|
|
|
@implementation PositionSlider
|
|
|
|
|
|
|
|
- (void)setDoubleValue:(double)value
|
|
|
|
{
|
2021-05-08 22:13:49 +00:00
|
|
|
self.positionTextField.currentTime = (long)value;
|
2021-01-25 20:17:57 +00:00
|
|
|
|
|
|
|
[super setDoubleValue:value];
|
2009-02-22 22:28:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)setMaxValue:(double)value
|
|
|
|
{
|
2021-05-08 22:13:49 +00:00
|
|
|
self.positionTextField.duration = (long)value;
|
2021-01-25 20:17:57 +00:00
|
|
|
|
|
|
|
[super setMaxValue:value];
|
2009-02-22 22:28:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)mouseDragged:(NSEvent *)theEvent
|
|
|
|
{
|
2021-05-08 22:13:49 +00:00
|
|
|
self.positionTextField.currentTime = (long)[self doubleValue];
|
2021-01-25 20:17:57 +00:00
|
|
|
|
|
|
|
[super mouseDragged:theEvent];
|
2009-02-22 22:28:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|