22 #ifndef FIFE_GUI_WIDGETS_CLICKLABEL_H 23 #define FIFE_GUI_WIDGETS_CLICKLABEL_H 29 #include <fifechan.hpp> 49 class ClickLabel :
public Widget,
public MouseListener,
public KeyListener,
public FocusListener,
public WidgetListener {
80 virtual void setCaption(
const std::string& caption);
89 virtual void setAlignment(Graphics::Alignment alignment);
134 virtual void draw(Graphics* graphics);
140 virtual void focusLost(
const Event& event);
Implementation of a label capable of displaying a single or multiline caption.
virtual void fontChanged()
virtual void keyReleased(KeyEvent &keyEvent)
virtual void ancestorHidden(const Event &event)
bool mMousePressed
True if a mouse has been pressed, false otherwise.
virtual Graphics::Alignment getAlignment() const
Gets the alignment of the caption.
virtual void setTextWrapping(bool textWrapping)
Sets the text wrapping of the caption.
virtual void mouseExited(MouseEvent &mouseEvent)
virtual void mouseEntered(MouseEvent &mouseEvent)
virtual void setOpaque(bool opaque)
Sets the opacity of the background.
bool mHasMouse
True if the mouse is ontop of the button, false otherwise.
virtual bool isTextWrapping() const
Gets the text wrapping of the caption.
FIFE::GuiFont * mGuiFont
Holds the gui font.
std::string mCaption
Holds the caption of the label.
virtual bool isOpaque() const
std::string mWrappedText
Holds the wrapped text of the label.
virtual const std::string & getCaption() const
Gets the caption of the label.
virtual void setDimension(const Rectangle &dimension)
virtual void adjustSize()
bool mTextWrapping
True if text wrapping is enabled, otherwise false.
virtual void resizeToContent(bool recursiv=true)
virtual void mouseReleased(MouseEvent &mouseEvent)
virtual void mousePressed(MouseEvent &mouseEvent)
bool mOpaque
True if opaque, otherwise false.
virtual void mouseDragged(MouseEvent &mouseEvent)
virtual void setAlignment(Graphics::Alignment alignment)
Sets the alignment of the caption.
Graphics::Alignment mAlignment
Holds the alignment of the caption.
virtual void draw(Graphics *graphics)
bool mKeyPressed
True if a key has been pressed, false otherwise.
virtual void focusLost(const Event &event)
virtual void keyPressed(KeyEvent &keyEvent)
virtual void setCaption(const std::string &caption)
Sets the caption of the label.