Mercurial > dwindows
comparison mac/dw.m @ 1537:a4ecef1980db
Added code for returning a size for scrolled widgets on OS/2, Windows and Mac...
They get 500x200 because this is what GTK seems to recommend.
It occurs to me that listboxes may not currently be handled... will have to look into that.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 12 Jan 2012 18:21:54 +0000 |
parents | 7bc189ef0cd0 |
children | 333f07bdbf7c |
comparison
equal
deleted
inserted
replaced
1536:a71ec02f3b70 | 1537:a4ecef1980db |
---|---|
3401 } | 3401 } |
3402 | 3402 |
3403 /* Internal function to calculate the widget's required size.. | 3403 /* Internal function to calculate the widget's required size.. |
3404 * These are the general rules for widget sizes: | 3404 * These are the general rules for widget sizes: |
3405 * | 3405 * |
3406 * Scrolled(Container,Tree,MLE)/Render/Unspecified: 1x1 | 3406 * Render/Unspecified: 1x1 |
3407 * Scrolled(Container,Tree,MLE): 500x200 | |
3407 * Entryfield/Combobox/Spinbutton: 150x(maxfontheight) | 3408 * Entryfield/Combobox/Spinbutton: 150x(maxfontheight) |
3408 * Spinbutton: 50x(maxfontheight) | 3409 * Spinbutton: 50x(maxfontheight) |
3409 * Text/Status: (textwidth)x(textheight) | 3410 * Text/Status: (textwidth)x(textheight) |
3410 * Ranged: 100x14 or 14x100 for vertical. | 3411 * Ranged: 100x14 or 14x100 for vertical. |
3411 * Buttons/Bitmaps: Size of text or image and border. | 3412 * Buttons/Bitmaps: Size of text or image and border. |
3524 | 3525 |
3525 thiswidth = size.width; | 3526 thiswidth = size.width; |
3526 thisheight = size.height; | 3527 thisheight = size.height; |
3527 } | 3528 } |
3528 } | 3529 } |
3530 /* MLE, Container and Tree */ | |
3531 else if([ object isMemberOfClass:[DWMLE class] ] || | |
3532 [ object isMemberOfClass:[DWContainer class] ] || | |
3533 [ object isMemberOfClass:[DWTree class] ]) | |
3534 { | |
3535 thiswidth = 500; | |
3536 thisheight = 200; | |
3537 } | |
3529 /* Any other control type */ | 3538 /* Any other control type */ |
3530 else if([ object isKindOfClass:[ NSControl class ] ]) | 3539 else if([ object isKindOfClass:[ NSControl class ] ]) |
3531 nsstr = [object stringValue]; | 3540 nsstr = [object stringValue]; |
3532 | 3541 |
3533 /* Handle static text fields */ | 3542 /* Handle static text fields */ |