This is PageMarker.m in view mode; [Download] [Up]
/* PageMarker.m by Paul Rensinng November 1991
* draws page boundary in drawing document
*
* Copyright (C) 1991 The Board of Trustees of
* The Leland Stanford Junior University. All Rights Reserved.
*/
#import "PageMarker.h"
const char PageMarker_h_rcsid[] = PAGEMARKER_H_ID;
const char PageMarker_m_rcsid[] = "$Id: PageMarker.m,v 2.3 1992/12/05 17:50:04 pfkeb Exp $";
/* Keep around in case we change our mind on PRECOMP
#import <appkit/View.h>
#import <math.h>
*/
#import "HGraphicView.h"
@implementation PageMarker : Line
/*
* The line to mark a page boundary.
* We must override a number of methods so that it does not print and
* so it does not move around.
*/
- addSelf: (id) hgraphview
{
NXRect box;
float x;
[ hgraphview getFrame: &box ];
box.origin.x = 0;
box.origin.y = box.size.height;
box.size.height = 0.0;
[ self setBounds: &box];
x = 0.5;
[ self setGray: &x ];
x = 4.0;
[ self setLineWidth: &x ];
[ self lock ];
[ hgraphview insertGraphicNoSelect: self ];
return self;
}
- draw
/*
* Only draw if drawing on screen.
*/
{
if (bounds.size.width < 1.0 && bounds.size.height < 1.0) return self;
if (NXDrawingStatus == NX_DRAWING)
{
[self setLineColor];
[self drawLine];
}
return self;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.