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


C++ wxDropFilesEvent类代码示例

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


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

示例1: OnDropFile

void MainFrame::OnDropFile(wxDropFilesEvent &event)
{
	int n = event.GetNumberOfFiles();
	wxString* f = event.GetFiles();
	// ignore all but last
	wxGetApp().pending_load = f[event.GetNumberOfFiles() - 1];
}
开发者ID:MrSwiss,项目名称:visualboyadvance-m,代码行数:7,代码来源:wxvbam.cpp

示例2: OnDropFiles

void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event)
{
    // By default, load the first file into the text window.
    if (event.GetNumberOfFiles() > 0)
    {
        LoadFile(event.GetFiles()[0]);
    }
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:8,代码来源:textctrl.cpp

示例3: OnDropFiles

//-----------------------------------------------------------------------------
void WXGLCanvas::OnDropFiles(wxDropFilesEvent& ev)
{
  std::vector<String> files;
  for(int i=0; i<ev.GetNumberOfFiles(); ++i)
  {
    wxCharBuffer chars = ev.GetFiles()[i].ToUTF8();
    String str = String::fromUTF8(chars.data());
    files.push_back(str);
  }
  dispatchFileDroppedEvent(files);
}
开发者ID:TomasHurban,项目名称:DP_Hairs_simulation_and_visualization,代码行数:12,代码来源:WXGLCanvas.cpp

示例4: OnDropFiles

void AudacityProject::OnDropFiles(wxDropFilesEvent & event)
{
   int numFiles = event.GetNumberOfFiles();

   if (numFiles > 0) {
      wxString *files = event.GetFiles();

      int i;
      for(i=0; i<numFiles; i++)
         Import(files[i]);
   }
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:12,代码来源:Project.cpp

示例5: OnDropFiles

void PicViewCtrl::OnDropFiles(wxDropFilesEvent& event)
{
    //g_LogMessage(_T("Enter PicViewCtrl::OnDropFiles"));
    if(event.GetNumberOfFiles() != 1)
    {
        wxMessageBox(_T("Only can drop one files once!"));
        return;
    }
    wxString* filenames = event.GetFiles();
    wxCommandEvent evt(wxEVT_DROP_FILES, wxID_ANY);
    evt.SetString(filenames[0]);
    wxPostEvent(m_pFrame, evt);
    return;
}
开发者ID:AaronLiChen,项目名称:HEVCAnalyzer,代码行数:14,代码来源:PicViewCtrl.cpp

示例6: OnDropFiles

void VHDDExplorer::OnDropFiles(wxDropFilesEvent& event)
{
	int count = event.GetNumberOfFiles();
	wxString* dropped = event.GetFiles();

	wxBusyCursor busyCursor;
	wxWindowDisabler disabler;
	wxBusyInfo busyInfo("Adding files, wait please...");


	for(int i=0; i<count; ++i)
	{
		LOG_NOTICE(HLE, "Importing '%s'", dropped[i].wx_str());
		Import(fmt::ToUTF8(dropped[i]), fmt::ToUTF8(wxFileName(dropped[i]).GetFullName()));
	}

	UpdateList();
}
开发者ID:Aishou,项目名称:rpcs3,代码行数:18,代码来源:VHDDManager.cpp


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