36 [spinbox setEnabled:(value==0)?NO:YES];
44 NSRect frame = [spinbox frame];
45 frame.size.width = value;
46 [spinbox setFrame:frame];
51 NSRect frame = [spinbox frame];
52 frame.size.height = value;
53 [spinbox setFrame:frame];
74 "Function is not appropriate for this type of widget (%s)",
94 return ([spinbox isEnabled])?1:0;
97 return ([spinbox isFirstResponder])?1:0;
100 return [spinbox frame].size.width;
103 return [spinbox frame].size.height;
118 "Function is not appropriate for this type of widget (%s)",
140 if (value && *value) {
141 NSString *stringValue = [[NSString alloc] initWithCString:value encoding:NSUTF8StringEncoding];
143 [stringValue release];
151 "Function is not appropriate for this type of widget (%s)",
162 const char *defaultValue) {
171 return [[spinbox
stringValue] cStringUsingEncoding:NSUTF8StringEncoding];
177 "Function is not appropriate for this type of widget (%s)",
208 wParent=GWEN_Widget_Tree_GetParent(w);
215 spinbox = [[[
CocoaSpinbox alloc] initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 22.0)] autorelease];
220 NSString *stringValue = [[NSString alloc] initWithCString:s encoding:NSUTF8StringEncoding];
222 [stringValue release];
#define COCOA_DIALOG_WIDGET_REAL
#define GWEN_ERROR_INVALID
void setMaxValue:(NSInteger new_max_value)
void setC_ActionPtr:Data:(gwenSpinBoxActionPtr ptr,[Data] void *data)
void makeFirstResponder()
#define DBG_WARN(dbg_logger, format, args...)
void setIntegerValue:(NSInteger new_value)
int CocoaGui_WSpinBox_Setup(GWEN_WIDGET *w)
void(* gwenSpinBoxActionPtr)(NSView *spinbox, void *data)
#define COCOA_DIALOG_WIDGET_CONTENT
void setStringValue:(NSString *aString)
#define GWEN_WIDGET_FLAGS_FILLY
#define GWEN_WIDGET_FLAGS_FILLX
int GWEN_Dialog_EmitSignal(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender)
#define DBG_ERROR(dbg_logger, format, args...)
static GWENHYWFAR_CB const char * CocoaGui_WSpinBox_GetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
static GWENHYWFAR_CB int CocoaGui_WSpinBox_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
void CocoaGui_Dialog_Leave(GWEN_DIALOG *dlg, int result)
#define GWEN_INHERIT(bt, t)
static GWENHYWFAR_CB int CocoaGui_WSpinBox_SetCharProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
void setMinValue:(NSInteger new_min_value)
static GWENHYWFAR_CB int CocoaGui_WSpinBox_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
static void CocoaGui_WSpinBox_Changed_handler(NSView *spinbox, void *data)