This is PreferencesBrain.h in view mode; [Download] [Up]
/* Generated by Interface Builder */ // This object is the central clearing house for the preferences. It // handles I/O between the Preferences Panel controls and it stores stuff // in the defaults database. It also tells the app when things change. // The app can also query it to find the state of various preferences. #import <objc/Object.h> /* superclass */ #import <appkit/Matrix.h> /* matrix controls' methods */ #import <appkit/Control.h> /* various controls' methods */ #import <appkit/defaults.h> /* preferences (defaults) */ #import <appkit/Slider.h> #import <stdio.h> /* strcpy */ #import <stdlib.h> /* malloc */ #import "GameBrain.h" /* where to send change alerts */ @interface PreferencesBrain:Object { // various controls on the Preferences... Panel id speedButtons; // buttons to set game speed on pref panel id preferencesPanel; // preferences panel instance id musicButtons; // radio buttons for music on/off id effectButtons; // radio buttons for sound effects on/off id demoSwitch; // "Demo Sound" switch id alertSwitch; // "Alerts" switch id autoUnPauseSwitch; // "Auto Unpause" switch id autoStartSwitch; // "New Game on Launch" switch id gameScreen; // GameView instance/subclass id gameBrain; // GameBrain instance // instance variables to hold preferences and game status: int speed; BOOL music, effects, alert, demoSound, autoUnPause, autoStart; char *defaultPlayerName, *version; // used for internal purposes. } - init; // designated initializer // methods called by the app to access the various preferences - (BOOL)firstTimeCheck; // first time running this version? - preferencesPanel; // returns the id of the Preferences Panel - (int)speed; // return game speed - (BOOL)music; // return music status - (BOOL)effects; // return effects status - setDefaultPlayerName:(char *)aString; // change default player name - (const char *)defaultPlayerName; // return ptr to defaultPlayerName string - revert:sender; // return to default values - setAutoUnPause:(BOOL)al; - (BOOL)autoUnPause; - (BOOL)alert; - (BOOL)demoSound; - (BOOL)autoStart; - setAutoStart:(BOOL)al; - setAlert:(BOOL)al; // Interface Builder (IB) methods: // (called by various controls on the Preferences Panel) - readDefaults:sender; // read preferences from defaults database - writeDefaults:sender; // write preferences to defaults database - speedChange:sender; // target of speed pref. matrix - preferences:sender; // called by Preferences... menu item - musicChange:sender; // target of music on/off matrix on pref panel - effectsChange:sender; // target of effect on/off matr. on pref panel - alertChange:sender; // turn alert panels on/off - autoStartChange:sender; // auto start game on launch on/off - demoSoundChange:sender; // turn off sound only in demo - setBack:sender; // set the background image - revertBack:sender; // revert to default background image - back1:sender; // call up background #1 - back2:sender; // call up background #1 - back3:sender; // call up background #1 - unPauseChange:sender; // turn off auto un-pausing @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.