MBMapkit
/Users/dongkui/ios_api/branches/1.0.x/code/config/MBMapDemo/MBMapkit/MBMapkit/MBAnnotationView.h
00001 //
00002 //  MBAnnotationView.h
00003 //  MBMapKit
00004 //
00005 //  Copyright 2011 Mapbar Inc. All rights reserved.
00006 //
00007 
00008 #import <UIKit/UIKit.h>
00009 
00011 UIKIT_EXTERN NSString *MBAnnotationCalloutInfoDidChangeNotification;
00012 
00013 enum
00014 {
00015     MBAnnotationViewDragStateNone = 0,      
00016     MBAnnotationViewDragStateStarting,      
00017     MBAnnotationViewDragStateDragging,      
00018     MBAnnotationViewDragStateCanceling,     
00019     MBAnnotationViewDragStateEnding         
00020 };
00022 typedef NSUInteger MBAnnotationViewDragState;
00023 
00024 
00025 @protocol MBAnnotation;
00026 
00061 @interface MBAnnotationView : UIView
00062 {
00063 @private
00064     id <MBAnnotation> _annotation;
00065     
00066     NSString *_reuseIdentifier;
00067     UIImage *_image;
00068     CGPoint _centerOffset;
00069     CGPoint _calloutOffset;
00070     BOOL _enabled;
00071     BOOL _highlighted;
00072     BOOL _selected;
00073     BOOL _canShowCallout;   
00074     BOOL _draggable;
00075     MBAnnotationViewDragState _dragState;
00076 }
00077 
00091 - (id)initWithAnnotation:(id <MBAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier;
00092 
00100 @property (nonatomic, readonly) NSString *reuseIdentifier;
00101 
00108 - (void)prepareForReuse;
00109 
00116 @property (nonatomic, retain) id <MBAnnotation> annotation;
00117 
00124 @property (nonatomic, retain) UIImage *image;
00125 
00133 @property (nonatomic) CGPoint centerOffset;
00134 
00142 @property (nonatomic) CGPoint calloutOffset;
00143 
00151 @property (nonatomic, getter=isEnabled) BOOL enabled;
00152 
00159 @property (nonatomic, getter=isHighlighted) BOOL highlighted;
00160 
00167 @property (nonatomic, getter=isSelected) BOOL selected;
00168 
00177 - (void)setSelected:(BOOL)selected animated:(BOOL)animated;
00178 
00189 @property (nonatomic) BOOL canShowCallout;
00190 
00200 @property (retain, nonatomic) UIView *leftCalloutAccessoryView;
00201 
00212 @property (retain, nonatomic) UIView *rightCalloutAccessoryView;
00213 
00223 @property (nonatomic, getter=isDraggable) BOOL draggable;
00224 
00242 @property (nonatomic) MBAnnotationViewDragState dragState;
00243 
00262 - (void)setDragState:(MBAnnotationViewDragState)newDragState animated:(BOOL)animated;
00263 
00264 @end
 全部  函数 变量 属性