| OLD | NEW |
| 1 /* |
| 2 * Copyright 2011 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 1 #import "SkUIView.h" | 7 #import "SkUIView.h" |
| 2 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 3 #include "SkCGUtils.h" | 9 #include "SkCGUtils.h" |
| 4 @implementation SkUIView | 10 @implementation SkUIView |
| 5 | 11 |
| 6 @synthesize fWind, fTitleItem, fOptionsDelegate; | 12 @synthesize fWind, fTitleItem, fOptionsDelegate; |
| 7 | 13 |
| 8 - (id)initWithDefaults { | 14 - (id)initWithDefaults { |
| 9 fWind = NULL; | 15 fWind = NULL; |
| 10 return self; | 16 return self; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 if (self = [super initWithFrame:frame]) { | 28 if (self = [super initWithFrame:frame]) { |
| 23 self = [self initWithDefaults]; | 29 self = [self initWithDefaults]; |
| 24 [self setUpWindow]; | 30 [self setUpWindow]; |
| 25 } | 31 } |
| 26 return self; | 32 return self; |
| 27 } | 33 } |
| 28 | 34 |
| 29 - (void)setUpWindow { | 35 - (void)setUpWindow { |
| 30 if (NULL != fWind) { | 36 if (NULL != fWind) { |
| 31 fWind->setVisibleP(true); | 37 fWind->setVisibleP(true); |
| 32 fWind->resize(self.frame.size.width, self.frame.size.height, | 38 fWind->resize(self.frame.size.width, self.frame.size.height); |
| 33 kN32_SkColorType); | |
| 34 } | 39 } |
| 35 } | 40 } |
| 36 | 41 |
| 37 - (void)dealloc { | 42 - (void)dealloc { |
| 38 delete fWind; | 43 delete fWind; |
| 39 [fTitleItem release]; | 44 [fTitleItem release]; |
| 40 [super dealloc]; | 45 [super dealloc]; |
| 41 } | 46 } |
| 42 | 47 |
| 43 - (void)forceRedraw { | 48 - (void)forceRedraw { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 - (void)onUpdateMenu:(SkOSMenu*)menu { | 111 - (void)onUpdateMenu:(SkOSMenu*)menu { |
| 107 [self.fOptionsDelegate view:self didUpdateMenu:menu]; | 112 [self.fOptionsDelegate view:self didUpdateMenu:menu]; |
| 108 } | 113 } |
| 109 | 114 |
| 110 - (void)postInvalWithRect:(const SkIRect*)r { | 115 - (void)postInvalWithRect:(const SkIRect*)r { |
| 111 [self performSelector:@selector(drawInRaster) withObject:nil afterDelay:0]; | 116 [self performSelector:@selector(drawInRaster) withObject:nil afterDelay:0]; |
| 112 [self setNeedsDisplay]; | 117 [self setNeedsDisplay]; |
| 113 } | 118 } |
| 114 | 119 |
| 115 @end | 120 @end |
| OLD | NEW |