-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathimage_group.h
More file actions
50 lines (38 loc) · 901 Bytes
/
image_group.h
File metadata and controls
50 lines (38 loc) · 901 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* File : image_group.h
* COPYRIGHT (C) 2012-2017, Shanghai Real-Thread Technology Co., Ltd
*
* Change Logs:
* Date Author Notes
* 2017-11-05 realthread the first version
*/
#pragma once
#include <pm_container.h>
#include <sigslot.h>
#include <pm_image.h>
namespace Persimmon
{
class ImageItem;
class ImageGroup : public Container
{
public:
ImageGroup(const Rect &rect);
virtual ~ImageGroup()
{
items.clear();
}
Signal<int> clicked;
void addItem(Image *itemImage, int value, const Rect rect);
void select(int value);
void clearSelect(void);
int getSelected(void)
{
return selectedItem;
}
virtual bool handleGestureEvent(struct rtgui_event_gesture *, const struct rtgui_gesture *);
private:
ImageItem *getItem(int value);
int selectedItem;
std::vector<ImageItem *> items;
};
}