11 #include "Alternative.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    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   234       virtual void setEnabled(
bool enabled);
   238 #ifdef DOXYGEN_SHOULD_USE_THIS   261       virtual void setVisible(
bool visible);
   265 #ifdef DOXYGEN_SHOULD_USE_THIS   286       virtual bool isVisible();
   290 #ifdef DOXYGEN_SHOULD_USE_THIS   291       setVisibleCondition(...);
   316       virtual void setVisibleCondition(
const char* visible, 
bool allowHiddenFocus = 
false);
   320 #ifdef DOXYGEN_SHOULD_USE_THIS   321       setEnableCondition(...);
   344       virtual void setEnableCondition(
const char* enable);
   348 #ifdef DOXYGEN_SHOULD_USE_THIS   379 #ifdef DOXYGEN_SHOULD_USE_THIS   401       virtual void setPosition(
long x, 
long y);
   405 #ifdef DOXYGEN_SHOULD_USE_THIS   424       virtual void setWidth(
long width);
   428 #ifdef DOXYGEN_SHOULD_USE_THIS   447       virtual void setHeight(
long height);
   451 #ifdef DOXYGEN_SHOULD_USE_THIS   480       virtual void setNavigation(
const Control* up, 
const Control* down,
   485 #ifdef DOXYGEN_SHOULD_USE_THIS   511       virtual void controlUp(
const Control* up);
   515 #ifdef DOXYGEN_SHOULD_USE_THIS   541       virtual void controlDown(
const Control* control);
   545 #ifdef DOXYGEN_SHOULD_USE_THIS   571       virtual void controlLeft(
const Control* control);
   575 #ifdef DOXYGEN_SHOULD_USE_THIS   601       virtual void controlRight(
const Control* control);
   612       int iControlDown = 0;
   613       int iControlLeft = 0;
   614       int iControlRight = 0;
   615       std::string m_label{};
   616       bool m_visible{
true};
   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       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,
   774                   bool hasPath = 
false, 
long angle = 0);
   778 #ifdef DOXYGEN_SHOULD_USE_THIS   797       virtual String getLabel();
   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       UTILS::COLOR::Color textColor;
   845       UTILS::COLOR::Color disabledColor;
   847       bool bHasPath = 
false;
   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   984       virtual String getLabel();
   988 #ifdef DOXYGEN_SHOULD_USE_THIS  1007       virtual void setText(
const String& text);
  1011 #ifdef DOXYGEN_SHOULD_USE_THIS  1031       virtual String getText();
  1037       std::string strFont;
  1038       std::string strText;
  1039       std::string strTextureFocus;
  1040       std::string strTextureNoFocus;
  1041       UTILS::COLOR::Color textColor;
  1042       UTILS::COLOR::Color disabledColor;
  1049 #ifdef DOXYGEN_SHOULD_USE_THIS  1083       virtual void setType(
int type, 
const String& heading);
  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,
  1167 #ifdef DOXYGEN_SHOULD_USE_THIS  1189 #ifdef DOXYGEN_SHOULD_USE_THIS  1215 #ifdef DOXYGEN_SHOULD_USE_THIS  1234       virtual void selectItem(
long item);
  1237 #ifdef DOXYGEN_SHOULD_USE_THIS  1257       virtual void removeItem(
int index);
  1260 #ifdef DOXYGEN_SHOULD_USE_THIS  1303       virtual void reset();
  1306 #ifdef DOXYGEN_SHOULD_USE_THIS  1327       virtual Control* getSpinControl();
  1330 #ifdef DOXYGEN_SHOULD_USE_THIS  1331       getSelectedPosition();
  1349       virtual long getSelectedPosition();
  1352 #ifdef DOXYGEN_SHOULD_USE_THIS  1380 #ifdef DOXYGEN_SHOULD_USE_THIS  1381       setImageDimensions(...);
  1400       virtual void setImageDimensions(
long imageWidth,
long imageHeight);
  1404 #ifdef DOXYGEN_SHOULD_USE_THIS  1423       virtual void setItemHeight(
long height);
  1427 #ifdef DOXYGEN_SHOULD_USE_THIS  1447       virtual void setSpace(
