39 #include <wx/scrolwin.h>
40 #include <wx/bmpbuttn.h>
41 #include <wx/filedlg.h>
42 #include <wx/stattext.h>
43 #include <wx/statbox.h>
44 #include <wx/artprov.h>
52 SetDataObject(
new wxFileDataObject);
66 wxFileDataObject *dobj = (wxFileDataObject *)m_dataObject;
67 wxArrayString
filenames = dobj->GetFilenames();
69 vector<wxString>
names;
72 for (
size_t i = 0;
i <
n;
i++)
77 if (def == wxDragMove || def == wxDragLink || def == wxDragCopy) {
78 m_Input.AddFilenames(
names);
102 const wxString& name)
133 const wxString& name)
135 wxPanel::Create(parent,
id, pos,
size, style, name);
137 wxBoxSizer* sizer =
new wxBoxSizer(wxVERTICAL);
159 wxHyperlinkCtrl* delete_link =
161 delete_link->SetVisitedColour(delete_link->GetNormalColour());
166 wxStaticText* drop_text =
new wxStaticText(
this,
wxID_ANY,
wxT(
"Drop files here"));
215 const wxString& wildcard, wxWindow* parent)
245 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9)
254 if (wnd) wnd->Show(
false);
275 if (wnd) wnd->Show(
true);
284 wxString
file =
input->GetValue().Strip();
301 int id =
event.GetId();
322 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9)
323 input->SetValue(filename);
325 input->ChangeValue(filename);
333 wxButton* btn =
new wxBitmapButton(
m_ScrollWnd,
m_LastChildID++, wxArtProvider::GetBitmap(
wxT(
"menu::open")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
334 btn->SetToolTip(
wxT(
"Choose a file..."));
339 link->SetVisitedColour(link->GetNormalColour());
340 m_FileSizer->Add(link, 0, wxALIGN_BOTTOM | wxALL, 5);
355 wxWindow* btn = FindWindowById(link_id - 1,
m_ScrollWnd);
358 wxWindow* link = FindWindowById(link_id,
m_ScrollWnd);
367 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9)
368 m_Inputs[0]->SetValue(wxEmptyString);
370 m_Inputs[0]->ChangeValue(wxEmptyString);
381 long style = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
385 if (dlg.ShowModal() == wxID_OK) {
393 size_t n = paths.GetCount();
394 for (
size_t i = 0;
i <
n;
i++)
407 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9)
421 wxString s =
input->GetValue();
430 int paths_n = (
int)paths.size();
432 for (
int j =
i + 1; j < (
int)
m_Inputs.size() && i_p < paths_n; j++, i_p++ ) {
434 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9)
437 m_Inputs[j]->ChangeValue(paths[i_p]);
442 for( ; i_p < paths_n; i_p++ ) {
464 int id =
event.GetId();
470 int input_id =
id - 1;
485 txt_change_evt.SetString(txt);
486 txt_change_evt.SetClientData(
input);
487 GetEventHandler()->ProcessEvent(txt_change_evt);
CHyperlink is wrapper class for wxHyperlinkCtrl On OSX platform it posts URL click instead of sending...
static const struct name_t names[]
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size