-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlistbox.h
More file actions
41 lines (30 loc) · 943 Bytes
/
Copy pathlistbox.h
File metadata and controls
41 lines (30 loc) · 943 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
#pragma once
#include "widget.h"
#include <GLFW/glfw3.h>
#include "application.h"
class ListBox : public Widget {
public:
ListBox(Widget* parent, App::PosFunction pf);
App::PosFunction pFunc;
int scrolled_to = 0;
int toshow = 7;
bool is_visible_layered = false;
double tryingtoscrollby = 0;
bool rounded = false;
using onclick = std::function<void(Widget*, int)>;
std::vector<std::vector<int>> elementalPositions;
onclick ONCLICK = nullptr;
// bool on_key_event(int key, int scancode, int action, int mods);
bool on_mouse_button_event(int button, int action, int mods);
bool on_mouse_move_event();
bool on_scroll_event(double xchange, double ychange);
void position(int x, int y, int w, int h);
void render();
void setElements(std::vector<icu::UnicodeString> el);
void fillElementalPositions();
void moveUp();
void moveDown();
int selected_id = 0;
std::vector<icu::UnicodeString> elements;
private:
};