diff 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
line wrap: on
line diff
--- a/mac/dw.m	Sun Dec 04 19:13:10 2011 +0000
+++ b/mac/dw.m	Sun Dec 04 20:11:38 2011 +0000
@@ -8613,6 +8613,18 @@
 }
 
 /*
+ * Gets the size the system thinks the widget should be.
+ * Parameters:
+ *       handle: Window handle of the item to be back.
+ *       width: Width in pixels of the item or NULL if not needed.
+ *       height: Height in pixels of the item or NULL if not needed.
+ */
+void API dw_window_get_preferred_size(HWND handle, int *width, int *height)
+{
+    _control_size(handle, width, height);
+}
+
+/*
  * Sets the position of a given window (widget).
  * Parameters:
  *          handle: Window (widget) handle.