MO_maxSize |
- ( NSSize ) MO_maxSize;
This method returns the maximum size of a view. If MO_setMaxSize: has been previously called, this returns the size that was set with that method. Otherwise, this returns the size {MAXFLOAT, MAXFLOAT}.
MO_minSize |
- ( NSSize ) MO_minSize;
This method returns the minimum size of a view. If MO_takesMinSizeFromClipView is YES and the view is currently the direct subview of an NSClipView, then this method returns the current bounds size of the clip view. If MO_setMinSize: has been previously called, this returns the size that was set with that method. Otherwise, this returns the size {0.0, 0.0}.
MO_setMaxSize: |
- ( void ) MO_setMaxSize: (NSSize ) maxSize;
This method sets the maximum size of a view.
- maxSize
- The maximum size to be used for the receiver.
MO_setMinSize: |
- ( void ) MO_setMinSize: (NSSize ) minSize;
This method sets the minimum size of a view. If MO_takesMinSizeFromClipView is YES and the view is currently the direct subview of an NSClipView, then the size set with this method will have no effect and the minimum size will instead be the size of the clip view's bounds rectangle.
- minSize
- The minimum size to be used for the receiver.
MO_setTakesMinSizeFromClipView: |
- ( void ) MO_setTakesMinSizeFromClipView: (BOOL ) flag;
This method sets whether the minimum size of the view should be the bounds size of the clip view it is in. If set to YES and the view is a direct subview of an NSClipView then MO_minSize will return the bounds size of the clip view. This setting has no effect when the receiver is not a subview of an NSClipView.
This method is often called from an NSView subclass' -initWithFrame: override. For example MOViewListView does this since it generally expects to live inside an NSClipView. Views that use this feature are encouraged to have a -sizeToFit method. When the clipview's size changes and the minimum size of the view is updated, if the view implemented -sizeToFit, it will be called. This allows the view to shrink itself if its minSize just got smaller and it was bigger than it might naturally want to be, for example.
- flag
- YES if the view's minimum size should be the bounds size of its clip view, NO if not.
MO_sizeConstraintsDidChange |
- ( void ) MO_sizeConstraintsDidChange;
This method is called whenever the min or max size contraints on a view may have changed. You should never call it directly, but you may wish to override it. A common override of this method would invoke -sizeToFit to make sure the view is as close to its natural size as possible given the new contraints. The default implementation does nothing.
MO_takesMinSizeFromClipView |
- ( BOOL ) MO_takesMinSizeFromClipView;
This method returns whether the minimum size of the view should be the bounds size of the clip view it is in. If this is YES and the view is a direct subview of an NSClipView then MO_minSize will return the bounds size of the clip view. This setting has no effect when the receiver is not a subview of an NSClipView.
(Last Updated 3/20/2005)