SetDataObject(
newwxFileDataObject);
66wxFileDataObject *dobj = (wxFileDataObject *)m_dataObject;
67wxArrayString
filenames= dobj->GetFilenames();
69vector<wxString>
names;
72 for(
size_t i= 0;
i<
n;
i++)
77 if(def == wxDragMove || def == wxDragLink || def == wxDragCopy) {
78m_Input.AddFilenames(
names);
102 constwxString& name)
106 Create(parent,
id, pos,
size, style, name);
133 constwxString& name)
135wxPanel::Create(parent,
id, pos,
size, style, name);
137wxBoxSizer* sizer =
newwxBoxSizer(wxVERTICAL);
159wxHyperlinkCtrl* delete_link =
161delete_link->SetVisitedColour(delete_link->GetNormalColour());
166wxStaticText* drop_text =
newwxStaticText(
this,
wxID_ANY,
wxT(
"Drop files here"));
215 constwxString& wildcard, wxWindow* parent)
245 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9) 254 if(wnd) wnd->Show(
false);
275 if(wnd) wnd->Show(
true);
284wxString
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);
333wxButton* btn =
newwxBitmapButton(
m_ScrollWnd,
m_LastChildID++, wxArtProvider::GetBitmap(
wxT(
"menu::open")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
334btn->SetToolTip(
wxT(
"Choose a file..."));
339link->SetVisitedColour(link->GetNormalColour());
340 m_FileSizer->Add(link, 0, wxALIGN_BOTTOM | wxALL, 5);
355wxWindow* btn = FindWindowById(link_id - 1,
m_ScrollWnd);
358wxWindow* 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 longstyle = 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) 410 m_Inputs[0]->ChangeValue(paths[0]);
421wxString s =
input->GetValue();
430 intpaths_n = (
int)paths.size();
432 for(
intj =
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 intinput_id =
id- 1;
485txt_change_evt.SetString(txt);
486txt_change_evt.SetClientData(
input);
487GetEventHandler()->ProcessEvent(txt_change_evt);
static const wxEventType s_InputTxtChangedEvt
event id for any filename text change events
CHyperlink is wrapper class for wxHyperlinkCtrl On OSX platform it posts URL click instead of sending...
CDropTarget(CMultiFileInput &input)
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)
virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult def)
void x_DeleteAllFilenames()
void AddFilenames(const vector< wxString > &filenames)
void SetDlgParent(wxWindow *parent)
void SetDefaultDir(const wxString &dir)
void GetFilenames(vector< wxString > &filenames) const
void SetWildcard(const wxString &wildcard)
void x_SendFileTxtChangedEvt(CAdvancedFileInput *input, const wxString &txt)
wxFlexGridSizer * m_FileSizer
void SetDlgTitle(const wxString &title)
vector< wxString > m_SaveFilenames
void x_DeleteFilename(int link_id)
void OnBrowseBtn(wxCommandEvent &event)
void SetSingleMode(bool single)
virtual ~CMultiFileInput()
wxScrolledWindow * m_ScrollWnd
wxString GetWildcard() const
void Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
void SetDlgAttrs(const wxString &title, const wxString &dir, const wxString &wildcard, wxWindow *parent)
void OnLink(wxHyperlinkEvent &event)
void SetFilenames(const vector< wxString > &filenames)
wxString GetDefaultDir() const
void x_AddFilenameRow(const wxString &filename)
vector< CAdvancedFileInput * > m_Inputs
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
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