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


C++ UpdateLabel函数代码示例

本文整理汇总了C++中UpdateLabel函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateLabel函数的具体用法?C++ UpdateLabel怎么用?C++ UpdateLabel使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: SwitchButtons

void PADManager::OnButtonClicked(wxCommandEvent &event)
{
	if (event.GetId() != wxID_OK && event.GetId() != wxID_CANCEL && event.GetId() != id_reset_parameters)
	{
		m_button_id = event.GetId();
		SwitchButtons(false); // disable all buttons, needed for using Space, Enter and other specific buttons
		//RunTimer(3, event.GetId()); // TODO: Currently, timer disabled. Use by later, have some strange problems
		//SwitchButtons(true); // needed, if timer enabled
		UpdateLabel();
	}

	else
	{
		switch (event.GetId())
		{
		case id_reset_parameters: ResetParameters(); UpdateLabel(); break;
		case wxID_OK: rpcs3::config.save(); break;
		case wxID_CANCEL: break;

		default: LOG_ERROR(HLE, "Unknown button ID: %d", event.GetId()); break;
		}
	}

	event.Skip();
}
开发者ID:976717326,项目名称:rpcs3,代码行数:25,代码来源:PADManager.cpp

示例2: HideProperty

    void CamSettingsPage::OnAbsModeClicked( Gtk::CheckButton* pButton )
    {
        m_absMode = pButton->get_active();

        // Refresh the unit label and spin buttons
        // The rest of the widgets don't need to be updated
        for ( unsigned int i = 0; i < sk_numProps; i++ )
        {
            if ( m_pCamera == 0 )
            {
                return;
            }           

            Gtk::SpinButton* pSpin1 = m_widgetPropArray[i].pSpinButton1;
            Gtk::SpinButton* pSpin2 = m_widgetPropArray[i].pSpinButton2;
            Gtk::Label* pLabel1 = m_widgetPropArray[i].pLabel1;
            Gtk::Label* pLabel2 = m_widgetPropArray[i].pLabel2;

            const PropertyType k_currPropType = (PropertyType)i;

            Property camProp;
            PropertyInfo camPropInfo;

            // Get the property and property info
            camProp.type = k_currPropType;
            camPropInfo.type = k_currPropType;

            if ( m_pCamera->GetProperty( &camProp ) != PGRERROR_OK ||
                m_pCamera->GetPropertyInfo( &camPropInfo ) != PGRERROR_OK )
            {
                // Perhaps not supported, hide it and continue
                HideProperty( k_currPropType );
                continue;
            }			            

            if ( pLabel1 != 0 )
            {
                UpdateLabel( pLabel1, &camPropInfo, &camProp );		                
            }		

            if ( pLabel2 != 0 )
            {
                UpdateLabel( pLabel2, &camPropInfo, &camProp );		                
            }	

            if ( pSpin1 != 0 )
            {
                UpdateSpinButton( pSpin1, &camPropInfo );
            }

            if ( pSpin2 != 0 )
            {
                UpdateSpinButton( pSpin2, &camPropInfo );
            }  
        }

        UpdateWidgets();
    }
开发者ID:dougkelly88,项目名称:3rdparty,代码行数:58,代码来源:CamSettingsPage.cpp

示例3: UpdateLabel

void CGUIDialogKeyboardGeneric::SetText(const CStdString& aTextString)
{
  m_strEdit.Empty();
  g_charsetConverter.utf8ToW(aTextString, m_strEdit);
  UpdateLabel();
  MoveCursor(m_strEdit.size());
}
开发者ID:maximuska,项目名称:xbmc,代码行数:7,代码来源:GUIDialogKeyboardGeneric.cpp

示例4: GetCursorPos

void CGUIDialogKeyboardGeneric::OnPasteClipboard(void)
{
  CStdStringW unicode_text;
  CStdStringA utf8_text;

// Get text from the clipboard
  utf8_text = g_Windowing.GetClipboardText();

  // Insert the pasted text at the current cursor position.
  if (utf8_text.length() > 0)
  {
    g_charsetConverter.utf8ToW(utf8_text, unicode_text);

    size_t i = GetCursorPos();
    if (i > m_strEdit.size())
      i = m_strEdit.size();
    CStdStringW left_end = m_strEdit.substr(0, i);
    CStdStringW right_end = m_strEdit.substr(i);

    m_strEdit = left_end;
    m_strEdit.append(unicode_text);
    m_strEdit.append(right_end);
    UpdateLabel();
    MoveCursor(unicode_text.length());
  }
}
开发者ID:lewy20041,项目名称:xbmclibmedia,代码行数:26,代码来源:GUIDialogKeyboardGeneric.cpp

示例5: SS_BT_HVClick

void SS_BT_HVClick() {
//

DrawScreen(&HVPSMode);
setvolt(0);
UpdateLabel(&SH_LB_HVVO,"0.0");
UpdateLabel(&SH_LB_HVCO,"0.0");
HVOnflag = 0;
UpdateButton(&SH_BT_HVOF, "HV Off");
SH_BT_HVVP_Active();
sprintf(strtmp,"%4u",HVM_CLim);
UpdateLabel(&SH_LB_HVCL,strtmp);
sprintf(strtmp,"%3.1f",Voltset/10.0);
UpdateLabel(&SH_LB_HVVL,strtmp);
CurrentMode = 2;
}
开发者ID:whuang86cn,项目名称:uC_Dev,代码行数:16,代码来源:ES613_GUI2_SP_events_code.c

示例6: UpdateLabel

