-
Notifications
You must be signed in to change notification settings - Fork 3
/
Container.h
28 lines (22 loc) · 726 Bytes
/
Container.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef CONTAINER_H
#define CONTAINER_H
#include"ScrollBar.h"
#include"Control.h"
class Container : public Drawable
{
private:
View controlView;
View containerView;
FloatRect bounds;
Control & control;
ScrollBar scroll;
static const int scrollBarSize = 15;
public:
Container(const FloatRect & rectangle, Control & ctrl, const Vector2f & windowSize);
void resize(const FloatRect & rectangle, const Vector2f & windowSize);
bool contains(const Vector2f & point);
Control * handleEvent(RenderWindow & window, Event event, Vector2i mousePos);
virtual void draw(RenderTarget& target, RenderStates states) const;
void updateControlSize(const Vector2f & size);
};
#endif // !CONTAINER_H