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)",
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)",
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) {
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);
276 [popUp setC_PopUpActionPtr:ptr Data:w];
288 [comboBox setC_ComboBoxActionPtr:ptr Data:w];
296 #pragma mark NOCH MACHEN Action setzen
#define COCOA_DIALOG_WIDGET_REAL
#define GWEN_ERROR_INVALID
static void CocoaGui_WComboBox_Changed_handler(NSControl *comboBoxOrPopUp, void *data)
#define DBG_WARN(dbg_logger, format, args...)
#define GWEN_WIDGET_FLAGS_READONLY
int CocoaGui_WComboBox_Setup(GWEN_WIDGET *w)
#define COCOA_DIALOG_WIDGET_CONTENT
#define GWEN_WIDGET_FLAGS_FILLY
#define GWEN_WIDGET_FLAGS_FILLX
int GWEN_Dialog_EmitSignal(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender)
static GWENHYWFAR_CB int CocoaGui_WComboBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
void(* gwenComboBoxActionPtr)(NSComboBox *comboBox, void *data)
#define DBG_ERROR(dbg_logger, format, args...)
static GWENHYWFAR_CB const char * CocoaGui_WComboBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
#define GWEN_ERROR_NOT_FOUND
void CocoaGui_Dialog_Leave(GWEN_DIALOG *dlg, int result)
static GWENHYWFAR_CB int CocoaGui_WComboBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
static GWENHYWFAR_CB int CocoaGui_WComboBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)