int space);
  1451 #ifdef DOXYGEN_SHOULD_USE_THIS  1452       setPageControlVisible(...);
  1471       virtual void setPageControlVisible(
bool visible);
  1475 #ifdef DOXYGEN_SHOULD_USE_THIS  1495       virtual long size();
  1499 #ifdef DOXYGEN_SHOULD_USE_THIS  1519       virtual long getItemHeight();
  1523 #ifdef DOXYGEN_SHOULD_USE_THIS  1543       virtual long getSpace();
  1547 #ifdef DOXYGEN_SHOULD_USE_THIS  1572 #ifdef DOXYGEN_SHOULD_USE_THIS  1573       setStaticContent(...);
  1594       virtual void setStaticContent(
const ListItemList* items);
  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;
  1611       UTILS::COLOR::Color textColor;
  1612       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;
  1689                        const char* font = NULL,
  1690                        const char* textColor = NULL,
  1694 #ifdef DOXYGEN_SHOULD_USE_THIS  1715       virtual void addLabel(
const String& label);
  1718 #ifdef DOXYGEN_SHOULD_USE_THIS  1739       virtual void setScrolling(
bool scroll);
  1742 #ifdef DOXYGEN_SHOULD_USE_THIS  1759       virtual void reset();
  1763       std::string strFont;
  1764       UTILS::COLOR::Color textColor;
  1765       std::vector<std::string> vecLabels;
  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  1884       virtual String getText();
  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       UTILS::COLOR::Color textColor;
  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  2056       setColorDiffuse(...);
  2077       virtual void setColorDiffuse(
const char* hexString);
  2083       std::string strFileName;
  2084       int aspectRatio = 0;
  2085       UTILS::COLOR::Color colorDiffuse;
  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  2192       virtual void setPercent(
float pct);
  2195 #ifdef DOXYGEN_SHOULD_USE_THIS  2216       virtual float getPercent();
  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       UTILS::COLOR::Color colorDiffuse;
  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,
  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  2359       setDisabledColor(...);
  2379       virtual void setDisabledColor(
const char* color);
  2383 #ifdef DOXYGEN_SHOULD_USE_THIS  2404       virtual String getLabel();
  2408 #ifdef DOXYGEN_SHOULD_USE_THIS  2429       virtual String getLabel2();
  2433       bool canAcceptMessages(
int actionId)
 override { 
return true; }
  2435       int textOffsetX = 0;
  2436       int textOffsetY = 0;
  2437       UTILS::COLOR::Color align;
  2438       std::string strFont;
  2439       UTILS::COLOR::Color textColor;
  2440       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;
  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,
  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  2621       virtual void setSelected(
bool selected);
  2625 #ifdef DOXYGEN_SHOULD_USE_THIS  2645       virtual bool isSelected();
  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  2698       setRadioDimension(...);
  2725       virtual void setRadioDimension(
long x, 
long y, 
long width, 
long height);
  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       UTILS::COLOR::Color textColor;
  2742       UTILS::COLOR::Color disabledColor;
  2743       int textOffsetX = 0;
  2744       int textOffsetY = 0;
  2747       UTILS::COLOR::Color shadowColor;
  2748       UTILS::COLOR::Color focusedColor;
  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  2833       virtual float getPercent();
  2836 #ifdef DOXYGEN_SHOULD_USE_THIS  2856       virtual void setPercent(
float pct);
  2859 #ifdef DOXYGEN_SHOULD_USE_THIS  2880       virtual int getInt();
  2883 #ifdef DOXYGEN_SHOULD_USE_THIS  2907       virtual void setInt(
int value, 
int min, 
int delta, 
int max);
  2910 #ifdef DOXYGEN_SHOULD_USE_THIS  2931       virtual float getFloat();
  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;
 Definition: Control.h:649
constexpr int XBFONT_LEFT
Align X left. 
Definition: GUIFont.h:39
constexpr int XBFONT_CENTER_Y
Align Y center. 
Definition: GUIFont.h:42
Definition: Control.h:2020
This class is a smart pointer for a Referenced class. 
Definition: AddonClass.h:154
Definition: Control.h:1685
Base class for controls. 
Definition: GUIControl.h:83
Definition: Control.h:1826
Definition: Control.h:2158
Definition: Control.h:2493
Definition: Control.h:2799
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
Definition: ListItem.h:53
Definition: Control.h:767
Definition: Alternative.h:17
Definition: Control.h:914
This class is the superclass for all reference counted classes in the api. 
Definition: AddonClass.h:57
Definition: Control.h:1152