11#include "Alternative.h"
14#include "guilib/GUIControl.h"
15#include "guilib/GUIFont.h"
17#include "swighelper.h"
18#include "utils/Color.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);
697 std::string strTextureUp;
698 std::string strTextureDown;
699 std::string strTextureUpFocus;
700 std::string strTextureDownFocus;
701 std::string strTextureUpDisabled;
702 std::string strTextureDownDisabled;
769 ControlLabel(
long x,
long y,
long width,
long height,
const String& label,
770 const char* font = NULL,
const char* textColor = NULL,
771 const char* disabledColor = NULL,
772 long alignment = XBFONT_LEFT,
773 bool hasPath =
false,
long angle = 0);
777#ifdef DOXYGEN_SHOULD_USE_THIS
799#ifdef DOXYGEN_SHOULD_USE_THIS
829 virtual void setLabel(
const String& label = emptyString,
830 const char* font = NULL,
831 const char* textColor = NULL,
832 const char* disabledColor = NULL,
833 const char* shadowColor = NULL,
834 const char* focusedColor = NULL,
835 const String& label2 = emptyString);
843 UTILS::Color textColor;
844 UTILS::Color disabledColor;
846 bool bHasPath =
false;
849 CGUIControl* Create()
override;
915 ControlEdit(
long x,
long y,
long width,
long height,
const String& label,
916 const char* font = NULL,
const char* textColor = NULL,
917 const char* disabledColor = NULL,
918 long _alignment = XBFONT_LEFT,
const char* focusTexture = NULL,
919 const char* noFocusTexture = NULL);
923#ifdef DOXYGEN_SHOULD_USE_THIS
953 virtual void setLabel(
const String& label = emptyString,
954 const char* font = NULL,
955 const char* textColor = NULL,
956 const char* disabledColor = NULL,
957 const char* shadowColor = NULL,
958 const char* focusedColor = NULL,
959 const String& label2 = emptyString);
963#ifdef DOXYGEN_SHOULD_USE_THIS
986#ifdef DOXYGEN_SHOULD_USE_THIS
1005 virtual void setText(
const String& text);
1009#ifdef DOXYGEN_SHOULD_USE_THIS
1035 std::string strFont;
1036 std::string strText;
1037 std::string strTextureFocus;
1038 std::string strTextureNoFocus;
1039 UTILS::Color textColor;
1040 UTILS::Color disabledColor;
1043 CGUIControl* Create()
override;
1047#ifdef DOXYGEN_SHOULD_USE_THIS
1081 virtual void setType(
int type,
const String& heading);
1151 void internAddListItem(
const AddonClass::Ref<ListItem>& listitem,
bool sendMessage);
1154 ControlList(
long x,
long y,
long width,
long height,
const char* font = NULL,
1155 const char* textColor = NULL,
const char* buttonTexture = NULL,
1156 const char* buttonFocusTexture = NULL,
1157 const char* selectedColor = NULL,
1158 long _imageWidth=10,
long _imageHeight=10,
long _itemTextXOffset = CONTROL_TEXT_OFFSET_X,
1159 long _itemTextYOffset = CONTROL_TEXT_OFFSET_Y,
long _itemHeight = 27,
long _space = 2,
1160 long _alignmentY = XBFONT_CENTER_Y);
1164#ifdef DOXYGEN_SHOULD_USE_THIS
1183 virtual void addItem(
const Alternative<String, const XBMCAddon::xbmcgui::ListItem* > & item,
bool sendMessage =
true);
1186#ifdef DOXYGEN_SHOULD_USE_THIS
1209 virtual void addItems(
const std::vector<Alternative<String, const XBMCAddon::xbmcgui::ListItem* > > & items);
1212#ifdef DOXYGEN_SHOULD_USE_THIS
1234#ifdef DOXYGEN_SHOULD_USE_THIS
1257#ifdef DOXYGEN_SHOULD_USE_THIS
1300 virtual void reset();
1303#ifdef DOXYGEN_SHOULD_USE_THIS
1327#ifdef DOXYGEN_SHOULD_USE_THIS
1349#ifdef DOXYGEN_SHOULD_USE_THIS
1377#ifdef DOXYGEN_SHOULD_USE_THIS
1401#ifdef DOXYGEN_SHOULD_USE_THIS
1424#ifdef DOXYGEN_SHOULD_USE_THIS
1448#ifdef DOXYGEN_SHOULD_USE_THIS
1472#ifdef DOXYGEN_SHOULD_USE_THIS
1492 virtual long size();
1496#ifdef DOXYGEN_SHOULD_USE_THIS
1520#ifdef DOXYGEN_SHOULD_USE_THIS
1544#ifdef DOXYGEN_SHOULD_USE_THIS
1569#ifdef DOXYGEN_SHOULD_USE_THIS
1595 void sendLabelBind(
int tail);
1597 bool canAcceptMessages(
int actionId)
override
1598 {
return ((actionId == ACTION_SELECT_ITEM) | (actionId == ACTION_MOUSE_LEFT_CLICK)); }
1604 std::vector<AddonClass::Ref<ListItem> > vecItems;
1605 std::string strFont;
1606 AddonClass::Ref<ControlSpin> pControlSpin;
1608 UTILS::Color textColor;
1609 UTILS::Color selectedColor;
1610 std::string strTextureButton;
1611 std::string strTextureButtonFocus;
1613 int imageHeight = 0;
1618 int itemTextOffsetX = 0;
1619 int itemTextOffsetY = 0;
1620 uint32_t alignmentY;
1622 CGUIControl* Create()
override;
1685 const char* font = NULL,
1686 const char* textColor = NULL,
1687 long _alignment = XBFONT_LEFT);
1690#ifdef DOXYGEN_SHOULD_USE_THIS
1711 virtual void addLabel(
const String& label);
1714#ifdef DOXYGEN_SHOULD_USE_THIS
1738#ifdef DOXYGEN_SHOULD_USE_THIS
1755 virtual void reset();
1759 std::string strFont;
1760 UTILS::Color textColor;
1761 std::vector<std::string> vecLabels;
1764 CGUIControl* Create()
override;
1826 const char* font = NULL,
1827 const char* textColor = NULL);
1830#ifdef DOXYGEN_SHOULD_USE_THIS
1854 virtual void setText(
const String& text);
1858#ifdef DOXYGEN_SHOULD_USE_THIS
1884#ifdef DOXYGEN_SHOULD_USE_THIS
1903 virtual void reset();
1907#ifdef DOXYGEN_SHOULD_USE_THIS
1930 virtual void scroll(
long id);
1934#ifdef DOXYGEN_SHOULD_USE_THIS
1959 virtual void autoScroll(
int delay,
int time,
int repeat);
1963 std::string strFont;
1964 UTILS::Color textColor;
1966 CGUIControl* Create()
override;
2020 const char* filename,
long aspectRatio = 0,
2021 const char* colorDiffuse = NULL);
2023#ifdef DOXYGEN_SHOULD_USE_THIS
2048 virtual void setImage(
const char* imageFilename,
const bool useCache =
true);
2051#ifdef DOXYGEN_SHOULD_USE_THIS
2079 std::string strFileName;
2080 int aspectRatio = 0;
2081 UTILS::Color colorDiffuse;
2083 CGUIControl* Create()
override;
2158 const char* texturebg = NULL,
2159 const char* textureleft = NULL,
2160 const char* texturemid = NULL,
2161 const char* textureright = NULL,
2162 const char* textureoverlay = NULL);
2164#ifdef DOXYGEN_SHOULD_USE_THIS
2191#ifdef DOXYGEN_SHOULD_USE_THIS
2216 std::string strTextureLeft;
2217 std::string strTextureMid;
2218 std::string strTextureRight;
2219 std::string strTextureBg;
2220 std::string strTextureOverlay;
2221 int aspectRatio = 0;
2222 UTILS::Color colorDiffuse;
2224 CGUIControl* Create()
override;
2302 ControlButton(
long x,
long y,
long width,
long height,
const String& label,
2303 const char* focusTexture = NULL,
const char* noFocusTexture = NULL,
2304 long textOffsetX = CONTROL_TEXT_OFFSET_X,
2305 long textOffsetY = CONTROL_TEXT_OFFSET_Y,
2306 long alignment = (XBFONT_LEFT | XBFONT_CENTER_Y),
2307 const char* font = NULL,
const char* textColor = NULL,
2308 const char* disabledColor = NULL,
long angle = 0,
2309 const char* shadowColor = NULL,
const char* focusedColor = NULL);
2312#ifdef DOXYGEN_SHOULD_USE_THIS
2343 virtual void setLabel(
const String& label = emptyString,
2344 const char* font = NULL,
2345 const char* textColor = NULL,
2346 const char* disabledColor = NULL,
2347 const char* shadowColor = NULL,
2348 const char* focusedColor = NULL,
2349 const String& label2 = emptyString);
2353#ifdef DOXYGEN_SHOULD_USE_THIS
2378#ifdef DOXYGEN_SHOULD_USE_THIS
2403#ifdef DOXYGEN_SHOULD_USE_THIS
2428 bool canAcceptMessages(
int actionId)
override {
return true; }
2430 int textOffsetX = 0;
2431 int textOffsetY = 0;
2433 std::string strFont;
2434 UTILS::Color textColor;
2435 UTILS::Color disabledColor;
2437 int shadowColor = 0;
2438 int focusedColor = 0;
2439 std::string strText;
2440 std::string strText2;
2441 std::string strTextureFocus;
2442 std::string strTextureNoFocus;
2444 CGUIControl* Create()
override;
2494 CGUIControl* Create()
override;
2578 const char* focusOnTexture = NULL,
const char* noFocusOnTexture = NULL,
2579 const char* focusOffTexture = NULL,
const char* noFocusOffTexture = NULL,
2580 const char* focusTexture = NULL,
const char* noFocusTexture = NULL,
2581 long textOffsetX = CONTROL_TEXT_OFFSET_X,
2582 long textOffsetY = CONTROL_TEXT_OFFSET_Y,
2583 long _alignment = (XBFONT_LEFT | XBFONT_CENTER_Y),
2584 const char* font = NULL,
const char* textColor = NULL,
2585 const char* disabledColor = NULL,
long angle = 0,
2586 const char* shadowColor = NULL,
const char* focusedColor = NULL,
2587 const char* disabledOnTexture = NULL,
const char* disabledOffTexture = NULL);
2590#ifdef DOXYGEN_SHOULD_USE_THIS
2619#ifdef DOXYGEN_SHOULD_USE_THIS
2643#ifdef DOXYGEN_SHOULD_USE_THIS
2681 virtual void setLabel(
const String& label = emptyString,
2682 const char* font = NULL,
2683 const char* textColor = NULL,
2684 const char* disabledColor = NULL,
2685 const char* shadowColor = NULL,
2686 const char* focusedColor = NULL,
2687 const String& label2 = emptyString);
2691#ifdef DOXYGEN_SHOULD_USE_THIS
2723 bool canAcceptMessages(
int actionId)
override {
return true; }
2725 std::string strFont;
2726 std::string strText;
2727 std::string strTextureFocus;
2728 std::string strTextureNoFocus;
2729 std::string strTextureRadioOnFocus;
2730 std::string strTextureRadioOnNoFocus;
2731 std::string strTextureRadioOffFocus;
2732 std::string strTextureRadioOffNoFocus;
2733 std::string strTextureRadioOnDisabled;
2734 std::string strTextureRadioOffDisabled;
2735 UTILS::Color textColor;
2736 UTILS::Color disabledColor;
2737 int textOffsetX = 0;
2738 int textOffsetY = 0;
2741 UTILS::Color shadowColor;
2742 UTILS::Color focusedColor;
2744 CGUIControl* Create()
override;
2795 const char* textureback = NULL,
2796 const char* texture = NULL,
2797 const char* texturefocus = NULL,
int orientation = 1);
2799#ifdef DOXYGEN_SHOULD_USE_THIS
2822#ifdef DOXYGEN_SHOULD_USE_THIS
2845#ifdef DOXYGEN_SHOULD_USE_THIS
2869#ifdef DOXYGEN_SHOULD_USE_THIS
2893 virtual void setInt(
int value,
int min,
int delta,
int max);
2896#ifdef DOXYGEN_SHOULD_USE_THIS
2920#ifdef DOXYGEN_SHOULD_USE_THIS
2944 virtual void setFloat(
float value,
float min,
float delta,
float max);
2948 std::string strTextureBack;
2949 std::string strTexture;
2950 std::string strTextureFoc;
2953 CGUIControl* Create()
override;
Definition: Control.h:913
Definition: Control.h:1682
Definition: Control.h:2489
Definition: Control.h:2017
Definition: Control.h:767
Definition: Control.h:1150
setItemHeight(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Definition: Control.h:2155
Definition: Control.h:2792
Definition: Control.h:650
Definition: Control.h:1823
Definition: ListItem.h:51
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...