DekGenius.com
[ Team LiB ] Previous Section Next Section

NSControl Mac OS X 10.0

NSControl is a subclass of NSView that is the base class of all AppKit controls like text fields (NSTextField), buttons (NSButton), table views (NSTableView), color wells (NSColorWell), and more. Controls generally have associated cells that are responsible for presenting the graphical appearance of the control, and responding appropriately to user interaction with the control.

figs/cocn_1523.gif

@interface NSControl : NSView
 // Initializers
   - (id)initWithFrame:(NSRect)frameRect;
 // Accessor Methods
   - (void)setTag:(int)anInt;
   - (int)tag;
   - (void)setCell:(NSCell *)aCell;
   - (id)cell;
   - (void)setNeedsDisplay;
   - (void)setTarget:(id)anObject;
   - (id)target;
   - (void)setAction:(SEL)aSelector;
   - (SEL)action;
   - (void)setFormatter:(NSFormatter *)newFormatter;
   - (id)formatter;
   - (void)setIgnoresMultiClick:(BOOL)flag;
   - (BOOL)ignoresMultiClick;
   - (void)setIntValue:(int)anInt;
   - (int)intValue;
   - (void)setStringValue:(NSString *)aString;
   - (NSString *)stringValue;
   - (void)setFloatValue:(float)aFloat;
   - (float)floatValue;
   - (void)setAttributedStringValue:(NSAttributedString *)obj;
   - (NSAttributedString *)attributedStringValue;
   - (void)setDoubleValue:(double)aDouble;
   - (double)doubleValue;
   - (void)setEnabled:(BOOL)flag;
   - (void)setFloatingPointFormat:(BOOL)autoRange left:(unsigned)leftDigits right:(unsigned)rightDigits;
   - (void)setAlignment:(NSTextAlignment)mode;
   - (NSTextAlignment)alignment;
   - (void)setObjectValue:(id)obj;
   - (id)objectValue;
   - (void)setContinuous:(BOOL)flag;
   - (void)setFont:(NSFont *)fontObj;
   - (NSFont *)font;
 // Class Methods
   + (Class)cellClass;
   + (void)setCellClass:(Class)factoryId;
 // Instance Methods
   - (void)calcSize;
   - (NSText *)currentEditor;
   - (BOOL)abortEditing;
   - (BOOL)isContinuous;
   - (BOOL)isEnabled;
   - (void)mouseDown:(NSEvent *)theEvent;
   - (void)selectCell:(NSCell *)aCell;
   - (id)selectedCell;
   - (int)selectedTag;
   - (BOOL)sendAction:(SEL)theAction to:(id)theTarget;
   - (int)sendActionOn:(int)mask;
   - (void)sizeToFit;
   - (void)takeDoubleValueFrom:(id)sender;
   - (void)takeFloatValueFrom:(id)sender;
   - (void)takeIntValueFrom:(id)sender;
   - (void)takeObjectValueFrom:(id)sender;
   - (void)takeStringValueFrom:(id)sender;
   - (void)updateCell:(NSCell *)aCell;
   - (void)updateCellInside:(NSCell *)aCell;
   - (void)validateEditing;
   - (void)drawCell:(NSCell *)aCell;
   - (void)drawCellInside:(NSCell *)aCell;
// Methods Implemented by the Delegate
   - (BOOL)control:(NSControl *)control didFailToFormatString:(NSString *)string errorDescription:(NSString *)error;
   - (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string
        errorDescription:(NSString *)error;
   - (BOOL)control:(NSControl *)control  isValidObject:(id)obj;
   - (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor;
   - (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor;
   - (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector;
   - (void)controlTextDidBeginEditing:(NSNotification *)obj;
   - (void)controlTextDidChange:(NSNotification *)obj;
   - (void)controlTextDidEndEditing:(NSNotification *)obj;

Subclasses

NSBrowser, NSButton, NSColorWell, NSImageView, NSMatrix, NSScroller, NSSlider, NSStepper, NSTableView, NSTextField

    [ Team LiB ] Previous Section Next Section