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
|
#ifndef SIMPLE_WEATHER_DISPLAY_H
#define SIMPLE_WEATHER_DISPLAY_H
#include "metarReader.h"
#include "weatherUtil.h"
#include "weather.h"
struct measurement {
char description[500];
char value[500];
};
class cSimpleWeatherOsd : public cOsdObject {
public:
cSimpleWeatherOsd(cUpdate *metarReader);
~cSimpleWeatherOsd();
virtual void Show(void);
virtual eOSState ProcessKey(eKeys Key);
protected:
cOsd *osd;
tColor color;
cUpdate *metarReader;
virtual void printMetar (cOsd *osd, Decoded_METAR *Mptr, int x, int y);
void drawData(cOsd *osd, Decoded_METAR *Mptr, int cy, const cFont *font, int x, int y);
int calculateMaxDescriptionFontWidth(measurement measurements[], int size, const cFont *font);
int calculateMaxValueFontWidth(measurement measurements[], int size, const cFont *font);
int calculateMaxFontWidth(char strings[][500], int size, const cFont *font);
};
#endif //SIMPLE_WEATHER_DISPLAY_H
|