Example #1
0
TextLayer_Text_AddA( LCUI_TextLayer *layer, char *ascii_text )
{
	wchar_t *unicode_text;
	LCUICharset_ASCIIToUnicode( ascii_text, &unicode_text );
	TextLayer_Text_AddW( layer, unicode_text );
	free( unicode_text );
	return 0;
}
Example #2
0
TextLayer_Text_Add( LCUI_TextLayer *layer, char *utf8_text )
{
	wchar_t *unicode_text;
	LCUICharset_UTF8ToUnicode( utf8_text, &unicode_text );
	TextLayer_Text_AddW( layer, unicode_text );
	free( unicode_text );
	return 0;
}
Example #3
0
/* 设定整个文本图层中需显示的文本,原有选中文本被删除 */
static int
__TextLayer_Text( LCUI_TextLayer *layer )
{
	if( !layer ) {
		return -1;
	}
	TextLayer_Text_Clear( layer );
	TextLayer_Text_AddW( layer, layer->text_buff.string );
	return 0;
}
Example #4
0
/* 在光标处添加文本 */
static void 
__TextBox_Text_Add( LCUI_Widget *widget, wchar_t *new_text )
{
	LCUI_Pos cur_pos;
	LCUI_TextLayer *layer;
	
	layer = TextBox_GetTextLayer( widget );
	TextLayer_Text_AddW( layer, new_text );
	cur_pos = TextLayer_Cursor_GetPos( layer );
	TextBox_Cursor_Move( widget, cur_pos );
}