当前位置: 首页>>代码示例>>C++>>正文


C++ CStdStringW::append方法代码示例

本文整理汇总了C++中CStdStringW::append方法的典型用法代码示例。如果您正苦于以下问题:C++ CStdStringW::append方法的具体用法?C++ CStdStringW::append怎么用?C++ CStdStringW::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CStdStringW的用法示例。


在下文中一共展示了CStdStringW::append方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UpdateLabel

void CGUIDialogKeyboardGeneric::UpdateLabel() // FIXME seems to be called twice for one USB SDL keyboard action/character
{
  CGUILabelControl* pEdit = ((CGUILabelControl*)GetControl(CTL_LABEL_EDIT));
  if (pEdit)
  {
    CStdStringW edit = m_strEdit;
    if (m_hiddenInput)
    { // convert to *'s
      edit.Empty();
      if (m_lastRemoteClickTime + REMOTE_SMS_DELAY > CTimeUtils::GetFrameTime() && m_strEdit.size())
      { // using the remove to input, so display the last key input
        edit.append(m_strEdit.size() - 1, L'*');
        edit.append(1, m_strEdit[m_strEdit.size() - 1]);
      }
      else
        edit.append(m_strEdit.size(), L'*');
    }
    // convert back to utf8
    CStdString utf8Edit;
    g_charsetConverter.wToUTF8(edit, utf8Edit);
    pEdit->SetLabel(utf8Edit);
    // Send off a search message
    unsigned int now = CTimeUtils::GetFrameTime();
    // don't send until the REMOTE_SMS_DELAY has passed
    if (m_lastRemoteClickTime && m_lastRemoteClickTime + REMOTE_SMS_DELAY >= now)
      return;

    if (m_pCharCallback)
      m_pCharCallback(this, utf8Edit);
  }
}
开发者ID:maximuska,项目名称:xbmc,代码行数:31,代码来源:GUIDialogKeyboardGeneric.cpp

示例2: UpdateLabel

void CGUIDialogKeyboard::UpdateLabel() // FIXME seems to be called twice for one USB SDL keyboard action/character
{
  CGUILabelControl* pEdit = ((CGUILabelControl*)GetControl(CTL_LABEL_EDIT));
  if (pEdit)
  {
    CStdStringW edit = m_strEdit;
    if (m_hiddenInput)
    { // convert to *'s
      edit.Empty();
      if (m_lastRemoteClickTime + REMOTE_SMS_DELAY > timeGetTime() && m_strEdit.size())
      { // using the remove to input, so display the last key input
        edit.append(m_strEdit.size() - 1, L'*');
        edit.append(1, m_strEdit[m_strEdit.size() - 1]);
      }
      else
        edit.append(m_strEdit.size(), L'*');
    }
    // convert back to utf8
    CStdString utf8Edit;
    g_charsetConverter.wToUTF8(edit, utf8Edit);
    pEdit->SetLabel(utf8Edit);
    // Send off a search message if it's been SEARCH_DELAY since last search.
    DWORD now = timeGetTime();
    if (!m_lastSearchUpdate || m_lastSearchUpdate + SEARCH_DELAY >= now)
      m_lastSearchUpdate = now; // update is called when we haven't passed our search delay, so reset it
    if (m_lastSearchUpdate + SEARCH_DELAY < now)
    {
      // don't send until the REMOTE_SMS_DELAY has passed
      if (m_lastRemoteClickTime && m_lastRemoteClickTime + REMOTE_SMS_DELAY >= now)
        return;
      m_lastSearchUpdate = 0;
      if (m_filtering == FILTERING_CURRENT)
      { // send our filter message
        CGUIMessage message(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_FILTER_ITEMS);
        message.SetStringParam(utf8Edit);
        g_graphicsContext.SendMessage(message);
      }
      if (m_filtering == FILTERING_SEARCH)
      { // send our search message
        CGUIMessage message(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_SEARCH_UPDATE);
        message.SetStringParam(utf8Edit);
        g_graphicsContext.SendMessage(message);
      }
    }
  }
}
开发者ID:Avoidnf8,项目名称:xbmc-fork,代码行数:46,代码来源:GUIDialogKeyboard.cpp

示例3: UpdateLabel

