* move DPSOperators.h to XDPS.

* move GPS headers into a new backend.
	* define GSContext.h/GSContext.m as abstract super for all drawing
		destinations (eliminates the need for DPS, GPS, DGS at the root of
		the AppKit) add appropriate defintion to various classes.
	* NSMatrix.m add abstract backend code from xraw (eliminate backend).
	* NSSlider.m add abstract backend code from xraw (eliminate backend).
	* NSSliderCell.m add abstract backend code from xraw (eliminate backend).
	* NSSplitView.m add abstract backend code from xraw (eliminate backend).
		replace private divider highlight method with NSHighlightRect()
	* NSWindow.m add class method to create backend specific window view.
	* NSTextField.m add abstract backend code from xraw (eliminate backend).
	* NSForm.m add abstract backend code from xraw (eliminate backend).
	* NSFormCell.m add abstract backend code from xraw (eliminate backend).
	* NSColorWell.m add abstract backend code from xraw (eliminate backend).
	* NSButton.m add abstract backend code from xraw (eliminate backend).
	* NSControl.m add abstract backend code from xraw (eliminate backend).
	* NSBox.m add abstract backend code from xraw (eliminate backend).
	* NSBrowser.m add abstract backend code from xraw (eliminate backend).
	* NSBrowserCell.m add abstract backend code from xraw (eliminate backend).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3321 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
far 1998-11-25 17:16:48 +00:00
parent d1456177e3
commit 2d4079f2cf
53 changed files with 2429 additions and 5144 deletions

View file

@ -46,11 +46,18 @@
#include <AppKit/TrackingRectangle.h>
#include <AppKit/PSMatrix.h>
@implementation NSView
/* Class variables */
static NSString *nsview_thread_key = @"NSViewThreadKey";
//
// Class variables
//
static NSString *viewThreadKey = @"NSViewThreadKey";
//
// Class methods
//
+ (void)initialize
{
if (self == [NSView class])
@ -63,13 +70,13 @@ static NSString *nsview_thread_key = @"NSViewThreadKey";
+ (NSView *)focusView
{
NSMutableDictionary *dict = [[NSThread currentThread] threadDictionary];
NSMutableArray *stack = [dict objectForKey: nsview_thread_key];
NSMutableArray *stack = [dict objectForKey: viewThreadKey];
NSView *current_view = nil;
if (stack)
{
unsigned count = [stack count];
// return the view at
if (stack) // the top of thread's
{ // focus stack or nil
unsigned count = [stack count]; // if none is focused
if (count > 0)
current_view = [stack objectAtIndex: --count];
}
@ -77,6 +84,9 @@ NSView *current_view = nil;
return current_view;
}
//
// Instance methods
//
- init
{
return [self initWithFrame:NSZeroRect];
@ -123,17 +133,17 @@ NSView *current_view = nil;
}
- (void)addSubview:(NSView *)aView
{ // make sure we aren't making
if ([self isDescendantOf:aView]) // self a subview of self
{
{ // make sure we are not
if ([self isDescendantOf:aView]) // making self a subview of
{ // self
NSLog(@"Operation addSubview: creates a loop in the views tree!\n");
return;
}
[aView viewWillMoveToWindow:window]; // Add to our subview
[aView setSuperview:self]; // list
[aView viewWillMoveToWindow:window];
[aView setSuperview:self];
[aView setNextResponder:self];
[sub_views addObject:(id)aView];
[sub_views addObject:(id)aView]; // Add to our subview list
}
- (void)addSubview:(NSView *)aView // may not be per OS spec
@ -273,7 +283,7 @@ NSSize old_size = bounds.size;
bounds.size = frame.size;
[frameMatrix setFrameOrigin:frame.origin];
[self resizeSubviewsWithOldSize: old_size]; // Resize subviews
[self resizeSubviewsWithOldSize: old_size]; // Resize the subviews
if (post_frame_changes)
[[NSNotificationCenter defaultCenter]
postNotificationName:NSViewFrameDidChangeNotification
@ -297,7 +307,7 @@ NSSize old_size = bounds.size;
frame.size = bounds.size = newSize;
[self resizeSubviewsWithOldSize: old_size]; // Resize subviews
[self resizeSubviewsWithOldSize: old_size]; // Resize the subviews
if (post_frame_changes)
[[NSNotificationCenter defaultCenter]
postNotificationName:NSViewFrameDidChangeNotification
@ -657,13 +667,13 @@ id e, o;
oldSize.width, oldSize.height);
}
- (void)allocateGState {} // implemented by the
- (void)releaseGState {} // back end
- (int)gState { return 0; }
- (void)renewGState {}
- (void)setUpGState {}
- (void)lockFocus {}
- (void)unlockFocus {}
- (void)allocateGState {} // implemented by the
- (void)releaseGState {} // back end
- (int)gState { return 0; }
- (void)renewGState {}
- (void)setUpGState {}
- (void)lockFocus { [self subclassResponsibility:_cmd]; }
- (void)unlockFocus { [self subclassResponsibility:_cmd]; }
- (BOOL)canDraw
{ // not implemented per