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
| | //
// SimpleCalc -- Randy Nelson -- NeXT Developer Training
// A general class that serves as a liaison between a calculator interface
// and a calculator engine.
//
// You may freely copy, distribute and reuse the code in this example.
// NeXT disclaims any warranty of any kind, expressed or implied, as to
// its fitness for any particular use.
//
// Created 8-8-90
//
#import <objc/Object.h>
@interface SimpleCalc:Object
{
// outlets...the front-end.
id display;
id enterKey;
id minusKey;
id infoManager;
id myNXStringTable;
// C++ object's can be a-part-of Objective-C objects.
class CalcEngine *cplus_object;
// record each previous user action
SEL previousAction;
}
// actions.
- numberKeys:sender;
- decimalKey:sender;
- operationKeys:sender;
- equalsKey:sender;
- clearKey:sender;
- clearAllKey:sender;
- infoPanel:sender;
- helpPanel:sender;
// delegate methods.
- windowWillClose:sender;
- appDidInit:sender;
- registerAction:(SEL)action;
- appendToDisplay:(const char *)theString;
@end
|