| 1197:4bbf0487509f | 1198:5bb4366b0c32 |
|---|---|
| 436 } | 436 } |
| 437 return s; | 437 return s; |
| 438 } | 438 } |
| 439 | 439 |
| 440 static void text_destroy(UiText *t) { | 440 static void text_destroy(UiText *t) { |
| 441 if(t->value.free) { | |
| 442 t->value.free(t->value.ptr); | |
| 443 } | |
| 441 if(t->destroy) { | 444 if(t->destroy) { |
| 442 t->destroy(t); | 445 t->destroy(t); |
| 443 } | 446 } |
| 444 } | 447 } |
| 445 | 448 |
| 1079 void ui_text_remove(UiText *text, int begin, int end) { | 1082 void ui_text_remove(UiText *text, int begin, int end) { |
| 1080 if(text->remove) { | 1083 if(text->remove) { |
| 1081 text->remove(text, begin, end); | 1084 text->remove(text, begin, end); |
| 1082 } | 1085 } |
| 1083 } | 1086 } |
| 1087 | |
| 1088 void ui_text_setreadonly(UiText *text, int readonly) { | |
| 1089 if(text->setreadonly) { | |
| 1090 text->setreadonly(text, readonly); | |
| 1091 } else { | |
| 1092 text->readonly = readonly; | |
| 1093 } | |
| 1094 } |