summaryrefslogtreecommitdiff
path: root/skins.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-12-08 11:05:39 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-12-08 11:05:39 +0100
commit83fe591f3254a8010e107739256ef0df780b219c (patch)
tree87ee41dbc77184af071f450ea29969579a53efb5 /skins.h
parentbc0b67e6302a114e1efd2701aafa6ecd9282cc69 (diff)
downloadvdr-83fe591f3254a8010e107739256ef0df780b219c.tar.gz
vdr-83fe591f3254a8010e107739256ef0df780b219c.tar.bz2
The new functions SetItemEvent(), SetItemTimer(), SetItemChannel() and SetItemRecording() of the cSkinDisplayMenu class can be reimplemented by skin plugins to display these items in a more elaborate way than just a simple line of text1.7.33
Diffstat (limited to 'skins.h')
-rw-r--r--skins.h47
1 files changed, 39 insertions, 8 deletions
diff --git a/skins.h b/skins.h
index c108e359..25061268 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.6 2012/12/02 13:23:44 kls Exp $
+ * $Id: skins.h 2.7 2012/12/07 17:18:44 kls Exp $
*/
#ifndef __SKINS_H
@@ -17,6 +17,7 @@
#include "recording.h"
#include "themes.h"
#include "thread.h"
+#include "timers.h"
#include "tools.h"
enum eMessageType { mtStatus = 0, mtInfo, mtWarning, mtError }; // will be used to calculate color offsets!
@@ -152,13 +153,43 @@ public:
///< this function will be first called for the old current item
///< with Current set to false, and then for the new current item
///< with Current set to true.
- /*TODO
- virtual void SetItem(const cEvent *Event, int Index, bool Current, bool Selectable, bool NowNext???, bool Schedule???);
- virtual void SetItem(const cTimer *Timer, int Index, bool Current, bool Selectable);
- virtual void SetItem(const cChannel *Channel, int Index, bool Current, bool Selectable);
- virtual void SetItem(const cRecording *Recording, int Index, bool Current, bool Selectable);
- --> false: call SetItem(text)
- */
+ virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, int TimerMatch) { return false; }
+ ///< Sets the item at the given Index to Event. See SetItem() for more information.
+ ///< If a derived skin class implements this function, it can display an Event item
+ ///< in a more elaborate way than just a simple line of text.
+ ///< If Channel is not NULL, the channel's name and/or number shall be displayed.
+ ///< If WithDate is true, the date of the Event shall be displayed (in addition to the time).
+ ///< TimerMatch tells how much of this event will be recorded by a timer.
+ ///< If the skin displays the Event item in its own way, it shall return true.
+ ///< The default implementation does nothing and returns false, which results in
+ ///< a call to SetItem() with a proper text.
+ virtual bool SetItemTimer(const cTimer *Timer, int Index, bool Current, bool Selectable) { return false; }
+ ///< Sets the item at the given Index to Timer. See SetItem() for more information.
+ ///< If a derived skin class implements this function, it can display a Timer item
+ ///< in a more elaborate way than just a simple line of text.
+ ///< If the skin displays the Timer item in its own way, it shall return true.
+ ///< The default implementation does nothing and returns false, which results in
+ ///< a call to SetItem() with a proper text.
+ virtual bool SetItemChannel(const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider) { return false; }
+ ///< Sets the item at the given Index to Channel. See SetItem() for more information.
+ ///< If a derived skin class implements this function, it can display a Channel item
+ ///< in a more elaborate way than just a simple line of text.
+ ///< If WithProvider ist true, the provider shall be displayed in addition to the
+ ///< channel's name.
+ ///< If the skin displays the Channel item in its own way, it shall return true.
+ ///< The default implementation does nothing and returns false, which results in
+ ///< a call to SetItem() with a proper text.
+ virtual bool SetItemRecording(const cRecording *Recording, int Index, bool Current, bool Selectable, int Level, int Total, int New) { return false; }
+ ///< Sets the item at the given Index to Recording. See SetItem() for more information.
+ ///< If a derived skin class implements this function, it can display a Recording item
+ ///< in a more elaborate way than just a simple line of text.
+ ///< Level is the currently displayed level of the video directory, where 0 is the
+ ///< top level. A value of -1 means that the full path names of the recordings
+ ///< shall be displayed. If Total is greater than 0, this is a directory with the given
+ ///< total number of entries, and New contains the number of new (unwatched) recordings.
+ ///< If the skin displays the Recording item in its own way, it shall return true.
+ ///< The default implementation does nothing and returns false, which results in
+ ///< a call to SetItem() with a proper text.
virtual void SetScrollbar(int Total, int Offset);
///< Sets the Total number of items in the currently displayed list, and the
///< Offset of the first item that is currently displayed (the skin knows how