コード例 #1
0
CGameListCtrl::CGameListCtrl(wxWindow* parent, const wxWindowID id, const
		wxPoint& pos, const wxSize& size, long style)
	: wxListCtrl(parent, id, pos, size, style), toolTip(0)
{
	DragAcceptFiles(true);
	Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CGameListCtrl::OnDropFiles), NULL, this);
}
コード例 #2
0
ファイル: VHDDManager.cpp プロジェクト: AMMAREN/rpcs3
VHDDExplorer::VHDDExplorer(wxWindow* parent, const std::string& hdd_path) : wxDialog(parent, wxID_ANY, "Virtual HDD Explorer", wxDefaultPosition)
{
	m_list = new wxListView(this);
	m_drop_target = new VHDDListDropTarget(m_list);

	m_list->SetDropTarget(m_drop_target);
	m_list->DragAcceptFiles(true);

	wxBoxSizer& s_main(*new wxBoxSizer(wxVERTICAL));
	s_main.Add(m_list, 1, wxEXPAND | wxALL, 5);
	SetSizerAndFit(&s_main);

	SetSize(800, 600);
	m_list->InsertColumn(0, "Name");
	m_list->InsertColumn(1, "Type");
	m_list->InsertColumn(2, "Size");
	m_list->InsertColumn(3, "Creation time");

	m_hdd = new vfsHDD(nullptr, hdd_path);
	UpdateList();
	Connect(m_list->GetId(),	wxEVT_COMMAND_LIST_BEGIN_DRAG,		wxListEventHandler(VHDDExplorer::OnListDrag));
	Connect(m_list->GetId(),	wxEVT_COMMAND_LIST_ITEM_ACTIVATED,	wxListEventHandler(VHDDExplorer::DClick));
	Connect(m_list->GetId(),	wxEVT_COMMAND_RIGHT_CLICK,			wxCommandEventHandler(VHDDExplorer::OnContextMenu));
	m_list->Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(VHDDExplorer::OnDropFiles), (wxObject*)0, this);

	Connect(id_open,			wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(VHDDExplorer::OnOpen));
	Connect(id_rename,			wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(VHDDExplorer::OnRename));
	Connect(id_remove,			wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(VHDDExplorer::OnRemove));
	Connect(id_create_dir,		wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(VHDDExplorer::OnCreateDir));
	Connect(id_create_file,		wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(VHDDExplorer::OnCreateFile));
	Connect(id_import,			wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(VHDDExplorer::OnImport));
	Connect(id_export,			wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(VHDDExplorer::OnExport));
}
コード例 #3
0
/*----------*/
ggscfg_ColorEditSheet::ggscfg_ColorEditSheet(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
: ColorEditSheet(parent, id, pos, size, style)
{
  m_image = NULL;
  m_image_w = 0;
  m_image_h = 0;

  m_palette_size = 0;
  memset(m_palette, 0, sizeof(u32) * 256);
  memset(m_palette_header, 0, sizeof(u32) * 16);

  memset(m_image_addr_list, 0, sizeof(u32) * kImageMaxCount);
  m_image_addr_list_count = 0;

  memset(m_pal_addr_list, 0, sizeof(u32) * kPaletteMaxCount);
  m_pal_addr_list_count = 0;

  m_cur_cid    = 0;
  m_cur_palette  = 0;
  m_palette_changed = false;
  m_select_palette = -1;

  // Connect Events
  this->Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(ggscfg_ColorEditSheet::on_timer));
  this->Connect(wxID_ANY, wxEVT_DROP_FILES, wxDropFilesEventHandler(ggscfg_ColorEditSheet::on_drop_file));
}