-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathSineWaveViewController.h
65 lines (48 loc) · 1.89 KB
/
SineWaveViewController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//
// SineWaveViewController.h
// SpeechToText
//
// Created by Sam Bosley on 10/11/11.
// Copyright (c) 2011 Astrid. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "WaveDisplay.h"
@protocol SineWaveViewDelegate <NSObject>
- (void)sineWaveDoneAction;
- (void)sineWaveCancelAction;
@end
// Users of this class can create a custom nib conforming to
// the defined IB interface.
@interface SineWaveViewController : UIViewController {
IBOutlet UILabel *header; // Title header
IBOutlet UIImageView *backgroundImage;
// Displays a realtime waveform that receives new data from the STTModule during recording
IBOutlet WaveDisplay *waveDisplay;
// This view can be used if the sine wave controller is repurposed to show a loading screen during
// voice processing (as it is in Astrid)
IBOutlet UIView *processingView;
IBOutlet UIButton *doneButton;
IBOutlet UIButton *cancelButton;
IBOutlet UITextView *footer;
}
@property (assign) id<SineWaveViewDelegate> delegate;
@property (readonly) WaveDisplay *waveDisplay;
@property (readonly) UIImageView *backgroundView;
@property (readonly) UIView *processingView;
@property (readonly) UIButton *doneButton;
@property (readonly) UIButton *cancelButton;
@property (readonly) UILabel *header;
@property (readonly) UITextView *footer;
// Pointer to the array containing data points for the waveform to draw
@property (nonatomic, retain) NSArray *dataPoints;
// Action sent by doneButton. This passes "done" or "cancel" messages to the delegate,
// which is generally a SpeechToTextModule instance
- (IBAction)done;
- (IBAction)cancel;
// Force the waveform display to update when new data is added
- (void)updateWaveDisplay;
// Resets the view state to the default (see the .m file for what that default is)
- (void)resetViewState;
// Repurposes the done button to be a cancel button
//- (void)repurposeForCancelling;
@end