add syntax highlighting (WIP)
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user