26 [textField setEnabled:(value==0)?NO:YES];
30 if ([textField window]) {
31 [[textField window] makeFirstResponder:textField];
36 NSRect frame = [textField frame];
37 frame.size.width = value;
38 [textField setFrame:frame];
43 NSRect frame = [textField frame];
44 frame.size.height = value;
45 [textField setFrame:frame];
54 "Function is not appropriate for this type of widget (%s)",
74 return ([textField isEnabled])?1:0;
78 if ([textField window]) {
79 if ([[textField window] firstResponder] == textField)
return 1;
84 return [textField frame].size.width;
87 return [textField frame].size.height;
94 "Function is not appropriate for this type of widget (%s)",
114 NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding];
115 [textField setStringValue:stringValue];
116 [stringValue release];
123 "Function is not appropriate for this type of widget (%s)",
134 const char *defaultValue) {
142 return [[textField stringValue] cStringUsingEncoding:NSUTF8StringEncoding];
148 "Function is not appropriate for this type of widget (%s)",
203 wParent=GWEN_Widget_Tree_GetParent(w);
207 textField = [[[
CocoaLineTextField alloc] initWithFrame:NSMakeRect(10.0, 10.0, 100.0, 22.0)] autorelease];
211 [textField setCell:[[[NSSecureTextFieldCell alloc] init] autorelease]];
212 [textField setDrawsBackground:YES];
213 [textField setBezeled:YES];
216 [[textField cell] setLineBreakMode:NSLineBreakByClipping];
219 [textField setEditable:YES];
224 NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding];
225 [textField setStringValue:stringValue];
226 [stringValue release];