0
(@pdfView setDocument:pdfDoc)
0
(@pdfView setDisplayMode:kPDFDisplaySinglePage)
0
(set w (@pdfView window))
0
+(NSLog "window #{w}, self #{self}")
0
(w setBecomesKeyOnlyIfNeeded:YES)
0
- (w setNextResponder:self))
0
+ (w setNextResponder:self)
0
(- (void)changeToPage:(int)i is
0
(unless (eq @currentPageIndex i)
0
(@pageSlider setIntValue:@currentPageIndex)))
0
-(class MyDocument is NSDocument
0
- (ivar (id) packModel (id) packerView)
0
(set @packModel (NSKeyedUnarchiver unarchiveObjectWithData:data))
0
(@packModel setUndoManager:(self undoManager))
0
(if @packerView (self updateUI))
0
- (- (id)printOperationWithSettings:(id)printSettings error:(id)outError is ;; last type should be "NSError **"
0
- (NSPrintOperation printOperationWithView:packerView printInfo:(self printInfo))))
0
(global NSDragOperationCopy 1)
0
(global NSPDFPboardType "Apple PDF pasteboard type")
0
(- (void) replacePageInfoAt:(int) i withPageInfo:(id) pi is
0
(set oldInfo (@pageInfos objectAtIndex:i))
0
(unless (eq pi oldInfo)
0
- ;; invocation-based undo is broken
0
- ;((@undoManager prepareWithInvocationTarget:self) replacePageInfoAt:i withPageInfo:oldInfo)
0
+ ((@undoManager prepareWithInvocationTarget:self) replacePageInfoAt:i withPageInfo:oldInfo)
0
(@pageInfos replaceObjectAtIndex:i withObject:pi)
0
((NSNotificationCenter defaultCenter) postNotificationName:"PackModelChangedNotification" object:self userInfo:NULL)))
0
(set $numberAttributes nil)
0
-(class PackerView
is NSView 0
(set @foldLines (NSBezierPath bezierPath))
0
- ;(set $foldLines @foldLines) ;; there is a memory problem. This keeps @foldlines from being released.
0
(@foldLines setLineWidth:1.0)
0
(@foldLines moveToPoint:(list midV lowerH))
0
(@foldLines lineToPoint:(list midV bottom))
0
- ;float dashes[2] = {7.0, 3.0};
0
- (set @cutLine (NSBezierPath bezierPath))
0
- (set $cutLine @cutLine) ;; there is a memory problem. This keeps @cutLine from being released.
0
- ;[cutLine setLineDash:dashes ;; how are we going to do this?
0
- (@cutLine moveToPoint:(list midV upperH))
0
- (@cutLine lineToPoint:(list midV lowerH))
0
- (@cutLine setLineWidth:1.0))
0
+ (set @cutLine (self cutlineFromPoint:(list midV upperH) toPoint:(list midV lowerH))))
0
(- (void)drawImageRep:(id)rep inRect:(NSRect)rect isLeft:(BOOL)isLeft is
0
(set imageSize (rep size))
0
- (if 0 ;; this function cannot be defined in Nu
0
- (- (BOOL)knowsPageRange:(NSRange *)rptr
0
- ;; As a sort of odd side-effect, I'm also informing the view
0
- ;; of how much of the page the printer can actually draw.
0
- ;; I waited until now so that I could use the printer that the
0
- ;; user actually selected.
0
- (set op (NSPrintOperation currentOperation))
0
- (set pi (op printInfo))
0
- (if pi (self setImageablePageRect:(pi imageablePageBounds)))
0
- ;; It is a one-page document
0
(- (NSRect) rectForPage:(int) i is (self bounds))
0
;;;; For Debugging Purposes
0
(- (id) description is "<PackerView: #{(@packModel description)}>")
0
(- acceptsFirstMouse:theEvent is YES)
0
(- (void) placeButtons is
0
; Draw the cutting line
0
((NSColor blackColor) set)
0
; If drawing to screen, draw imageable Rect
0
(if @showsImageableRect
0
(NSBezierPath fillRect:(self fullRectForPage:@dropPage))))))
0
(class TextDisplayView is NSView
0
(ivar (id) attString (NSSize) pageSize)
0
(set bounds (NSInsetRect (self bounds) 3 3))
0
(@attString drawInRect:bounds)))
0
(global PaperSizeChangedNotification "PaperSizeChangedNotification")
0
(global PaperSizeKey "PaperSize")
0
(global FontFamilyKey "FontFamily")
Comments
No one has commented yet.