22 assert(labelTextField);
26 [labelTextField setEnabled:(value==0)?NO:YES];
30 if ([labelTextField window]) {
31 [[labelTextField window] makeFirstResponder:labelTextField];
36 NSRect frame = [labelTextField frame];
37 frame.size.width = value;
38 [labelTextField setFrame:frame];
43 NSRect frame = [labelTextField frame];
44 frame.size.height = value;
45 [labelTextField setFrame:frame];
54 "Function is not appropriate for this type of widget (%s)",
70 assert(labelTextField);
74 return ([labelTextField isEnabled])?1:0;
77 if ([labelTextField window]) {
78 if ([[labelTextField window] firstResponder] == labelTextField) {
85 return [labelTextField frame].size.width;
88 return [labelTextField frame].size.height;
95 "Function is not appropriate for this type of widget (%s)",
111 assert(labelTextField);
115 NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding];
116 [labelTextField setStringValue:stringValue];
117 NSLog(
@"%@", stringValue);
118 [stringValue release];
126 "Function is not appropriate for this type of widget (%s)",
137 const char *defaultValue) {
141 assert(labelTextField);
145 return [[labelTextField stringValue] cStringUsingEncoding:NSUTF8StringEncoding];
151 "Function is not appropriate for this type of widget (%s)",
166 wParent=GWEN_Widget_Tree_GetParent(w);
169 labelTextField = [[[
CocoaLabel alloc] initWithFrame:NSMakeRect(10.0, 10.0, 100.0, 24.0)] autorelease];
172 [labelTextField setDrawsBackground:NO];
173 [labelTextField setBordered:NO];
174 [labelTextField setEditable:NO];
176 NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding];
177 [labelTextField setStringValue:stringValue];
179 [stringValue release];