ATMHud.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * ATMHud.h
  3. * ATMHud
  4. *
  5. * Created by Marcel Müller on 2011-03-01.
  6. * Copyright (c) 2010-2011, Marcel Müller (atomcraft)
  7. * All rights reserved.
  8. *
  9. * https://github.com/atomton/ATMHud
  10. */
  11. #import <UIKit/UIKit.h>
  12. @class ATMHudView, ATMSoundFX, ATMHudQueueItem;
  13. @protocol ATMHudDelegate;
  14. typedef enum {
  15. ATMHudAccessoryPositionTop = 0,
  16. ATMHudAccessoryPositionRight,
  17. ATMHudAccessoryPositionBottom,
  18. ATMHudAccessoryPositionLeft
  19. } ATMHudAccessoryPosition;
  20. @interface ATMHud : UIViewController {
  21. CGFloat margin;
  22. CGFloat padding;
  23. CGFloat alpha;
  24. CGFloat appearScaleFactor;
  25. CGFloat disappearScaleFactor;
  26. CGFloat progressBorderRadius;
  27. CGFloat progressBorderWidth;
  28. CGFloat progressBarRadius;
  29. CGFloat progressBarInset;
  30. CGPoint center;
  31. BOOL shadowEnabled;
  32. BOOL blockTouches;
  33. BOOL allowSuperviewInteraction;
  34. NSString *showSound;
  35. NSString *updateSound;
  36. NSString *hideSound;
  37. ATMHudAccessoryPosition accessoryPosition;
  38. @private
  39. ATMHudView *__view;
  40. ATMSoundFX *sound;
  41. NSMutableArray *displayQueue;
  42. NSInteger queuePosition;
  43. }
  44. @property (nonatomic, assign) CGFloat margin;
  45. @property (nonatomic, assign) CGFloat padding;
  46. @property (nonatomic, assign) CGFloat alpha;
  47. @property (nonatomic, assign) CGFloat appearScaleFactor;
  48. @property (nonatomic, assign) CGFloat disappearScaleFactor;
  49. @property (nonatomic, assign) CGFloat progressBorderRadius;
  50. @property (nonatomic, assign) CGFloat progressBorderWidth;
  51. @property (nonatomic, assign) CGFloat progressBarRadius;
  52. @property (nonatomic, assign) CGFloat progressBarInset;
  53. @property (nonatomic, assign) CGPoint center;
  54. @property (nonatomic, assign) BOOL isShowing;
  55. @property (nonatomic, assign) BOOL shadowEnabled;
  56. @property (nonatomic, assign) BOOL blockTouches;
  57. @property (nonatomic, assign) BOOL allowSuperviewInteraction;
  58. @property (nonatomic, strong) NSString *showSound;
  59. @property (nonatomic, strong) NSString *updateSound;
  60. @property (nonatomic, strong) NSString *hideSound;
  61. @property (nonatomic, weak) id <ATMHudDelegate> delegate;
  62. @property (nonatomic, assign) ATMHudAccessoryPosition accessoryPosition;
  63. @property (nonatomic, strong) ATMHudView *__view;
  64. @property (nonatomic, strong) ATMSoundFX *sound;
  65. @property (nonatomic, strong) NSMutableArray *displayQueue;
  66. @property (nonatomic, assign) NSInteger queuePosition;
  67. + (NSString *)buildInfo;
  68. +(ATMHud*)sharedInstance;
  69. - (id)initWithDelegate:(id)hudDelegate;
  70. - (void)setCaption:(NSString *)caption;
  71. - (void)setImage:(UIImage *)image;
  72. - (void)setActivity:(BOOL)activity;
  73. - (void)setActivityStyle:(UIActivityIndicatorViewStyle)activityStyle;
  74. - (void)setFixedSize:(CGSize)fixedSize;
  75. - (void)setProgress:(CGFloat)progress;
  76. - (void)addQueueItem:(ATMHudQueueItem *)item;
  77. - (void)addQueueItems:(NSArray *)items;
  78. - (void)clearQueue;
  79. - (void)startQueue;
  80. - (void)showNextInQueue;
  81. - (void)showQueueAtIndex:(NSInteger)index;
  82. - (void)show:(UIView*)parent;
  83. - (void)stop;
  84. - (void)start;
  85. - (void)start:(NSString*)s;
  86. - (void)start:(NSString*)s inView:(UIView *)parent;
  87. - (void)start:(NSString*)s delay:(int)delay;
  88. - (void)startWithClearColor;
  89. - (void)show;
  90. - (void)update;
  91. - (void)hide;
  92. - (void)hideAfter:(NSTimeInterval)delay;
  93. - (void)playSound:(NSString *)soundPath;
  94. @end