void CGUIDialogKeyboardGeneric::UpdateLabel() // FIXME seems to be called twice for one USB SDL keyboard action/character
{
  CGUILabelControl* pEdit = ((CGUILabelControl*)GetControl(CTL_LABEL_EDIT));
  if (pEdit)
  {
    CStdStringW edit = m_strEdit;
    pEdit->SetHighlight(0, 0);
    pEdit->SetSelection(0, 0);
    if (m_hiddenInput)
    { // convert to *'s
      edit.clear();
      if (m_lastRemoteClickTime + REMOTE_SMS_DELAY > CTimeUtils::GetFrameTime() && m_iCursorPos > 0)
      { // using the remove to input, so display the last key input
        edit.append(m_iCursorPos - 1, L'*');
        edit.append(1, m_strEdit[m_iCursorPos - 1]);
      }
      else
        edit.append(m_strEdit.size(), L'*');
    }
    else if (!m_strEditing.empty())
    {
      edit.insert(m_iCursorPos, m_strEditing);
      pEdit->SetHighlight(m_iCursorPos, m_iCursorPos + m_strEditing.size());
      if (m_iEditingLength > 0)
        pEdit->SetSelection(m_iCursorPos + m_iEditingOffset, m_iCursorPos + m_iEditingOffset + m_iEditingLength);
    }
    // convert back to utf8
    CStdString utf8Edit;
    g_charsetConverter.wToUTF8(edit, utf8Edit);
    pEdit->SetLabel(utf8Edit);
    // Send off a search message
    unsigned int now = CTimeUtils::GetFrameTime();
    // don't send until the REMOTE_SMS_DELAY has passed
    if (m_lastRemoteClickTime && m_lastRemoteClickTime + REMOTE_SMS_DELAY >= now)
      return;

    if (m_pCharCallback)
    {
      // do not send editing text comes from system input method
      if (!m_hiddenInput && !m_strEditing.empty())
        g_charsetConverter.wToUTF8(m_strEdit, utf8Edit);
      m_pCharCallback(this, utf8Edit);
    }
  }
}
开发者ID:lewy20041,项目名称:xbmclibmedia,代码行数:45,代码来源:GUIDialogKeyboardGeneric.cpp

示例4: GetDisplayedText

CStdStringW CGUIEditControl::GetDisplayedText() const
{
  if (m_inputType == INPUT_TYPE_PASSWORD || m_inputType == INPUT_TYPE_PASSWORD_MD5 || m_inputType == INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW)
  {
    CStdStringW text;
    text.append(m_text2.size(), L'*');
    return text;
  }
  return m_text2;
}
开发者ID:AdolphHuan,项目名称:xbmc,代码行数:10,代码来源:GUIEditControl.cpp

示例5: GetDisplayedText

CStdStringW CGUIEditControl::GetDisplayedText()
{
  if (m_inputType == INPUT_TYPE_PASSWORD)
  {
    CStdStringW text;

    if (!m_text2.empty() > 0 && m_addToText2Counter >= 0 && (m_addToText2Counter*50 < EXPOSE_PASSWORD_LETTER_IN_MS))
    {
      m_addToText2Counter++;
      text.append(m_text2.size()-1, L'\u2022');
      text += m_text2[m_text2.size()-1];
    }
    else
    {
      m_addToText2Counter = -1;
      text.append(m_text2.size(), L'\u2022');
    }
    return text;
  }
  return m_text2;
}
开发者ID:DakaiTV,项目名称:DakaiBoxee,代码行数:21,代码来源:GUIEditControl.cpp

示例6:

void CWIN32Util::ExtendDllPath()
{
  CStdStringW strEnvW;
  CStdStringArray vecEnv;
  WCHAR wctemp[32768];
  if(GetEnvironmentVariableW(L"PATH",wctemp,32767) != 0)
    strEnvW = wctemp;

  StringUtils::SplitString(DLL_ENV_PATH, ";", vecEnv);
  for (int i=0; i<(int)vecEnv.size(); ++i)
  {
    CStdStringW strFileW;
    g_charsetConverter.utf8ToW(CSpecialProtocol::TranslatePath(vecEnv[i]), strFileW, false);
    strEnvW.append(L";" + strFileW);
  }
  if(SetEnvironmentVariableW(L"PATH",strEnvW.c_str())!=0)
    CLog::Log(LOGDEBUG,"Setting system env PATH to %S",strEnvW.c_str());
  else
    CLog::Log(LOGDEBUG,"Can't set system env PATH to %S",strEnvW.c_str());

}
开发者ID:Saddamisalami,项目名称:xbmc,代码行数:21,代码来源:WIN32Util.cpp


注:本文中的CStdStringW::append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。