File: simpleDisplay.h

package info (click to toggle)
vdr-plugin-weather 0.2.1e-50
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 264 kB
  • ctags: 135
  • sloc: ansic: 1,243; sh: 369; makefile: 36
file content (30 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (8)
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:
		cOsdBase *osd;
		eDvbColor color;
		cUpdate *metarReader;
		virtual void printMetar (cOsdBase *osd, Decoded_METAR *Mptr, int x, int y);
		void drawData(cOsdBase *osd, Decoded_METAR *Mptr, int cy, cFont *font, int x, int y);
		int calculateMaxDescriptionFontWidth(measurement measurements[], int size, cFont *font);
		int calculateMaxValueFontWidth(measurement measurements[], int size, cFont *font);
		int calculateMaxFontWidth(char strings[][500], int size, cFont *font);
};

#endif //SIMPLE_WEATHER_DISPLAY_H