• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: subclass of NSSlider won't call action method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subclass of NSSlider won't call action method


  • Subject: Re: subclass of NSSlider won't call action method
  • From: Chris Stephens <email@hidden>
  • Date: Thu, 30 Jun 2005 12:11:02 +1000

Thanks, Andreas.

Here is the complete EluSliderCell.m code if that helps:

#import "EluSliderCell.h"
static NSImage * _knobOff = nil;
static NSImage * _knobOn = nil;
static NSImage * barImage = nil;

@implementation EluSliderCell
-(id)init {
self = [super init];
_knobOff = [[NSImage imageNamed:@"knob_cold"] retain];
_knobOn = [[NSImage imageNamed:@"knob_hot"] retain];
return self;
}
- (void)drawKnob:(NSRect)knobRect {
NSImage * knob = _knobOn;
[[self controlView] lockFocus];
[knob compositeToPoint:NSMakePoint(knobRect.origin.x + 1,knobRect.origin.y+knobRect.size.height - 2)
operation:NSCompositeSourceOver];
[[self controlView] unlockFocus];
}
- (void)drawBarInside:(NSRect)barRect flipped:(BOOL)flipped
{
[super drawBarInside:barRect flipped:flipped];
NSRect imageRect;
barImage = [[NSImage imageNamed:@"black_bar"] retain];
imageRect.origin = NSZeroPoint;
imageRect.size = [barImage size];
barRect.origin.x = barRect.origin.x - 3;
[barImage setFlipped:YES];
[barImage drawInRect:barRect
fromRect:imageRect
operation:NSCompositeSourceOver
fraction:1.0];
}
- (void)dealloc
{
[super dealloc];
}
@end


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Doc problem? File mgmt...
  • Next by Date: Re: subclass of NSSlider won't call action method
  • Previous by thread: Re: subclass of NSSlider won't call action method
  • Next by thread: Re: subclass of NSSlider won't call action method
  • Index(es):
    • Date
    • Thread