Today's Menu  Portugal
journal and plan nutrition
DLStarRatingControl.h
Go to the documentation of this file.
1 /*
2 
3  DLStarRating
4  Copyright (C) 2011 David Linsin <dlinsin@gmail.com>
5 
6  All rights reserved. This program and the accompanying materials
7  are made available under the terms of the Eclipse Public License v1.0
8  which accompanies this distribution, and is available at
9  http://www.eclipse.org/legal/epl-v10.html
10 
11  */
12 
13 #import <UIKit/UIKit.h>
14 
15 #define kDefaultNumberOfStars 5
16 #define kNumberOfFractions 10
17 
18 @protocol DLStarRatingDelegate;
19 
20 @interface DLStarRatingControl : UIControl {
23  UIImage *star;
24  UIImage *highlightedStar;
25  // id<DLStarRatingDelegate> delegate;
27 }
28 
29 - (id)initWithFrame:(CGRect)frame;
30 - (id)initWithFrame:(CGRect)frame andStars:(NSUInteger)_numberOfStars isFractional:(BOOL)isFract;
31 - (void)setStar:(UIImage*)defaultStarImage highlightedStar:(UIImage*)highlightedStarImage;
32 - (void)setStar:(UIImage*)defaultStarImage highlightedStar:(UIImage*)highlightedStarImage atIndex:(int)index;
33 
34 @property (retain,nonatomic) UIImage *star;
35 @property (retain,nonatomic) UIImage *highlightedStar;
36 @property (nonatomic) float rating;
37 @property (assign,nonatomic) id<DLStarRatingDelegate> delegate;
38 @property (nonatomic,assign) BOOL isFractionalRatingEnabled;
39 
40 @end
41 
43 
44 -(void)newRating:(DLStarRatingControl *)control :(float)rating;
45 
46 @end
id< U7ParamEditControlDelegate > delegate