Go to the documentation of this file.
37 void update(
bool focusCursor =
false);
45 void setValidCharacters(
const std::string validCharacters) { m_validCharacters = validCharacters; }
63 void del(
bool right =
false);
64 void paste(
const std::string& text);
83 bool hasSelection() {
return m_selectionEnd - m_selectionStart > 0; }
100 virtual bool onKeyText(
const std::string& keyText);
101 virtual bool onKeyPress(
uchar keyCode,
int keyboardModifiers,
int autoRepeatTicks);
109 void disableUpdates() { m_updatesEnabled =
false; }
110 void enableUpdates() { m_updatesEnabled =
true; }
111 void recacheGlyphs() { m_glyphsMustRecache =
true; }
115 Point m_textVirtualOffset;
116 Size m_textVirtualSize;
117 Size m_textTotalSize;
120 bool m_shiftNavigation;
122 bool m_cursorInRange;
123 bool m_cursorVisible;
125 bool m_changeCursorImage;
126 std::string m_validCharacters;
128 bool m_updatesEnabled;
132 int m_selectionReference;
133 int m_selectionStart;
136 Color m_selectionColor;
137 Color m_selectionBackgroundColor;
139 std::vector<Rect> m_glyphsCoords;
140 std::vector<Rect> m_glyphsTexCoords;
144 bool m_glyphsMustRecache;
void setCursorPos(int pos)
std::string getDisplayedText()
std::string getSelection()
void setValidCharacters(const std::string validCharacters)
virtual bool onKeyPress(uchar keyCode, int keyboardModifiers, int autoRepeatTicks)
void setShiftNavigation(bool enable)
virtual void onStyleApply(const std::string &styleName, const OTMLNodePtr &styleNode)
void setTextHidden(bool hidden)
Size getTextVirtualSize()
virtual void onFocusChange(bool focused, Fw::FocusReason reason)
Color getSelectionColor()
virtual bool onMouseMove(const Point &mousePos, const Point &mouseMoved)
void drawSelf(Fw::DrawPane drawPane)
int getTextPos(Point pos)
void paste(const std::string &text)
virtual void onGeometryChange(const Rect &oldRect, const Rect &newRect)
void appendText(std::string text)
void setSelectable(bool selectable)
void setCursorVisible(bool enable)
virtual bool onMousePress(const Point &mousePos, Fw::MouseButton button)
void setSelection(int start, int end)
void setMultiline(bool enable)
Point getTextVirtualOffset()
bool isChangingCursorImage()
void moveCursorVertically(bool up)
void setSelectionColor(const Color &color)
void appendCharacter(char c)
void removeCharacter(bool right)
virtual bool onDoubleClick(const Point &mousePos)
void setMaxLength(uint maxLength)
void setTextVirtualOffset(const Point &offset)
void setEditable(bool editable)
void setChangeCursorImage(bool enable)
Color getSelectionBackgroundColor()
void del(bool right=false)
void setAutoScroll(bool autoScroll)
void setSelectionBackgroundColor(const Color &color)
void moveCursorHorizontally(bool right)
virtual void onTextAreaUpdate(const Point &vitualOffset, const Size &visibleSize, const Size &totalSize)
virtual void onHoverChange(bool hovered)
virtual bool onMouseRelease(const Point &mousePos, Fw::MouseButton button)
virtual bool onKeyText(const std::string &keyText)