vdr
1.7.27
|
#include <themes.h>
Public Types | |
enum | { MaxThemeColors = 128 } |
enum | { MaxThemeColors = 128 } |
Public Member Functions | |
cTheme (void) | |
~cTheme () | |
const char * | Name (void) |
const char * | Description (void) |
bool | Load (const char *FileName, bool OnlyDescriptions=false) |
bool | Save (const char *FileName) |
int | AddColor (const char *Name, tColor Color) |
tColor | Color (int Subject) |
cTheme (void) | |
~cTheme () | |
const char * | Name (void) |
const char * | Description (void) |
bool | Load (const char *FileName, bool OnlyDescriptions=false) |
bool | Save (const char *FileName) |
int | AddColor (const char *Name, tColor Color) |
tColor | Color (int Subject) |
Private Member Functions | |
bool | FileNameOk (const char *FileName, bool SetName=false) |
bool | FileNameOk (const char *FileName, bool SetName=false) |
Private Attributes | |
char * | name |
cStringList | descriptions |
char * | colorNames [MaxThemeColors] |
tColor | colorValues [MaxThemeColors] |
Definition at line 17 of file include/vdr/themes.h.
anonymous enum |
Definition at line 19 of file include/vdr/themes.h.
cTheme::cTheme | ( | void | ) |
Creates a new theme class.
Definition at line 18 of file themes.c.
References colorNames, colorValues, descriptions, and name.
cTheme::~cTheme | ( | ) |
Definition at line 26 of file themes.c.
References colorNames, MaxThemeColors, and name.
cTheme::cTheme | ( | void | ) |
Creates a new theme class.
cTheme::~cTheme | ( | ) |
int cTheme::AddColor | ( | const char * | Name, |
tColor | Color | ||
) |
Adds a color with the given Name to this theme, initializes it with Color and returns an index into the color array that can be used in a call to Color() later.
The index returned from the first call to AddColor() is 0, and subsequent calls will return values that are incremented by 1 with every call. If a color entry with the given Name already exists, its value will be overwritten with Color and the returned index will be that of the existing entry.
Definition at line 183 of file themes.c.
References Color(), colorNames, colorValues, and MaxThemeColors.
int cTheme::AddColor | ( | const char * | Name, |
tColor | Color | ||
) |
Adds a color with the given Name to this theme, initializes it with Color and returns an index into the color array that can be used in a call to Color() later.
The index returned from the first call to AddColor() is 0, and subsequent calls will return values that are incremented by 1 with every call. If a color entry with the given Name already exists, its value will be overwritten with Color and the returned index will be that of the existing entry.
tColor cTheme::Color | ( | int | Subject | ) |
Returns the color for the given Subject.
Subject must be one of the values returned by a previous call to AddColor().
Definition at line 201 of file themes.c.
References colorValues, and MaxThemeColors.
Referenced by AddColor(), cSkinClassicDisplayMenu::Clear(), cSkinSTTNGDisplayMenu::Clear(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cSkinClassicDisplayMenu::DrawScrollbar(), cSkinSTTNGDisplayMenu::DrawScrollbar(), cSkinClassicDisplayChannel::Flush(), cSkinSTTNGDisplayChannel::Flush(), cSkinClassicDisplayMenu::Flush(), cSkinSTTNGDisplayMenu::Flush(), cSkinSTTNGDisplayTracks::SetAudioChannel(), cSkinClassicDisplayMenu::SetButtons(), cSkinSTTNGDisplayMenu::SetButtons(), cSkinClassicDisplayChannel::SetChannel(), cSkinSTTNGDisplayChannel::SetChannel(), cSkinClassicDisplayReplay::SetCurrent(), cSkinSTTNGDisplayReplay::SetCurrent(), cSkinClassicDisplayMenu::SetEvent(), cSkinSTTNGDisplayMenu::SetEvent(), cSkinClassicDisplayChannel::SetEvents(), cSkinSTTNGDisplayChannel::SetEvents(), cSkinClassicDisplayMenu::SetItem(), cSkinSTTNGDisplayMenu::SetItem(), cSkinClassicDisplayTracks::SetItem(), cSkinSTTNGDisplayTracks::SetItem(), cSkinClassicDisplayReplay::SetJump(), cSkinSTTNGDisplayReplay::SetJump(), cSkinClassicDisplayChannel::SetMessage(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinClassicDisplayMenu::SetMessage(), cSkinSTTNGDisplayMenu::SetMessage(), cSkinClassicDisplayReplay::SetMessage(), cSkinClassicDisplayMessage::SetMessage(), cSkinSTTNGDisplayReplay::SetMessage(), cSkinSTTNGDisplayMessage::SetMessage(), cSkinSTTNGDisplayReplay::SetMode(), cSkinClassicDisplayReplay::SetProgress(), cSkinSTTNGDisplayReplay::SetProgress(), cSkinClassicDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), cSkinClassicDisplayMenu::SetText(), cSkinSTTNGDisplayMenu::SetText(), cSkinClassicDisplayMenu::SetTitle(), cSkinSTTNGDisplayMenu::SetTitle(), cSkinClassicDisplayReplay::SetTitle(), cSkinSTTNGDisplayReplay::SetTitle(), cSkinClassicDisplayReplay::SetTotal(), cSkinSTTNGDisplayReplay::SetTotal(), cSkinClassicDisplayVolume::SetVolume(), and cSkinSTTNGDisplayVolume::SetVolume().
tColor cTheme::Color | ( | int | Subject | ) |
Returns the color for the given Subject.
Subject must be one of the values returned by a previous call to AddColor().
const char* cTheme::Description | ( | void | ) |
Returns a user visible, single line description of this theme.
The actual text shouldn't be too long, so that it can be fully displayed in the Setup/OSD menu.
const char * cTheme::Description | ( | void | ) |
Returns a user visible, single line description of this theme.
The actual text shouldn't be too long, so that it can be fully displayed in the Setup/OSD menu.
Definition at line 75 of file themes.c.
References descriptions, I18nCurrentLanguage(), and name.
Referenced by cMenuSetupOSD::cMenuSetupOSD(), and cThemes::Load().
bool cTheme::FileNameOk | ( | const char * | FileName, |
bool | SetName = false |
||
) | [private] |
bool cTheme::FileNameOk | ( | const char * | FileName, |
bool | SetName = false |
||
) | [private] |
bool cTheme::Load | ( | const char * | FileName, |
bool | OnlyDescriptions = false |
||
) |
Loads the theme data from the given file.
Definition at line 83 of file themes.c.
References colorNames, colorValues, descriptions, esyslog, FileNameOk(), I18nLanguageIndex(), isempty(), isyslog, LOG_ERROR_STR, MaxThemeColors, cReadLine::Read(), skipspace(), and stripspace().
Referenced by cThemes::Load(), and cMenuSetupOSD::ProcessKey().
bool cTheme::Load | ( | const char * | FileName, |
bool | OnlyDescriptions = false |
||
) |
Loads the theme data from the given file.
const char* cTheme::Name | ( | void | ) | [inline] |
const char* cTheme::Name | ( | void | ) | [inline] |
Definition at line 30 of file include/vdr/themes.h.
References name.
Referenced by cThemes::Load(), and cThemes::Save().
bool cTheme::Save | ( | const char * | FileName | ) |
Saves the theme data to the given file.
FileName must be in the form "<skin>-<theme>.theme", where <skin> is the name of the skin this theme applies to, and <theme> is the actual theme name, which will be used to identify this theme in the 'setup.conf', and is normally not seen by the user. It should consist of only lowercase letters and digits.
bool cTheme::Save | ( | const char * | FileName | ) |
Saves the theme data to the given file.
FileName must be in the form "<skin>-<theme>.theme", where <skin> is the name of the skin this theme applies to, and <theme> is the actual theme name, which will be used to identify this theme in the 'setup.conf', and is normally not seen by the user. It should consist of only lowercase letters and digits.
Definition at line 160 of file themes.c.
References cSafeFile::Close(), colorNames, colorValues, descriptions, FileNameOk(), I18nLanguageCode(), I18nLanguages(), MaxThemeColors, cSafeFile::Open(), and cVector< T >::Size().
Referenced by cThemes::Save().
char * cTheme::colorNames [private] |
Definition at line 23 of file include/vdr/themes.h.
Referenced by AddColor(), cTheme(), Load(), Save(), and ~cTheme().
tColor cTheme::colorValues [private] |
Definition at line 24 of file include/vdr/themes.h.
Referenced by AddColor(), Color(), cTheme(), Load(), and Save().
cStringList cTheme::descriptions [private] |
Definition at line 22 of file include/vdr/themes.h.
Referenced by cTheme(), Description(), Load(), and Save().
char * cTheme::name [private] |
Definition at line 21 of file include/vdr/themes.h.
Referenced by cTheme(), Description(), FileNameOk(), Name(), and ~cTheme().