A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/file__load__panel_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/loaders/file_load_panel.cpp Source File

45 #include <wx/choice.h> 46 #include <wx/statbox.h> 47 #include <wx/stattext.h> 48 #include <wx/msgdlg.h> 49 #include <wx/bitmap.h> 51 #include <wx/filename.h> 52 #include <wx/txtstrm.h> 53 #include <wx/sstream.h> 73

: m_Manager(), m_CurrFormat(0), m_MRUFileClicked(

false

), m_MRUFormat(-1)

80

: m_Manager(), m_CurrFormat(0), m_MRUFileClicked(

false

), m_MRUFormat(-1)

90 

wxPanel::Create( parent,

id

, pos,

size

, style );

95

GetSizer()->SetSizeHints(

this

);

126

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

127

itemPanel1->SetSizer(itemBoxSizer2);

129

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

130

itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);

132

wxStaticText* itemStaticText4 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"File Format:"

), wxDefaultPosition, wxDefaultSize, 0 );

133

itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

135

wxArrayString m_FormatListStrings;

136  m_FormatList

=

new

wxChoice( itemPanel1,

ID_CHOICE

, wxDefaultPosition, wxDefaultSize, m_FormatListStrings, 0 );

137

itemBoxSizer3->Add(

m_FormatList

, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);

139

wxStaticText* itemStaticText6 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Filenames:"

), wxDefaultPosition, wxDefaultSize, 0 );

140

itemBoxSizer2->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);

143

itemBoxSizer2->Add(

m_FileInput

, 1, wxGROW|wxALL, 5);

145

wxStaticText* itemStaticText8 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Recently used Files:"

), wxDefaultPosition, wxDefaultSize, 0 );

146

itemBoxSizer2->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);

149

itemBoxSizer2->Add(

m_MRUWindow

, 1, wxGROW|wxALL, 5);

169  for

(

size_t i

= 0;

i

< managers.size();

i

++) {

174  if

(

id

==

"file_loader_gbench_project"

)

212

wxStringOutputStream strstrm;

213

wxTextOutputStream os(strstrm);

215

os <<

wxT

(

"<html><body>"

);

217  for

(CFileLoadMRUList::TTimeToTMap::const_reverse_iterator it =

map

.rbegin();

218

it !=

map

.rend(); ++it) {

219

time_t

t

= it->first;

221

wxString name, ext, filename = it->second.GetFileName();

223

wxFileName::SplitPath(filename, 0, &name, &ext);

224  if

( ! ext.empty()) {

225

name +=

wxT

(

"."

) + ext;

229

<<

wxT

(

"</a></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"

)

230

<<

wxT

(

"<font color=#808080>last&nbsp;used&nbsp;&nbsp;"

)

232

<<

wxT

(

"<small>"

) << filename <<

wxT

(

"</small><br />"

);

237

os <<

wxT

(

"</body></html>"

);

244  if

(index == wxNOT_FOUND)

249

wxString manager_label =

m_MRUFilenames

[index].GetFileLoaderLabel();

251  if

(!wxFileName::FileExists(filename)) {

252

wxString err_msg =

wxT

(

"The file: \""

) + filename +

wxT

(

"\" doesn't exist."

);

253

wxMessageBox(err_msg,

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

259  int

format_index = -1;

260  for

(

size_t i

= 0;

i

< managers.size(); ++

i

) {

263

format_index = (

int

)

i

;

268  if

(format_index < 0) {

269

wxString err_msg =

wxT

(

"File loader \""

) + manager_label +

wxT

(

"\" not found."

);

270

wxMessageBox(err_msg,

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

280

wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_FORWARD);

281  event

.SetEventObject(

this

);

282

AddPendingEvent(event);

291  if

(entryFormat ==

format

) {

329

wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_FORWARD);

330  event

.SetEventObject(

this

);

331

AddPendingEvent(event);

357  const

wxHtmlLinkInfo

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