void CGUIDialogKeyboard::OnIPAddress()
{
  // find any IP address in the current string if there is any
  // We match to #.#.#.#
  CStdString utf8String;
  g_charsetConverter.wToUTF8(m_strEdit, utf8String);
  CStdString ip;
  CRegExp reg;
  reg.RegComp("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
  int start = reg.RegFind(utf8String.c_str());
  int length = 0;
  if (start > -1)
  {
    length = reg.GetSubLenght(0);
    ip = utf8String.Mid(start, length);
  }
  else
    start = utf8String.size();
  if (CGUIDialogNumeric::ShowAndGetIPAddress(ip, m_strHeading))
  {
    utf8String = utf8String.Left(start) + ip + utf8String.Mid(start + length);
    g_charsetConverter.utf8ToW(utf8String, m_strEdit);
    UpdateLabel();
  }
}
开发者ID:Avoidnf8,项目名称:xbmc-fork,代码行数:25,代码来源:GUIDialogKeyboard.cpp

示例7: SH_BT_HVVN2Click

void SH_BT_HVVN2Click() {
     // Click -0.1 kV
    if (Voltset >=1)
    Voltset = Voltset -1;

    // Update text in display
    sprintf(strtmp,"%3.1f",Voltset/10.0);
    UpdateLabel(&SH_LB_HVVL,strtmp);

    //Update Voltage if HV On
    if (HVOnflag==1)
    {
      setvolt(Voltset);
      UpdateLabel(&SH_LB_HVVO,strtmp);
    }
}
开发者ID:whuang86cn,项目名称:uC_Dev,代码行数:16,代码来源:ES613_GUI2_SP_events_code.c

示例8: WinProc

INT CALLBACK WinProc(HWND H, UINT M, WPARAM W, LPARAM L)
{
  switch(M)
  {
    case WM_APP:
      if(L == WM_LBUTTONDBLCLK)
      {
        ShowWindow(WinHandle, SW_RESTORE);
        SetForegroundWindow(WinHandle);
      }
      break;
    case WM_ACTIVATE:
      if(HIWORD(W))
        ShowWindow(WinHandle, SW_HIDE);
    case WM_SETFOCUS:
      UpdateLabel();
      break;
    case WM_DESTROY:
      PostQuitMessage(0);
      break;
    default:
      return DefWindowProc(H, M, W, L);
  }

  return 0;
}
开发者ID:msdsgn,项目名称:fastrate,代码行数:26,代码来源:fastrate.cpp

示例9: UpdateLabel

void CMyLabel::OnSysColorChange() {
	if (m_brush)
		::DeleteObject(m_brush);

	m_brush = ::CreateSolidBrush(GetSysColor(COLOR_3DFACE));
	
	UpdateLabel();		
}
开发者ID:BradZA,项目名称:outcall,代码行数:8,代码来源:MyLabel.cpp

示例10: SH_BT_HVVP2Click

void SH_BT_HVVP2Click() {
    // Click +1kV
    if (Voltset <= (MaxVoltLimit-1))
    Voltset = Voltset +1;

    // Update text in display
    sprintf(strtmp,"%3.1f",Voltset/10.0);
    UpdateLabel(&SH_LB_HVVL,strtmp);

    //Update Voltage if HV On
    if (HVOnflag==1)
    {
      setvolt(Voltset);
      UpdateLabel(&SH_LB_HVVO,strtmp);
    }
    
}
开发者ID:whuang86cn,项目名称:uC_Dev,代码行数:17,代码来源:ES613_GUI2_SP_events_code.c

示例11: UpdateLabel

void NumberSpinner::DecreaseClick(void * sender, EventArgs args)
{
	if (value - clickDelta >= minValue)
	{		
		value -= clickDelta;		
		UpdateLabel();	
	}
}
开发者ID:adamskubel,项目名称:AmplifyReality,代码行数:8,代码来源:NumberSpinner.cpp

示例12: UpdateLabel

void CGUIDialogKeyboardGeneric::SetText(const CStdString& aTextString)
{
  m_strEdit.clear();
  m_strEditing.clear();
  m_iEditingOffset = 0;
  g_charsetConverter.utf8ToW(aTextString, m_strEdit);
  UpdateLabel();
  SetCursorPos(m_strEdit.size());
}
开发者ID:lewy20041,项目名称:xbmclibmedia,代码行数:9,代码来源:GUIDialogKeyboardGeneric.cpp

示例13: UpgleWeapon

void Unit::UpgleWeapon()
{
    auto weapon = m_WeaponQueue.front();
    weapon->AddCount(2);
    weapon->AddDamage(5);
    weapon->AddSize(0.01f);
    weapon->AddSpeed(3);
    weapon->UpdateLabel();
}
开发者ID:dlakwwkd,项目名称:WeaponCook,代码行数:9,代码来源:Unit.cpp

示例14: SM_BT_VP2Click

void SM_BT_VP2Click() {
// Add 1 digit on 0X0 bit.
if (Voltset <=(MaxVoltLimit-10) )
Voltset = Voltset +10;

// Update text in display
sprintf(strtmp,"%3.1f",Voltset/10.0);
UpdateLabel(&SM_LB_Volt,strtmp);
}
开发者ID:whuang86cn,项目名称:uC_Dev,代码行数:9,代码来源:ES613_GUI2_SP_events_code.c

示例15: SM_BT_VN3Click

void SM_BT_VN3Click() {
// Add 1 digit on 00X bit.
if (Voltset >=1)
Voltset = Voltset -1;

// Update text in display
sprintf(strtmp,"%3.1f",Voltset/10.0);
UpdateLabel(&SM_LB_Volt,strtmp);
}
开发者ID:whuang86cn,项目名称:uC_Dev,代码行数:9,代码来源:ES613_GUI2_SP_events_code.c


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