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


C++ UpdateUI函数代码示例

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


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

示例1: UpdateUI

void TorusObject::SetGenUVW(BOOL sw) {  
	if (sw==HasUVW()) return;
	pblock->SetValue(PB_GENUVS,0, sw);				
	UpdateUI();
	}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:5,代码来源:torus.cpp

示例2: wxFrame

// Define my frame constructor
MyFrame::MyFrame(wxFrame *frame, const wxString& title)
       : wxFrame(frame, wxID_ANY, title, wxDefaultPosition, wxSize(400, 300))
{
#if wxUSE_STATUSBAR
    CreateStatusBar();
#endif // wxUSE_STATUSBAR

    SetIcon(wxICON(sample));

    m_server = NULL;

    wxPanel * const panel = new wxPanel(this);

    wxBoxSizer * const sizerMain = new wxBoxSizer( wxVERTICAL );

    wxFlexGridSizer * const sizerCmds = new wxFlexGridSizer( 2, 0, 0 );
    sizerCmds->AddGrowableCol( 1 );

    wxButton *btn;

    btn = new wxButton(panel, ID_START, "&Start Server");
    sizerCmds->Add(btn, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    const wxString choices[] = { IPC_SERVICE, "..." };
    wxChoice * const choice = new wxChoice
                                  (
                                    panel,
                                    ID_SERVERNAME,
                                    wxDefaultPosition, wxSize(100, -1),
                                    WXSIZEOF(choices), choices
                                  );
    sizerCmds->Add(choice, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    btn = new wxButton(panel, ID_DISCONNECT, "&Disconnect Client");
    sizerCmds->Add(btn, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    sizerCmds->AddSpacer(20);

    btn = new wxButton( panel, ID_ADVISE, "&Advise");
    sizerCmds->Add(btn, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    sizerCmds->AddSpacer(20);

    sizerMain->Add(sizerCmds, wxSizerFlags().Expand().Border(wxALL, 5));

    wxStaticBoxSizer * const
        sizerLog = new wxStaticBoxSizer(wxVERTICAL, panel, "Server &log");

    wxTextCtrl * const textLog = new wxTextCtrl
                                 (
                                    panel,
                                    wxID_ANY,
                                    "",
                                    wxDefaultPosition, wxSize(500, 140),
                                    wxTE_MULTILINE
                                 );
    sizerLog->Add(textLog, wxSizerFlags(1).Expand().Border(wxALL, 5));

    sizerMain->Add(sizerLog, wxSizerFlags(1).Expand().Border(wxALL, 5));

    panel->SetSizer(sizerMain);
    sizerMain->SetSizeHints(panel);
    SetClientSize(panel->GetSize());

    GetServername()->SetSelection(0);
    wxLogTextCtrl *logWindow = new wxLogTextCtrl(textLog);
    delete wxLog::SetActiveTarget(logWindow);
    wxLogMessage("Click on Start to start the server");
    UpdateUI();
}
开发者ID:catalinr,项目名称:wxWidgets,代码行数:69,代码来源:server.cpp

示例3: WXUNUSED

void EffectDtmf::OnDuration(wxCommandEvent & WXUNUSED(evt))
{
   SetDuration(mDtmfDurationT->GetValue());
   Recalculate();
   UpdateUI();
}
开发者ID:SteveDaulton,项目名称:audacity,代码行数:6,代码来源:DtmfGen.cpp

示例4: UpdateUI

void CCElection::DoIncVoteComplete( void )
{
	UpdateUI();
}
开发者ID:KerwinMa,项目名称:AerothFlyffSource,代码行数:4,代码来源:clord.cpp

示例5: switch

// OnMenu handles all events which don't have their own event handler
void LifeFrame::OnMenu(wxCommandEvent& event)
{
    switch (event.GetId())
    {
        case wxID_NEW:
        {
            // stop if it was running
            OnStop();
            m_life->Clear();
            m_canvas->Recenter(0, 0);
            m_tics = 0;
            UpdateInfoText();
            break;
        }
        case wxID_ABOUT:
        {
            LifeAboutDialog dialog(this);
            dialog.ShowModal();
            break;
        }
        case wxID_EXIT:
        {
            // true is to force the frame to close
            Close(true);
            break;
        }
        case ID_SHOWNAV:
        {
            bool checked = GetMenuBar()->GetMenu(1)->IsChecked(ID_SHOWNAV);
            if (m_navigator)
                m_navigator->Show(checked);
            break;
        }
        case ID_INFO:
        {
            wxString desc = m_life->GetDescription();

            if ( desc.empty() )
                desc = _("Not available");

            // should we make the description editable here?
            wxMessageBox(desc, _("Description"), wxOK | wxICON_INFORMATION);

            break;
        }
        case ID_START   : OnStart(); break;
        case ID_STEP    : OnStep(); break;
        case wxID_STOP  : OnStop(); break;
        case ID_TOPSPEED:
        {
            m_running = true;
            m_topspeed = true;
            UpdateUI();
            while (m_running && m_topspeed)
            {
                OnStep();
                wxYield();
            }
            break;
        }
    }
}
开发者ID:crankycoder,项目名称:wxPython-2.9.2.4,代码行数:63,代码来源:life.cpp

示例6: UpdateUI

void CManageTagsDlg::OnLbnSelchangeManageTagsList()
{
	UpdateUI();
}
开发者ID:cspark777,项目名称:PDFManager,代码行数:4,代码来源:CManageTagsDlg.cpp

示例7: UpdateUI

void CJobControlDlg::UpdateList()
{
	m_List.SetItemCountEx(GetJobCount(), 0);	// invalidate all items
	UpdateUI();
}
开发者ID:victimofleisure,项目名称:FFRend,代码行数:5,代码来源:JobControlDlg.cpp

示例8: _AddRandomSongs


//.........这里部分代码省略.........
				break;
			}
			wxGetApp().Yield();

		} while (!bExit && !m_b_NETSTREAM_AbortConnect);
		m_p_NETSTREAM_Connecting = NULL;
		if( m_b_NETSTREAM_AbortConnect )
		{
			delete pNewStream;
			Stop(false);
			m_b_NETSTREAM_AbortConnect = false;
			return false;
		}
		
	}
	//---------------------------------------------//
	//--- start playback on the new stream on	---//
	//--- the designated channel.				---//
	//---------------------------------------------//
	int retries = 2;
	bool bPlaySucceeded = false;
	pNewStream->SetTime( nStartPos * 1000 );
	while( retries -- && (!bPlaySucceeded))
	{
		if(!pNewStream->Play())
		{
			wxCriticalSectionLocker lock(m_protectingStreamArrays);
			if(m_ActiveStreams.GetCount())
			{
				delete( m_ActiveStreams[0] );
				m_ActiveStreams.RemoveAt(0);
			}

		}
		else
			bPlaySucceeded = true;
	}
	if(!bPlaySucceeded)
	{
		wxMessageBox(_("Play failed, please try again."));
		wxLogDebug(wxT("play failed:%s"),(const wxChar *) ConvA2W(m_SndEngine.ErrorString()));
		delete pNewStream;
		Stop(false);
		return false;

	}
	if(_CurrentSongIsNetStream())
	{
		FSOUND_Stream_Net_SetMetadataCallback((FSOUND_STREAM*)pNewStream->GetStreamOut()->STREAM(), MetadataCallback, this);
	}
	pNewStream->SetVolume(  0.0 );
	m_Playing = true;
	m_Paused = false;
	if(g_FaderThread)
    	g_FaderThread->CrossfaderAbort();
	//---------------------------------------------//
	//--- update the global arrays containing	---//
	//--- active channels and streams			---//
	//---------------------------------------------//
	{
		wxCriticalSectionLocker lock(m_protectingStreamArrays);
		m_ActiveStreams.Add( pNewStream );
	}
	//---------------------------------------------//
	//--- playback has been started, update the	---//
	//--- user interface to reflect it			---//
	//---------------------------------------------//
    MusikPlayerEvent ev_start(this,wxEVT_MUSIKPLAYER_PLAY_START);
	ProcessEvent(ev_start);
    
	UpdateUI();//TODO: remove this. replace by event handling of playlistctrl etc.
	//---------------------------------------------//
	//--- record history in database			---//
	//---------------------------------------------//
	if(bNewSongStarted)
	{
        MusikPlayerEvent ev_songchange(this,wxEVT_MUSIKPLAYER_SONG_CHANGED);
        ProcessEvent(ev_songchange);
		wxGetApp().Library.UpdateItemLastPlayed	( m_CurrentSong );//TODO: replace by event handling of  wxEVT_MUSIKPLAYER_SONG_CHANGED in library
	}
	//---------------------------------------------//
	//--- if fading is not enabled, shut down	---//
	//--- all of the old channels, and set the	---//
	//--- active stream to full volume			---//
	//---------------------------------------------//
	if ( wxGetApp().Prefs.bFadeEnable == 0 || wxGetApp().Prefs.bGlobalFadeEnable == 0 )
	{
		if(pNewStream)
			pNewStream->SetVolume(1.0);
		ClearOldStreams();
	}

	//---------------------------------------------//
	//--- tell the listening thread its time to	---//
	//--- start fading							---//
	//---------------------------------------------//
	else if ( wxGetApp().Prefs.bFadeEnable && wxGetApp().Prefs.bGlobalFadeEnable )
		SetFadeStart();		
	return true;
}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:101,代码来源:MusikPlayer.cpp

