Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
2-dimensional vector of floats, representing a point on the plane for graphics.
Definition math.hpp:189
Definition TextField.hpp:53
PasswordField()
Definition TextField.hpp:54
Definition TextField.hpp:11
bool multiline
Definition TextField.hpp:16
Widget * nextField
Definition TextField.hpp:27
int selection
The index of the other end of the selection.
Definition TextField.hpp:22
void onButton(const ButtonEvent &e) override
std::string getSelectedText()
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
std::string placeholder
Definition TextField.hpp:13
std::string text
Definition TextField.hpp:12
void onSelectText(const SelectTextEvent &e) override
void onSelectKey(const SelectKeyEvent &e) override
bool password
Masks text with "*".
Definition TextField.hpp:15
void insertText(std::string text)
Inserts text at the cursor, replacing the selection if necessary.
void setText(std::string text)
Replaces the entire text.
Widget * prevField
For Tab and Shift-Tab focusing.
Definition TextField.hpp:26
void onDragHover(const DragHoverEvent &e) override
virtual int getTextPosition(math::Vec mousePos)
int cursor
The index of the text cursor.
Definition TextField.hpp:18
Occurs when text is typed while a Widget is selected.
Definition Widget.hpp:358