-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbutton.h
More file actions
37 lines (29 loc) · 848 Bytes
/
Copy pathbutton.h
File metadata and controls
37 lines (29 loc) · 848 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
#pragma once
#include <GLFW/glfw3.h>
#include <functional>
#include <vector>
#include "helper_types.h"
#include "widget.h"
#include "unicode/unistr.h"
class Button : public Widget {
public:
using Positioner = std::function<void(Button*,int,int,int,int,int,int)>;
using OnClick = std::function<void(Button*)>;
Button(Widget* parent, icu::UnicodeString text, Positioner positioner, OnClick onclick);
void render();
void position(int x, int y, int width, int height);
bool on_mouse_button_event(int button, int action, int mods);
bool transparent;
bool window_button;
bool execute_on_down = true;
bool border = false;
bool rounded = false;
bool alignLeft = false;
bool isContext = false;
int text_special = 0;
Color* background_color;
icu::UnicodeString BUTTON_LABEL;
private:
Positioner POSITIONER;
OnClick ONCLICK;
};