-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlabel.h
More file actions
37 lines (27 loc) · 853 Bytes
/
Copy pathlabel.h
File metadata and controls
37 lines (27 loc) · 853 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 "markdown_utils.h"
#include "widget.h"
#include <GLFW/glfw3.h>
#include "application.h"
class Label : public Widget {
public:
Label(Widget* parent);
bool border = true;
bool rect = true;
icu::UnicodeString fulltext;
std::vector<MarkdownSpan> colorSpans = {};
std::vector<icu::UnicodeString> drawlines;
std::vector<std::vector<Color*>> drawColors;
bool handlingColor = false;
App::PosFunction POSITIONER = nullptr;
void position(int x, int y, int w, int h);
void render();
void setFullText(icu::UnicodeString text, std::vector<MarkdownSpan> spans = {});
icu::UnicodeString getFullText();
bool on_mouse_button_event(int button, int action, int mods);
int should_be_h = 0;
int old_width = -1;
Color* background_color = App::theme.darker_background_color;
private:
std::mutex positioning;
};