本文整理汇总了C++中Close函数的典型用法代码示例。如果您正苦于以下问题:C++ Close函数的具体用法?C++ Close怎么用?C++ Close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Close函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Close
/* MainWindow::handleAction
* Handles the action [id]. Returns true if the action was handled,
* false otherwise
*******************************************************************/
bool MainWindow::handleAction(string id)
{
// We're only interested in "main_" actions
if (!id.StartsWith("main_"))
return false;
// File->Exit
if (id == "main_exit")
{
Close();
return true;
}
// Edit->Undo
if (id == "main_undo")
{
panel_archivemanager->undo();
return true;
}
// Edit->Redo
if (id == "main_redo")
{
panel_archivemanager->redo();
return true;
}
// Edit->Set Base Resource Archive
if (id == "main_setbra")
{
wxDialog dialog_ebr(this, -1, "Edit Base Resource Archives", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
BaseResourceArchivesPanel brap(&dialog_ebr);
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
sizer->Add(&brap, 1, wxEXPAND|wxALL, 4);
sizer->Add(dialog_ebr.CreateButtonSizer(wxOK|wxCANCEL), 0, wxEXPAND|wxLEFT|wxRIGHT|wxDOWN, 4);
dialog_ebr.SetSizer(sizer);
dialog_ebr.Layout();
dialog_ebr.SetInitialSize(wxSize(500, 300));
dialog_ebr.CenterOnParent();
if (dialog_ebr.ShowModal() == wxID_OK)
theArchiveManager->openBaseResource(brap.getSelectedPath());
return true;
}
// Edit->Preferences
if (id == "main_preferences")
{
PreferencesDialog::openPreferences(this);
return true;
}
// View->Archive Manager
if (id == "main_showam")
{
wxAuiManager* m_mgr = wxAuiManager::GetManager(panel_archivemanager);
wxAuiPaneInfo& p_inf = m_mgr->GetPane("archive_manager");
p_inf.Show(!p_inf.IsShown());
m_mgr->Update();
return true;
}
// View->Console
if (id == "main_showconsole")
{
wxAuiManager* m_mgr = wxAuiManager::GetManager(panel_archivemanager);
wxAuiPaneInfo& p_inf = m_mgr->GetPane("console");
p_inf.Show(!p_inf.IsShown());
p_inf.MinSize(200, 128);
m_mgr->Update();
return true;
}
// View->Undo History
if (id == "main_showundohistory")
{
wxAuiManager* m_mgr = wxAuiManager::GetManager(panel_archivemanager);
wxAuiPaneInfo& p_inf = m_mgr->GetPane("undo_history");
p_inf.Show(!p_inf.IsShown());
m_mgr->Update();
return true;
}
// Help->About
if (id == "main_about")
{
wxAboutDialogInfo info;
info.SetName("SLADE");
info.SetVersion("v" + Global::version);
info.SetWebSite("http://slade.mancubus.net");
info.SetDescription("It's a Doom Editor");
//.........这里部分代码省略.........
开发者ID:jonrimmer,项目名称:SLADE,代码行数:101,代码来源:MainWindow.cpp
示例2: Close
CLog4zFile::~CLog4zFile()
{
Close();
}
开发者ID:854825967,项目名称:zsummer,代码行数:4,代码来源:log4z.cpp
示例3: switch
bool CGUIDialogSelect::OnMessage(CGUIMessage& message)
{
switch ( message.GetMessage() )
{
case GUI_MSG_WINDOW_DEINIT:
{
CGUIDialog::OnMessage(message);
m_viewControl.Clear();
m_bButtonEnabled = false;
m_useDetails = false;
m_multiSelection = false;
// construct selected items list
m_selectedItems->Clear();
m_iSelected = -1;
for (int i = 0 ; i < m_vecList->Size() ; i++)
{
CFileItemPtr item = m_vecList->Get(i);
if (item->IsSelected())
{
m_selectedItems->Add(item);
if (m_iSelected == -1)
m_iSelected = i;
}
}
m_vecList->Clear();
m_buttonString = -1;
SET_CONTROL_LABEL(CONTROL_BUTTON, "");
return true;
}
break;
case GUI_MSG_WINDOW_INIT:
{
CGUIDialog::OnMessage(message);
return true;
}
break;
case GUI_MSG_CLICKED:
{
int iControl = message.GetSenderId();
if (m_viewControl.HasControl(CONTROL_LIST))
{
int iAction = message.GetParam1();
if (ACTION_SELECT_ITEM == iAction || ACTION_MOUSE_LEFT_CLICK == iAction)
{
int iSelected = m_viewControl.GetSelectedItem();
if(iSelected >= 0 && iSelected < (int)m_vecList->Size())
{
CFileItemPtr item(m_vecList->Get(iSelected));
if (m_multiSelection)
item->Select(!item->IsSelected());
else
{
for (int i = 0 ; i < m_vecList->Size() ; i++)
m_vecList->Get(i)->Select(false);
item->Select(true);
m_bConfirmed = true;
Close();
}
}
}
}
if (CONTROL_BUTTON == iControl)
{
m_iSelected = -1;
m_bButtonPressed = true;
if (m_multiSelection)
m_bConfirmed = true;
Close();
}
}
break;
case GUI_MSG_SETFOCUS:
{
// make sure the additional button is focused in case the list is empty
// (otherwise it is impossible to navigate to the additional button)
if (m_vecList->IsEmpty() && m_bButtonEnabled &&
m_viewControl.HasControl(message.GetControlId()))
{
SET_CONTROL_FOCUS(CONTROL_BUTTON, 0);
return true;
}
if (m_viewControl.HasControl(message.GetControlId()) && m_viewControl.GetCurrentControl() != message.GetControlId())
{
m_viewControl.SetFocused();
return true;
}
}
break;
}
return CGUIDialog::OnMessage(message);
}
开发者ID:Distrotech,项目名称:xbmc,代码行数:99,代码来源:GUIDialogSelect.cpp
示例4: Close
// -------------------------------------------------------------------------------- //
void guSplashFrame::OnSplashClick( wxMouseEvent &event )
{
Close();
}
开发者ID:anonbeat,项目名称:guayadeque,代码行数:5,代码来源:SplashWin.cpp
示例5: Close
//***************************************************************************
CBCGPDAOGridCtrl::~CBCGPDAOGridCtrl()
{
Close ();
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:5,代码来源:BCGPDAOGridCtrl.cpp
示例6: Close
VDFileAsync9x::~VDFileAsync9x() {
Close();
}
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:3,代码来源:fileasync.cpp
示例7: Close
void CustomEdit::scheduleCreated(int ruleID)
{
if (ruleID > 0)
Close();
}
开发者ID:tomhughes,项目名称:mythtv,代码行数:5,代码来源:customedit.cpp
示例8: WXUNUSED
void MyChild::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(true);
}
开发者ID:nealey,项目名称:vera,代码行数:4,代码来源:mfctest.cpp
示例9: lock
bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE deinterlace, bool hdmi_clock_sync)
{
CSingleLock lock (m_critSection);
bool vflip = false;
Close();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
std::string decoder_name;
m_settings_changed = false;
m_setStartTime = true;
m_res_ctx = NULL;
m_res_callback = NULL;
m_video_codec_name = "";
m_codingType = OMX_VIDEO_CodingUnused;
m_decoded_width = hints.width;
m_decoded_height = hints.height;
m_hdmi_clock_sync = hdmi_clock_sync;
m_submitted_eos = false;
m_failed_eos = false;
if(hints.extrasize > 0 && hints.extradata != NULL)
{
m_extrasize = hints.extrasize;
m_extradata = (uint8_t *)malloc(m_extrasize);
memcpy(m_extradata, hints.extradata, hints.extrasize);
}
switch (hints.codec)
{
case AV_CODEC_ID_H264:
{
switch(hints.profile)
{
case FF_PROFILE_H264_BASELINE:
// (role name) video_decoder.avc
// H.264 Baseline profile
decoder_name = OMX_H264BASE_DECODER;
m_codingType = OMX_VIDEO_CodingAVC;
m_video_codec_name = "omx-h264";
break;
case FF_PROFILE_H264_MAIN:
// (role name) video_decoder.avc
// H.264 Main profile
decoder_name = OMX_H264MAIN_DECODER;
m_codingType = OMX_VIDEO_CodingAVC;
m_video_codec_name = "omx-h264";
break;
case FF_PROFILE_H264_HIGH:
// (role name) video_decoder.avc
// H.264 Main profile
decoder_name = OMX_H264HIGH_DECODER;
m_codingType = OMX_VIDEO_CodingAVC;
m_video_codec_name = "omx-h264";
break;
case FF_PROFILE_UNKNOWN:
decoder_name = OMX_H264HIGH_DECODER;
m_codingType = OMX_VIDEO_CodingAVC;
m_video_codec_name = "omx-h264";
break;
default:
decoder_name = OMX_H264HIGH_DECODER;
m_codingType = OMX_VIDEO_CodingAVC;
m_video_codec_name = "omx-h264";
break;
}
}
break;
case AV_CODEC_ID_MPEG4:
// (role name) video_decoder.mpeg4
// MPEG-4, DivX 4/5 and Xvid compatible
decoder_name = OMX_MPEG4_DECODER;
m_codingType = OMX_VIDEO_CodingMPEG4;
m_video_codec_name = "omx-mpeg4";
break;
case AV_CODEC_ID_MPEG1VIDEO:
case AV_CODEC_ID_MPEG2VIDEO:
// (role name) video_decoder.mpeg2
// MPEG-2
decoder_name = OMX_MPEG2V_DECODER;
m_codingType = OMX_VIDEO_CodingMPEG2;
m_video_codec_name = "omx-mpeg2";
break;
case AV_CODEC_ID_H263:
// (role name) video_decoder.mpeg4
// MPEG-4, DivX 4/5 and Xvid compatible
decoder_name = OMX_MPEG4_DECODER;
m_codingType = OMX_VIDEO_CodingMPEG4;
m_video_codec_name = "omx-h263";
break;
case AV_CODEC_ID_VP6:
// this form is encoded upside down
vflip = true;
// fall through
case AV_CODEC_ID_VP6F:
case AV_CODEC_ID_VP6A:
// (role name) video_decoder.vp6
// VP6
//.........这里部分代码省略.........
开发者ID:BenxiangGe,项目名称:boxeebox-xbmc,代码行数:101,代码来源:OMXVideo.cpp
示例10: PartitionInfo
//.........这里部分代码省略.........
BYTE bLayoutInfo[20240];
DISK_GEOMETRY dg;
for( int iDrive = 0; iDrive < 8; iDrive++ )
{
if( !Open(iDrive) )
continue;
if( GetDriveGeometryEx( (DISK_GEOMETRY_EX*) bLayoutInfo, sizeof(bLayoutInfo) ) )
{
DISK_GEOMETRY& dgref = (((DISK_GEOMETRY_EX*)bLayoutInfo)->Geometry);
dg = dgref;
PartitionInfo* p = new PartitionInfo();
p->m_dwDrive = (DWORD) iDrive;
p->m_dwPartition = 0;
p->m_bIsPartition = FALSE; //! was TRUE. -AEB
p->m_dwBytesPerSector = dg.BytesPerSector;
p->m_NumberOfSectors = dg.Cylinders.QuadPart;
p->m_NumberOfSectors *= dg.SectorsPerTrack;
p->m_NumberOfSectors *= dg.TracksPerCylinder;
p->m_StartingOffset = 0;
p->m_StartingSector = 0;
p->m_PartitionLength = p->m_NumberOfSectors;
p->m_PartitionLength *= dg.BytesPerSector;
list.push_back(p);
if( GetDriveLayoutEx( bLayoutInfo, sizeof(bLayoutInfo) ) )
{
PDRIVE_LAYOUT_INFORMATION_EX pLI = (PDRIVE_LAYOUT_INFORMATION_EX)bLayoutInfo;
for( DWORD iPartition = 0; iPartition < pLI->PartitionCount; iPartition++ )
{
PARTITION_INFORMATION_EX* pi = &(pLI->PartitionEntry[iPartition]);
PartitionInfo* p = new PartitionInfo();
p->m_dwDrive = (DWORD) iDrive;
p->m_dwPartition = (DWORD) iPartition;
p->m_bIsPartition = TRUE;
p->m_dwBytesPerSector = dg.BytesPerSector;
p->m_NumberOfSectors = pi->PartitionLength.QuadPart;
p->m_NumberOfSectors /= dg.BytesPerSector;
p->m_StartingOffset = pi->StartingOffset.QuadPart;
p->m_StartingSector = p->m_StartingOffset;
p->m_StartingSector /= dg.BytesPerSector;
p->m_PartitionLength = pi->PartitionLength.QuadPart;
if (pi->PartitionStyle == PARTITION_STYLE_MBR)
{
p->m_nPartitionType = pi->Mbr.PartitionType;
}
list.push_back(p);
}
}
}
else
{
if( GetDriveGeometry( &dg ) )
{
PartitionInfo* p = new PartitionInfo();
p->m_dwDrive = (DWORD) iDrive;
p->m_dwPartition = 0;
p->m_bIsPartition = FALSE;
p->m_dwBytesPerSector = dg.BytesPerSector;
p->m_NumberOfSectors = dg.Cylinders.QuadPart;
p->m_NumberOfSectors *= dg.SectorsPerTrack;
p->m_NumberOfSectors *= dg.TracksPerCylinder;
p->m_StartingOffset = 0;
p->m_StartingSector = 0;
p->m_PartitionLength = p->m_NumberOfSectors;
p->m_PartitionLength *= dg.BytesPerSector;
list.push_back(p);
if( GetDriveLayout( bLayoutInfo, sizeof(bLayoutInfo) ) )
{
PDRIVE_LAYOUT_INFORMATION pLI = (PDRIVE_LAYOUT_INFORMATION)bLayoutInfo;
for( DWORD iPartition = 0; iPartition < pLI->PartitionCount; iPartition++ )
{
PARTITION_INFORMATION* pi = &(pLI->PartitionEntry[iPartition]);
if( !pi->PartitionLength.QuadPart )
continue;
PartitionInfo* p = new PartitionInfo();
p->m_dwDrive = (DWORD) iDrive;
p->m_dwPartition = (DWORD) iPartition;
p->m_bIsPartition = TRUE;
p->m_dwBytesPerSector = dg.BytesPerSector;
p->m_NumberOfSectors = pi->PartitionLength.QuadPart;
p->m_NumberOfSectors /= dg.BytesPerSector;
p->m_StartingOffset = pi->StartingOffset.QuadPart;
p->m_StartingSector = p->m_StartingOffset;
p->m_StartingSector /= dg.BytesPerSector;
p->m_PartitionLength = pi->PartitionLength.QuadPart;
list.push_back(p);
}
}
}
}
Close();
}
}
开发者ID:pulsa,项目名称:t.hex,代码行数:101,代码来源:PhysicalDrive.cpp
示例11: WXUNUSED
void MyFrame::OnClose(wxCommandEvent& WXUNUSED(event))
{
// true is to force the frame to close
Close(true);
}
开发者ID:euler0,项目名称:Helium,代码行数:5,代码来源:cube.cpp
示例12: Close
DBConnector::~DBConnector()
{
Close();
mysql_shutdown(&mysql, SHUTDOWN_DEFAULT);
}
开发者ID:ak4hige,项目名称:myway3d,代码行数:5,代码来源:DBConnector.cpp
示例13: Close
Fd::~Fd()
{
if(IsAcquired())
Close();
}
开发者ID:peku33,项目名称:HikVision-EventReceiver,代码行数:5,代码来源:Fd.cpp
示例14: Close
void __fastcall TAPAffirmAndNotBookForm::btnExitClick(TObject *Sender)
{
Close();
}
开发者ID:25311753,项目名称:asi,代码行数:4,代码来源:APAffirmAndNotBook.cpp
示例15: Close
CFile::~CFile() {
Close();
}
开发者ID:BGCX261,项目名称:znc-msvc-svn-to-git,代码行数:3,代码来源:FileUtils.cpp
示例16: Close
COMXVideo::~COMXVideo()
{
Close();
}
开发者ID:BenxiangGe,项目名称:boxeebox-xbmc,代码行数:4,代码来源:OMXVideo.cpp
示例17: Close
开发者ID:Tithand,项目名称:TER-Server,代码行数:4,代码来源:Log.cpp
示例18: Close
bool GmInputStream::Open (const wxString & szIStream)
{
Close ();
m_szFileName = szIStream;
return m_In.Open (szIStream);
}
开发者ID:tanganam,项目名称:gimu,代码行数:6,代码来源:gmiostream.cpp
示例19: Close
MciPlayer::~MciPlayer()
{
Close();
DestroyWindow(_wnd);
}
开发者ID:BeyondEngine,项目名称:BeyondEngine,代码行数:5,代码来源:MciPlayer.cpp
示例20: Close
CetonChannel::~CetonChannel(void)
{
Close();
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:4,代码来源:cetonchannel.cpp
注:本文中的Close函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论