92 const std::string &caption) :
119 if (
theme !=
nullptr)
134 if (
theme !=
nullptr)
144 if (
mSkin !=
nullptr)
187 if (image !=
nullptr)
190 graphics->
drawImage(image, textX, textY);
235 const int dots = font->
getWidth(
"...");
241 const size_t szChars =
mCaption.size();
242 for (
size_t f = 1; f < szChars - 1; f ++)
244 const std::string text =
mCaption.substr(0, szChars - f);
245 const int width = font->
getWidth(text) + dots + pad2;
246 if (width <= maxSize)
280 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
void removeDragged(const Widget *const widget)
void setForegroundColor(const Color &color)
void resizeTo(const int maxSize, const int minSize)
static void finalCleanup()
void setForegroundColorAll(const Color &color1, const Color &color2)
void setParent(Widget *const widget)
void widgetHidden(const Event &event)
void safeDraw(Graphics *const graphics)
void draw(Graphics *const graphics)
Graphics::Alignment mAlignment
void setCaption(const std::string &caption)
Label(const Widget2 *const widget)
void setWindow(Widget *const widget)
void unload(Skin *const skin)
static std::string getThemePath()
Skin * load(const std::string &filename, const std::string &filename2, const bool full, const std::string &defaultPath)
#define BLOCK_START(name)