add syntax highlighting (WIP)

This commit is contained in:
MihailRis
2024-12-04 22:13:17 +03:00
parent ce1e9f76cf
commit ed3865964b
16 changed files with 168 additions and 43 deletions
+6
View File
@@ -57,6 +57,8 @@ namespace gui {
bool autoresize = false;
bool showLineNumbers = false;
std::string syntax;
void stepLeft(bool shiftPressed, bool breakSelection);
void stepRight(bool shiftPressed, bool breakSelection);
void stepDefaultDown(bool shiftPressed, bool breakSelection);
@@ -84,6 +86,8 @@ namespace gui {
void refreshLabel();
void onInput();
void refreshSyntax();
public:
TextBox(
std::wstring placeholder,
@@ -219,5 +223,7 @@ namespace gui {
virtual std::shared_ptr<UINode> getAt(glm::vec2 pos, std::shared_ptr<UINode> self) override;
virtual void setOnUpPressed(const runnable &callback);
virtual void setOnDownPressed(const runnable &callback);
virtual void setSyntax(const std::string& lang);
};
}