This is Controller.h in view mode; [Download] [Up]
#import <appkit/appkit.h> #import <dpsclient/dpsNeXT.h> // Check delay when calling timed entry #define PB_CHECKDELAY 1.0 // This is only used for the HEX Viewer indicating that the Hex-Viewer // can handle any type of PB-content #define PB_HANDLEANY "Any Pasteboard content" // Extension for loadable PBInspector Modules #define PB_EXTENSION ".pbio" #define PB_LEXTENSION strlen(PB_EXTENSION) @interface Controller:Object { @private // Maximum value for progress View int maxValue; // outlet counter for pasteboard change count id pbChangeCountField; // Matrix with buttons describing contents id pbContents; // the ScrollView id itemView; // TextField outlet describing the contents type id itemType; // Button for default (hex) viewer id hexButton; // Timed entry to check pasteboard DPSTimedEntry myTimer; // Last change count when Pasteboard was visited int pbChangeCount; // the cuurent Pasteboard id pb; // the differnt pasteboards available id generalPb, fontPb, rulerPb, findPb, dragPb; // ModuleList id modulelist; // Previous viewer id previous; // progress panel support id progress, progressPanel, progressTitle; } // ============================================================================ // PRIVATE METHODS // ============================================================================ - changePasteboard:sender; - checkPasteboard; - findHandlerFor:(const char *)type; - loadViewModulesFrom:(const char *)dirname; - installViewer:viewer forType:(const char *)theType; - identify:sender; - setHex:sender; - appDidInit:sender; - appWillTerminate:sender; - saveTo:(const char *)filename; - loadFrom:(const char *)filename; - pasteboardChangedOwner:sender; // ============================================================================ // PUBLIC METHODS // ============================================================================ // get the selected Pasteboard. This is the Pasteboard the viewer // will retrieve data from - getPb; // Progress Panel for operations that take a bit longer // init a progress panel with panel-title "title". "x" holds the maximum steps // your process will take. E.g. If you load five different files init it with "5" - initProgressPanel:(const char*)title max:(int)x; // change the Info-line in the progress Panel E.g. show filename which is currently // loaded - setProgressInfo:(const char *)info; // move the progess display. E.g. if you load five files you will call this method // with values "1" - "5" for each file loaded. - progressStep:(int)n; // make the progress Panel disappear - removeProgressPanel; // Pasteboard data access // get data for type "type" into "data". "datasize" returns the number of bytes // read to "data" - provideData:(char **)data length:(int *)datasize forType:(const char *)type; // call this method after provideData with the values returned from provideData - releaseData:(char *)data length:(int)datasize; // read contents from pasteboard for type "theType" into the Stream "theStream" - provideStream:(NXStream **)theStream forType:(const char *)theType; // call this method after provideStream to free memory - releaseStream:(NXStream *)theStream; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.