File: simpleDisplay.h

package info (click to toggle)
vdr-plugin-weather 0.2.1e-63
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 480 kB
  • ctags: 263
  • sloc: ansic: 769; sh: 345; makefile: 65
file content (30 lines) | stat: -rw-r--r-- 945 bytes parent folder | download | duplicates (4)
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