本文整理汇总了C++中UpdateTitle函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateTitle函数的具体用法?C++ UpdateTitle怎么用?C++ UpdateTitle使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateTitle函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxFileName
bool PCB_EDIT_FRAME::doAutoSave()
{
wxFileName tmpFileName;
if( GetBoard()->GetFileName().IsEmpty() )
{
tmpFileName = wxFileName( wxStandardPaths::Get().GetDocumentsDir(), wxT( "noname" ),
KiCadPcbFileExtension );
GetBoard()->SetFileName( tmpFileName.GetFullPath() );
}
else
{
tmpFileName = Prj().AbsolutePath( GetBoard()->GetFileName() );
}
wxFileName autoSaveFileName = tmpFileName;
// Auto save file name is the board file name prepended with autosaveFilePrefix string.
autoSaveFileName.SetName( GetAutoSaveFilePrefix() + autoSaveFileName.GetName() );
if( !autoSaveFileName.IsOk() )
return false;
// If the board file path is not writable, try writing to a platform specific temp file
// path. If that path isn't writabe, give up.
if( !autoSaveFileName.IsDirWritable() )
{
autoSaveFileName.SetPath( wxFileName::GetTempDir() );
if( !autoSaveFileName.IsOk() || !autoSaveFileName.IsDirWritable() )
return false;
}
wxLogTrace( traceAutoSave, "Creating auto save file <" + autoSaveFileName.GetFullPath() + ">" );
if( SavePcbFile( autoSaveFileName.GetFullPath(), NO_BACKUP_FILE ) )
{
GetScreen()->SetModify();
GetBoard()->SetFileName( tmpFileName.GetFullPath() );
UpdateTitle();
m_autoSaveState = false;
return true;
}
GetBoard()->SetFileName( tmpFileName.GetFullPath() );
return false;
}
示例2: SetCursor
/*
================
rvGEWorkspace::SaveFile
Writes the contents of the open gui file to disk
================
*/
bool rvGEWorkspace::SaveFile ( const char* filename )
{
idFile* file;
idWindow* window;
SetCursor ( LoadCursor ( NULL, MAKEINTRESOURCE(IDC_WAIT ) ) );
mFilename = filename;
// Since quake can only write to its path we will write a temp file then copy it over
idStr tempfile;
idStr ospath;
tempfile = "guis/temp.guied";
ospath = fileSystem->RelativePathToOSPath ( tempfile, "fs_basepath" );
// Open the output file for write
if ( !(file = fileSystem->OpenFileWrite ( tempfile ) ) )
{
int error = GetLastError ( );
SetCursor ( LoadCursor ( NULL, MAKEINTRESOURCE(IDC_ARROW ) ) );
return false;
}
window = mInterface->GetDesktop ( );
WriteWindow ( file, 1, window );
fileSystem->CloseFile ( file );
if ( !CopyFile ( ospath, filename, FALSE ) )
{
DeleteFile ( ospath );
SetCursor ( LoadCursor ( NULL, MAKEINTRESOURCE(IDC_ARROW ) ) );
return false;
}
DeleteFile ( ospath );
mFilename = filename;
mModified = false;
mNew = false;
UpdateTitle ( );
SetCursor ( LoadCursor ( NULL, MAKEINTRESOURCE(IDC_ARROW ) ) );
return true;
}
示例3: VideoThrottle
// Display FPS info
// This should only be called from VI
void VideoThrottle()
{
// Update info per second
u32 ElapseTime = (u32)s_timer.GetTimeDifference();
if ((ElapseTime >= 1000 && s_drawn_video.load() > 0) || s_request_refresh_info)
{
UpdateTitle();
// Reset counter
s_timer.Update();
s_drawn_frame.store(0);
s_drawn_video.store(0);
}
s_drawn_video++;
}
示例4: VideoThrottle
// Apply Frame Limit and Display FPS info
// This should only be called from VI
void VideoThrottle()
{
// Update info per second
u32 ElapseTime = (u32)Timer.GetTimeDifference();
if ((ElapseTime >= 1000 && DrawnVideo > 0) || g_requestRefreshInfo)
{
UpdateTitle();
// Reset counter
Timer.Update();
Common::AtomicStore(DrawnFrame, 0);
DrawnVideo = 0;
}
DrawnVideo++;
}
示例5: UpdateTitle
void CThhylDlg::CloseFile(BOOL bSilently)
{
m_filestatus.Clear();
m_bTHX = FALSE;
delete m_pRpyAnalyzer;
m_pRpyAnalyzer = NULL;
delete []m_pRpyData;
m_pRpyData = NULL;
if (bSilently)
return;
m_rpyfile.LoadString(IDS_HINTNOFILE);
m_rpyinfo.LoadString(IDS_HINTSTART);
UpdateTitle();
UpdateData(FALSE);
}
示例6: VideoThrottle
// Apply Frame Limit and Display FPS info
// This should only be called from VI
void VideoThrottle()
{
// Update info per second
u32 ElapseTime = (u32)s_timer.GetTimeDifference();
if ((ElapseTime >= 1000 && s_drawn_video > 0) || s_request_refresh_info)
{
UpdateTitle();
// Reset counter
s_timer.Update();
Common::AtomicStore(s_drawn_frame, 0);
s_drawn_video = 0;
}
s_drawn_video++;
}
示例7: UpdateTitle
// Set up appropriate views for the intermediate render target.
void D3D12Fullscreen::LoadSceneResolutionDependentResources()
{
// Update resolutions shown in app title.
UpdateTitle();
// Set up the scene viewport and scissor rect to match the current scene rendering resolution.
{
m_sceneViewport.Width = static_cast<float>(m_resolutionOptions[m_resolutionIndex].Width);
m_sceneViewport.Height = static_cast<float>(m_resolutionOptions[m_resolutionIndex].Height);
m_sceneViewport.MaxDepth = 1.0f;
m_sceneScissorRect.right = static_cast<LONG>(m_resolutionOptions[m_resolutionIndex].Width);
m_sceneScissorRect.bottom = static_cast<LONG>(m_resolutionOptions[m_resolutionIndex].Height);
}
// Update post-process viewport and scissor rectangle.
UpdatePostViewAndScissor();
// Create RTV for the intermediate render target.
{
D3D12_RESOURCE_DESC swapChainDesc = m_renderTargets[m_frameIndex]->GetDesc();
const CD3DX12_CLEAR_VALUE clearValue(swapChainDesc.Format, ClearColor);
const CD3DX12_RESOURCE_DESC renderTargetDesc = CD3DX12_RESOURCE_DESC::Tex2D(
swapChainDesc.Format,
m_resolutionOptions[m_resolutionIndex].Width,
m_resolutionOptions[m_resolutionIndex].Height,
1u, 1u,
swapChainDesc.SampleDesc.Count,
swapChainDesc.SampleDesc.Quality,
D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET,
D3D12_TEXTURE_LAYOUT_UNKNOWN, 0u);
CD3DX12_CPU_DESCRIPTOR_HANDLE rtvHandle(m_rtvHeap->GetCPUDescriptorHandleForHeapStart(), FrameCount, m_rtvDescriptorSize);
ThrowIfFailed(m_device->CreateCommittedResource(
&CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT),
D3D12_HEAP_FLAG_NONE,
&renderTargetDesc,
D3D12_RESOURCE_STATE_RENDER_TARGET,
&clearValue,
IID_PPV_ARGS(&m_intermediateRenderTarget)));
m_device->CreateRenderTargetView(m_intermediateRenderTarget.Get(), nullptr, rtvHandle);
NAME_D3D12_OBJECT(m_intermediateRenderTarget);
}
// Create SRV for the intermediate render target.
m_device->CreateShaderResourceView(m_intermediateRenderTarget.Get(), nullptr, m_cbvSrvHeap->GetCPUDescriptorHandleForHeapStart());
}
示例8: OnCreate
LRESULT OnCreate(LPCREATESTRUCT lParam)
{
SetMsgHandled(false);
T *pT = static_cast<T*>(this);
g_window[pT->ID] = m_hWnd;
pT->DoCreateView();
ATLASSERT(m_hWndClient);
CMessageLoop * pLoop = _Module.GetMessageLoop();
ATLASSERT(NULL != pLoop);
pLoop->AddIdleHandler(this);
UpdateTitle();
return 0;
}
示例9: assert
/*
================
rvGEWorkspace::Attach
Attaches the workspace to the given window. This is usually done after the
window is created and the file has been loaded.
================
*/
bool rvGEWorkspace::Attach ( HWND wnd )
{
assert ( wnd );
mWnd = wnd;
// Initialize the pixel format for this window
SetupPixelFormat ( );
// Jam the workspace pointer into the userdata window long so
// we can retrieve the workspace from the window later
SetWindowLong ( mWnd, GWL_USERDATA, (LONG) this );
UpdateTitle ( );
return true;
}
示例10: SelectLibrary
void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event )
{
wxString selection = SelectLibrary( m_libraryName );
if( !!selection && selection != m_libraryName )
{
m_libraryName = selection;
UpdateTitle();
ReCreateFootprintList();
int id = m_libList->FindString( m_libraryName );
if( id >= 0 )
m_libList->SetSelection( id );
}
}
示例11: EnterCriticalSection
/// This method checks the list of pending commands and executes the next command
void CMediaMonitor::DispatchNextCommand()
{
if (m_commands.size() <= 0)
{
return ;
}
EnterCriticalSection(&m_critical_section);
COMMANDITERATOR it = m_commands.begin();
CMediaMonitor::Command command = *it;
m_commands.erase(it);
LeaveCriticalSection(&m_critical_section);
switch (command.rCommand)
{
case CommandType::Seed:
{
// update all movie information
CLog::Log(LOGINFO, "Seeding database... started.");
Scan(true);
CLog::Log(LOGINFO, "Seeding database... completed.");
break;
}
case CommandType::Refresh:
{
// get information for the latest 3 movies
CLog::Log(LOGINFO, "Refreshing latest movies... started.");
Scan(false);
CLog::Log(LOGINFO, "Refreshing latest movies... completed.");
break;
}
case CommandType::Update:
{
// update the information for a specific movie
CLog::Log(LOGINFO, "Updating movie... started.");
UpdateTitle(command.nParam1, command.strParam1, command.strParam2);
CLog::Log(LOGINFO, "Updating movie... completed.");
break;
}
}
}
示例12: ReCreateFootprintList
void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event )
{
int ii = m_libList->GetSelection();
if( ii < 0 )
return;
wxString name = m_libList->GetString( ii );
if( m_libraryName == name )
return;
m_libraryName = name;
ReCreateFootprintList();
UpdateTitle();
ReCreateHToolbar();
}
示例13: CreateDirectory
/*
================
rvGEWorkspace::LoadFile
Loads the given gui file.
================
*/
bool rvGEWorkspace::LoadFile( const char *filename, idStr *error ) {
delete mInterface;
idStr tempfile;
idStr ospath;
bool result;
tempfile = "guis/temp.guied";
ospath = fileSystem->RelativePathToOSPath( tempfile, "fs_basepath" );
// Make sure the gui directory exists
idStr createDir = ospath;
createDir.StripFilename( );
CreateDirectory( createDir, NULL );
SetFileAttributes( ospath, FILE_ATTRIBUTE_NORMAL );
DeleteFile( ospath );
if( !CopyFile( filename, ospath, FALSE ) ) {
if( error ) {
*error = "File not found";
}
return false;
}
SetFileAttributes( ospath, FILE_ATTRIBUTE_NORMAL );
mFilename = filename;
UpdateTitle( );
// Let the real window system parse it first
mInterface = NULL;
result = true;
try {
mInterface = reinterpret_cast< idUserInterfaceLocal * >( uiManager->FindGui( tempfile, true, true ) );
if( !mInterface && error ) {
*error = "File not found";
}
} catch( idException &e ) {
result = false;
if( error ) {
*error = e.error;
}
return false;
}
if( result ) {
rvGEWindowWrapper::GetWrapper( mInterface->GetDesktop( ) )->Expand( );
} else {
DeleteFile( ospath );
}
return result;
}
示例14: UpdateTitle
void CEsmSpellDlg::OnInitialUpdate() {
int Index;
CEsmRecDialog::OnInitialUpdate();
UpdateTitle(NULL);
/* Initialize the armor record */
ASSERT(GetRecInfo() != NULL);
m_pSpell = (CEsmSpell *) GetRecInfo()->pRecord;
FillEsmSpellTypeCombo(m_TypeList);
for (Index = 0; Index < MWESM_ENCHANT_NUMENCHANTS; Index++) {
FillEsmEffectsCombo(m_EffectList[Index], false);
FillEsmEnchantRangeCombo(m_RangeList[Index]);
m_DurationText[Index].SetLimitText(5); /* Are shorts so only need 5 digits at most */
m_Magnitude1Text[Index].SetLimitText(5);
m_Magnitude2Text[Index].SetLimitText(5);
m_AreaText[Index].SetLimitText(5);
}
SetControlData();
}
示例15: SetCurItem
void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event )
{
if( m_footprintList->GetCount() == 0 )
return;
int ii = m_footprintList->GetSelection();
if( ii < 0 )
return;
wxString name = m_footprintList->GetString( ii );
if( m_footprintName.CmpNoCase( name ) != 0 )
{
m_footprintName = name;
SetCurItem( NULL );
// Delete the current footprint
GetBoard()->m_Modules.DeleteAll();
FPID id;
id.SetLibNickname( m_libraryName );
id.SetFootprintName( m_footprintName );
try
{
GetBoard()->Add( loadFootprint( id ) );
}
catch( const IO_ERROR& ioe )
{
wxString msg;
msg.Printf( _( "Could not load footprint \"%s\" from library \"%s\".\n\n"
"Error %s." ), GetChars( m_footprintName ), GetChars( m_libraryName ),
GetChars( ioe.errorText ) );
DisplayError( this, msg );
}
UpdateTitle();
Zoom_Automatique( false );
m_canvas->Refresh();
Update3D_Frame();
}
}