summaryrefslogtreecommitdiff
path: root/menu.h
diff options
context:
space:
mode:
authorThomas Günther <tom@toms-cafe.de>2005-10-28 03:00:00 +0200
committerThomas Günther <tom@toms-cafe.de>2005-10-28 03:00:00 +0200
commita0863e7f249e0a4eae8f71f8946cb90071fba985 (patch)
treedb2138d8e12e3138d7305bc0c6e5679fdd3163af /menu.h
downloadvdr-plugin-sudoku-0.1.0.tar.gz
vdr-plugin-sudoku-0.1.0.tar.bz2
Initial versionv0.1.0
Diffstat (limited to 'menu.h')
-rw-r--r--menu.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/menu.h b/menu.h
new file mode 100644
index 0000000..30d9819
--- /dev/null
+++ b/menu.h
@@ -0,0 +1,66 @@
+/*
+ * Sudoku: A plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: menu.h 11 2005-10-28 01:00:01Z tom $
+ */
+
+#ifndef VDR_SUDOKU_MENU_H
+#define VDR_SUDOKU_MENU_H
+
+#include "sudoku.h"
+namespace SudokuPlugin { class SetupData; class Bitmap; }
+namespace Sudoku { class Puzzle; class Pos; }
+#include <vdr/config.h>
+#include <vdr/osdbase.h>
+#include <vdr/osd.h>
+
+// Compatibility to older vdr versions
+#if VDRVERSNUM < 10307
+ #define cOsd_ cOsdBase
+#else
+ #define cOsd_ cOsd
+#endif
+
+
+namespace SudokuPlugin
+{
+
+ //--- class SudokuPlugin::Menu -----------------------------------------------
+
+ /** Main menu of the plugin */
+ class Menu : public cOsdObject
+ {
+ const SetupData& setup;
+ Sudoku::Puzzle& puzzle;
+ Sudoku::Pos& curr;
+ int xPos, yPos;
+ cOsd_* osd;
+ Bitmap* info;
+ const char* infoText;
+ bool new_puzzle_request;
+
+ public:
+
+ /** Constructor */
+ Menu(const SetupData& setup, Sudoku::Puzzle& puzzle, Sudoku::Pos& curr);
+
+ /** Destructor */
+ virtual ~Menu();
+
+ /** Display the menu on the OSD. */
+ virtual void Show();
+
+ /** Process user events. */
+ virtual eOSState ProcessKey(eKeys key);
+
+ private:
+
+ /** Paint all pieces of the menu. */
+ void paint();
+ };
+
+} // namespace SudokuPlugin
+
+#endif // VDR_SUDOKU_MENU_H