Next: 2. The GNUstep Markup
Up: 1. Renaissance AutoLayout
Previous: 1.10 How AutoLayout flags
Some containers allow your views to have paddings set. When the view
is placed inside the container, additional space will be reserved
around the view for the paddings; that space will be left intentionally
blank.
The container will initially call the methods
-autoLayoutDefaultLeftPadding
-autoLayoutDefaultRightPadding
-autoLayoutDefaultBottomPadding
-autoLayoutDefaultTopPadding
of the view to get its default padding on the various sides.
You can later change the paddings manually by calling the appropriate
method of the container, such as -setLeftPadding:forView: for
boxes.
Renaissance AutoLayout adds a category to NSView, implementing the
following methods:
- - (float) autoLayoutDefaultLeftPadding, which should
return the default padding on the left side for that view.
- - (float) autoLayoutDefaultRightPadding, which should
return the default padding on the right side for that view.
- - (float) autoLayoutDefaultBottomPadding, which should
return the default padding on the bottom side for that view.
- - (float) autoLayoutDefaultTopPadding, which should
return the default padding on the top side for that view.
The default implementation of those methods in NSView returns
4 for all of them. Containers and spaces have
implementations of those methods returning 0 for all of them.
Unless you are looking for special effects (or for trouble), you
generally don't need to modify paddings.
Next: 2. The GNUstep Markup
Up: 1. Renaissance AutoLayout
Previous: 1.10 How AutoLayout flags
2010-06-30