Mercurial > dwindows
comparison mac/dw.m @ 1429:fbaec6e5df63
Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 04 Dec 2011 20:11:38 +0000 |
parents | 1628bf383893 |
children | 6aa94c8a91de |
comparison
equal
deleted
inserted
replaced
1428:7826031d48ce | 1429:fbaec6e5df63 |
---|---|
8608 { | 8608 { |
8609 NSWindow *window = handle; | 8609 NSWindow *window = handle; |
8610 [window setContentSize:size]; | 8610 [window setContentSize:size]; |
8611 } | 8611 } |
8612 DW_MUTEX_UNLOCK; | 8612 DW_MUTEX_UNLOCK; |
8613 } | |
8614 | |
8615 /* | |
8616 * Gets the size the system thinks the widget should be. | |
8617 * Parameters: | |
8618 * handle: Window handle of the item to be back. | |
8619 * width: Width in pixels of the item or NULL if not needed. | |
8620 * height: Height in pixels of the item or NULL if not needed. | |
8621 */ | |
8622 void API dw_window_get_preferred_size(HWND handle, int *width, int *height) | |
8623 { | |
8624 _control_size(handle, width, height); | |
8613 } | 8625 } |
8614 | 8626 |
8615 /* | 8627 /* |
8616 * Sets the position of a given window (widget). | 8628 * Sets the position of a given window (widget). |
8617 * Parameters: | 8629 * Parameters: |