summaryrefslogtreecommitdiff
path: root/osd.h
diff options
context:
space:
mode:
Diffstat (limited to 'osd.h')
-rw-r--r--osd.h42
1 files changed, 25 insertions, 17 deletions
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<cOsdItem> {
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