diff options
author | louis <louis.braun@gmx.de> | 2015-03-12 17:22:16 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-03-12 17:22:16 +0100 |
commit | 3cc8e78e1bf00e16b49520ac416b74b5fd73c906 (patch) | |
tree | 4425c4eb4b9833d927aae2f65d0f3a99d3792f83 /recmenu.h | |
download | vdr-plugin-tvguideng-3cc8e78e1bf00e16b49520ac416b74b5fd73c906.tar.gz vdr-plugin-tvguideng-3cc8e78e1bf00e16b49520ac416b74b5fd73c906.tar.bz2 |
Version 0.0.10.0.1
Diffstat (limited to 'recmenu.h')
-rw-r--r-- | recmenu.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/recmenu.h b/recmenu.h new file mode 100644 index 0000000..99111c2 --- /dev/null +++ b/recmenu.h @@ -0,0 +1,59 @@ +#ifndef __TVGUIDE_RECMENU_H
+#define __TVGUIDE_RECMENU_H
+
+#include <list>
+#include "libskindesigner/osdelements.h"
+#include "recmenuitem.h"
+
+// --- cRecMenu -------------------------------------------------------------
+
+class cRecMenu {
+private:
+ int menuWidth;
+ int menuHeight;
+ int maxMenuHeight;
+ cOsdView *osdView;
+ cViewElement *back;
+ cViewElement *scrollBar;
+ cViewGrid *recMenuGrid;
+ cList<cRecMenuItem> menuItems;
+ cRecMenuItem *start;
+ cRecMenuItem *stop;
+ int itemCount;
+ cRecMenuItem *active;
+ cRecMenuItem *header;
+ cRecMenuItem *footer;
+ bool scrolling;
+ bool SeekForward(bool page);
+ bool SeekBack(bool page);
+ void AdjustActive(bool down);
+ void DrawScrollbar(void);
+ void DrawHeader(void);
+ void DrawFooter(void);
+protected:
+ void SetMenuWidth(int width) { menuWidth = width; };
+ void AddMenuItem(cRecMenuItem *item, bool inFront = false);
+ void AddHeader(cRecMenuItem *header);
+ void AddFooter(cRecMenuItem *footer);
+ int GetNumActive(void);
+ cRecMenuItem *GetActive(void) { return active; };
+ bool ScrollUp(bool retry);
+ bool ScrollDown(bool retry);
+ bool PageUp(void);
+ bool PageDown(void);
+ void ClearMenuItems(void);
+ void InitMenuItems(void);
+ int GetWidth(void) { return menuWidth; };
+ int GetHeight(void);
+public:
+ cRecMenu(void);
+ virtual ~cRecMenu(void);
+ void Init(cOsdView *osdView);
+ void DrawBackground(void);
+ void Draw(void);
+ void Hide(void) { osdView->Deactivate(true); };
+ void Show(void) { osdView->Activate(); };
+ void Flush(void) { osdView->Display(); };
+ virtual eRecMenuState ProcessKey(eKeys Key);
+};
+#endif //__TVGUIDE_RECMENU_H
\ No newline at end of file |