Re: Customizing NSSlider (NSSliderCell)
Re: Customizing NSSlider (NSSliderCell)
- Subject: Re: Customizing NSSlider (NSSliderCell)
- From: Kyle Sluder <email@hidden>
- Date: Mon, 30 Mar 2015 21:17:37 -0600
On Mon, Mar 30, 2015, at 08:15 PM, Daniel Wilson wrote:
> Hi,
>
> I am new to C++ and Audio Unit programming. I am trying to create my own
> custom slider and am having much difficulty. Currently I am using
> NSSlider but I have read that I need to subclass NSSliderCell to update
> the graphics. I don’t even know how to subclass NSSliderCell. Does anyone
> know how to? Currently for my .h file I have
You will have much better luck asking Cocoa programming questions on the
cocoa-dev mailing list.
> @implementation PHAS_RateGestureSlider
>
> - (void)mouseDown:(NSEvent *)inEvent {
>
> [[NSNotificationCenter defaultCenter] postNotificationName:
> PHAS_RateGestureSliderMouseDownNotification object: self];
>
> [super mouseDown: inEvent];
>
> [[NSNotificationCenter defaultCenter] postNotificationName:
> PHAS_RateGestureSliderMouseUpNotification object: self];
> }
>
> @end
This is rather strange. Why do you need this notification? And if you
need it, why are you sending it as a notification instead of messaging
the control's target directly?
> Does anyone know how to subclass NSSliderCell and add a custom knob or
> slider bar? Thank you!
See the documentation for -[NSSliderCell drawKnob:] and
-drawBarInside:flipped:.
--Kyle Sluder
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden