11#include "Alternative.h"
14#include "guilib/GUIControl.h"
15#include "guilib/GUIFont.h"
16#include "input/actions/ActionIDs.h"
17#include "swighelper.h"
18#include "utils/ColorUtils.h"
25#define CONTROL_TEXT_OFFSET_X 10
26#define CONTROL_TEXT_OFFSET_Y 2
70 virtual CGUIControl* Create();
74 virtual bool canAcceptMessages(
int actionId) {
return false; }
76#ifdef DOXYGEN_SHOULD_USE_THIS
95 virtual int getId() {
return iControlId; }
98 inline bool operator==(
const Control& other)
const {
return iControlId == other.iControlId; }
99 inline bool operator>(
const Control& other)
const {
return iControlId > other.iControlId; }
100 inline bool operator<(
const Control& other)
const {
return iControlId < other.iControlId; }
103#ifdef DOXYGEN_SHOULD_USE_THIS
122 virtual std::vector<int> getPosition();
125#ifdef DOXYGEN_SHOULD_USE_THIS
144 int getX() {
return dwPosX; }
147#ifdef DOXYGEN_SHOULD_USE_THIS
166 int getY() {
return dwPosY; }
169#ifdef DOXYGEN_SHOULD_USE_THIS
188 virtual int getHeight() {
return dwHeight; }
192#ifdef DOXYGEN_SHOULD_USE_THIS
211 virtual int getWidth() {
return dwWidth; }
215#ifdef DOXYGEN_SHOULD_USE_THIS
238#ifdef DOXYGEN_SHOULD_USE_THIS
265#ifdef DOXYGEN_SHOULD_USE_THIS
290#ifdef DOXYGEN_SHOULD_USE_THIS
320#ifdef DOXYGEN_SHOULD_USE_THIS
348#ifdef DOXYGEN_SHOULD_USE_THIS
375 virtual void setAnimations(
const std::vector< Tuple<String,String> >& eventAttr);
379#ifdef DOXYGEN_SHOULD_USE_THIS
405#ifdef DOXYGEN_SHOULD_USE_THIS
428#ifdef DOXYGEN_SHOULD_USE_THIS
451#ifdef DOXYGEN_SHOULD_USE_THIS
485#ifdef DOXYGEN_SHOULD_USE_THIS
515#ifdef DOXYGEN_SHOULD_USE_THIS
545#ifdef DOXYGEN_SHOULD_USE_THIS
575#ifdef DOXYGEN_SHOULD_USE_THIS
612 int iControlDown = 0;
613 int iControlLeft = 0;
614 int iControlRight = 0;
615 std::string m_label{};
616 bool m_visible{
true};
617 CGUIControl* pGUIControl =
nullptr;
654#ifdef DOXYGEN_SHOULD_USE_THIS
689 virtual void setTextures(
const char* up,
const char* down,
691 const char* downFocus,
692 const char* upDisabled,
const char* downDisabled);
696 KODI::UTILS::COLOR::Color color;
697 std::string strTextureUp;
698 std::string strTextureDown;
699 std::string strTextureUpFocus;
700 std::string strTextureDownFocus;
701 std::string strTextureUpDisabled;
702 std::string strTextureDownDisabled;
770 ControlLabel(
long x,
long y,
long width,
long height,
const String& label,
771 const char* font = NULL,
const char* textColor = NULL,
772 const char* disabledColor = NULL,
773 long alignment = XBFONT_LEFT,
774 bool hasPath =
false,
long angle = 0);
778#ifdef DOXYGEN_SHOULD_USE_THIS
800#ifdef DOXYGEN_SHOULD_USE_THIS
830 virtual void setLabel(
const String& label = emptyString,
831 const char* font = NULL,
832 const char* textColor = NULL,
833 const char* disabledColor = NULL,
834 const char* shadowColor = NULL,
835 const char* focusedColor = NULL,
836 const String& label2 = emptyString);
844 KODI::UTILS::COLOR::Color textColor;
845 KODI::UTILS::COLOR::Color disabledColor;
847 bool bHasPath =
false;
850 CGUIControl* Create()
override;
917 ControlEdit(
long x,
long y,
long width,
long height,
const String& label,
918 const char* font = NULL,
const char* textColor = NULL,
919 const char* disabledColor = NULL,
920 long _alignment = XBFONT_LEFT,
const char* focusTexture = NULL,
921 const char* noFocusTexture = NULL);
925#ifdef DOXYGEN_SHOULD_USE_THIS
955 virtual void setLabel(
const String& label = emptyString,
956 const char* font = NULL,
957 const char* textColor = NULL,
958 const char* disabledColor = NULL,
959 const char* shadowColor = NULL,
960 const char* focusedColor = NULL,
961 const String& label2 = emptyString);
965#ifdef DOXYGEN_SHOULD_USE_THIS
988#ifdef DOXYGEN_SHOULD_USE_THIS
1007 virtual void setText(
const String& text);
1011#ifdef DOXYGEN_SHOULD_USE_THIS
1037 std::string strFont;
1038 std::string strText;
1039 std::string strTextureFocus;
1040 std::string strTextureNoFocus;
1041 KODI::UTILS::COLOR::Color textColor;
1042 KODI::UTILS::COLOR::Color disabledColor;
1045 CGUIControl* Create()
override;
1049#ifdef DOXYGEN_SHOULD_USE_THIS
1083 virtual void setType(
int type,
const String& heading);
1154 void internAddListItem(
const AddonClass::Ref<ListItem>& listitem,
bool sendMessage);
1157 ControlList(
long x,
long y,
long width,
long height,
const char* font = NULL,
1158 const char* textColor = NULL,
const char* buttonTexture = NULL,
1159 const char* buttonFocusTexture = NULL,
1160 const char* selectedColor = NULL,
1161 long _imageWidth=10,
long _imageHeight=10,
long _itemTextXOffset = CONTROL_TEXT_OFFSET_X,
1162 long _itemTextYOffset = CONTROL_TEXT_OFFSET_Y,
long _itemHeight = 27,
long _space = 2,
1163 long _alignmentY = XBFONT_CENTER_Y);
1167#ifdef DOXYGEN_SHOULD_USE_THIS
1186 virtual void addItem(
const Alternative<String, const XBMCAddon::xbmcgui::ListItem* > & item,
bool sendMessage =
true);
1189#ifdef DOXYGEN_SHOULD_USE_THIS
1212 virtual void addItems(
const std::vector<Alternative<String, const XBMCAddon::xbmcgui::ListItem* > > & items);
1215#ifdef DOXYGEN_SHOULD_USE_THIS
1237#ifdef DOXYGEN_SHOULD_USE_THIS
1260#ifdef DOXYGEN_SHOULD_USE_THIS
1303 virtual void reset();
1306#ifdef DOXYGEN_SHOULD_USE_THIS
1330#ifdef DOXYGEN_SHOULD_USE_THIS
1352#ifdef DOXYGEN_SHOULD_USE_THIS
1380#ifdef DOXYGEN_SHOULD_USE_THIS
1404#ifdef DOXYGEN_SHOULD_USE_THIS
1427#ifdef DOXYGEN_SHOULD_USE_THIS
1451#ifdef DOXYGEN_SHOULD_USE_THIS
1475#ifdef DOXYGEN_SHOULD_USE_THIS
1495 virtual long size();
1499#ifdef DOXYGEN_SHOULD_USE_THIS
1523#ifdef DOXYGEN_SHOULD_USE_THIS
1547#ifdef DOXYGEN_SHOULD_USE_THIS
1572#ifdef DOXYGEN_SHOULD_USE_THIS
1598 void sendLabelBind(
int tail);
1600 bool canAcceptMessages(
int actionId)
override
1601 {
return ((actionId == ACTION_SELECT_ITEM) | (actionId == ACTION_MOUSE_LEFT_CLICK)); }
1607 std::vector<AddonClass::Ref<ListItem> > vecItems;
1608 std::string strFont;
1609 AddonClass::Ref<ControlSpin> pControlSpin;
1611 KODI::UTILS::COLOR::Color textColor;
1612 KODI::UTILS::COLOR::Color selectedColor;
1613 std::string strTextureButton;
1614 std::string strTextureButtonFocus;
1616 int imageHeight = 0;
1621 int itemTextOffsetX = 0;
1622 int itemTextOffsetY = 0;
1623 uint32_t alignmentY;
1625 CGUIControl* Create()
override;
1689 const char* font = NULL,
1690 const char* textColor = NULL,
1691 long _alignment = XBFONT_LEFT);
1694#ifdef DOXYGEN_SHOULD_USE_THIS
1715 virtual void addLabel(
const String& label);
1718#ifdef DOXYGEN_SHOULD_USE_THIS
1742#ifdef DOXYGEN_SHOULD_USE_THIS
1759 virtual void reset();
1763 std::string strFont;
1764 KODI::UTILS::COLOR::Color textColor;
1765 std::vector<std::string> vecLabels;
1768 CGUIControl* Create()
override;
1830 const char* font = NULL,
1831 const char* textColor = NULL);
1834#ifdef DOXYGEN_SHOULD_USE_THIS
1858 virtual void setText(
const String& text);
1862#ifdef DOXYGEN_SHOULD_USE_THIS
1888#ifdef DOXYGEN_SHOULD_USE_THIS
1907 virtual void reset();
1911#ifdef DOXYGEN_SHOULD_USE_THIS
1934 virtual void scroll(
long id);
1938#ifdef DOXYGEN_SHOULD_USE_THIS
1963 virtual void autoScroll(
int delay,
int time,
int repeat);
1967 std::string strFont;
1968 KODI::UTILS::COLOR::Color textColor;
1970 CGUIControl* Create()
override;
2024 const char* filename,
long aspectRatio = 0,
2025 const char* colorDiffuse = NULL);
2027#ifdef DOXYGEN_SHOULD_USE_THIS
2052 virtual void setImage(
const char* imageFilename,
const bool useCache =
true);
2055#ifdef DOXYGEN_SHOULD_USE_THIS
2083 std::string strFileName;
2084 int aspectRatio = 0;
2085 KODI::UTILS::COLOR::Color colorDiffuse;
2087 CGUIControl* Create()
override;
2162 const char* texturebg = NULL,
2163 const char* textureleft = NULL,
2164 const char* texturemid = NULL,
2165 const char* textureright = NULL,
2166 const char* textureoverlay = NULL);
2168#ifdef DOXYGEN_SHOULD_USE_THIS
2195#ifdef DOXYGEN_SHOULD_USE_THIS
2220 std::string strTextureLeft;
2221 std::string strTextureMid;
2222 std::string strTextureRight;
2223 std::string strTextureBg;
2224 std::string strTextureOverlay;
2225 int aspectRatio = 0;
2226 KODI::UTILS::COLOR::Color colorDiffuse;
2228 CGUIControl* Create()
override;
2307 ControlButton(
long x,
long y,
long width,
long height,
const String& label,
2308 const char* focusTexture = NULL,
const char* noFocusTexture = NULL,
2309 long textOffsetX = CONTROL_TEXT_OFFSET_X,
2310 long textOffsetY = CONTROL_TEXT_OFFSET_Y,
2311 long alignment = (XBFONT_LEFT | XBFONT_CENTER_Y),
2312 const char* font = NULL,
const char* textColor = NULL,
2313 const char* disabledColor = NULL,
long angle = 0,
2314 const char* shadowColor = NULL,
const char* focusedColor = NULL);
2317#ifdef DOXYGEN_SHOULD_USE_THIS
2348 virtual void setLabel(
const String& label = emptyString,
2349 const char* font = NULL,
2350 const char* textColor = NULL,
2351 const char* disabledColor = NULL,
2352 const char* shadowColor = NULL,
2353 const char* focusedColor = NULL,
2354 const String& label2 = emptyString);
2358#ifdef DOXYGEN_SHOULD_USE_THIS
2383#ifdef DOXYGEN_SHOULD_USE_THIS
2408#ifdef DOXYGEN_SHOULD_USE_THIS
2433 bool canAcceptMessages(
int actionId)
override {
return true; }
2435 int textOffsetX = 0;
2436 int textOffsetY = 0;
2437 KODI::UTILS::COLOR::Color align;
2438 std::string strFont;
2439 KODI::UTILS::COLOR::Color textColor;
2440 KODI::UTILS::COLOR::Color disabledColor;
2442 int shadowColor = 0;
2443 int focusedColor = 0;
2444 std::string strText;
2445 std::string strText2;
2446 std::string strTextureFocus;
2447 std::string strTextureNoFocus;
2449 CGUIControl* Create()
override;
2499 CGUIControl* Create()
override;
2584 const char* focusOnTexture = NULL,
const char* noFocusOnTexture = NULL,
2585 const char* focusOffTexture = NULL,
const char* noFocusOffTexture = NULL,
2586 const char* focusTexture = NULL,
const char* noFocusTexture = NULL,
2587 long textOffsetX = CONTROL_TEXT_OFFSET_X,
2588 long textOffsetY = CONTROL_TEXT_OFFSET_Y,
2589 long _alignment = (XBFONT_LEFT | XBFONT_CENTER_Y),
2590 const char* font = NULL,
const char* textColor = NULL,
2591 const char* disabledColor = NULL,
long angle = 0,
2592 const char* shadowColor = NULL,
const char* focusedColor = NULL,
2593 const char* disabledOnTexture = NULL,
const char* disabledOffTexture = NULL);
2596#ifdef DOXYGEN_SHOULD_USE_THIS
2625#ifdef DOXYGEN_SHOULD_USE_THIS
2649#ifdef DOXYGEN_SHOULD_USE_THIS
2687 virtual void setLabel(
const String& label = emptyString,
2688 const char* font = NULL,
2689 const char* textColor = NULL,
2690 const char* disabledColor = NULL,
2691 const char* shadowColor = NULL,
2692 const char* focusedColor = NULL,
2693 const String& label2 = emptyString);
2697#ifdef DOXYGEN_SHOULD_USE_THIS
2729 bool canAcceptMessages(
int actionId)
override {
return true; }
2731 std::string strFont;
2732 std::string strText;
2733 std::string strTextureFocus;
2734 std::string strTextureNoFocus;
2735 std::string strTextureRadioOnFocus;
2736 std::string strTextureRadioOnNoFocus;
2737 std::string strTextureRadioOffFocus;
2738 std::string strTextureRadioOffNoFocus;
2739 std::string strTextureRadioOnDisabled;
2740 std::string strTextureRadioOffDisabled;
2741 KODI::UTILS::COLOR::Color textColor;
2742 KODI::UTILS::COLOR::Color disabledColor;
2743 int textOffsetX = 0;
2744 int textOffsetY = 0;
2747 KODI::UTILS::COLOR::Color shadowColor;
2748 KODI::UTILS::COLOR::Color focusedColor;
2750 CGUIControl* Create()
override;
2806 const char* textureback = NULL,
2807 const char* texture = NULL,
2808 const char* texturefocus = NULL,
2809 int orientation = 1,
2810 const char* texturebackdisabled = NULL,
2811 const char* texturedisabled = NULL);
2813#ifdef DOXYGEN_SHOULD_USE_THIS
2836#ifdef DOXYGEN_SHOULD_USE_THIS
2859#ifdef DOXYGEN_SHOULD_USE_THIS
2883#ifdef DOXYGEN_SHOULD_USE_THIS
2907 virtual void setInt(
int value,
int min,
int delta,
int max);
2910#ifdef DOXYGEN_SHOULD_USE_THIS
2934#ifdef DOXYGEN_SHOULD_USE_THIS
2958 virtual void setFloat(
float value,
float min,
float delta,
float max);
2962 std::string strTextureBack;
2963 std::string strTextureBackDisabled;
2964 std::string strTexture;
2965 std::string strTextureFoc;
2966 std::string strTextureDisabled;
2969 CGUIControl* Create()
override;
Definition Control.h:1686
Definition Control.h:2494
Definition Control.h:2021
Definition Control.h:1153
setItemHeight(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Definition Control.h:2159
Definition Control.h:2800
Definition Control.h:1827
setLabel(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getLabel()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getText()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setType(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setText(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
addLabel(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setScrolling(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setColorDiffuse(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setImage(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setLabel(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getLabel()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
reset()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getSelectedItem()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
selectItem(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setStaticContent(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
addItem(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getItemHeight()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
reset()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setSpace(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setPageControlVisible(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getSpace()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
size()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getSelectedPosition()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
removeItem(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getListItem(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getSpinControl()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setImageDimensions(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
addItems(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getPercent()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setPercent(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getPercent()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getInt()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setPercent(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setFloat(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getFloat()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setInt(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setTextures(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
reset()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
autoScroll(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getText()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
scroll(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setText(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setVisible(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setAnimations(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
isVisible(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setPosition(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
controlRight(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getX()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
controlLeft(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setNavigation(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setEnabled(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setEnableCondition(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setHeight(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setVisibleCondition(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getHeight()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
controlUp(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getY()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getId() inline bool operator
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getWidth()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
setWidth(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
controlDown(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...