| 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 |
@class Tutor, Session; |
|---|
| 30 |
|
|---|
| 31 |
@interface Controller : NSObject { |
|---|
| 32 |
IBOutlet Session *sessionOutlet; |
|---|
| 33 |
|
|---|
| 34 |
IBOutlet NSWindow *windowTutor; |
|---|
| 35 |
IBOutlet NSWindow *windowLines; |
|---|
| 36 |
|
|---|
| 37 |
IBOutlet NSMenu *menuSettings; |
|---|
| 38 |
|
|---|
| 39 |
IBOutlet NSMatrix *buttonsKana; |
|---|
| 40 |
IBOutlet NSTextField *fieldKana; |
|---|
| 41 |
IBOutlet NSImageView *imageKana; |
|---|
| 42 |
IBOutlet NSTextField *textAnswer; |
|---|
| 43 |
IBOutlet NSTextField *textCorrect; |
|---|
| 44 |
IBOutlet NSTextField *textPercent; |
|---|
| 45 |
IBOutlet NSTextField *textScore; |
|---|
| 46 |
|
|---|
| 47 |
IBOutlet NSMenuItem *itemQuizMode; |
|---|
| 48 |
IBOutlet NSMenuItem *itemLearningMode; |
|---|
| 49 |
IBOutlet NSMenuItem *itemHiragana; |
|---|
| 50 |
IBOutlet NSMenuItem *itemKatakana; |
|---|
| 51 |
IBOutlet NSMenuItem *itemMixed; |
|---|
| 52 |
IBOutlet NSMenuItem *itemHepburn; |
|---|
| 53 |
IBOutlet NSMenuItem *itemKunreiSiki; |
|---|
| 54 |
IBOutlet NSMenuItem *itemNihonSiki; |
|---|
| 55 |
|
|---|
| 56 |
IBOutlet NSButtonCell *kanaDi; |
|---|
| 57 |
IBOutlet NSButtonCell *kanaDu; |
|---|
| 58 |
IBOutlet NSButtonCell *kanaHu; |
|---|
| 59 |
IBOutlet NSButtonCell *kanaSi; |
|---|
| 60 |
IBOutlet NSButtonCell *kanaTi; |
|---|
| 61 |
IBOutlet NSButtonCell *kanaTu; |
|---|
| 62 |
IBOutlet NSButtonCell *kanaZi; |
|---|
| 63 |
|
|---|
| 64 |
IBOutlet NSButton *linesA; |
|---|
| 65 |
IBOutlet NSButton *linesBa; |
|---|
| 66 |
IBOutlet NSButton *linesDa; |
|---|
| 67 |
IBOutlet NSButton *linesGa; |
|---|
| 68 |
IBOutlet NSButton *linesHa; |
|---|
| 69 |
IBOutlet NSButton *linesKa; |
|---|
| 70 |
IBOutlet NSButton *linesMa; |
|---|
| 71 |
IBOutlet NSButton *linesNa; |
|---|
| 72 |
IBOutlet NSButton *linesPa; |
|---|
| 73 |
IBOutlet NSButton *linesRa; |
|---|
| 74 |
IBOutlet NSButton *linesSa; |
|---|
| 75 |
IBOutlet NSButton *linesTa; |
|---|
| 76 |
IBOutlet NSButton *linesWa; |
|---|
| 77 |
IBOutlet NSButton *linesYa; |
|---|
| 78 |
IBOutlet NSButton *linesZa; |
|---|
| 79 |
|
|---|
| 80 |
Tutor *_tutor; |
|---|
| 81 |
NSTimer *_timer; |
|---|
| 82 |
|
|---|
| 83 |
int _startTime, _stopTime, _diffTime; |
|---|
| 84 |
bool _waitingForUser; |
|---|
| 85 |
} |
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
- (void) openTutor; |
|---|
| 89 |
- (void) resetTutor; |
|---|
| 90 |
- (void) sessionShouldFinish; |
|---|
| 91 |
|
|---|
| 92 |
- (IBAction) clickKana:(NSMatrix *)sender; |
|---|
| 93 |
- (IBAction) writeKana:(NSButton *)sender; |
|---|
| 94 |
- (void) userWasCorrect:(NSString *)kana; |
|---|
| 95 |
- (void) userWasIncorrect:(NSString *)kana; |
|---|
| 96 |
|
|---|
| 97 |
- (IBAction) openLines:(id)sender; |
|---|
| 98 |
- (IBAction) linesOK:(NSButton *)sender; |
|---|
| 99 |
- (IBAction) linesSelectAll:(NSButton *)sender; |
|---|
| 100 |
|
|---|
| 101 |
- (void) start; |
|---|
| 102 |
- (void) startNewQuiz; |
|---|
| 103 |
- (void) startNewLearning; |
|---|
| 104 |
|
|---|
| 105 |
- (void) updateSettings; |
|---|
| 106 |
- (void) updateScore; |
|---|
| 107 |
- (void) updateButtonTitles; |
|---|
| 108 |
- (void) updateButtons; |
|---|
| 109 |
|
|---|
| 110 |
- (void) setImageByKanaName:(NSString *)kanaName; |
|---|
| 111 |
- (void) userConfirmed; |
|---|
| 112 |
|
|---|
| 113 |
- (IBAction) changeMode:(id)sender; |
|---|
| 114 |
- (IBAction) changeKanaType:(id)sender; |
|---|
| 115 |
- (IBAction) changeRomanisationSystem:(id)sender; |
|---|
| 116 |
|
|---|
| 117 |
- (int) getQuestions; |
|---|
| 118 |
- (int) getCorrect; |
|---|
| 119 |
- (int) getTime; |
|---|
| 120 |
|
|---|
| 121 |
@end |
|---|