26 #ifndef _TGUI_OBJECTS_INCLUDED_
27 #define _TGUI_OBJECTS_INCLUDED_
36 struct TGUI_API
OBJECT :
public sf::Drawable, sf::Transformable
47 OBJECT(
const OBJECT& copy);
59 OBJECT& operator= (
const OBJECT& right);
65 virtual void initialize();
71 virtual OBJECT* clone() = 0;
77 virtual void setSize(
float width,
float height) = 0;
83 virtual Vector2u getSize()
const = 0;
89 virtual Vector2f getScaledSize()
const = 0;
114 virtual bool isVisible()
const;
122 virtual void enable();
130 virtual void disable();
139 virtual bool isEnabled()
const;
147 virtual bool isDisabled()
const;
155 virtual bool isLoaded()
const;
161 virtual void extractPhases(std::string phases);
195 void focusNextObject();
201 virtual bool isFocused()
const;
213 virtual void moveToFront();
219 virtual void moveToBack();
226 virtual bool mouseOnObject(
float x,
float y);
227 virtual void leftMousePressed(
float x,
float y);
228 virtual void leftMouseReleased(
float x,
float y);
229 virtual void mouseMoved(
float x,
float y);
230 virtual void keyPressed(sf::Keyboard::Key key);
231 virtual void textEntered(sf::Uint32 key);
232 virtual void mouseWheelMoved(
int delta);
233 virtual void objectFocused();
234 virtual void objectUnfocused();
236 virtual void mouseNotOnObject();
237 virtual void mouseNoLongerDown();
244 unsigned int callbackID;
261 unsigned char m_ObjectPhase;
280 bool m_AnimatedObject;
283 bool m_DraggableObject;
291 friend struct EventManager;
310 virtual void setBorders(
unsigned int leftBorder = 0,
unsigned int topBorder = 0,
311 unsigned int rightBorder = 0,
unsigned int bottomBorder = 0) = 0;
320 virtual Vector4u getBorders()
const;
326 unsigned int m_LeftBorder;
327 unsigned int m_TopBorder;
328 unsigned int m_RightBorder;
329 unsigned int m_BottomBorder;
341 friend struct EventManager;
349 virtual void update() = 0;
355 sf::Time m_AnimationTimeElapsed;
367 unsigned int callbackID;
370 unsigned int trigger;
389 sf::Mouse::Button mouseButton;
425 TGUI_API sf::Color extractColor(std::string
string);
432 TGUI_API std::string convertColorToString(
const sf::Color& color);
438 TGUI_API
bool extractVector2f(std::string
string, Vector2f& vector);
444 TGUI_API
bool extractVector2u(std::string
string, Vector2u& vector);
450 TGUI_API
bool extractVector4u(std::string
string,
Vector4u& vector);
455 #endif //_TGUI_OBJECTS_INCLUDED_
When you receive an action callback from an object then this struct will be passed as parameter...
Definition: Objects.hpp:362
The parent struct for every object.
Definition: Objects.hpp:36
Parent struct for every object that has borders.
Definition: Objects.hpp:299
Parent struct for objects that store multiple objects.
Definition: Group.hpp:38
ObjectTypes
A list of all objects in tgui.
Definition: TGUI.hpp:107
Definition: Vectors.hpp:36
Parent object for all objects that need to access the internal clock of the window.
Definition: Objects.hpp:338