26 [checkbox setEnabled:(value==0)?NO:YES];
30 if ([checkbox window]) {
31 [[checkbox window] makeFirstResponder:checkbox];
36 NSRect frame = [checkbox frame];
37 frame.size.width = value;
38 [checkbox setFrame:frame];
43 NSRect frame = [checkbox frame];
44 frame.size.height = value;
45 [checkbox setFrame:frame];
50 if (value==0) [checkbox setState:NSOffState];
51 else [checkbox setState:NSOnState];
60 "Function is not appropriate for this type of widget (%s)",
80 return ([checkbox isEnabled]==YES)?1:0;
83 if ([checkbox window]) {
84 if ([[checkbox window] firstResponder] == checkbox)
return 1;
89 return [checkbox frame].size.width;
92 return [checkbox frame].size.height;
95 return ([checkbox state]==NSOnState)?1:0;
102 "Function is not appropriate for this type of widget (%s)",
122 NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding];
123 [checkbox setTitle:stringValue];
124 [stringValue release];
132 "Function is not appropriate for this type of widget (%s)",
143 const char *defaultValue) {
151 return [[checkbox stringValue] cStringUsingEncoding:NSUTF8StringEncoding];
157 "Function is not appropriate for this type of widget (%s)",
189 wParent=GWEN_Widget_Tree_GetParent(w);
193 checkbox = [[[
CocoaCheckboxButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 60.0, 24.0)] autorelease];
197 NSString *title = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding];
198 [checkbox setTitle:title];