From 6feebe674c09b65e43012bf439c201cfb65aa82c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 11 Mar 2000 18:00:00 +0100 Subject: Version 0.02 - Fixed compilation with only DEBUG_REMOTE=1. - Menus now use colors. - Support for "Red", "Green", "Yellow", "Blue" buttons. - Channels and Timers can now be added, deleted and moved. - Basic record/play file handling support (no actual record/playback yet). --- osd.h | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'osd.h') diff --git a/osd.h b/osd.h index 392f1a7..5ec1334 100644 --- a/osd.h +++ b/osd.h @@ -4,7 +4,7 @@ * See the main source file 'osm.c' for copyright information and * how to reach the author. * - * $Id: osd.h 1.1 2000/02/19 13:36:48 kls Exp $ + * $Id: osd.h 1.2 2000/03/05 11:33:11 kls Exp $ */ #ifndef __OSD_H @@ -16,53 +16,61 @@ #define MAXOSDITEMS 9 -enum eOSStatus { osUnknown, - osContinue, - osProcessed, - osChannels, - osTimer, - osRecordings, - osBack, - osEnd, - }; +enum eOSState { osUnknown, + osContinue, + osProcessed, + osChannels, + osTimer, + osRecordings, + osBack, + osEnd, + }; class cOsdItem : public cListObject { private: char *text; int offset; - eOSStatus status; + eOSState state; protected: bool fresh; public: - cOsdItem(eOSStatus Status = osUnknown); - cOsdItem(char *Text, eOSStatus Status = osUnknown); + cOsdItem(eOSState State = osUnknown); + cOsdItem(char *Text, eOSState State = osUnknown); virtual ~cOsdItem(); void SetText(char *Text, bool Copy = true); char *Text(void) { return text; } void Display(int Offset = -1, bool Current = false); virtual void Set(void) {} - virtual eOSStatus ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key); }; class cOsdMenu : public cList { private: char *title; int cols[cInterface::MaxCols]; - int first, current, count; + int first, current, marked; cOsdMenu *subMenu; + const char *helpRed, *helpGreen, *helpYellow, *helpBlue; + const char *status; protected: + bool visible; void RefreshCurrent(void); void DisplayCurrent(bool Current); void CursorUp(void); void CursorDown(void); - eOSStatus AddSubMenu(cOsdMenu *SubMenu); + void Mark(void); + eOSState AddSubMenu(cOsdMenu *SubMenu); + bool HasSubMenu(void) { return subMenu; } + void SetStatus(const char *s); + void SetHelp(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); + virtual void Del(int Index); public: cOsdMenu(char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0); virtual ~cOsdMenu(); int Current(void) { return current; } void Add(cOsdItem *Item, bool Current = false); void Display(void); - virtual eOSStatus ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key); }; #endif //__OSD_H -- cgit v1.2.3