: m_Manager(), m_FileMRU(), m_MRUFileClicked(
false), m_MRUFormat(-1)
82: m_Manager(), m_FileMRU(), m_MRUFileClicked(
false), m_MRUFormat(-1)
92wxPanel::Create( parent,
id, pos,
size, style );
97GetSizer()->SetSizeHints(
this);
129wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
130itemPanel1->SetSizer(itemBoxSizer2);
132wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
133itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 0);
135wxStaticText* itemStaticText4 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"File Format:"), wxDefaultPosition, wxDefaultSize, 0 );
136itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
138wxArrayString m_FormatListStrings;
139 m_FormatList=
newwxChoice( itemPanel1,
ID_CHOICE, wxDefaultPosition, wxDefaultSize, m_FormatListStrings, 0 );
140itemBoxSizer3->Add(
m_FormatList, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
142 m_CheckFormat=
newwxCheckBox( itemPanel1,
ID_CHECKBOX6,
_(
"Verify that the file data match the selected file format"), wxDefaultPosition, wxDefaultSize, 0 );
144itemBoxSizer2->Add(
m_CheckFormat, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT, 5);
146wxStaticText* itemStaticText7 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Filenames or URLs:"), wxDefaultPosition, wxDefaultSize, 0 );
147itemBoxSizer2->Add(itemStaticText7, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);
150itemBoxSizer2->Add(
m_FileInput, 1, wxGROW|wxALL, 5);
152wxStaticText* itemStaticText9 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Recently used Files:"), wxDefaultPosition, wxDefaultSize, 0 );
153itemBoxSizer2->Add(itemStaticText9, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);
156itemBoxSizer2->Add(
m_MRUWindow, 1, wxGROW|wxALL, 5);
201wxStringOutputStream strstrm;
202wxTextOutputStream os(strstrm);
204os <<
wxT(
"<html><body>");
206 for( TMap::const_reverse_iterator it =
map.rbegin(); it !=
map.rend(); ++it) {
207time_t
t= it->first;
209wxString name, ext, filename = it->second.GetFileName();
211wxFileName::SplitPath(filename, 0, &name, &ext);
212 if( ! ext.empty()) {
213name +=
wxT(
".") + ext;
217<<
wxT(
"</a></b> ")
218<<
wxT(
"<font color=#808080>last used ")
220<<
wxT(
"<small>") << filename <<
wxT(
"</small><br />");
225os <<
wxT(
"</body></html>");
230 m_MRUWindow->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
235 if(index == wxNOT_FOUND)
240wxString manager_label =
m_MRUFilenames[index].GetFileLoaderLabel();
243wxString err_msg =
wxT(
"The file: \"") + filename +
wxT(
"\" doesn't exist.");
244wxMessageBox(err_msg,
wxT(
"Error"), wxOK | wxICON_ERROR,
this);
248 intformat_index = -1;
251format_index = (
int)
i;
256 if(format_index < 0) {
257wxString err_msg =
wxT(
"File loader \"") + manager_label +
wxT(
"\" not found.");
258wxMessageBox(err_msg,
wxT(
"Error"), wxOK | wxICON_ERROR,
this);
266wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_FORWARD);
267 event.SetEventObject(
this);
268AddPendingEvent(event);
277 for(
size_t i= 0;
i<
n;
i++) {
308 if(entryFormat ==
format) {
353wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_FORWARD);
354 event.SetEventObject(
this);
355AddPendingEvent(event);
380 constwxHtmlLinkInfo
info=
event.GetLinkInfo();
382 if(
info.GetHref().ToLong(&index))
static bool FileExists(const wxString &fileName)
CFileLoadManager CFileLoadManager - a Loader Manager implementing "File" option in "Open" dialog.
virtual void OnFormatChanged()
called by File Format panel when a user selects a format
void x_SetCurrentFormat(int index)
wxIcon GetIconResource(const wxString &name)
CFileLoadManager * m_Manager
static bool ShowToolTips()
void SetFilenames(const vector< wxString > &filenames)
void SetMRU(const TFileMRU &file_mru)
bool Create(wxWindow *parent, wxWindowID id=ID_CFILELOADOPTIONPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
const TFileMRU * m_FileMRU
void OnFormatListSelected(wxCommandEvent &event)
void SetManager(CFileLoadManager *manager)
void x_LoadMRUFile(int index)
vector< CFormatDescriptor > m_Formats
void SelectFormat(int format)
void GetFilenames(vector< wxString > &filenames) const
void SetCheckFormat(bool value=true)
CMultiFileInput * m_FileInput
void OnMRUWindowLinkClicked(wxHtmlLinkEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
vector< CFileLoadManager::CFileDescriptor > m_MRUFilenames
CwxHtmlWindow * m_MRUWindow
void OnLoadFiles(wxCommandEvent &event)
void SetFormats(const vector< CFormatDescriptor > &formats)
wxCheckBox * m_CheckFormat
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
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
const GenericPointer< typename T::ValueType > T2 value
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