26 if ([control isKindOfClass:[
CocoaComboBox class]]) comboBox = (CocoaComboBox*)control;
31 [control setEnabled:(value!=0)];
35 [[control window] makeFirstResponder:control];
40 [comboBox selectItemAtIndex:value];
43 [popUp selectItemAtIndex:value];
49 if (comboBox) [comboBox removeAllItems];
50 else if (popUp) [popUp removeAllItems];
60 "Function is not appropriate for this type of widget (%s)",
79 if ([control isKindOfClass:[
CocoaComboBox class]]) comboBox = (CocoaComboBox*)control;
84 return ([control isEnabled])?1:0;
87 if ([control window]) {
88 if ([[control window] firstResponder] == control)
return 1;
94 return [comboBox indexOfSelectedItem];
97 return [popUp indexOfSelectedItem];
105 i = [comboBox numberOfItems];
108 i = [popUp numberOfItems];
120 "Function is not appropriate for this type of widget (%s)",
139 if ([control isKindOfClass:[
CocoaComboBox class]]) comboBox = (CocoaComboBox*)control;
149 NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding];
150 if (popUp && stringValue) {
151 [popUp addItemWithTitle:stringValue];
153 else if (comboBox && stringValue) {
154 [comboBox addItemWithObjectValue:stringValue];
157 [stringValue release];
162 if (comboBox) [comboBox removeAllItems];
163 else if (popUp) [popUp removeAllItems];
172 "Function is not appropriate for this type of widget (%s)",
183 const char *defaultValue) {
190 if ([control isKindOfClass:[
CocoaComboBox class]]) comboBox = (CocoaComboBox*)control;
195 NSString *value = nil;
198 value = [popUp titleOfSelectedItem];
200 else if (comboBox && [[comboBox itemObjectValueAtIndex:index] isKindOfClass:[NSString
class]]) {
201 value = [comboBox itemObjectValueAtIndex:index];
204 if (value)
return [value cStringUsingEncoding:NSUTF8StringEncoding];
213 "Function is not appropriate for this type of widget (%s)",
263 wParent=GWEN_Widget_Tree_GetParent(w);
296 #pragma mark NOCH MACHEN Action setzen