NSBox Mac OS X 10.0

This simple subclass of NSView performs two tasks: it can draw a border around itself, as well as title itself. By specifying that the box should have no border or title, NSBox views can be used to transparentlly group other NSView objects by making them subviews of the box view. Interface Builder provides facilities for using NSBox to group views.


@interface NSBox : NSView
 // Accessor Methods
   - (void)setTitle:(NSString *)aString;
   - (NSString *)title;
   - (void)setBorderType:(NSBorderType)aType;
   - (NSBorderType)borderType;
   - (void)setBoxType:(NSBoxType)boxType;
   - (NSBoxType)boxType;
   - (void)setTitlePosition:(NSTitlePosition)aPosition;
   - (NSTitlePosition)titlePosition;
   - (void)setFrameFromContentFrame:(NSRect)contentFrame;
   - (void)setTitleFont:(NSFont *)fontObj;
   - (NSFont *)titleFont;
   - (void)setContentView:(NSView *)aView;
   - (id)contentView;
   - (void)setContentViewMargins:(NSSize)offsetSize;
   - (NSSize)contentViewMargins;
 // Instance Methods
   - (NSRect)borderRect;
   - (void)sizeToFit;
   - (id)titleCell;
   - (NSRect)titleRect;

    Part II: API Quick Reference
    Chapter 13. Foundation Classes