本文整理汇总了C++中TextEntry::DoInsertString方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEntry::DoInsertString方法的具体用法?C++ TextEntry::DoInsertString怎么用?C++ TextEntry::DoInsertString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEntry
的用法示例。
在下文中一共展示了TextEntry::DoInsertString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: system
//-----------------------------------------------------------------------------
// Purpose: Adds lines to the text entry every second.
//-----------------------------------------------------------------------------
void TextEntryDemo4::OnTick()
{
if (m_iTimeoutTime)
{
int currentTime = system()->GetTimeMillis();
// Check for timeout
if (currentTime > m_iTimeoutTime)
{
char buf[125];
sprintf (buf, "Additional Text %d\n", m_iTimeoutTime);
// Move to the end of the history before we add some new text.
// Its important to call this and explicitly move to the
// correct position in case someone clicked in
// the window (this moves the cursor)
// If you comment out this line and rerun you will see
// that if you click in the text window additional
// text will be added where you clicked.
m_pTextEntry->DoGotoTextEnd();
// Add some text to the text entry window
m_pTextEntry->DoInsertString(buf);
// Timed out, make a new timeout time
m_iTimeoutTime = system()->GetTimeMillis() + TIMEOUT;
}
}
}