This is NSForm.rtf in view mode; [Download] [Up]
paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc. All Rights Reserved. s4 li100 fi0 ri1007 ql f0 b fs36 fs100 fs36 NSForm pard s14 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSMatrix : NSControl : NSView : NSResponder : NSObject fs20 fs28 s7 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding (NSResponder) fi0 NSObject (NSObject) fs20 fs28 s8 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSForm.h fs20 fs28 pard s19 li100 fi0 ri1007 ql f0 b fs28 fs20 fs28 Class Description fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 An NSForm is an NSMatrix that contains titled entries (text fields) into which a user can type data values. Entries are indexed from the top down (starting with zero). Each item in the NSForm, including the titles, is an NSFormCell. A mouse click on an NSFormCell (that is, on the title or in the entry area) starts text editing in that entry. If the user presses the Return or Enter key while editing an entry, the action of the entry is sent to the target of the entry, or'd0if the entry doesn't have an action'd0the NSForm sends its action to its target. If the user presses the Tab key, the next entry in the NSForm is selected; if the user presses Shift-Tab, the previous entry is selected. fs16 fs28 For more information, see the NSFormCell and NSMatrix class specifications. fs16 fs28 pard s19 li100 fi0 ri1007 ql f0 b fs24 fs28 Laying Out the Form fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSFormCell *)b addEntry:b0 (NSString *)i titlei0 tab Adds and returns a new entry with i titlei0 as its title at the end of the Form. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSFormCell *)b insertEntry:b0 (NSString *)i titlei0 tab Inserts a new entry at i indexi0 with i titlei0 as its title. s11 li7030 fi-6553 fi-5796 b atIndex:b0 (int)i indexi0 tab s9 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b removeEntryAtIndex:b0 (int)i indexi0 tab Removes the entry at i indexi0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setInterlineSpacing:b0 (float)i spacingi0 tab Sets the spacing between entries to i spacingi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Finding Indices fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (int)b indexOfCellWithTag:b0 (int)i aTagi0 tab Returns the index for the entry with tag i aTagi0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (int)b indexOfSelectedItemb0 tab Returns the index of the currently selected entry. pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Modifying Graphic Attributes fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b setBezeled:b0 (BOOL)i flagi0 tab Sets whether entries have a bezeled border. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setBordered:b0 (BOOL)i flagi0 tab Sets whether the entries have a plain border. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setTextAlignment:b0 (int)i modei0 tab Sets how text is aligned within the entries to i modei0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setTextFont:b0 (NSFont *)i fontObjecti0 tab Sets the font used to draw entry text to i fontObjecti0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setTitleAlignment:b0 (NSTextAlignment)i modei0 tab Sets how titles are aligned to i modei0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setTitleFont:b0 (NSFont *)i fontObjecti0 tab Sets the font used to draw entry titles to i fontObjecti0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Setting the Cell Class fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 + (Class)b cellClasstab b0 Returns the class last set in a b setCellClass:b0 message, or the NSFormCell class if b setCellClass:b0 has never been called. fi-6552 fs16 fs28 fi-6552 + (void)b setCellClass:b0 (Class)i classIdi0 tab Sets the class of NSCell used in the NSForm. pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Getting a Cell fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b cellAtIndex:b0 (int)i indexi0 tab Returns the Cell at i indexi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Displaying a Cell fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b drawCellAtIndex:b0 (int)i indexi0 tab Displays the Cell at the specified i indexi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Editing Text fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b selectTextAtIndex:b0 (int)i indexi0 tab Selects the text in the entry at i indexi0 . pard s19 li100 fi0 ri1007 ql f0 b fs48 fs28 Resizing the Form fs14 fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b setEntryWidth:b0 (float)i widthi0 tab Sets the width of all the entries (including the title part) to i widthi0 . s11 li7030 fi-6553 fi-5796 }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.