Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifdef HAVE_CONFIG_H
00008 # include <config.h>
00009 #endif
00010
00011
00012 #import "CocoaCheckboxButton.h"
00013
00014 #import <Foundation/Foundation.h>
00015
00016
00017 @implementation CocoaCheckboxButton
00018
00019 - (id)initWithFrame:(NSRect)frame {
00020 self = [super initWithFrame:frame];
00021 if (self) {
00022 [self setBezelStyle:NSRoundedBezelStyle];
00023 [self setButtonType:NSSwitchButton];
00024 }
00025 return self;
00026 }
00027
00028 -(void) dealloc {
00029 [super dealloc];
00030 }
00031
00032 -(void) computeMinWidth {
00033 NSSize size = [self neededTextSize];
00034 minWidth = size.width + 22.0;
00035 }
00036
00037
00038
00039
00040
00041
00042
00043
00044 #pragma mark Protocoll Methods
00045
00046 - (NSSize) minSize {
00047 return NSMakeSize(minWidth, 16.0);
00048 }
00049
00050 @end