| 199 QTextDocument *doc = (QTextDocument*)text->data1; |
199 QTextDocument *doc = (QTextDocument*)text->data1; |
| 200 return doc->characterCount(); |
200 return doc->characterCount(); |
| 201 } |
201 } |
| 202 |
202 |
| 203 void ui_textarea_remove(UiText *text, int begin, int end) { |
203 void ui_textarea_remove(UiText *text, int begin, int end) { |
| 204 // TODO |
204 QTextDocument *doc = (QTextDocument*)text->data1; |
| |
205 QTextCursor cursor(doc); |
| |
206 cursor.setPosition(begin); |
| |
207 cursor.setPosition(end, QTextCursor::KeepAnchor); |
| |
208 cursor.removeSelectedText(); |
| 205 } |
209 } |
| 206 |
210 |
| 207 /* ------------------------------ TextField ------------------------------ */ |
211 /* ------------------------------ TextField ------------------------------ */ |
| 208 |
212 |
| 209 static UIWIDGET create_textfield(UiObject *obj, UiTextFieldArgs args, bool password, bool frameless) { |
213 static UIWIDGET create_textfield(UiObject *obj, UiTextFieldArgs args, bool password, bool frameless) { |