aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMUILocalizerAndLayoutTweaker.h
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-10-20 21:15:55 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-10-20 21:15:55 +0000
commit47d6568fec47fd0026aec559130ab9492fe57be3 (patch)
treed1bf96d932b3b814287cf9da3312900f4b2eb655 /AppKit/GTMUILocalizerAndLayoutTweaker.h
parent9e318781c61170fc28682d0600cd37e0c8fd5308 (diff)
[Author: thomasvl]
Add two apis for making checkboxs/radios and radio groups wrap to their size. Add a unittest to cover normal and mini sizes. R=dmaclach,stuartmorgan DELTA=1174 (1164 added, 0 deleted, 10 changed)
Diffstat (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.h')
-rw-r--r--AppKit/GTMUILocalizerAndLayoutTweaker.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.h b/AppKit/GTMUILocalizerAndLayoutTweaker.h
index 4f08525..abcb758 100644
--- a/AppKit/GTMUILocalizerAndLayoutTweaker.h
+++ b/AppKit/GTMUILocalizerAndLayoutTweaker.h
@@ -52,6 +52,14 @@
// Returns the amount the field changed height.
+ (CGFloat)sizeToFitFixedWidthTextField:(NSTextField *)textField;
+// Insert newlines into the title of the button (radio or checkbox) or all cells
+// in the radio group (NSMatrix) so they will word wrap to the item's current
+// width. Then +sizeToFitView can be called to have then resize to the exact
+// width and height needed. Note: any existing Opt-Return forced wraps are
+// removed from the existing titles.
++ (void)wrapButtonTitleForWidth:(NSButton *)button;
++ (void)wrapRadioGroupForWidth:(NSMatrix *)radioGroup;
+
// Resizes |window| by |delta| without letting the subviews of |window| get
// resized. Useful when you've done manual tweaking by things like
// +sizeToFitFixedWidthTextField. The window's origin is not adjusted. Passes