Mercurial > dwindows
comparison mac/dw.m @ 953:2dfc06afc7d3
Support dw_window_set_text() for groupboxes
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 01 May 2011 22:52:38 +0000 |
parents | abb9203adc05 |
children | cfb12bf3bb06 |
comparison
equal
deleted
inserted
replaced
952:abb9203adc05 | 953:2dfc06afc7d3 |
---|---|
282 { | 282 { |
283 int (* API motionfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction; | 283 int (* API motionfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction; |
284 int buttonmask = DWOSMinor > 5 ? (int)[NSEvent pressedMouseButtons] : 0; | 284 int buttonmask = DWOSMinor > 5 ? (int)[NSEvent pressedMouseButtons] : 0; |
285 id view = [[[event window] contentView] superview]; | 285 id view = [[[event window] contentView] superview]; |
286 NSPoint p = [view convertPoint:[event locationInWindow] toView:object]; | 286 NSPoint p = [view convertPoint:[event locationInWindow] toView:object]; |
287 | 287 |
288 if(DWOSMinor < 6) | 288 if(DWOSMinor < 6) |
289 { | 289 { |
290 buttonmask = (1 << [event buttonNumber]); | 290 buttonmask = (1 << [event buttonNumber]); |
291 } | 291 } |
292 | 292 |
7299 else if([ object isKindOfClass:[ NSControl class ] ]) | 7299 else if([ object isKindOfClass:[ NSControl class ] ]) |
7300 { | 7300 { |
7301 NSControl *control = handle; | 7301 NSControl *control = handle; |
7302 [control setStringValue:[ NSString stringWithUTF8String:text ]]; | 7302 [control setStringValue:[ NSString stringWithUTF8String:text ]]; |
7303 } | 7303 } |
7304 else if([object isMemberOfClass:[DWGroupBox class]]) | |
7305 { | |
7306 DWGroupBox *groupbox = handle; | |
7307 [groupbox setTitle:[NSString stringWithUTF8String:text]]; | |
7308 } | |
7304 DW_MUTEX_UNLOCK; | 7309 DW_MUTEX_UNLOCK; |
7305 } | 7310 } |
7306 | 7311 |
7307 /* | 7312 /* |
7308 * Disables given window (widget). | 7313 * Disables given window (widget). |