root/Nuku/trunk/Controller.h

Revision 4178, 3.9 kB (checked in by morris, 2 years ago)

Add prefix header

  • Property svn:keywords set to author date id revision
Line 
1 /* $Id$ */
2
3 /*
4  * Copyright (c) 2000-2006 Axel Andersson
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
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
Note: See TracBrowser for help on using the browser.