1 /*****************************************************************************
2 * fspanel.m: MacOS X full screen panel
3 *****************************************************************************
4 * Copyright (C) 2006-2013 VLC authors and VideoLAN
7 * Authors: Jérôme Decoodt <djc at videolan dot org>
8 * Felix Paul Kühne <fkuehne at videolan dot org>
9 * David Fuhrmann <david dot fuhrmann at googlemail dot com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
26 /*****************************************************************************
28 *****************************************************************************/
30 #import "CoreInteraction.h"
31 #import "MainWindow.h"
34 #import "CompatibilityFixes.h"
36 @interface VLCFSPanel ()
40 /*****************************************************************************
42 *****************************************************************************/
43 @implementation VLCFSPanel
44 /* We override this initializer so we can set the NSBorderlessWindowMask styleMask, and set a few other important settings */
45 - (id)initWithContentRect:(NSRect)contentRect
46 styleMask:(NSUInteger)aStyle
47 backing:(NSBackingStoreType)bufferingType
50 id win = [super initWithContentRect:contentRect styleMask:NSTexturedBackgroundWindowMask backing:bufferingType defer:flag];
55 self.contentView = [[VLCFSPanelView alloc] initWithFrame:contentRect];
57 [win setHasShadow: NO];
58 [win setBackgroundColor:[NSColor clearColor]];
59 if (!OSX_SNOW_LEOPARD)
60 [win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
62 /* let the window sit on top of everything else and start out completely transparent */
63 [win setLevel:NSModalPanelWindowLevel];
64 i_device = config_GetInt(VLCIntf, "macosx-vdev");
65 hideAgainTimer = fadeTimer = nil;
66 [self setFrameAutosaveName:@"fspanel"];
67 [self setNonActive:nil];
69 [self setContentView:[[VLCFSPanelView alloc] initWithFrame: [self frame]]];
70 BOOL isInside = (NSPointInRect([NSEvent mouseLocation],[self frame]));
71 [[self contentView] addTrackingRect:[[self contentView] bounds] owner:self userData:nil assumeInside:isInside];
73 [self mouseEntered:NULL];
75 [self mouseExited:NULL];
77 if (!OSX_SNOW_LEOPARD)
78 [self setAnimationBehavior:NSWindowAnimationBehaviorNone];
80 /* get a notification if VLC isn't the active app anymore */
81 [[NSNotificationCenter defaultCenter]
83 selector: @selector(setNonActive:)
84 name: NSApplicationDidResignActiveNotification
87 /* Get a notification if VLC is the active app again.
88 Needed as becomeKeyWindow does not get called when window is activated by clicking */
89 [[NSNotificationCenter defaultCenter]
91 selector: @selector(setActive:)
92 name: NSApplicationDidBecomeActiveNotification
98 /* make sure that we don't become key, since we can't handle hotkeys */
99 - (BOOL)canBecomeKeyWindow
104 - (BOOL)mouseDownCanMoveWindow
111 [[NSNotificationCenter defaultCenter] removeObserver: self];
113 if (hideAgainTimer) {
114 [hideAgainTimer invalidate];
115 [hideAgainTimer release];
119 [o_vout_window release];
121 [self setFadeTimer:nil];
127 /* centre the panel in the lower third of the screen */
128 NSPoint theCoordinate;
129 NSRect theScreensFrame;
130 NSRect theWindowsFrame;
133 /* user-defined screen */
134 screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)i_device];
137 /* invalid preferences or none specified, using main screen */
138 screen = [NSScreen mainScreen];
140 theScreensFrame = [screen frame];
141 theWindowsFrame = [self frame];
143 theCoordinate.x = (theScreensFrame.size.width - theWindowsFrame.size.width) / 2 + theScreensFrame.origin.x;
144 theCoordinate.y = (theScreensFrame.size.height / 3) - theWindowsFrame.size.height + theScreensFrame.origin.y;
145 [self setFrameTopLeftPoint: theCoordinate];
150 [[self contentView] setPlay];
155 [[self contentView] setPause];
158 - (void)setStreamTitle:(NSString *)o_title
160 [[self contentView] setStreamTitle: o_title];
163 - (void)updatePositionAndTime
165 [[self contentView] updatePositionAndTime];
168 - (void)setSeekable:(BOOL) b_seekable
170 [[self contentView] setSeekable: b_seekable];
173 - (void)setVolumeLevel: (int)i_volumeLevel
175 [[self contentView] setVolumeLevel: i_volumeLevel];
178 - (void)setNonActive:(id)noData
182 /* here's fadeOut, just without visibly fading */
184 [self setAlphaValue:0.0];
185 [self setFadeTimer:nil];
189 [self orderOut: self];
192 - (void)setActive:(id)noData
196 [[VLCMain sharedInstance] showFullscreenController];
199 /* This routine is called repeatedly to fade in the window */
200 - (void)focus:(NSTimer *)timer
202 /* we need to push ourselves to front if the vout window was closed since our last display */
203 if (b_voutWasUpdated) {
204 [self orderFront: self];
205 b_voutWasUpdated = NO;
208 if ([self alphaValue] < 1.0) {
209 [self setAlphaValue:[self alphaValue]+0.1];
211 if ([self alphaValue] >= 1.0) {
213 [self setAlphaValue: 1.0];
214 [self setFadeTimer:nil];
217 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unfocus:) userInfo:NULL repeats:YES]];
222 /* This routine is called repeatedly to hide the window */
223 - (void)unfocus:(NSTimer *)timer
228 [self setFadeTimer: NULL];
232 if ([self alphaValue] > 0.0) {
233 [self setAlphaValue:[self alphaValue]-0.05];
235 if ([self alphaValue] <= 0.05) {
237 [self setAlphaValue:0.0];
238 [self setFadeTimer:nil];
242 [NSTimer scheduledTimerWithTimeInterval:0.1
244 selector:@selector(focus:)
251 - (void)mouseExited:(NSEvent *)theEvent
253 /* give up our focus, so the vout may show us again without letting the user clicking it */
254 if (o_vout_window && var_GetBool(pl_Get(VLCIntf), "fullscreen"))
255 [o_vout_window makeKeyWindow];
260 [NSCursor setHiddenUntilMouseMoves: YES];
265 /* in case that the user don't want us to appear, make sure we hide the mouse */
267 if (!config_GetInt(VLCIntf, "macosx-fspanel")) {
268 float time = (float)var_CreateGetInteger(VLCIntf, "mouse-hide-timeout") / 1000.;
269 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:time target:self selector:@selector(hideMouse) userInfo:nil repeats:NO]];
276 [self orderFront: nil];
278 if ([self alphaValue] < 1.0 || b_displayed != YES) {
279 if (![self fadeTimer])
280 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(focus:) userInfo:[NSNumber numberWithInt:1] repeats:YES]];
281 else if ([[[self fadeTimer] userInfo] shortValue]==0)
289 if (NSPointInRect([NSEvent mouseLocation],[self frame]))
292 if (([self alphaValue] > 0.0)) {
293 if (![self fadeTimer])
294 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(unfocus:) userInfo:[NSNumber numberWithInt:0] repeats:YES]];
295 else if ([[[self fadeTimer] userInfo] shortValue]==1)
300 /* triggers a timer to autoHide us again after some seconds of no activity */
303 /* this will tell the timer to start over again or to start at all */
306 /* get us a valid timer */
307 if (!b_alreadyCounting) {
308 i_timeToKeepVisibleInSec = var_CreateGetInteger(VLCIntf, "mouse-hide-timeout") / 500;
309 if (hideAgainTimer) {
310 [hideAgainTimer invalidate];
311 [hideAgainTimer autorelease];
313 /* released in -autoHide and -dealloc */
314 hideAgainTimer = [[NSTimer scheduledTimerWithTimeInterval: 0.5
316 selector: @selector(keepVisible:)
318 repeats: YES] retain];
319 b_alreadyCounting = YES;
323 - (void)keepVisible:(NSTimer *)timer
325 /* if the user triggered an action, start over again */
329 /* count down until we hide ourselfes again and do so if necessary */
330 if (--i_timeToKeepVisibleInSec < 1) {
333 [hideAgainTimer invalidate]; /* released in -autoHide and -dealloc */
334 b_alreadyCounting = NO;
338 /* A getter and setter for our main timer that handles window fading */
339 - (NSTimer *)fadeTimer
344 - (void)setFadeTimer:(NSTimer *)timer
347 [fadeTimer invalidate];
348 [fadeTimer autorelease];
352 - (void)mouseDown:(NSEvent *)theEvent
354 mouseClic = [theEvent locationInWindow];
357 - (void)mouseDragged:(NSEvent *)theEvent
359 NSPoint point = [NSEvent mouseLocation];
360 point.x -= mouseClic.x;
361 point.y -= mouseClic.y;
362 [self setFrameOrigin:point];
365 - (void)setVoutWasUpdated: (VLCWindow *)o_window
367 b_voutWasUpdated = YES;
369 [o_vout_window release];
370 o_vout_window = [o_window retain];
371 int i_newdevice = (int)[[o_vout_window screen] displayID];
372 if ((i_newdevice != i_device && i_device != 0) || i_newdevice != [[self screen] displayID]) {
373 i_device = i_newdevice;
376 i_device = i_newdevice;
380 /*****************************************************************************
382 *****************************************************************************/
383 @implementation VLCFSPanelView
385 #define addButton(o_button, imageOff, imageOn, _x, _y, action, AXDesc, ToolTip) \
386 s_rc.origin.x = _x; \
387 s_rc.origin.y = _y; \
388 o_button = [[NSButton alloc] initWithFrame: s_rc]; \
389 [o_button setButtonType: NSMomentaryChangeButton]; \
390 [o_button setBezelStyle: NSRegularSquareBezelStyle]; \
391 [o_button setBordered: NO]; \
392 [o_button setFont:[NSFont systemFontOfSize:0]]; \
393 [o_button setImage:imageFromRes(imageOff)]; \
394 [o_button setAlternateImage:imageFromRes(imageOn)]; \
395 [o_button sizeToFit]; \
396 [o_button setTarget: self]; \
397 [o_button setAction: @selector(action:)]; \
398 [[o_button cell] accessibilitySetOverrideValue:AXDesc forAttribute:NSAccessibilityDescriptionAttribute]; \
399 [[o_button cell] accessibilitySetOverrideValue:ToolTip forAttribute:NSAccessibilityTitleAttribute]; \
400 [o_button setToolTip: ToolTip]; \
401 [self addSubview:o_button];
403 #define addTextfield(class, o_text, align, font, color) \
404 o_text = [[class alloc] initWithFrame: s_rc]; \
405 [o_text setDrawsBackground: NO]; \
406 [o_text setBordered: NO]; \
407 [o_text setEditable: NO]; \
408 [o_text setSelectable: NO]; \
409 [o_text setStringValue: _NS("(no item is being played)")]; \
410 [o_text setAlignment: align]; \
411 [o_text setTextColor: [NSColor color]]; \
412 [o_text setFont:[NSFont font:[NSFont smallSystemFontSize]]]; \
413 [self addSubview:o_text];
415 - (id)initWithFrame:(NSRect)frameRect
417 id view = [super initWithFrame:frameRect];
418 fillColor = [[NSColor clearColor] retain];
419 NSRect s_rc = [self frame];
420 addButton(o_prev, @"fs_skip_previous_highlight" , @"fs_skip_previous", 174, 15, prev, _NS("Click to go to the previous playlist item."), _NS("Previous"));
421 addButton(o_bwd, @"fs_rewind_highlight" , @"fs_rewind" , 211, 14, backward, _NS("Click and hold to skip backward through the current media."), _NS("Backward"));
422 addButton(o_play, @"fs_play_highlight" , @"fs_play" , 265, 10, play, _NS("Click to play or pause the current media."), _NS("Play/Pause"));
423 addButton(o_fwd, @"fs_forward_highlight" , @"fs_forward" , 313, 14, forward, _NS("Click and hold to skip forward through the current media."), _NS("Forward"));
424 addButton(o_next, @"fs_skip_next_highlight" , @"fs_skip_next" , 365, 15, next, _NS("Click to go to the next playlist item."), _NS("Next"));
425 addButton(o_fullscreen, @"fs_exit_fullscreen_highlight", @"fs_exit_fullscreen", 507, 13, toggleFullscreen, _NS("Click to exit fullscreen playback."), _NS("Toggle Fullscreen mode"));
427 addButton(o_button, @"image (off state)", @"image (on state)", 38, 51, something, accessibility help string, usual tool tip);
429 [o_fwd setContinuous:YES];
430 [o_bwd setContinuous:YES];
433 // (surrounding progress view for swipe behaviour)
436 s_rc.size.width = 518;
437 s_rc.size.height = 13;
438 o_progress_view = [[VLCProgressView alloc] initWithFrame: s_rc];
441 o_fs_timeSlider = [[VLCFSTimeSlider alloc] initWithFrame: s_rc];
442 [o_fs_timeSlider setMinValue:0];
443 [o_fs_timeSlider setMaxValue:10000];
444 [o_fs_timeSlider setFloatValue: 0];
445 [o_fs_timeSlider setContinuous: YES];
446 [o_fs_timeSlider setTarget: self];
447 [o_fs_timeSlider setAction: @selector(fsTimeSliderUpdate:)];
448 [[o_fs_volumeSlider cell] accessibilitySetOverrideValue:_NS("Position") forAttribute:NSAccessibilityTitleAttribute];
449 [[o_fs_timeSlider cell] accessibilitySetOverrideValue:_NS("Click and move the mouse while keeping the button pressed to use this slider to change current playback position.") forAttribute:NSAccessibilityDescriptionAttribute];
450 [self addSubview: o_progress_view];
451 [o_progress_view addSubview: o_fs_timeSlider];
457 s_rc.size.width = 95;
458 s_rc.size.height = 12;
459 o_fs_volumeSlider = [[VLCFSVolumeSlider alloc] initWithFrame: s_rc];
460 [o_fs_volumeSlider setMinValue:0];
461 [o_fs_volumeSlider setMaxValue: [[VLCCoreInteraction sharedInstance] maxVolume]];
462 [o_fs_volumeSlider setIntValue:AOUT_VOLUME_DEFAULT];
463 [o_fs_volumeSlider setContinuous: YES];
464 [o_fs_volumeSlider setTarget: self];
465 [o_fs_volumeSlider setAction: @selector(fsVolumeSliderUpdate:)];
466 [o_fs_volumeSlider setUsesBrightArtwork:NO];
467 [[o_fs_volumeSlider cell] accessibilitySetOverrideValue:_NS("Volume") forAttribute:NSAccessibilityTitleAttribute];
468 [[o_fs_volumeSlider cell] accessibilitySetOverrideValue:_NS("Click and move the mouse while keeping the button pressed to use this slider to change the volume.") forAttribute:NSAccessibilityDescriptionAttribute];
469 [self addSubview: o_fs_volumeSlider];
471 /* time counter and stream title output fields */
473 // 10 px gap between time fields
476 s_rc.size.width = 361;
477 s_rc.size.height = 14;
478 addTextfield(NSTextField, o_streamTitle_txt, NSCenterTextAlignment, systemFontOfSize, whiteColor);
481 s_rc.size.width = 65;
482 addTextfield(VLCTimeField, o_streamPosition_txt, NSLeftTextAlignment, systemFontOfSize, whiteColor);
485 s_rc.size.width = 65;
486 addTextfield(VLCTimeField, o_streamLength_txt, NSRightTextAlignment, systemFontOfSize, whiteColor);
487 [o_streamLength_txt setRemainingIdentifier: @"DisplayFullscreenTimeAsTimeRemaining"];
489 o_background_img = [imageFromRes(@"fs_background") retain];
490 o_vol_sld_img = [imageFromRes(@"fs_volume_slider_bar") retain];
491 o_vol_mute_img = [imageFromRes(@"fs_volume_mute_highlight") retain];
492 o_vol_max_img = [imageFromRes(@"fs_volume_max_highlight") retain];
493 o_time_sld_img = [imageFromRes(@"fs_time_slider") retain];
500 [o_background_img release];
501 [o_vol_sld_img release];
502 [o_vol_mute_img release];
503 [o_vol_max_img release];
504 [o_time_sld_img release];
505 [o_fs_timeSlider release];
506 [o_fs_volumeSlider release];
512 [o_fullscreen release];
513 [o_streamTitle_txt release];
514 [o_streamPosition_txt release];
520 [o_play setImage:imageFromRes(@"fs_play_highlight")];
521 [o_play setAlternateImage: imageFromRes(@"fs_play")];
526 [o_play setImage: imageFromRes(@"fs_pause_highlight")];
527 [o_play setAlternateImage: imageFromRes(@"fs_pause")];
530 - (void)setStreamTitle:(NSString *)o_title
532 [o_streamTitle_txt setStringValue: o_title];
535 - (void)updatePositionAndTime
537 input_thread_t * p_input;
538 p_input = pl_CurrentInput(VLCIntf);
544 var_Get(p_input, "position", &pos);
545 f_updated = 10000. * pos.f_float;
546 [o_fs_timeSlider setFloatValue: f_updated];
549 char psz_time[MSTRTIME_MAX_SIZE];
551 var_Get(p_input, "time", &time);
552 mtime_t dur = input_item_GetDuration(input_GetItem(p_input));
554 // update total duration (right field)
556 [o_streamLength_txt setHidden: YES];
558 [o_streamLength_txt setHidden: NO];
560 NSString *o_total_time;
561 if ([o_streamLength_txt timeRemaining]) {
562 mtime_t remaining = 0;
563 if (dur > time.i_time)
564 remaining = dur - time.i_time;
565 o_total_time = [NSString stringWithFormat: @"-%s", secstotimestr(psz_time, (remaining / 1000000))];
567 o_total_time = [NSString stringWithUTF8String:secstotimestr(psz_time, (dur / 1000000))];
569 [o_streamLength_txt setStringValue: o_total_time];
572 // update current position (left field)
573 NSString *o_playback_pos = [NSString stringWithUTF8String:secstotimestr(psz_time, (time.i_time / 1000000))];
575 [o_streamPosition_txt setStringValue: o_playback_pos];
576 vlc_object_release(p_input);
578 [o_fs_timeSlider setFloatValue: 0.0];
579 [o_streamPosition_txt setStringValue: @"00:00"];
580 [o_streamLength_txt setHidden: YES];
585 - (void)setSeekable:(BOOL)b_seekable
587 [o_bwd setEnabled: b_seekable];
588 [o_fwd setEnabled: b_seekable];
589 [o_fs_timeSlider setEnabled: b_seekable];
592 - (void)setVolumeLevel: (int)i_volumeLevel
594 [o_fs_volumeSlider setIntValue: i_volumeLevel];
597 - (IBAction)play:(id)sender
599 [[VLCCoreInteraction sharedInstance] playOrPause];
602 - (IBAction)forward:(id)sender
604 if (([NSDate timeIntervalSinceReferenceDate] - last_fwd_event) > 0.16) {
605 // we just skipped 4 "continous" events, otherwise we are too fast
606 [[VLCCoreInteraction sharedInstance] forwardExtraShort];
607 last_fwd_event = [NSDate timeIntervalSinceReferenceDate];
611 - (IBAction)backward:(id)sender
613 if (([NSDate timeIntervalSinceReferenceDate] - last_bwd_event) > 0.16) {
614 // we just skipped 4 "continous" events, otherwise we are too fast
615 [[VLCCoreInteraction sharedInstance] backwardExtraShort];
616 last_bwd_event = [NSDate timeIntervalSinceReferenceDate];
620 - (IBAction)prev:(id)sender
622 [[VLCCoreInteraction sharedInstance] previous];
625 - (IBAction)next:(id)sender
627 [[VLCCoreInteraction sharedInstance] next];
630 - (IBAction)toggleFullscreen:(id)sender
632 [[VLCCoreInteraction sharedInstance] toggleFullscreen];
635 - (IBAction)fsTimeSliderUpdate:(id)sender
637 input_thread_t * p_input;
638 p_input = pl_CurrentInput(VLCIntf);
639 if (p_input != NULL) {
642 pos.f_float = [o_fs_timeSlider floatValue] / 10000.;
643 var_Set(p_input, "position", pos);
644 vlc_object_release(p_input);
646 [[VLCMain sharedInstance] updatePlaybackPosition];
649 - (IBAction)fsVolumeSliderUpdate:(id)sender
651 [[VLCCoreInteraction sharedInstance] setVolume: [sender intValue]];
654 #define addImage(image, _x, _y, mode) \
655 image_size = [image size]; \
656 image_rect.size = image_size; \
657 image_rect.origin.x = 0; \
658 image_rect.origin.y = 0; \
659 frame.origin.x = _x; \
660 frame.origin.y = _y; \
661 frame.size = image_size; \
662 [image drawInRect:frame fromRect:image_rect operation:mode fraction:1];
664 - (void)drawRect:(NSRect)rect
666 NSRect frame = [self frame];
670 addImage(o_background_img, 0, 0, NSCompositeCopy);
671 addImage(o_vol_sld_img, 26, 23, NSCompositeSourceOver);
672 addImage(o_vol_mute_img, 16, 18, NSCompositeSourceOver);
673 addImage(o_vol_max_img, 124, 18, NSCompositeSourceOver);
674 addImage(o_time_sld_img, 15, 45, NSCompositeSourceOver);
679 /*****************************************************************************
681 *****************************************************************************/
682 @implementation VLCFSTimeSlider
683 - (void)drawKnobInRect:(NSRect)knobRect
686 NSImage *img = imageFromRes(@"fs_time_slider_knob_highlight");
687 image_rect.size = [img size];
688 image_rect.origin.x = 0;
689 image_rect.origin.y = 0;
690 knobRect.origin.x += (knobRect.size.width - image_rect.size.width) / 2;
691 knobRect.size.width = image_rect.size.width;
692 knobRect.size.height = image_rect.size.height;
693 [img drawInRect:knobRect fromRect:image_rect operation:NSCompositeSourceOver fraction:1];
696 - (void)drawRect:(NSRect)rect
698 /* Draw default to make sure the slider behaves correctly */
699 [[NSGraphicsContext currentContext] saveGraphicsState];
700 NSRectClip(NSZeroRect);
701 [super drawRect:rect];
702 [[NSGraphicsContext currentContext] restoreGraphicsState];
704 NSRect knobRect = [[self cell] knobRectFlipped:NO];
705 knobRect.origin.y+=4;
706 [[[NSColor blackColor] colorWithAlphaComponent:0.6] set];
707 [self drawKnobInRect: knobRect];
712 /*****************************************************************************
714 *****************************************************************************/
715 @implementation VLCFSVolumeSlider
717 - (id)initWithFrame:(NSRect)frame
719 self = [super initWithFrame:frame];
721 [self setCell:[[[VolumeSliderCell alloc] init] autorelease]];
727 - (void)drawKnobInRect:(NSRect) knobRect
730 NSImage *img = imageFromRes(@"fs_volume_slider_knob_highlight");
731 image_rect.size = [img size];
732 image_rect.origin.x = 0;
733 image_rect.origin.y = 0;
734 knobRect.origin.x += (knobRect.size.width - image_rect.size.width) / 2;
735 knobRect.size.width = image_rect.size.width;
736 knobRect.size.height = image_rect.size.height;
737 [img drawInRect:knobRect fromRect:image_rect operation:NSCompositeSourceOver fraction:1];
740 - (void)drawRect:(NSRect)rect
742 /* Draw default to make sure the slider behaves correctly */
743 [[NSGraphicsContext currentContext] saveGraphicsState];
744 NSRectClip(NSZeroRect);
745 [super drawRect:rect];
746 [[NSGraphicsContext currentContext] restoreGraphicsState];
748 [self drawFullVolumeMarker];
750 NSRect knobRect = [[self cell] knobRectFlipped:NO];
751 knobRect.origin.y+=7.5;
752 [[[NSColor blackColor] colorWithAlphaComponent:0.6] set];
753 [self drawKnobInRect: knobRect];
756 - (void)drawFullVolBezierPath:(NSBezierPath*)bezierPath
758 CGFloat fullVolPos = [self fullVolumePos];
759 [bezierPath moveToPoint:NSMakePoint(fullVolPos, [self frame].size.height)];
760 [bezierPath lineToPoint:NSMakePoint(fullVolPos, 1.)];