: m_Manager(), m_CurrFormat(0), m_MRUFileClicked(
false), m_MRUFormat(-1)
80: m_Manager(), m_CurrFormat(0), m_MRUFileClicked(
false), m_MRUFormat(-1)
90wxPanel::Create( parent,
id, pos,
size, style );
95GetSizer()->SetSizeHints(
this);
126wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
127itemPanel1->SetSizer(itemBoxSizer2);
129wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
130itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);
132wxStaticText* itemStaticText4 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"File Format:"), wxDefaultPosition, wxDefaultSize, 0 );
133itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
135wxArrayString m_FormatListStrings;
136 m_FormatList=
newwxChoice( itemPanel1,
ID_CHOICE, wxDefaultPosition, wxDefaultSize, m_FormatListStrings, 0 );
137itemBoxSizer3->Add(
m_FormatList, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
139wxStaticText* itemStaticText6 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Filenames:"), wxDefaultPosition, wxDefaultSize, 0 );
140itemBoxSizer2->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);
143itemBoxSizer2->Add(
m_FileInput, 1, wxGROW|wxALL, 5);
145wxStaticText* itemStaticText8 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Recently used Files:"), wxDefaultPosition, wxDefaultSize, 0 );
146itemBoxSizer2->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);
149itemBoxSizer2->Add(
m_MRUWindow, 1, wxGROW|wxALL, 5);
169 for(
size_t i= 0;
i< managers.size();
i++) {
174 if(
id==
"file_loader_gbench_project")
212wxStringOutputStream strstrm;
213wxTextOutputStream os(strstrm);
215os <<
wxT(
"<html><body>");
217 for(CFileLoadMRUList::TTimeToTMap::const_reverse_iterator it =
map.rbegin();
218it !=
map.rend(); ++it) {
219time_t
t= it->first;
221wxString name, ext, filename = it->second.GetFileName();
223wxFileName::SplitPath(filename, 0, &name, &ext);
224 if( ! ext.empty()) {
225name +=
wxT(
".") + ext;
229<<
wxT(
"</a></b> ")
230<<
wxT(
"<font color=#808080>last used ")
232<<
wxT(
"<small>") << filename <<
wxT(
"</small><br />");
237os <<
wxT(
"</body></html>");
244 if(index == wxNOT_FOUND)
249wxString manager_label =
m_MRUFilenames[index].GetFileLoaderLabel();
251 if(!wxFileName::FileExists(filename)) {
252wxString err_msg =
wxT(
"The file: \"") + filename +
wxT(
"\" doesn't exist.");
253wxMessageBox(err_msg,
wxT(
"Error"), wxOK | wxICON_ERROR,
this);
259 intformat_index = -1;
260 for(
size_t i= 0;
i< managers.size(); ++
i) {
263format_index = (
int)
i;
268 if(format_index < 0) {
269wxString err_msg =
wxT(
"File loader \"") + manager_label +
wxT(
"\" not found.");
270wxMessageBox(err_msg,
wxT(
"Error"), wxOK | wxICON_ERROR,
this);
280wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_FORWARD);
281 event.SetEventObject(
this);
282AddPendingEvent(event);
291 if(entryFormat ==
format) {
329wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_FORWARD);
330 event.SetEventObject(
this);
331AddPendingEvent(event);
357 constwxHtmlLinkInfo
info=
event.GetLinkInfo();
359 if(
info.GetHref().ToLong(&index))
bool Create(wxWindow *parent, wxWindowID id=ID_CFILELOADPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
void SetWorkDir(const wxString &workDir)
vector< CFileLoadDescriptor > m_MRUFilenames
void OnFormatListSelected(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE
void SetManager(CFileLoadWizard *manager)
void x_LoadMRUFile(int index)
void x_SetCurrentFormat(int index)
CFileLoadWizard * m_Manager
CMultiFileInput * m_FileInput
void OnLoadFiles(wxCommandEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnMRUWindowLinkClicked(wxHtmlLinkEvent &event)
wxEVT_COMMAND_HTML_LINK_CLICKED event handler for ID_HTMLWINDOW
CwxHtmlWindow * m_MRUWindow
static bool ShowToolTips()
void SelectFormat(int format)
void GetFilenames(vector< wxString > &filenames) const
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void SetFilenames(const vector< wxString > &filenames)
const vector< CIRef< IFileLoadPanelClient > > & GetFormatManagers() const
void OnFormatChanged(int format)
CFileLoadMRUList & GetFileMRUList()
void SetDefaultDir(const wxString &dir)
void GetFilenames(vector< wxString > &filenames) const
void SetWildcard(const wxString &wildcard)
void SetSingleMode(bool single)
void SetFilenames(const vector< wxString > &filenames)
const TTimeToTMap & GetMap() const
virtual string GetLabel() const =0
virtual bool SingleFileLoader() const
returns true if loader can handle only one file
virtual string GetFileLoaderId() const =0
virtual wxString GetFormatWildcard() const =0
return file wildcard for the format (example - "*.txt;*.tab" )
static string sFormatTimePeriod(CTime &t_now, CTime &t_before)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
CTime & ToLocalTime(void)
Convert the time into local time.
string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const
Transform time to string.
@ eCurrent
Use current time. See also CCurrentTime.
unsigned int
A callback function used to compare two keys in a database.
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
const struct ncbi::grid::netcache::search::fields::SIZE size
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4