-
Notifications
You must be signed in to change notification settings - Fork 1
/
calc.h
65 lines (46 loc) · 1.4 KB
/
calc.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
#ifndef _CSMAP_CALCULATOR
#define _CSMAP_CALCULATOR
#include "datafile.h"
#include "map.h"
#include <fx.h>
#include <list>
class FXCalculator : public FXHorizontalFrame
{
FXDECLARE(FXCalculator)
public:
FXCalculator(FXComposite* p, FXObject* tgt=NULL,FXSelector sel=0, FXuint opts=0, FXint x=0,FXint y=0,FXint w=0,FXint h=0);
void create();
virtual ~FXCalculator();
void setMapFile(std::shared_ptr<datafile>& f);
void connectMap(FXCSMap* map);
public:
long onToggleShown(FXObject*, FXSelector, void*);
long onUpdateShown(FXObject*, FXSelector, void*);
long onCloseButton(FXObject*, FXSelector, void*);
long onChanged(FXObject*, FXSelector, void*);
long onFocusIn(FXObject*, FXSelector, void*);
long onFocusNext(FXObject*, FXSelector, void*);
long onFocusPrev(FXObject*, FXSelector, void*);
long onMapChange(FXObject*, FXSelector, void*);
public:
enum
{
ID_FORMULA = FXHorizontalFrame::ID_LAST,
ID_CLOSE,
ID_LAST
};
protected:
datafile::SelectionState selection;
std::shared_ptr<datafile> mapFile;
FXHorizontalFrame *firstline = nullptr;
FXHorizontalFrame *secondline = nullptr;
FXTextField *formula = nullptr;
FXTextField *result = nullptr;
FXTextField *longresult = nullptr;
FXIcon *closeIcon = nullptr;
FXCSMap *map = nullptr; // map to send ROUTE commands to
protected:
FXCalculator(){}
FXCalculator(const FXCalculator&) {}
};
#endif //_CSMAP_CALCULATOR