This is SwitchBox.rtf in view mode; [Download] [Up]
SwitchBox INHERITS FROM Box : View : Responder : Object DECLARED IN SwitchBox.h CLASS DESCRIPTION A SwitchBox is a View that allows its subview to be switched on request. The subview is switched to onee of a set of predefined views. The separate subviews are assigned to the views of other panels, windows or boxes. This allows the interface on a region of a panel to change dynamically as it does in the Preferences application where one panel is used to serve as the working space for several distinct tasks. INSTANCE VARIABLES Inherited from Object Class isa; Inherited from Responder id nextResponder; Inherited from View NXRect frame; NXRect bounds; id superview; id subviews; id window; struct __vFlags vFlags; Inherited from Box id cell; id contentView; NXSize offsets; NXRect borderRect; NXRect titleRect; struct _bFlags{ unsigned int borderType:2; unsigned int titlePosition:3; unsigned int transparent:1; } bFlags; Declared in SwitchBox id panel0..panel9 id panelList id delegate; int defaultPanel; panel0..panel9 Outlets allowing connections to be made in Interface Builder. panelList An instance of List which actually holds the subviews. delegate The delegate of the SwitchBox. defaultPanel The number of the subview SwitchBox initially takes. METHOD TYPES Initializing a new SwitchBox object - initFrame: Freeing a Box object - free Setting The Default Subview ± setDefaultPanel: Switching the Subview ± switchTo: ± switchToTagOf: Setting the Delegate ± delegate ± setDelegate: INSTANCE METHODS delegate - delegate Returns the delegate of the NXBrowser, the object that provides the data to be browsed. See also: - setDelegate:, ªMETHODS IMPLEMENTED BY THE DELEGATEº free - free Releases the storage for the SwitchBox but not all its subviews. See also: - free (View) initFrame: - initFrame:(const NXRect *)frameRect Initializes the SwitchBox, which must be a newly allocated SwitchBox instance. The SwitchBox's frame rectangle is made equivalent to that pointed to by frameRect. The title position is set to NX_NOTITLE, the border type is NX_BEZEL. The defaultPanel is set to -1. Returns self. See also: - initFrame (View), + alloc (Object), + allocFromZone: (Object) setDefaultPanel: - setDefaultPanel:(int)aNumber Set the value of defaultPanel to aNumber. Returns self. setDelegate: - setDelegate:anObject Sets the delegate of the NXBrowser to anObject and returns self. If anObject is of a class that implements the browser:fillMatrix:inColumn: method (normal or lazy delegates) or the browser:loadCell:atRow:inColumn and browser:getNumRowsInColumn: methods (very lazy delegate), it is set as the NXBrowser's delegate; otherwise the delegate is set to nil. Returns self. See also: - delegate, ªMETHODS IMPLEMENTED BY THE DELEGATEº switchTo: - switchTo:(int)anIndex Switches the SwitchBox' subview to the subview in the panelList at anIndex. Returns self. See also: ªMETHODS IMPLEMENTED BY THE DELEGATEº switchToTagOf: - switchToTagOf:sender Switches the SwitchBox' subview to the subview in the panelList at [sender tag]. If, however, sender isKindOf Matrix then [[sender selectedCell] tag] is used. Returns self. See also: ªMETHODS IMPLEMENTED BY THE DELEGATEº METHODS IMPLEMENTED BY THE DELEGATE willSwitchTo: - willSwitchTo:(int)anIndex This method invoked by SwitchBox when it has been asked to switch to subview in panelList at anIndex. Returns nil if the switch is to be aborted. No attempt is made to reconcile with the original sender an aborted switch that was motivated by switchToTagOf:. didSwitchTo: - didSwitchTo:(int)anIndex This method invoked by SwitchBox when it has switched to subview in panelList at anIndex.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.