示例9: WXUNUSED

void EffectCompressor::OnSlider(wxCommandEvent & WXUNUSED(evt))
{
   TransferDataFromWindow();
   UpdateUI();
}
开发者ID:henricj,项目名称:audacity,代码行数:5,代码来源:Compressor.cpp

示例10: sscanf


//.........这里部分代码省略.........
   int      reverbtype;
   float    reverblevel;
   str      faceted;
   Vector   tempvec;

   if ( !reverb )
      {
      return;
      }

   //
   // go to a known state
   //

   reverb->SetOneShot( false );
   // no angle use
   reverb->useTriggerDir = false;
   // make sure it doesn't trigger
   reverb->triggerable = false;

   // get origin
   cvar = gi.Cvar_Get( "snd_origin", "", 0 );
   sscanf( cvar->string, "%f %f %f", &tempvec[ 0 ], &tempvec[ 1 ], &tempvec[ 2 ] );
   reverb->setOrigin( tempvec );

   // get targetname
   cvar = gi.Cvar_Get( "snd_targetname", "", 0 );
   reverb->SetTargetName( cvar->string );

   // get width
   cvar = gi.Cvar_Get( "snd_width", "", 0 );
   reverb->mins[ 0 ] = -cvar->value;
   reverb->maxs[ 0 ] = cvar->value;

   // get length
   cvar = gi.Cvar_Get( "snd_length", "", 0 );
   reverb->mins[ 1 ] = -cvar->value;
   reverb->maxs[ 1 ] = cvar->value;

   // get height
   cvar = gi.Cvar_Get( "snd_height", "", 0 );
   reverb->mins[ 2 ] = 0;
   reverb->maxs[ 2 ] = cvar->value;

   reverb->setSize( reverb->mins, reverb->maxs );

   // get current multi faceted ness
   cvar = gi.Cvar_Get( "snd_multifaceted", "", 0 );
   faceted = cvar->string;

   if ( faceted == "North/South" )
      {
      reverb->SetMultiFaceted( 1 );
      }
   else if ( faceted == "East/West" )
      {
      reverb->SetMultiFaceted( 2 );
      }
   else
      {
      reverb->SetMultiFaceted( 0 );
      }

   // get reverb type
   cvar = gi.Cvar_Get( "snd_reverbtype", "", 0 );
   reverbtype = cvar->integer;

   // get reverb level
   cvar = gi.Cvar_Get( "snd_reverblevel", "", 0 );
   reverblevel = cvar->value;

   if ( reverb->multiFaceted && currentFacet )
      {
      reverb->SetAltReverb( reverbtype, reverblevel );
      }
   else
      {
      reverb->SetReverb( reverbtype, reverblevel );
      }

   // get onetime
   cvar = gi.Cvar_Get( "snd_onetime", "", 0 );
   if ( cvar->integer )
      {
      reverb->SetOneShot( true );
      }

   // get yaw
   cvar = gi.Cvar_Get( "snd_yaw", "", 0 );
   reverb->angles[ YAW ] = cvar->value;
   reverb->setAngles();

   // get useangles
   cvar = gi.Cvar_Get( "snd_useangles", "", 0 );
   if ( cvar->integer )
      {
      reverb->SetTriggerDir( reverb->angles[ YAW ] );
      }
   UpdateUI();
   }
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:101,代码来源:soundman.cpp

