#include <GUIInfoLabel.h>
|
static std::string | GetLabel (const std::string &label, int contextWindow, bool preferImage=false) |
|
static std::string | GetItemLabel (const std::string &label, const CGUIListItem *item, bool preferImage=false) |
|
static std::string | ReplaceLocalize (const std::string &label) |
| Replaces instances of $LOCALIZE[number] with the appropriate localized string.
|
|
static std::string | ReplaceAddonStrings (std::string &&label) |
| Replaces instances of $ADDON[id number] with the appropriate localized addon string.
|
|
static std::string | ReplaceControllerStrings (std::string &&label) |
| Replaces instances of $FEATURE[feature name, controller ID] with the appropriate localized controller string.
|
|
static bool | ReplaceSpecialKeywordReferences (const std::string &strInput, const std::string &strKeyword, const StringReplacerFunc &func, std::string &strOutput) |
| Replaces instances of $strKeyword[value] with the appropriate resolved string.
|
|
static bool | ReplaceSpecialKeywordReferences (std::string &work, const std::string &strKeyword, const StringReplacerFunc &func) |
| Replaces instances of $strKeyword[value] with the appropriate resolved string in-place.
|
|
◆ StringReplacerFunc
◆ CGUIInfoLabel() [1/2]
KODI::GUILIB::GUIINFO::CGUIInfoLabel::CGUIInfoLabel |
( |
| ) |
|
|
default |
◆ CGUIInfoLabel() [2/2]
CGUIInfoLabel::CGUIInfoLabel |
( |
const std::string & | label, |
|
|
const std::string & | fallback = "", |
|
|
int | context = INFO::DEFAULT_CONTEXT ) |
|
explicit |
◆ GetFallback()
const std::string & KODI::GUILIB::GUIINFO::CGUIInfoLabel::GetFallback |
( |
| ) |
const |
|
inline |
◆ GetIntValue()
int CGUIInfoLabel::GetIntValue |
( |
int | contextWindow | ) |
const |
Gets the label and returns it as an int value.
- Parameters
-
contextWindow | the context in which to evaluate the expression. |
- Returns
- int value.
- See also
- GetLabel
◆ GetItemLabel() [1/2]
const std::string & CGUIInfoLabel::GetItemLabel |
( |
const CGUIListItem * | item, |
|
|
bool | preferImage = false, |
|
|
std::string * | fallback = nullptr ) const |
Gets a label (or image) for a given listitem from the info manager.
- Parameters
-
item | listitem in question. |
preferImage | caller is specifically wanting an image rather than a label. Defaults to false. |
fallback | if non-NULL, is set to an alternate value to use should the actual value be not appropriate. Defaults to nullptr. |
- Returns
- label (or image).
◆ GetItemLabel() [2/2]
std::string CGUIInfoLabel::GetItemLabel |
( |
const std::string & | label, |
|
|
const CGUIListItem * | item, |
|
|
bool | preferImage = false ) |
|
static |
◆ GetLabel() [1/2]
std::string CGUIInfoLabel::GetLabel |
( |
const std::string & | label, |
|
|
int | contextWindow, |
|
|
bool | preferImage = false ) |
|
static |
◆ GetLabel() [2/2]
const std::string & CGUIInfoLabel::GetLabel |
( |
int | contextWindow, |
|
|
bool | preferImage = false, |
|
|
std::string * | fallback = NULL ) const |
Gets a label (or image) for a given window context from the info manager.
- Parameters
-
contextWindow | the context in which to evaluate the expression. |
preferImage | caller is specifically wanting an image rather than a label. Defaults to false. |
fallback | if non-NULL, is set to an alternate value to use should the actual value be not appropriate. Defaults to NULL. |
- Returns
- label (or image).
◆ IsConstant()
bool CGUIInfoLabel::IsConstant |
( |
| ) |
const |
◆ IsEmpty()
bool CGUIInfoLabel::IsEmpty |
( |
| ) |
const |
◆ ReplaceAddonStrings()
std::string CGUIInfoLabel::ReplaceAddonStrings |
( |
std::string && | label | ) |
|
|
static |
Replaces instances of $ADDON[id number] with the appropriate localized addon string.
- Parameters
-
- Returns
- text with any localized strings filled in.
◆ ReplaceControllerStrings()
std::string CGUIInfoLabel::ReplaceControllerStrings |
( |
std::string && | label | ) |
|
|
static |
Replaces instances of $FEATURE[feature name, controller ID] with the appropriate localized controller string.
- Parameters
-
- Returns
- text with any controller strings filled in
◆ ReplaceLocalize()
std::string CGUIInfoLabel::ReplaceLocalize |
( |
const std::string & | label | ) |
|
|
static |
Replaces instances of $LOCALIZE[number] with the appropriate localized string.
- Parameters
-
- Returns
- text with any localized strings filled in.
◆ ReplaceSpecialKeywordReferences() [1/2]
bool CGUIInfoLabel::ReplaceSpecialKeywordReferences |
( |
const std::string & | strInput, |
|
|
const std::string & | strKeyword, |
|
|
const StringReplacerFunc & | func, |
|
|
std::string & | strOutput ) |
|
static |
Replaces instances of $strKeyword[value] with the appropriate resolved string.
- Parameters
-
strInput | text to replace |
strKeyword | keyword to look for |
func | function that does the actual replacement of each bracketed value found |
strOutput | the output string |
- Returns
- whether anything has been replaced.
◆ ReplaceSpecialKeywordReferences() [2/2]
bool CGUIInfoLabel::ReplaceSpecialKeywordReferences |
( |
std::string & | work, |
|
|
const std::string & | strKeyword, |
|
|
const StringReplacerFunc & | func ) |
|
static |
Replaces instances of $strKeyword[value] with the appropriate resolved string in-place.
- Parameters
-
work | text to replace in-place |
strKeyword | keyword to look for |
func | function that does the actual replacement of each bracketed value found |
- Returns
- whether anything has been replaced.
◆ SetLabel()
The documentation for this class was generated from the following files: