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];
238 [textField setC_ActionPtr:ptr Data:w];
241 [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_PASSWORD
#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_WLineEdit_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
static GWENHYWFAR_CB const char * CocoaGui_WLineEdit_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
static GWENHYWFAR_CB int CocoaGui_WLineEdit_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
int CocoaGui_WLineEdit_Setup(GWEN_WIDGET *w)
static GWENHYWFAR_CB int CocoaGui_WLineEdit_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
static void CocoaGui_WLineEdit_Changed_text_handler(NSTextField *textField, void *data)
static void CocoaGui_WLineEdit_End_Editing_text_handler(NSTextField *textField, void *data)