Пример #1
0
static void
TextBox_Text_Clear( LCUI_Widget *widget )
{
	LCUI_TextLayer *layer;
	
	layer = TextBox_GetTextLayer( widget );
	TextLayer_Text_Clear( layer );
}
Пример #2
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;
}
Пример #3
0
static int
__TextLayer_Text( LCUI_TextLayer *layer )
/* 设定整个文本图层中需显示的文本,原有选中文本被删除 */
{
	if( !layer ) {
		return -1;
	}
	TextLayer_Text_Clear( layer );
	TextLayer_Text_Add( layer, layer->text_buff.string );
	return 0;
}
Пример #4
0
TextBox_Text_AppendW( LCUI_Widget *widget, wchar_t *unicode_text )
{
	LCUI_TextBox *tb;
	LCUI_TextLayer *layer;
	
	tb = Widget_GetPrivData( widget );
	TextBox_TextBuff_Add( widget, unicode_text, AT_TEXT_LAST );
	if( tb->show_placeholder ) {
		layer = TextBox_GetTextLayer( widget );
		TextLayer_Text_Clear( layer );
		TextLayer_Text_SetPasswordChar( layer, tb->password_char_bak );
		TextLayer_Text_SetDefaultStyle( layer, tb->textstyle_bak );
		tb->show_placeholder = FALSE;
	}
	Widget_Update( widget );
}
Пример #5
0
TextBox_Text_AddW( LCUI_Widget *widget, wchar_t *unicode_text )
{
	LCUI_TextBox *tb;
	LCUI_TextLayer *layer;
	
	tb = Widget_GetPrivData( widget );
	/* 把文本分割成若干块,加入至缓冲队列,让文本框分段处理显示 */ 
	TextBox_TextBuff_Add( widget, unicode_text, AT_CURSOR_POS );
	if( tb->show_placeholder ) {
		layer = TextBox_GetTextLayer( widget );
		TextLayer_Text_Clear( layer );
		TextLayer_Text_SetPasswordChar( layer, tb->password_char_bak );
		TextLayer_Text_SetDefaultStyle( layer, tb->textstyle_bak );
		tb->show_placeholder = FALSE;
	}
	Widget_Update( widget );
}