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];
55 "Function is not appropriate for this type of widget (%s)",
75 return ([textField isEnabled])?1:0;
79 if ([textField window]) {
80 if ([[textField window] firstResponder] == textField)
return 1;
85 return [textField frame].size.width;
88 return [textField frame].size.height;
95 "Function is not appropriate for this type of widget (%s)",
115 NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding];
116 [textField setStringValue:stringValue];
117 [stringValue release];
124 "Function is not appropriate for this type of widget (%s)",
135 const char *defaultValue) {
143 return [[textField stringValue] cStringUsingEncoding:NSUTF8StringEncoding];
149 "Function is not appropriate for this type of widget (%s)",
199 wParent=GWEN_Widget_Tree_GetParent(w);
203 textField = [[[
CocoaLineTextField alloc] initWithFrame:NSMakeRect(10.0, 10.0, 100.0, 22.0)] autorelease];
207 [textField setEditable:YES];
210 NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding];
211 [textField setStringValue:stringValue];
212 [stringValue release];
225 [textField setC_ActionPtr:ptr Data:w];
228 [textField setC_TextChanged_ActionPtr:changed_ptr Data:w];
void(* gwenTextFieldActionPtr)(NSTextField *textField, void *data)
#define COCOA_DIALOG_WIDGET_REAL
void CocoaGui_Dialog_Leave(GWEN_DIALOG *dlg, int result)
#define COCOA_DIALOG_WIDGET_CONTENT
#define DBG_WARN(dbg_logger, format,...)
int GWEN_Dialog_EmitSignal(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender)
#define GWEN_WIDGET_FLAGS_FILLY
#define GWEN_WIDGET_FLAGS_FILLX
@ GWEN_DialogProperty_Title
@ GWEN_DialogProperty_Height
@ GWEN_DialogProperty_Enabled
@ GWEN_DialogProperty_Value
@ GWEN_DialogProperty_Focus
@ GWEN_DialogProperty_Width
@ GWEN_DialogEvent_TypeValueChanged
@ GWEN_DialogEvent_TypeActivated
@ GWEN_DialogEvent_ResultAccept
@ GWEN_DialogEvent_ResultReject
#define GWEN_ERROR_INVALID
static GWENHYWFAR_CB int CocoaGui_WTextEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
static GWENHYWFAR_CB int CocoaGui_WTextEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
static GWENHYWFAR_CB int CocoaGui_WTextEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
static GWENHYWFAR_CB const char * CocoaGui_WTextEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
static void CocoaGui_WTextEdit_Changed_text_handler(NSTextField *textField, void *data)
static void CocoaGui_WTextEdit_End_Editing_text_handler(NSTextField *textField, void *data)
int CocoaGui_WTextEdit_Setup(GWEN_WIDGET *w)