26 #ifndef _TGUI_GRID_INCLUDED_
27 #define _TGUI_GRID_INCLUDED_
98 virtual void initialize();
105 virtual Grid* clone();
120 virtual void setSize(
float width,
float height);
129 virtual Vector2u getSize()
const;
138 virtual Vector2f getScaledSize()
const;
149 virtual void remove(
OBJECT* object);
156 virtual void removeAllObjects();
167 virtual void addToRow(
OBJECT*
const object,
const Vector4u& borders =
Vector4u(0, 0, 0, 0), Layout::layouts layout = Layout::Center);
176 virtual void addRow(
unsigned int rowHeight = 0);
185 virtual void updateObjects();
192 virtual void changeObjectLayout(
const OBJECT*
const object, Layout::layouts layout = Layout::Center);
200 virtual bool mouseOnObject(
float x,
float y);
201 virtual void objectFocused();
202 virtual void objectUnfocused();
209 virtual void addCallback(
const Callback& callback);
219 virtual void updatePosition(
unsigned int row,
unsigned int column);
225 virtual void updatePositionsOfAllObjects();
232 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
238 std::vector< std::vector<OBJECT*> > m_GridObjects;
239 std::vector< std::vector<Vector4u> > m_ObjBorders;
240 std::vector< std::vector<Layout::layouts> > m_ObjLayout;
242 std::vector<unsigned int> m_RowHeight;
243 std::vector<unsigned int> m_ColumnWidth;
256 #endif //_TGUI_GRID_INCLUDED_
Definition: GroupObject.hpp:35
When you receive an action callback from an object then this struct will be passed as parameter...
Definition: Objects.hpp:362
layouts
Definition: Grid.hpp:48
The parent struct for every object.
Definition: Objects.hpp:36
The layout of the object.
Definition: Grid.hpp:46
Definition: Vectors.hpp:36
Draw the object in the top left corner of the cell.
Definition: Grid.hpp:51