示例11: UpdateUI

void TimeIPDlg::Initialize()
{
    UpdateUI();
    exec();
}
开发者ID:leeych,项目名称:CYRTSCConfig,代码行数:5,代码来源:timeipdlg.cpp

示例12: wxASSERT

void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
{
   wxASSERT(kNumActions == WXSIZEOF(kActionStrings));

   wxArrayString actionChoices;
   for (int i = 0; i < kNumActions; i++)
   {
      actionChoices.Add(wxGetTranslation(kActionStrings[i]));
   }

   S.AddSpace(0, 5);

   S.StartStatic(_("Detect Silence"));
   {
      S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
      {
         // Threshold
         mTruncDbChoice = S.AddChoice(_("Level:"), wxT(""), &mDbChoices);
         mTruncDbChoice->SetValidator(wxGenericValidator(&mTruncDbChoiceIndex));
         S.SetSizeHints(-1, -1);
         S.AddSpace(0); // 'choices' already includes units.

         // Ignored silence
         FloatingPointValidator<double> vldDur(3, &mInitialAllowedSilence, NUM_VAL_NO_TRAILING_ZEROES);
         vldDur.SetRange(MIN_Minimum, MAX_Minimum);
         mInitialAllowedSilenceT = S.AddTextBox(_("Duration:"), wxT(""), 12);
         mInitialAllowedSilenceT->SetValidator(vldDur);
         S.AddUnits(wxT("seconds"));
      }
      S.EndMultiColumn();
   }
   S.EndStatic();

   S.StartStatic(_("Action"));
   {
      S.StartHorizontalLay();
      {
         // Action choices
         mActionChoice = S.AddChoice(wxT(""), wxT(""), &actionChoices);
         mActionChoice->SetValidator(wxGenericValidator(&mActionIndex));
         S.SetSizeHints(-1, -1);
      }
      S.EndHorizontalLay();
      S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
      {
         // Truncation / Compression factor

         FloatingPointValidator<double> vldTrunc(3, &mTruncLongestAllowedSilence, NUM_VAL_NO_TRAILING_ZEROES);
         vldTrunc.SetRange(MIN_Truncate, MAX_Truncate);
         mTruncLongestAllowedSilenceT = S.AddTextBox(_("Truncate to:"), wxT(""), 12);
         mTruncLongestAllowedSilenceT->SetValidator(vldTrunc);
         S.AddUnits(wxT("seconds"));

         FloatingPointValidator<double> vldComp(3, &mSilenceCompressPercent, NUM_VAL_NO_TRAILING_ZEROES);
         vldComp.SetRange(MIN_Compress, MAX_Compress);
         mSilenceCompressPercentT = S.AddTextBox(_("Compress to:"), wxT(""), 12);
         mSilenceCompressPercentT->SetValidator(vldComp);
         S.AddUnits(wxT("percent"));
      }
      S.EndMultiColumn();

      S.StartMultiColumn(2, wxALIGN_CENTER_HORIZONTAL);
      {
         mIndependent = S.AddCheckBox(_("Truncate tracks independently"),
            mbIndependent ? wxT("true") : wxT("false"));
      }
   S.EndMultiColumn();
}
   S.EndStatic();

   UpdateUI();
}
开发者ID:ShockingIce,项目名称:audacity,代码行数:72,代码来源:TruncSilence.cpp

