|
|
typedef std::function< std::string(const std::string &)> | StringReplacerFunc |
| |
|
|
| CGUIInfoLabel (const std::string &label, const std::string &fallback="", int context=INFO::DEFAULT_CONTEXT) |
| |
|
void | SetLabel (const std::string &label, const std::string &fallback, int context=INFO::DEFAULT_CONTEXT) |
| |
| const std::string & | 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. More...
|
| |
| int | GetIntValue (int contextWindow) const |
| | Gets the label and returns it as an int value. More...
|
| |
| const std::string & | 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. More...
|
| |
|
bool | IsConstant () const |
| |
|
bool | IsEmpty () const |
| |
|
const std::string & | GetFallback () const |
| |
|
|
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. More...
|
| |
| static std::string | ReplaceAddonStrings (std::string &&label) |
| | Replaces instances of $ADDON[id number] with the appropriate localized addon string. More...
|
| |
| static std::string | ReplaceControllerStrings (std::string &&label) |
| | Replaces instances of $FEATURE[feature name, controller ID] with the appropriate localized controller string. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
◆ 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()
| 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).
◆ GetLabel()
| 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).
◆ 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.
The documentation for this class was generated from the following files:
- xbmc/guilib/guiinfo/GUIInfoLabel.h
- xbmc/guilib/guiinfo/GUIInfoLabel.cpp