47 void setImage(
const String & fname,
bool autosize=
true,
bool bg=
false);
63 void moveInit(SDL_MouseButtonEvent * event);
64 void move(SDL_MouseMotionEvent * event);
91 #endif // SDLTK_LABEL_H virtual void setPos(int x, int y)
Sets the Position.
Definition: label.h:42
Color mBorderColor1
Definition: label.h:84
Image * mImage
Definition: label.h:71
bool mBorder
Definition: label.h:67
Image to display either on an OpenGL- or plain SDL-Surface.
Definition: image.h:39
String mText
Definition: label.h:73
bool mMoveable
Definition: label.h:69
Point mRightBottom
Definition: label.h:81
virtual void onMouseButton(SDL_MouseButtonEvent *event)
Catch MouseButton events.
Definition: label.cpp:48
void moveInit(SDL_MouseButtonEvent *event)
Definition: label.cpp:53
virtual ~Label()
Definition: label.cpp:38
A Widget with text and background color or image.
Definition: label.h:33
void drawText()
Definition: label.cpp:147
Label(Widget *parent=nullptr)
Definition: label.cpp:25
virtual void draw()
Definition: label.cpp:158
Point mRelativeMousePos
Definition: label.h:77
Point mTextOffset
Definition: label.h:75
void setBackground(bool val)
Definition: label.h:49
void drawBackground()
Definition: label.cpp:127
virtual void onMouseMotion(SDL_MouseMotionEvent *event)
Catch MouseMotion events.
Definition: label.cpp:43
Point mTextPos
Definition: label.h:74
void move(SDL_MouseMotionEvent *event)
Definition: label.cpp:69
void setImage(const String &fname, bool autosize=true, bool bg=false)
Definition: label.cpp:102
bool mBackground
Definition: label.h:68
void setText(const String &text)
Definition: label.h:50
Point mLeftBottom
Definition: label.h:82
void setBorder(bool val)
Definition: label.cpp:80
void drawBorder()
Definition: label.cpp:114
Point mRightTop
Definition: label.h:80
Defines a 2D point (x, y)
Definition: point.h:28
const String & getText() const
Definition: label.h:55
Point mLeftTop
Definition: label.h:79
void setX(Sint16 x)
Definition: rect.h:93
Color mBorderColor2
Definition: label.h:85
void setY(Sint16 y)
Definition: rect.h:94
void setMoveable(bool moveable)
Definition: label.h:51
RGBA Color Type.
Definition: color.h:30
std::string String
Definition: types.h:29
the SDL based Stuff
Definition: audio.cpp:22
void setBorderColor(const Color &color, const Color &highlite)
Definition: label.h:52