100 const std::string &
restrict skinName) :
112 mEnabledColor(getThemeColor(
ThemeColorId::BUTTON, 255U)),
113 mEnabledColor2(getThemeColor(
ThemeColorId::BUTTON_OUTLINE, 255U)),
114 mDisabledColor(getThemeColor(
ThemeColorId::BUTTON_DISABLED, 255U)),
115 mDisabledColor2(getThemeColor(
ThemeColorId::BUTTON_DISABLED_OUTLINE,
117 mHighlightedColor(getThemeColor(
ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
118 mHighlightedColor2(getThemeColor(
120 mPressedColor(getThemeColor(
ThemeColorId::BUTTON_PRESSED, 255U)),
121 mPressedColor2(getThemeColor(
ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
135 mMousePressed(false),
145 const std::string &
restrict caption,
146 const std::string &
restrict actionEventId,
147 const std::string &
restrict skinName,
160 mEnabledColor(getThemeColor(
ThemeColorId::BUTTON, 255U)),
161 mEnabledColor2(getThemeColor(
ThemeColorId::BUTTON_OUTLINE, 255U)),
162 mDisabledColor(getThemeColor(
ThemeColorId::BUTTON_DISABLED, 255U)),
163 mDisabledColor2(getThemeColor(
ThemeColorId::BUTTON_DISABLED_OUTLINE,
165 mHighlightedColor(getThemeColor(
ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
166 mHighlightedColor2(getThemeColor(
168 mPressedColor(getThemeColor(
ThemeColorId::BUTTON_PRESSED, 255U)),
169 mPressedColor2(getThemeColor(
ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
183 mMousePressed(false),
197 const std::string &
restrict caption,
198 const std::string &
restrict imageName,
199 const int imageWidth,
200 const int imageHeight,
201 const std::string &
restrict actionEventId,
202 const std::string &
restrict skinName,
215 mEnabledColor(getThemeColor(
ThemeColorId::BUTTON, 255U)),
216 mEnabledColor2(getThemeColor(
ThemeColorId::BUTTON_OUTLINE, 255U)),
217 mDisabledColor(getThemeColor(
ThemeColorId::BUTTON_DISABLED, 255U)),
218 mDisabledColor2(getThemeColor(
ThemeColorId::BUTTON_DISABLED_OUTLINE,
220 mHighlightedColor(getThemeColor(
ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
221 mHighlightedColor2(getThemeColor(
223 mPressedColor(getThemeColor(
ThemeColorId::BUTTON_PRESSED, 255U)),
224 mPressedColor2(getThemeColor(
ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
234 mImageWidth(imageWidth),
235 mImageHeight(imageHeight),
238 mMousePressed(false),
253 const std::string &
restrict imageName,
254 const int imageWidth,
255 const int imageHeight,
256 const std::string &
restrict actionEventId,
257 const std::string &
restrict skinName,
270 mEnabledColor(getThemeColor(
ThemeColorId::BUTTON, 255U)),
271 mEnabledColor2(getThemeColor(
ThemeColorId::BUTTON_OUTLINE, 255U)),
272 mDisabledColor(getThemeColor(
ThemeColorId::BUTTON_DISABLED, 255U)),
273 mDisabledColor2(getThemeColor(
ThemeColorId::BUTTON_DISABLED_OUTLINE,
275 mHighlightedColor(getThemeColor(
ThemeColorId::BUTTON_HIGHLIGHTED, 255U)),
276 mHighlightedColor2(getThemeColor(
278 mPressedColor(getThemeColor(
ThemeColorId::BUTTON_PRESSED, 255U)),
279 mPressedColor2(getThemeColor(
ThemeColorId::BUTTON_PRESSED_OUTLINE, 255U)),
289 mImageWidth(imageWidth),
290 mImageHeight(imageHeight),
293 mMousePressed(false),
318 if (
theme !=
nullptr)
345 if (
theme !=
nullptr)
381 if (image ==
nullptr)
428 for (
int a = 0; a < 9; a ++)
435 if (image !=
nullptr)
482 else if (
mMode != mode)
503 const int width = rect.
width;
504 const int height = rect.
height;
506 int textY = height / 2 - font->
getHeight() / 2;
534 imageX = (width - w) / 2;
535 textX = imageX +
mImageWidth + spacing - width1 / 2;
539 textX = (width - width1) / 2;
546 textX = width - width1 - padding;
547 imageX = textX - width1 - spacing;
568 imageX + 1, imageY + 1);
616 if (image !=
nullptr)
617 graphics->
drawImage(image, textX, textY);
658 const int width = rect.
width;
659 const int height = rect.
height;
661 int textY = height / 2 - font->
getHeight() / 2;
689 imageX = (width - w) / 2;
690 textX = imageX +
mImageWidth + spacing - width1 / 2;
694 textX = (width - width1) / 2;
701 textX = width - width1 - padding;
702 imageX = textX - width1 - spacing;
752 if (image !=
nullptr)
753 graphics->
drawImage(image, textX, textY);
907 if ((widget ==
nullptr) && (
mWindow !=
nullptr))
void generate(TextChunk &chunk)
int getWidth(const std::string &text) const
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
virtual void drawTileCollection(const ImageCollection *const vertCol)=0
virtual void calcTileCollection(ImageCollection *const vertCol, const Image *const image, int x, int y)=0
virtual void finalize(ImageCollection *const col)
virtual void calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0
ClipRect & getTopClip() const
virtual void drawImageRect(const int x, const int y, const int w, const int h, const ImageRect &imgRect)=0
void removeDragged(const Widget *const widget)
Image * get(const size_type i) const
MouseButtonT getButton() const
int getOption(const std::string &name) const
const ImageRect & getBorder() const
void unload(Skin *const skin)
static std::string getThemePath()
static Image * getImageFromThemeXml(const std::string &name, const std::string &name2)
Skin * load(const std::string &filename, const std::string &filename2, const bool full, const std::string &defaultPath)
float getMinimumOpacity() const
static ImageSet * getImageSetFromTheme(const std::string &path, const int w, const int h)
#define BLOCK_START(name)
#define isBatchDrawRenders(val)