5 // Created by Byron Ellis on 6/29/07.
6 // Copyright 2007 __MyCompanyName__. All rights reserved.
12 @implementation DeviceView
14 - (id)initWithFrame:(NSRect)frame {
15 self = [super initWithFrame:frame];
17 // Initialization code here.
22 - (void)drawRect:(NSRect)rect {
24 [device drawInRect:[self bounds]];
28 - (void)setFrame:(NSRect)frame {
29 [super setFrame:frame];
30 if(NO == [self inLiveResize]) {
31 [device setSize:frame.size];
37 - (void)viewDidEndLiveResize {
38 [device setSize:[self bounds].size];
44 - (void)willChangeDelegateForDevice:(RDevice*)aDevice {
45 if(device != nil && aDevice == device) {
50 - (void)didChangeDelegateForDevice:(RDevice*)aDevice {
51 if(device != nil && aDevice != device) [self willChangeDelegateForDevice:device];
52 device = [aDevice retain];
55 - (void)didUpdateDevice:(RDevice*)aDevice {
56 if(aDevice == device) [self display];
59 - (void)didActivateDevice:(RDevice*)aDevice withNumber:(int)num {
62 - (void)didDeactivateDevice:(RDevice*)aDevice withNumber:(int)num {
66 - (void)willCloseDevice:(RDevice*)aDevice { }
68 - (void)didEndPageForDevice:(RDevice*)aDevice {
70 - (void)willBeginPageForDevice:(RDevice*)aDevice {