Home

Dokumentation

Impressum

Dokumentation VDR
 

Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

menuitems.h

Go to the documentation of this file.
00001 
00010 #ifndef __MENUITEMS_H
00011 #define __MENUITEMS_H
00012 
00013 #include "osd.h"
00014 
00015 extern const char *FileNameChars;
00016 
00018 class cMenuEditItem : public cOsdItem {
00019 private:
00020   char *name;
00021   char *value;
00022 public:
00023   cMenuEditItem(const char *Name);
00024   ~cMenuEditItem();
00025   void SetValue(const char *Value);
00026   };
00027 
00029 class cMenuEditIntItem : public cMenuEditItem {
00030 protected:
00031   int *value;
00032   int min, max;
00033   virtual void Set(void);
00034 public:
00035   cMenuEditIntItem(const char *Name, int *Value, int Min = 0, int Max = INT_MAX);
00036   virtual eOSState ProcessKey(eKeys Key);
00037   };
00038 
00040 class cMenuEditBoolItem : public cMenuEditIntItem {
00041 protected:
00042   const char *falseString, *trueString;
00043   virtual void Set(void);
00044 public:
00045   cMenuEditBoolItem(const char *Name, int *Value, const char *FalseString = NULL, const char *TrueString = NULL);
00046   };
00047 
00049 class cMenuEditChrItem : public cMenuEditItem {
00050 private:
00051   char *value;
00052   char *allowed;
00053   const char *current;
00054   virtual void Set(void);
00055 public:
00056   cMenuEditChrItem(const char *Name, char *Value, const char *Allowed);
00057   ~cMenuEditChrItem();
00058   virtual eOSState ProcessKey(eKeys Key);
00059   };
00060 
00062 class cMenuEditStrItem : public cMenuEditItem {
00063 private:
00064   char *value;
00065   int length;
00066   char *allowed;
00067   int pos;
00068   bool insert, newchar, uppercase;
00069   void SetHelpKeys(void);
00070   virtual void Set(void);
00071   char Inc(char c, bool Up);
00072 public:
00073   cMenuEditStrItem(const char *Name, char *Value, int Length, const char *Allowed);
00074   ~cMenuEditStrItem();
00075   virtual eOSState ProcessKey(eKeys Key);
00076   };
00077 
00079 class cMenuEditStraItem : public cMenuEditIntItem {
00080 private:
00081   const char * const *strings;
00082 protected:
00083   virtual void Set(void);
00084 public:
00085   cMenuEditStraItem(const char *Name, int *Value, int NumStrings, const char * const *Strings);
00086   };
00087 
00089 class cMenuTextItem : public cOsdItem {
00090 private:
00091   char *text;
00092   int x, y, w, h, lines, offset;
00093   eDvbColor fgColor, bgColor;
00094   eDvbFont font;
00095 public:
00096   cMenuTextItem(const char *Text, int X, int Y, int W, int H = -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground, eDvbFont Font = fontOsd);
00097   ~cMenuTextItem();
00098   int Height(void) { return h; }
00099   void Clear(void);
00100   virtual void Display(int Offset = -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
00101   bool CanScrollUp(void) { return offset > 0; }
00102   bool CanScrollDown(void) { return h + offset < lines; }
00103   void ScrollUp(bool Page);
00104   void ScrollDown(bool Page);
00105   virtual eOSState ProcessKey(eKeys Key);
00106   };
00107 
00108 class cPlugin;
00109 
00111 class cMenuSetupPage : public cOsdMenu {
00112 private:
00113   cPlugin *plugin;
00114 protected:
00115   void SetSection(const char *Section);
00116   virtual void Store(void) = 0;
00117   void SetupStore(const char *Name, const char *Value = NULL);
00118   void SetupStore(const char *Name, int Value);
00119 public:
00120   cMenuSetupPage(void);
00121   virtual eOSState ProcessKey(eKeys Key);
00122   void SetPlugin(cPlugin *Plugin);
00123   };
00124 
00125 #endif //__MENUITEMS_H
00126 

Generated on Wed Feb 5 23:30:10 2003 for VDR by doxygen1.3-rc2