d9f6d3507db6856fb51b59a4f9d157d9d314fa9b
[zxing.git] / iphone / ZXingWidget / Classes / OverlayView.h
1 /**
2  * Copyright 2009 Jeff Verkoeyen
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *    http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #import <UIKit/UIKit.h>
18
19 @protocol CancelDelegate;
20
21 @interface OverlayView : UIView {
22         UIImageView *imageView;
23         NSArray *_points;
24         UIButton *cancelButton;
25         id<CancelDelegate> delegate;
26         BOOL oneDMode;
27 }
28
29 @property (nonatomic, retain) NSArray*  points;
30 @property (nonatomic, assign) id<CancelDelegate> delegate;
31 @property (nonatomic, assign) BOOL oneDMode;
32
33 - (id)initWithFrame:(CGRect)theFrame cancelEnabled:(BOOL)isCancelEnabled oneDMode:(BOOL)isOneDModeEnabled;
34
35 - (CGRect)cropRect;
36
37 @end
38
39 @protocol CancelDelegate
40 - (void)cancelled;
41 @end