summaryrefslogtreecommitdiff
path: root/skins.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-04-08 11:52:56 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-04-08 11:52:56 +0200
commit170e05e1e651a46740ab231e43f3d33b805926ec (patch)
treefb7ac1d5c5bfd275f4a1e6a4bd5256ac65eb55d0 /skins.h
parentc24a89156857e91787e8a1ccaaffc085de41ae04 (diff)
downloadvdr-170e05e1e651a46740ab231e43f3d33b805926ec.tar.gz
vdr-170e05e1e651a46740ab231e43f3d33b805926ec.tar.bz2
Skins can now inquire the menu category for which their cSkinDisplayMenu is currently being used
Diffstat (limited to 'skins.h')
-rw-r--r--skins.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/skins.h b/skins.h
index 19bba513..b31b7dc4 100644
--- a/skins.h
+++ b/skins.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skins.h 2.2 2012/03/11 14:38:23 kls Exp $
+ * $Id: skins.h 2.3 2012/04/08 11:24:59 kls Exp $
*/
#ifndef __SKINS_H
@@ -72,6 +72,8 @@ public:
*/
};
+enum eMenuCategory { mcUnknown = 0, mcMain, mcSchedule, mcChannel, mcTimer, mcRecording, mcPlugin, mcSetup, mcCommand, mcEvent, mcText, mcFolder, mcCam };
+
class cSkinDisplayMenu : public cSkinDisplay {
///< This class implements the general purpose menu display, which is
///< used throughout the program to display information and let the
@@ -92,6 +94,7 @@ class cSkinDisplayMenu : public cSkinDisplay {
public:
enum { MaxTabs = 6 };
private:
+ eMenuCategory menuCategory;
int tabs[MaxTabs];
protected:
cTextScroller textScroller;
@@ -104,6 +107,16 @@ protected:
///< part can be found, NULL will be returned.
public:
cSkinDisplayMenu(void);
+ eMenuCategory MenuCategory(void) const { return menuCategory; }
+ ///< Returns the menu category, set by a previous call to SetMenuCategory().
+ virtual void SetMenuCategory(eMenuCategory MenuCategory);
+ ///< Sets the current menu category. This allows skins to handle known
+ ///< types of menus in different ways, for instance by displaying icons
+ ///< or special decorations.
+ ///< A derived class can reimplement this function to be informed of any
+ ///< changes in the menu category. If it does, it shall call the base class
+ ///< function in order to set the members accordingly for later calls to the
+ ///< MenuCategory() function.
virtual void SetTabs(int Tab1, int Tab2 = 0, int Tab3 = 0, int Tab4 = 0, int Tab5 = 0);
///< Sets the tab columns to the given values, which are the number of
///< characters in each column.