本文整理汇总了C++中LineEdit::GetText方法的典型用法代码示例。如果您正苦于以下问题:C++ LineEdit::GetText方法的具体用法?C++ LineEdit::GetText怎么用?C++ LineEdit::GetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LineEdit
的用法示例。
在下文中一共展示了LineEdit::GetText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnDragDropFinish
bool LineEdit::OnDragDropFinish(UIElement* source)
{
if (source && editable_)
{
// If the UI element in question has a drag-and-drop content string defined, use it instead of element text
if (source->GetVars().Contains(VAR_DRAGDROPCONTENT))
{
SetText(source->GetVar(VAR_DRAGDROPCONTENT).GetString());
return true;
}
StringHash sourceType = source->GetType();
if (sourceType == LineEdit::GetTypeStatic())
{
LineEdit* sourceLineEdit = static_cast<LineEdit*>(source);
SetText(sourceLineEdit->GetText());
return true;
}
else if (sourceType == Text::GetTypeStatic())
{
Text* sourceText = static_cast<Text*>(source);
SetText(sourceText->GetText());
return true;
}
}
return false;
}
示例2: OnDragDropFinish
bool LineEdit::OnDragDropFinish(UIElement* source)
{
if (source)
{
ShortStringHash sourceType = source->GetType();
if (sourceType == LineEdit::GetTypeStatic())
{
LineEdit* sourceLineEdit = static_cast<LineEdit*>(source);
SetText(sourceLineEdit->GetText());
return true;
}
else if (sourceType == Text::GetTypeStatic())
{
Text* sourceText = static_cast<Text*>(source);
SetText(sourceText->GetText());
return true;
}
}
return false;
}