forked from ennorehling/csmapfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc.h
64 lines (47 loc) · 1.36 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
#ifndef _CSMAP_CALCULATOR
#define _CSMAP_CALCULATOR
#include <fx.h>
#include <list>
#include "datafile.h"
#include "map.h"
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 mapfiles(std::list<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 onKeyPress(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::list<datafile> *files;
FXHorizontalFrame *firstline;
FXHorizontalFrame *secondline;
FXTextField *formula;
FXTextField *result;
FXTextField *longresult;
FXIcon *closeIcon;
FXCSMap *map; // map to send ROUTE commands to
protected:
FXCalculator(){}
FXCalculator(const FXCalculator&) {}
};
#endif //_CSMAP_CALCULATOR