![]() |
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <GUIControlFactory.h>
Public Member Functions | |
CGUIControlFactory (void) | |
virtual | ~CGUIControlFactory (void) |
CGUIControl * | Create (int parentID, const CRect &rect, TiXmlElement *pControlNode, bool insideContainer=false) |
Static Public Member Functions | |
static CGUIControl::GUICONTROLTYPES | TranslateControlType (const std::string &type) |
translate from control name to control type | |
static std::string | TranslateControlType (CGUIControl::GUICONTROLTYPES type) |
translate from control type to control name | |
static bool | GetAspectRatio (const TiXmlNode *pRootNode, const char *strTag, CAspectRatio &aspectRatio) |
static bool | GetInfoTexture (const TiXmlNode *pRootNode, const char *strTag, CTextureInfo &image, KODI::GUILIB::GUIINFO::CGUIInfoLabel &info, int parentID) |
static bool | GetTexture (const TiXmlNode *pRootNode, const char *strTag, CTextureInfo &image) |
static bool | GetAlignment (const TiXmlNode *pRootNode, const char *strTag, uint32_t &dwAlignment) |
static bool | GetAlignmentY (const TiXmlNode *pRootNode, const char *strTag, uint32_t &dwAlignment) |
static bool | GetAnimations (TiXmlNode *control, const CRect &rect, int context, std::vector< CAnimation > &animation) |
static float | ParsePosition (const char *pos, const float parentSize) |
Create an info label from an XML element Processes XML elements of the form <xmltag fallback="fallback_value">info_value</xmltag> where info_value may use $INFO[], $LOCALIZE[], $NUMBER[] etc. If either the fallback_value or info_value are natural numbers they are interpreted as ids for lookup in strings.po. The fallback attribute is optional. | |
static bool | GetInfoLabelFromElement (const TiXmlElement *element, KODI::GUILIB::GUIINFO::CGUIInfoLabel &infoLabel, int parentID) |
static void | GetInfoLabel (const TiXmlNode *pControlNode, const std::string &labelTag, KODI::GUILIB::GUIINFO::CGUIInfoLabel &infoLabel, int parentID) |
static void | GetInfoLabels (const TiXmlNode *pControlNode, const std::string &labelTag, std::vector< KODI::GUILIB::GUIINFO::CGUIInfoLabel > &infoLabels, int parentID) |
static bool | GetColor (const TiXmlNode *pRootNode, const char *strTag, KODI::UTILS::COLOR::Color &value) |
static bool | GetInfoColor (const TiXmlNode *pRootNode, const char *strTag, KODI::GUILIB::GUIINFO::CGUIInfoColor &value, int parentID) |
static std::string | FilterLabel (const std::string &label) |
static bool | GetConditionalVisibility (const TiXmlNode *control, std::string &condition) |
static bool | GetActions (const TiXmlNode *pRootNode, const char *strTag, CGUIAction &actions) |
static void | GetRectFromString (const std::string &string, CRect &rect) |
static bool | GetHitRect (const TiXmlNode *pRootNode, CRect &rect, const CRect &parentRect) |
static bool | GetScroller (const TiXmlNode *pControlNode, const std::string &scrollerTag, CScroller &scroller) |
Static Protected Member Functions | |
static std::string | GetType (const TiXmlElement *pControlNode) |
static bool | GetMovingSpeedConfig (const TiXmlNode *pRootNode, const char *strTag, KODI::UTILS::MOVING_SPEED::MapEventConfig &movingSpeedCfg) |
static bool | GetConditionalVisibility (const TiXmlNode *control, std::string &condition, std::string &allowHiddenFocus) |
static bool | GetString (const TiXmlNode *pRootNode, const char *strTag, std::string &strString) |
static bool | GetFloatRange (const TiXmlNode *pRootNode, const char *strTag, float &iMinValue, float &iMaxValue, float &iIntervalValue) |
static bool | GetIntRange (const TiXmlNode *pRootNode, const char *strTag, int &iMinValue, int &iMaxValue, int &iIntervalValue) |
static bool | GetPosition (const TiXmlNode *node, const char *tag, const float parentSize, float &value) |
Get the value of a position tag from XML Handles both absolute and relative values. | |
static bool | GetDimension (const TiXmlNode *node, const char *strTag, const float parentSize, float &value, float &min) |
grab a dimension out of the XML | |
static bool | GetDimensions (const TiXmlNode *node, const char *leftTag, const char *rightTag, const char *centerLeftTag, const char *centerRightTag, const char *widthTag, const float parentSize, float &left, float &width, float &min_width) |
Retrieve the dimensions for a control. | |
|
default |
|
virtualdefault |
CGUIControl * CGUIControlFactory::Create | ( | int | parentID, |
const CRect & | rect, | ||
TiXmlElement * | pControlNode, | ||
bool | insideContainer = false ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprotected |
|
staticprotected |
grab a dimension out of the XML
Supports plain reading of a number (or constant) and, in addition allows "auto" as the value for the dimension, whereby value is set to the max attribute (if it exists) and min is set the min attribute (if it exists) or 1. Auto values are thus detected by min != 0.
node | the <control> XML node to read |
strTag | tag within node to read |
parentSize | the size of the parent for relative sizing. |
value | value to set, or maximum value if using auto |
min | minimum value - set != 0 if auto is used. |
|
staticprotected |
Retrieve the dimensions for a control.
Handles positioning based on at least 2 of left/right/center/width.
node | the <control> node describing the control. |
leftTag | the tag that holds the left field. |
rightTag | the tag that holds the right field. |
centerLeftTag | the tag that holds the center left field. |
centerRightTag | the tag that holds the center right field. |
widthTag | the tag holding the width. |
parentSize | the size of the parent, for relative sizing. |
pos | [out] the discovered position. |
width | [out] the discovered width. |
min_width | [out] the discovered minimum width. |
|
staticprotected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprotected |
|
staticprotected |
|
staticprotected |
Get the value of a position tag from XML Handles both absolute and relative values.
node | the <control> XML node. |
tag | the XML node to parse. |
parentSize | the size of the parent, for relative positioning. |
value | [out] the returned value. |
|
static |
|
staticprotected |
|
static |
|
staticprotected |
|
static |
Create an info label from an XML element Processes XML elements of the form <xmltag fallback="fallback_value">info_value</xmltag> where info_value may use $INFO[], $LOCALIZE[], $NUMBER[] etc. If either the fallback_value or info_value are natural numbers they are interpreted as ids for lookup in strings.po. The fallback attribute is optional.
element | XML element to process |
infoLabel | Returned infoLabel |
parentID | The parent id |
Parse a position string Handles strings of the form
pos | the string to parse. |
parentSize | the size of the parent. |
|
static |
translate from control type to control name
type | type of the control |
|
static |
translate from control name to control type
type | name of the control |