textbox.c
// set the default text to display
set the default text to display
set the default text to display
void textbox_text(textbox *tb, char *text)
{
	if (tb->text) free(tb->text);
	tb->text = strdup(text);
	tb->cursor = MAX(0, MIN(strlen(text), tb->cursor));
	textbox_extents(tb);
}
void textbox_text ( textbox * tb , char * text ) { if ( tb -> text ) free ( tb -> text ) ; tb -> text = strdup ( text ) ; tb -> cursor = MAX ( 0 , MIN ( strlen ( text ) , tb -> cursor ) ) ; textbox_extents ( tb ) ; }
set the default text to display
set the default text to display