ftp.nice.ch/pub/next/connectivity/protocol/PPPMonitor.1.16.NIHS.bs.tar.gz#/PPPMonitor1.16/Source/ExecScrollText.h

This is ExecScrollText.h in view mode; [Download] [Up]

// -------------------------------------------------------------------------------------
// ExecScrollText.h
// (Indent:4, Tabs:4)
// -------------------------------------------------------------------------------------
// Copyright 1996 Persistent Technologies, Inc. - all rights reserved
// -------------------------------------------------------------------------------------
// This source code comes with no warranty of any kind, and the user assumes all 
// responsibility for its use.
// -------------------------------------------------------------------------------------
#import <objc/Object.h>
#import "ExecRunCommand.h"

// -------------------------------------------------------------------------------------
// formatted text size limit for 'textPrintf'
#define         textStringSIZE          2048    // actual size cannot be known

// -------------------------------------------------------------------------------------
// method name synonyms
#define         setAutoLF               setAutoLineFeed

// -------------------------------------------------------------------------------------
// structures used internal to ScrollText

/* text attributes */
typedef struct textAttr_s {
	id					fontId;
	int					colorMode;		// 0=none, 1=gray, 2=color
	NXColor				color;			// contains only gray if mode=1
} textAttr_t;

// -------------------------------------------------------------------------------------
// Scroll text output for commands
@interface ExecScrollText : Object
#ifdef RemoteClient_PROTOCOL
	<RemoteClient>
#endif
{

	id					delegate;					// delegate for ExecServer support
	id					scrollView;					// scroll view object
	id					textView;					// text view object
	textAttr_t			runAttr;					// newly added text attributes
	BOOL				wasEditable;				// scrollView was editable
	BOOL				autoLf;						// auto linefeed mode
}

// -------------------------------------------------------------------------------------
+ newExecScrollText:anObject;
//  Creates a new ExecScrollText object to handle text scrolling.  anObject must be
//  a ScrollView object which has a Text content view.  This is compatible
//  with the outlet provided by the text scroll view object in Interface Builder.
//
// -------------------------------------------------------------------------------------
- setDelegate:aDelegate;
- (id)delegate;
//  Currently used for ExecServer support.  Returns self.
//
// -------------------------------------------------------------------------------------
- setAutoLineFeed:(BOOL)mode;
//  Sets the autoLineFeed options.  If set to YES, then a newLine will be sent
//  after each string written to the scroll text.  The default is NO. 
//
// -------------------------------------------------------------------------------------
- docView;
//  Returns the ScrollView docView.
//
// -------------------------------------------------------------------------------------
- scrollView;
//  Returns the ScrollView id.
//
// -------------------------------------------------------------------------------------
- setTextAttributeFont:fontId;
- setTextAttributeGray:(float)aGray;
- setTextAttributeColor:(NXColor)aColor;
//  Set RTF font/gray run attributes for newly added text.
//
// -------------------------------------------------------------------------------------
- setTabStops:(float*)tabArray count:(int)c;
- setTab:(float)tabSize count:(int)c;
//  Set default tabs stops.  'setTabStops:count:' set the default tabs to those
//  specified in the array 'tabArray'. 'setTab:count:' sets the default tabs to 
//  multiples of 'tabSize'.  Both return self.
//
// -------------------------------------------------------------------------------------
- clearScrollText;
//  This clears the contents of the Text ScrollView.  Returns self.
//
// -------------------------------------------------------------------------------------
- (int)textPrint:(const char*)buffer;
- (int)textPrintf:(const char*)fmt args:(va_list)args;
- (int)textPrintf:(const char*)fmt, ...;
//  Appends the specified formated string to the contents of the ScrollView.
//
// -------------------------------------------------------------------------------------
- (ExecRunCommand*)runCommand:(const char*)command user:(const char*)user;
- (int)system:(const char*)command user:(const char*)user;
//  Allows running a command shell and using the scrollable text view to place the
//  output.  The delegate is sent the message commandDidComplete:withError: when
//  the command has completed execution.
//
// -------------------------------------------------------------------------------------

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.