comparison mac/dw.m @ 1533:7bc189ef0cd0

Add code to determine the size of the calendar control on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 09 Jan 2012 15:18:04 +0000
parents 783a464afab2
children a4ecef1980db
comparison
equal deleted inserted replaced
1532:6c55d68fd08a 1533:7bc189ef0cd0
3511 NSSize size = [image size]; 3511 NSSize size = [image size];
3512 thiswidth = (int)size.width; 3512 thiswidth = (int)size.width;
3513 thisheight = (int)size.height; 3513 thisheight = (int)size.height;
3514 } 3514 }
3515 } 3515 }
3516 /* Handle calendar */
3517 else if([ object isMemberOfClass:[DWCalendar class] ])
3518 {
3519 NSCell *cell = [object cell];
3520
3521 if(cell)
3522 {
3523 NSSize size = [cell cellSize];
3524
3525 thiswidth = size.width;
3526 thisheight = size.height;
3527 }
3528 }
3529 /* Any other control type */
3516 else if([ object isKindOfClass:[ NSControl class ] ]) 3530 else if([ object isKindOfClass:[ NSControl class ] ])
3517 nsstr = [object stringValue]; 3531 nsstr = [object stringValue];
3518 3532
3519 /* Handle static text fields */ 3533 /* Handle static text fields */
3520 if([object isKindOfClass:[ NSTextField class ]] && ![object isEditable]) 3534 if([object isKindOfClass:[ NSTextField class ]] && ![object isEditable])