10 m_textColor(textColor),
11 m_backgroundColor(backgroundColor),
22 m_textColor = textColor;
27 int adjustedLocation = location < 0 ? 0 : location;
28 adjustedLocation = adjustedLocation > (
signed int)editedTextLength() ? (
signed int)editedTextLength() : adjustedLocation;
29 m_cursorIndex = adjustedLocation;
34 return characterFrameAtIndex(m_cursorIndex);
37 int TextInput::ContentView::numberOfSubviews()
const {
41 View * TextInput::ContentView::subviewAtIndex(
int index) {
46 m_cursorView.setFrame(cursorRect());
50 KDRect charRect = characterFrameAtIndex(index);
bool setCursorLocation(int location)
void setTextColor(KDColor textColor)
void setTextColor(KDColor textColor)
void setBackgroundColor(KDColor backgroundColor)
virtual bool removeChar()=0
Responder * parentResponder() const
void markRectAsDirty(KDRect rect)
void setBackgroundColor(KDColor backgroundColor)
KDRect unionedWith(const KDRect &other) const
virtual void scrollToCursor()
void setCursorLocation(int cursorLocation)
Toolbox * toolbox() override
virtual bool removeEndOfLine()
bool insertTextAtLocation(const char *textBuffer, int location)
ContentView * contentView()
const char * text() const
void reloadRectFromCursorPosition(size_t index, bool lineBreak=false)
KDCoordinate width() const
KDColor backgroundColor() const
ContentView(KDText::FontSize size, KDColor textColor, KDColor backgroundColor)
TextInput(Responder *parentResponder, View *contentView)
virtual Toolbox * toolboxForTextInput(TextInput *textInput)=0
virtual void layoutSubviews() override
KDCoordinate height() const
KDCoordinate bottom() const