home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
OpenStepConversion
/
IntermediateFrameworks3
/
AppKit.framework
/
Headers
/
NSView.h
< prev
next >
Wrap
Text File
|
1994-09-29
|
9KB
|
277 lines
/*
View.h
Application Kit, Release 2.0
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#import "NSWindow.h"
#import "screens.h"
#import <time.h>
/* Autosizing parameters */
enum {
NSViewNotSizable = 0,
NSViewMinXMargin = 1,
NSViewWidthSizable = 2,
NSViewMaxXMargin = 4,
NSViewMinYMargin = 8,
NSViewHeightSizable = 16,
NSViewMaxYMargin = 32
};
typedef enum _NSBorderType {
NSNoBorder = 0,
NSLineBorder = 1,
NSBezelBorder = 2,
NSGrooveBorder = 3
} NSBorderType;
/* Are we drawing, printing, or copying PostScript to the scrap? */
extern short NXDrawingStatus;
/* NXDrawingStatus values */
#define NX_DRAWING 1 /* we're drawing */
#define NX_PRINTING 2 /* we're printing */
#define NX_COPYING 3 /* we're copying to the scrap */
extern BOOL NSScreenDump; /* Do we draw selection while printing? */
@class NSEvent;
@interface NSView : NSResponder
{
NSRect frame;
NSRect bounds;
id superview;
id subviews;
id window;
struct __vFlags {
#ifdef __BIG_ENDIAN__
unsigned int noClip:1;
unsigned int translatedDraw:1;
unsigned int drawInSuperview:1;
unsigned int alreadyFlipped:1;
unsigned int needsFlipped:1;
unsigned int rotatedFromBase:1;
unsigned int rotatedOrScaledFromBase:1;
unsigned int opaque:1;
unsigned int disableAutodisplay:1;
unsigned int needsDisplay:1;
unsigned int validGState:1;
unsigned int newGState:1;
unsigned int _RESERVED:2;
unsigned int _noVerticalAutosizing:1;
unsigned int _hasDirtySubview:1;
#else
unsigned int _hasDirtySubview:1;
unsigned int _noVerticalAutosizing:1;
unsigned int _RESERVED:2;
unsigned int newGState:1;
unsigned int validGState:1;
unsigned int needsDisplay:1;
unsigned int disableAutodisplay:1;
unsigned int opaque:1;
unsigned int rotatedOrScaledFromBase:1;
unsigned int rotatedFromBase:1;
unsigned int needsFlipped:1;
unsigned int alreadyFlipped:1;
unsigned int drawInSuperview:1;
unsigned int translatedDraw:1;
unsigned int noClip:1;
#endif
} vFlags;
struct ___vFlags {
#ifdef __BIG_ENDIAN__
unsigned int autosizing:6;
unsigned int autoresizeSubviews:1;
unsigned int notifyWhenFlipped:1;
unsigned int ancestorNotifyWasEnabled:1;
unsigned int needsAncestorNotify:1;
unsigned int notifyToInitGState:1;
unsigned int wantsGState:1;
unsigned int noCopyOnScroll:1;
unsigned int noDisplayOnScroll:1;
unsigned int specialClip:1;
unsigned int mark:1;
#else
unsigned int mark:1;
unsigned int specialClip:1;
unsigned int noDisplayOnScroll:1;
unsigned int noCopyOnScroll:1;
unsigned int wantsGState:1;
unsigned int notifyToInitGState:1;
unsigned int needsAncestorNotify:1;
unsigned int ancestorNotifyWasEnabled:1;
unsigned int notifyWhenFlipped:1;
unsigned int autoresizeSubviews:1;
unsigned int autosizing:6;
#endif
} _vFlags;
int _gState;
id _frameMatrix;
id _drawMatrix;
NSString * *_dragTypes;
void * _vPrivate;
}
- initFrame:(NSRect)frameRect;
- window;
- superview;
- subviews;
- (BOOL)isDescendantOf:aView;
- findAncestorSharedWith:aView;
- opaqueAncestor;
- addSubview:aView;
- addSubview:aView :(int)place relativeTo:otherView;
- windowChanged:newWindow;
- removeFromSuperview;
- replaceSubview:oldView with:newView;
- notifyAncestorWhenFrameChanged:(BOOL)flag;
- suspendNotifyAncestorWhenFrameChanged:(BOOL)flag;
- notifyWhenFlipped:(BOOL)flag;
- descendantFrameChanged:sender;
- descendantFlipped:sender;
- resizeSubviews:(NSSize)oldSize;
- superviewSizeChanged:(NSSize)oldSize;
- setAutoresizeSubviews:(BOOL)flag;
- setAutosizing:(unsigned int)mask;
- (unsigned int)autosizing;
- setFrameOrigin:(NSPoint)_newOrigin;
- setFrameSize:(NSSize)_newSize;
- setFrame:(NSRect)frameRect;
- rotateTo:(float)angle;
- moveBy:(float)deltaX :(float)deltaY;
- sizeBy:(float)deltaWidth :(float)deltaHeight;
- rotateBy:(float)deltaAngle;
- (NSRect)frame;
- (float)frameAngle;
- setBoundsOrigin:(NSPoint)_newOrigin;
- setBoundsSize:(NSSize)_newSize;
- setDrawRotation:(float)angle;
- translateOriginToPoint:(NSPoint)_translation;
- scaleUnitSquareToSize:(NSSize)_newUnitSize;
- rotate:(float)angle;
- (NSRect)bounds;
- (float)boundsAngle;
- setFlipped:(BOOL)flag;
- (BOOL)isFlipped;
- (BOOL)isRotatedFromBase;
- (BOOL)isRotatedOrScaledFromBase;
- setOpaque:(BOOL)flag;
- (BOOL)isOpaque;
- (NSPoint)convertPointFromSuperview:(NSPoint)aPoint;
- (NSPoint)convertPointToSuperview:(NSPoint)aPoint;
- convertRectFromSuperview:(NSRect)aRect;
- convertRectToSuperview:(NSRect)aRect;
- (NSPoint)convertPoint:(NSPoint)aPoint fromView:aView;
- (NSPoint)convertPoint:(NSPoint)aPoint toView:aView;
- (NSSize)convertSize:(NSSize)aSize fromView:aView;
- (NSSize)convertSize:(NSSize)aSize toView:aView;
- convertRect:(NSRect)aRect fromView:aView;
- convertRect:(NSRect)aRect toView:aView;
- centerScanRect:(NSRect)aRect;
- (BOOL)canDraw;
- setAutodisplay:(BOOL)flag;
- (BOOL)isAutodisplay;
- setNeedsDisplay:(BOOL)flag;
- (BOOL)needsDisplay;
- update;
- drawInSuperview;
- (int)gState;
- allocateGState;
- freeGState;
- notifyToInitGState:(BOOL)flag;
- initGState;
- renewGState;
- clipToFrame:(NSRect)frameRect;
- (BOOL)lockFocus;
- unlockFocus;
- (BOOL)isFocusView;
- setClipping:(BOOL)flag;
- (BOOL)doesClip;
- (NSRect)visibleRect;
- displayIfNeeded;
- displayRect:(NSRect)rects;
- display;
- drawRect:(NSRect)rects;
- scrollPoint:(NSPoint)aPoint;
- scrollRectToVisible:(NSRect)aRect;
- autoscroll:(NSEvent *)theEvent;
- adjustScroll:(NSRect)newVisible;
- invalidate:(NSRect)rect;
- scrollRect:(NSPoint)aRect by:(NSSize)delta;
- hitTest:(NSPoint)aPoint;
- (BOOL)mouse:(NSPoint)aPoint inRect:(NSRect *)aRect;
- findViewWithTag:(int)aTag;
- (int)tag;
- (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
- (BOOL)acceptsFirstMouse;
- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent;
- addCursorRect:(NSRect)aRect cursor:anObj;
- removeCursorRect:(NSRect)aRect cursor:anObj;
- discardCursorRects;
- resetCursorRects;
- (BOOL)shouldDrawColor;
@end
@interface NSView(Printing)
- (NSData *)dataWithEPSInsideRect:(NSRect)rect;
- writePSCodeInside:(NSRect)copyArea to:pasteboard;
- printPSCode:sender;
- faxPSCode:sender;
- faxPSCode:sender toList:(const char *const *)names numberList:(const char *const *)numbers sendAt:(time_t)when wantsCover: (BOOL)cFlag wantsNotify: (BOOL)nFlag wantsHires: (BOOL)hFl faxName: (NSString *)aString;
- (BOOL)knowsPagesFirst:(int *)firstPageNum last:(int *)lastPageNum;
- openSpoolFile:(char *)filename;
- beginPSOutput;
- beginPrologueBBox:(NSRect)boundingBox creationDate:(NSString *)dateCreated createdBy:(NSString *)anApplication fonts:(NSString *)fontNames forWhom:(NSString *)user pages:(int)numPages title:(NSString *)aTitle;
- endHeaderComments;
- endPrologue;
- beginSetup;
- endSetup;
- beginPage:(int)ordinalNum label:(NSString *)aString bBox:(NSRect)pageRect fonts:(NSString *)fontNames;
- beginPageSetupRect:(NSRect)aRect placement:(NSPoint)location;
- addToPageSetup;
- endPageSetup;
- endPage;
- beginTrailer;
- endTrailer;
- endPSOutput;
- spoolFile:(NSString *)filename;
- (float)heightAdjustLimit;
- (float)widthAdjustLimit;
- adjustPageWidthNew:(float *)newRight left:(float)oldLeft right:(float)oldRight limit:(float)rightLimit;
- adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
- (NSRect)rectForPage;
- placePrintRect:(NSRect)aRect offset:(NSPoint)location;
- drawSheetBorderWithSize:(NSSize)_borderSize;
- drawPageBorderWithSize:(NSSize)_borderSize;
@end
@interface NSView(Drag)
- dragImage:anImage at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:sourceObj slideBack:(BOOL)slideFlag;
- registerForDraggedTypes:(NSArray *)newTypes;
- unregisterDraggedTypes;
@end
@interface NSView (IconDragging)
- dragFile:(NSString *)filename fromRect:(NSRect)rect slideBack:(BOOL)aFlag event:(NSEvent *)event;
@end
@interface NSView (RIBPrinting)
- (BOOL)canPrintRIB;
@end
@interface NSObject(NXPrintingUserInterface)
- (BOOL)shouldRunPrintPanel:aView;
@end