00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 @import "CPButton.j"
00024
00025
00026 @implementation CPCheckBox : CPButton
00027 {
00028 }
00029
00030 + (id)checkBoxWithTitle:(CPString)aTitle theme:(CPTheme)aTheme
00031 {
00032 return [self buttonWithTitle:aTitle theme:aTheme];
00033 }
00034
00035 + (id)checkBoxWithTitle:(CPString)aTitle
00036 {
00037 return [self buttonWithTitle:aTitle];
00038 }
00039
00040 + (CPString)themeClass
00041 {
00042 return @"check-box";
00043 }
00044
00045 - (id)initWithFrame:(CGRect)aFrame
00046 {
00047 self = [super initWithFrame:aFrame];
00048
00049 if (self)
00050 {
00051 [self setHighlightsBy:CPContentsCellMask];
00052 [self setShowsStateBy:CPContentsCellMask];
00053
00054
00055 [self setImagePosition:CPImageLeft];
00056 [self setAlignment:CPLeftTextAlignment];
00057
00058 [self setBordered:YES];
00059 }
00060
00061 return self;
00062 }
00063
00064 @end