示例13: SkipJob

void CJobControlDlg::Abort()
{
	SkipJob();
	m_Main->SetBatchMode(FALSE);	// force RunBatchJobs to abort and exit
	UpdateUI();	// update UI to reflect final state
}
开发者ID:victimofleisure,项目名称:FFRend,代码行数:6,代码来源:JobControlDlg.cpp

示例14: UpdateUI

void DetectorFlowDlg::Initialize()
{
    UpdateUI();
    OnReadFlowButtonClicked();
    exec();
}
开发者ID:leeych,项目名称:CYRTSCConfig,代码行数:6,代码来源:detectorflowdlg.cpp

示例15: int

//---------------------------------------------------------------------
int __fastcall TRADIOSetDlg::Execute(void)
{
	PortName->Text = RADIO.StrPort;
	Baud->Text = RADIO.BaudRate;
	BitLen->ItemIndex = RADIO.BitLen;
	Parity->ItemIndex = RADIO.Parity;
	Stop->ItemIndex = RADIO.Stop;
	flwXON->Checked = RADIO.flwXON;
	flwCTS->Checked = RADIO.flwCTS;
	CBPTT->Checked = RADIO.usePTT;

	ByteWait->Text = int(RADIO.ByteWait);

	char bf[32];
	sprintf( bf, "%02X", RADIO.Cmdxx);
	Cmdxx->Text = bf;
	CmdInit->Text = RADIO.CmdInit;
	CmdRx->Text = RADIO.CmdRx;
	CmdTx->Text = RADIO.CmdTx;

	CmdGNR->Text = RADIO.cmdGNR;
	OpenGNR->Checked = RADIO.openGNR;
	m_PollType = RADIO.PollType;
	PollInt->Text = (RADIO.PollInterval + 5)/10.0;
	AddrScan->Checked = RADIO.PollScan;
	SetMaker();
	UpdateUI();
	if( ShowModal() == IDOK ){
		StrCopy(RADIO.StrPort, AnsiString(PortName->Text).c_str(), 31);	//ja7ude 0428
		int dd;
		if( sscanf(AnsiString(Baud->Text).c_str(), "%u", &dd) == 1 ){	//ja7ude 0428
			RADIO.BaudRate = dd;
		}
		RADIO.BitLen = BitLen->ItemIndex;
		RADIO.Parity = Parity->ItemIndex;
		RADIO.Stop = Stop->ItemIndex;
		RADIO.flwXON = flwXON->Checked;
		RADIO.flwCTS = flwCTS->Checked;
		RADIO.usePTT = CBPTT->Checked;

		if( sscanf(AnsiString(ByteWait->Text).c_str(), "%u", &dd) == 1 ){	//ja7ude 0428
			if( (dd >= 0) && (dd <= 1000) ){
				RADIO.ByteWait = dd;
			}
		}
		if( sscanf(AnsiString(Cmdxx->Text).c_str(), "%X", &dd) == 1 ){	//ja7ude 0428
			RADIO.Cmdxx = dd & 0x000000ff;
		}
		RADIO.CmdInit = CmdInit->Text;
		RADIO.CmdRx = CmdRx->Text;
		RADIO.CmdTx = CmdTx->Text;

		RADIO.cmdGNR = CmdGNR->Text;
		RADIO.openGNR = OpenGNR->Checked;

		RADIO.PollType = m_PollType;
		double d;
		if( sscanf(AnsiString(PollInt->Text).c_str(), "%lf", &d) == 1 ){	//ja7ude 0428
			if( d >= 0.5 ){
				RADIO.PollInterval = int((d * 10.0) - 5);
				if( RADIO.PollInterval < 0 ) RADIO.PollInterval = 0;
			}
		}
		RADIO.PollScan = AddrScan->Checked;
		RADIO.change = 1;
		return TRUE;
	}
	else {
		return FALSE;
	}
}
开发者ID:mygaldre,项目名称:mmsstv,代码行数:72,代码来源:RadioSet.cpp


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