-
Notifications
You must be signed in to change notification settings - Fork 1
/
GCP_ContextMenu.h
38 lines (36 loc) · 1.12 KB
/
GCP_ContextMenu.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
29
30
31
32
33
34
35
36
37
38
#ifndef GCP_ContextMenuH
#define GCP_ContextMenuH
#include "GCP_Button.h"
#include "GCP_Vector.h"
namespace gcp
{
class GCP_ContextMenu;
typedef GCP_SPointer<GCP_ContextMenu> gcp_spContextMenu;
class GCP_ContextMenu : public GCP_FormComponent
{
private:
bool _isLocked;
int _iType;
GCP_Vector<unsigned int> _iSeparators;
public:
GCP_Vector<gcp_spButton> menu;
bool isContextMenuBlocking;
GCP_ContextMenu();
~GCP_ContextMenu();
void setLock(bool flag);
void addButton(const GCP_SPointer<GCP_Button> &button);
void addButton(const string &type);
void open(int x, int y);
//void initTexture(SDL_Renderer *screen);
void close(void* obj);
//gcp_formEvent OnMouseGlobalMotion(const GCP_Event& event);
gcp_formEvent OnMouseGlobalLeftHoldMotion(const GCP_Event& event);
//gcp_formEvent OnMouseGlobalLeftClick(const GCP_Event& event);
//bool OnMouseGlobalRightClick(const GCP_Event& event);
gcp_formEvent OnEvent(const GCP_Event &event);
void OnDraw(const GCP_Event &event);
void setMenuType(int type) { _iType = type; }
int getMenuType() { return _iType; }
};
}
#endif