home *** CD-ROM | disk | FTP | other *** search
- #if !defined( __CALC_H )
- #define __CALC_H
-
- #if !defined( __MATH_H )
- #include <math.h>
- #endif // __MATH_H
-
- #define DISPLAYLEN 45 // Length (width) of calculator display
-
- enum TCalcState { csFirst = 1, csValid, csError };
-
- const int cmCalcButton = 200;
-
- class TCalcDisplay : public TView
- {
- public:
- TCalcDisplay(TRect& r);
- ~TCalcDisplay();
- virtual void handleEvent(TEvent& event);
- virtual void draw();
- private:
- TCalcState status;
- char *dnfile; // pointer to text to display as "status"
- void calcKey(unsigned char key);
- void ShowFiles(char *directory);
- };
-
- class TCalculator : public TDialog
- {
- public:
- TCalculator();
- };
-
- #endif // __CALC_H
-