(wxPanel* parent, wxWindowID
id,
constwxString &
label,
constwxPoint &pos,
constwxSize &
size,
longstyle) : wxButton(parent,
wxID_ANY,
label,pos,
size,style),
211m_OrigId(id), m_Position(pos), m_dragging(
false),
212m_locked(
true),m_removed(
false),m_Sizer(parent->GetSizer())
258 booloccupied =
false;
259wxRect
r= GetRect();
261wxSizerItemList& children =
m_Sizer->GetChildren();
262 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
264wxWindow* w = (*child)->GetWindow();
267 if(w ==
dynamic_cast<wxWindow*
>(
this))
271wxRect
r1= w->GetRect();
273 if(
r.Intersects(
r1))
286 intwidth = GetRect().GetWidth();
287 intheight = GetRect().GetHeight();
290wxSizerItemList& children = sizer->GetChildren();
291 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
293wxRect
r(x,y,width,height);
294wxWindow* w = (*child)->GetWindow();
297 if(w ==
dynamic_cast<wxWindow*
>(
this))
301wxRect
r1= w->GetRect();
302 if(
r1.GetTop() >
r.GetTop())
309 if(
r.Intersects(
r1))
313 if(x+width > sizer->GetContainingWindow()->GetRect().GetWidth() ||
row> 2)
334 if(p == wxDefaultPosition)
343 intbottom = panel->GetVirtualSize().y;
345 if(button_bottom > bottom)
346panel->SetVirtualSize(panel->GetVirtualSize().x, button_bottom);
401wxPoint mouseOnScreen = wxGetMousePosition();
403 if(
r.Contains(mouseOnScreen.x,mouseOnScreen.y))
416 if(!IsShownOnScreen())
418wxPoint mouseOnScreen = wxGetMousePosition();
420 if(
r.Contains(mouseOnScreen.x,mouseOnScreen.y))
436wxPoint mouseOnScreen = wxGetMousePosition();
454GetPosition(&cx,&cy);
473wxRect
r= w->GetScreenRect();
474 if(cx >
r.GetWidth())
483SetPosition( wxPoint(cx, cy) );
484 m_Position= wxPoint(w->CalcUnscrolledPosition(GetPosition()));
485 intbottom = w->GetVirtualSize().y;
487 if(button_bottom > bottom)
489w->SetVirtualSize(w->GetVirtualSize().x, button_bottom);
507GetPosition(&cx,&cy);
511 switch( event.GetKeyCode() )
513 caseWXK_LEFT : pos.x--;
MoveButton(pos); found =
true;
break;
514 caseWXK_RIGHT : pos.x += sdx+1;
MoveButton(pos); found =
true;
break;
515 caseWXK_UP : pos.y--;
MoveButton(pos); found =
true;
break;
516 caseWXK_DOWN : pos.y += sdy+1;
MoveButton(pos); found =
true;
break;
518 default:
event.Skip();
break;
530 CMovableButton(wxPanel* parent, wxWindowID
id,
constwxString &
label=wxEmptyString,
constwxPoint &pos=wxDefaultPosition,
constwxSize &
size=wxDefaultSize,
longstyle=0) :
IMovableButton(parent,id,
label,pos,
size,style) {}
558 CFeatureMovableButton(wxPanel* parent, wxWindowID
id,
CSeqFeatData::ESubtypesubtype,
constwxString &
label=wxEmptyString,
constwxPoint &pos=wxDefaultPosition,
constwxSize &
size=wxDefaultSize,
longstyle=0) :
IMovableButton(parent,id,
label,pos,
size,style),
CFeatureSubtypeSelector(subtype) {}
575 CFeatureMovableButtonNa(wxPanel* parent, wxWindowID
id,
CSeqFeatData::ESubtypesubtype,
constwxString &
label=wxEmptyString,
constwxPoint &pos=wxDefaultPosition,
constwxSize &
size=wxDefaultSize,
longstyle=0) :
IMovableButton(parent,id,
label,pos,
size,style),
CFeatureSubtypeSelector(subtype) {}
592 CFeatureMovableButtonAa(wxPanel* parent, wxWindowID
id,
CSeqFeatData::ESubtypesubtype,
constwxString &
label=wxEmptyString,
constwxPoint &pos=wxDefaultPosition,
constwxSize &
size=wxDefaultSize,
longstyle=0) :
IMovableButton(parent,id,
label,pos,
size,style),
CFeatureSubtypeSelector(subtype) {}
607m_MovingButton =
NULL;
636wxWindow*
main= GetGrandParent()->GetParent();
638 if(!e)
return false;
640wxSizer* sizer = GetSizer();
641wxSizerItemList& children = sizer->GetChildren();
643 intbottom = GetVirtualSize().y;
644 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
646wxWindow* w = (*child)->GetWindow();
653 if(p.x < 0 || p.y < 0)
657button->SetPosition(CalcScrolledPosition(p));
666 boolauto_layout = GetAutoLayout();
667SetAutoLayout(
false);
668SetVirtualSize(GetVirtualSize().x, bottom);
669SetAutoLayout(auto_layout);
678wxPoint p = evt.GetPosition();
686wxPoint scrollpos = GetViewStart();
688GetScrollPixelsPerUnit(&x,&y);
748wxString a_label =
a->GetLabel();
749wxString b_label =
b->GetLabel();
750 if(a_label[0].GetValue() ==
'*'&& b_label[0].GetValue() !=
'*')
752 if(a_label[0].GetValue() !=
'*'&& b_label[0].GetValue() ==
'*')
754 returna_label.CmpNoCase(b_label) < 0;
757IMPLEMENT_DYNAMIC_CLASS(
CButtonPanel, wxScrolledWindow )
920 if(autostart && !m_Instance->ShouldAutoStart())
922m_Instance->Destroy();
926m_Instance->Show(
true);
927m_Instance->SetFocus();
946 if(!instance.empty())
949title <<
" ("<< instance <<
")";
962wxFrame::Create( parent,
id,
_(
"Editing Buttons"), pos,
size, style );
966GetSizer()->SetSizeHints(
this);
1042wxColour bg_color = wxSystemSettings::GetColour(wxSYS_COLOUR_FRAMEBK);
1044 m_panel1->SetBackgroundColour(bg_color);
1045 m_panel2->SetBackgroundColour(bg_color);
1046 m_panel3->SetBackgroundColour(bg_color);
1083wxColourDialog dlg(
this);
1084 if(dlg.ShowModal() == wxID_OK)
1086 m_bg_color= dlg.GetColourData().GetColour();
1109wxPanel* itemPanel1 =
newwxPanel(
this,
wxID_ANY,wxPoint(0,20),wxSize(600,380));
1111wxBoxSizer* itemBoxSizer1 =
newwxBoxSizer(wxVERTICAL);
1112itemPanel1->SetSizer(itemBoxSizer1);
1115itemBoxSizer1->Add(
m_Notebook, 2, wxALL|wxGROW, 0);
1118 m_panel1->SetVirtualSize(-1, 1500);
1123 m_panel2->SetVirtualSize(-1, 1500);
1128 m_panel3->SetVirtualSize(-1, 1500);
1137 m_Sizer1=
newwxBoxSizer(wxVERTICAL);
1140 m_Sizer2=
newwxBoxSizer(wxVERTICAL);
1143 m_Sizer3=
newwxBoxSizer(wxVERTICAL);
1394wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxHORIZONTAL);
1395itemBoxSizer1->Add(itemBoxSizer2, 0, wxALL|wxEXPAND, 0);
1399itemBoxSizer2->Add(
m_CheckBox, 0, wxALIGN_LEFT|wxALL, 5);
1413wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
1414itemBoxSizer1->Add(itemBoxSizer3, 0, wxALL|wxEXPAND, 0);
1418itemBoxSizer3->Add(
m_AutoStart, 0, wxALIGN_LEFT|wxALL, 5);
1420 m_findButton=
newwxSearchCtrl( itemPanel1,
ID_FIND_BUTTON,wxEmptyString,wxDefaultPosition,wxDefaultSize,wxTE_PROCESS_ENTER);
1424itemBoxSizer3->Add(
m_findButton, 0, wxALIGN_LEFT|wxALL, 5);
1430wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
1431itemBoxSizer1->Add(itemBoxSizer4, 0, wxALL|wxEXPAND, 0);
1433wxHyperlinkCtrl* itemHyperLink1 =
newwxHyperlinkCtrl(itemPanel1,
ID_SET_BG_COLOR,
wxT(
"Set Background"),
wxT(
""));
1434itemHyperLink1->SetVisitedColour(itemHyperLink1->GetNormalColour());
1435itemBoxSizer4->Add(itemHyperLink1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
1437wxHyperlinkCtrl* itemHyperLink2 =
newwxHyperlinkCtrl(itemPanel1,
ID_RESET_BG_COLOR,
wxT(
"Reset Background"),
wxT(
""));
1438itemHyperLink2->SetVisitedColour(itemHyperLink2->GetNormalColour());
1439itemBoxSizer4->Add(itemHyperLink2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
1443 for(wxSizerItemList::iterator child = children1.begin(); child != children1.end(); ++child)
1445wxWindow* w = (*child)->GetWindow();
1487 returnwxFrame::TransferDataToWindow();
1492wxSizerItemList& children = sizer->GetChildren();
1493 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
1495wxWindow* w = (*child)->GetWindow();
1532 intold =
event.GetOldSelection();
1543 intcurrent =
event.GetSelection();
1568 boolfound =
false;
1572 if(sel != wxNOT_FOUND)
1577found = panel->
OnChar(evt);
1593vector<wxSizer*> sizers;
1597vector<IMovableButton*> buttons;
1598 for(
unsigned int i=0;
i<sizers.size();
i++)
1600wxSizer *sz = sizers[
i];
1609wxSizerItemList& children = sz->GetChildren();
1610 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
1612wxWindow* w = (*child)->GetWindow();
1617buttons.push_back(button);
1624 for(
unsigned int i=0;
i<buttons.size();
i++)
1625buttons[
i]->DeleteButton();
1634wxString
str=
event.GetString().Lower();
1635 if(!
str.IsEmpty())
1640 if(
label.Lower().Find(
str) == wxNOT_FOUND)
1660 intbutton_id = btn.first;
1661 stringfilename = btn.second;
1670 if(report_required)
1687 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
1689wxWindow* w = (*child)->GetWindow();
1694id_to_win[button->
GetOrigId()] = button;
1701 intwin_id =
i->first;
1705 for(vector<pair<int,wxPoint> >::const_iterator j =
i->second.begin(); j !=
i->second.end(); ++j)
1707 intx = j->second.x;
1708 inty = j->second.y;
1721button->SetPosition(win->CalcScrolledPosition(p));
1773 stringaction =
"Loading toolbar buttons layout registry - ";
1775 if( !path.empty() ){
1776 if( wxFileName::FileExists( path ) ){
1782 LOG_POST(
Error<< action <<
"registry file is invalid "<< path );
1785 LOG_POST(
Info<< action <<
"skipping, no file "<< path );
1788 LOG_POST(
Info<< action <<
"skipping, path is empty.");
1797 if(!coords.empty())
1800 while(
i< coords.size()-3 )
1802 int id= coords[
i];
1803 intx = coords[
i+1];
1804 inty = coords[
i+2];
1805 intwin = coords[
i+3];
1815 intwidth = 600,height = 400;
1819 intpos_x = 5, pos_y = 5;
1824 for(
unsigned int i= 0;
i< wxDisplay::GetCount();
i++)
1826wxDisplay display(
i);
1827max_x += display.GetGeometry().GetWidth();
1829 if(pos_x + width > max_x) pos_x = wxGetDisplaySize().GetWidth()-width-5;
1830 if(pos_x < 0) pos_x = 5;
1831 if(pos_y + height > wxGetDisplaySize().GetHeight()) pos_y = wxGetDisplaySize().GetHeight()-height-5;
1832 if(pos_y < 0) pos_y = 5;
1844vector<string> button_names;
1846vector<string> titles;
1858 for(
size_t i= 0;
i< ids.size();
i++)
1862 stringbutton_name = button_names[
i];
1863 stringtitle = titles[
i];
1875 for(
long i= ids.size() - 1;
i>= 0;
i--)
1880ids.erase(ids.begin() +
i);
1882button_names.erase(button_names.begin() +
i);
1883titles.erase(titles.begin() +
i);
1907vector<wxSizer*> sizers;
1911 for(
unsigned int i=0;
i<sizers.size();
i++)
1913wxSizer *sz = sizers[
i];
1919wxSizerItemList& children = sz->GetChildren();
1920 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
1922wxWindow* w = (*child)->GetWindow();
1928coords.push_back(button->
GetOrigId());
1931coords.push_back(col);
1932coords.push_back(
row);
1933coords.push_back(panel->GetId());
1943vector<string> button_names;
1944vector<string> titles;
1947 intbutton_id = btn.first;
1948 stringfilename = btn.second;
1953ids.push_back(button_id);
1955button_names.push_back(button_name);
1956titles.push_back(title);
1973 if( !path.empty() ){
1978 LOG_POST(
Info<<
"Saving window layout registry - skipping, path is empty");
1985 if(dlg.ShowModal() == wxID_OK)
1987wxString button_name = dlg.
GetName();
1990 if(filename.empty())
1996button->AddDynamicMenu();
1997button->SetRemoved(
true);
1999 if(report_required)
2016button->GetPosition(
NULL, &y);
2045pos =
static_cast<int>(
i);
2051vector<wxSizer *> sizers;
2055vector<IMovableButton *> buttons;
2056 for(
unsigned int i= 0;
i< sizers.size();
i++)
2058wxSizer *sz = sizers[
i];
2067wxSizerItemList& children = sz->GetChildren();
2068 for(wxSizerItemList::iterator child = children.begin(); child != children.end(); ++child)
2070wxWindow* w = (*child)->GetWindow();
2075buttons.push_back(btn);
2082 for(
size_t i=0;
i<buttons.size();
i++)
2083buttons[
i]->Destroy();
2098wxWindow* main_window =
NULL;
2110wxFileDialog asn_save_file(
this,
wxT(
"Export settings to file"), wxEmptyString, wxEmptyString,
2113wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
2115 if(asn_save_file.ShowModal() == wxID_OK)
2117wxString path = asn_save_file.GetPath();
2118 if( !path.empty() )
2125wxFileDialog asn_save_file(
this,
wxT(
"Import settings from file"), wxEmptyString, wxEmptyString,
2128wxFD_OPEN|wxFD_FILE_MUST_EXIST);
2130 if(asn_save_file.ShowModal() == wxID_OK)
2132wxString path = asn_save_file.GetPath();
2133 if( !path.empty() )
2161 returnwxNullBitmap;
2192sel_srv->GetActiveObjects(
objects);
2221 if(!ws)
return false;
2277vector<CRef<CSeq_loc> > locs;
2284 if(!sel_srv)
returnlocs;
2285sel_srv->GetCurrentSelection(
objects);
2288sel_srv->GetActiveObjects(
objects);
2295 if(
objects.empty())
returnlocs;
2299 const CObject* ptr = it->object.GetPointer();
2302 constobjects::CSeq_feat* seqfeat =
dynamic_cast<constobjects::CSeq_feat*
>(ptr);
2303 constobjects::CSeq_loc* seqloc =
dynamic_cast<constobjects::CSeq_loc*
>(ptr);
2304 constobjects::CBioseq* bioseq =
dynamic_cast<constobjects::CBioseq*
>(ptr);
2305 constobjects::CSeqdesc* seqdesc =
dynamic_cast<constobjects::CSeqdesc*
>(ptr);
2306 constobjects::CPubdesc* pubdesc =
dynamic_cast<constobjects::CPubdesc*
>(ptr);
2307 constobjects::CSeq_id* seq_id =
dynamic_cast<constobjects::CSeq_id*
>(ptr);
2310 if(seqfeat->IsSetLocation()) {
2312loc->
Assign(seqfeat->GetLocation());
2313locs.push_back(loc);
2315}
else if(seq_id) {
2319new_id->
Assign(*seq_id);
2321locs.push_back(loc);
2323}
else if(seqloc) {
2326locs.push_back(loc);
2327}
else if(bioseq) {
2329loc->
SetInt().SetId().Assign(*(bioseq->GetId().front()));
2330loc->
SetInt().SetFrom(0);
2331loc->
SetInt().SetTo(bioseq->GetLength() - 1);
2332locs.push_back(loc);
2333}
else if(seqdesc) {
2338loc->
SetInt().SetId().Assign(*(bi->
GetId().front().GetSeqId()));
2339loc->
SetInt().SetFrom(0);
2341locs.push_back(loc);
2344}
else if(pubdesc) {
2349loc->
SetInt().SetId().Assign(*(bi->
GetId().front().GetSeqId()));
2350loc->
SetInt().SetFrom(0);
2352locs.push_back(loc);
2390 boolfound =
false;
2395sel_srv->GetCurrentSelection(
objects);
2398sel_srv->GetActiveObjects(
objects);
2513wxWindow* main_window =
NULL;
2522report->Show(
true);
2527wxWindow* main_window =
NULL;
2562 if(regpath.empty() || !dlg)
2577 if(regpath.empty() || !dlg)
2585 if(width >= 0 && height >= 0)
2586dlg->SetSize(wxSize(width,height));
2591 if(pos_x >= 0 && pos_y >= 0) {
2593 for(
unsigned i= 0;
i< wxDisplay::GetCount();
i++)
2595wxDisplay display(
i);
2596max_x += display.GetGeometry().GetWidth();
2598 if(pos_x + width > max_x) pos_x = wxGetDisplaySize().GetWidth()-width-5;
2599 if(pos_y + height > wxGetDisplaySize().GetHeight()) pos_y = wxGetDisplaySize().GetHeight()-height-5;
2601dlg->SetPosition(wxPoint(pos_x,pos_y));
2603wxTopLevelWindow* top_win =
dynamic_cast<wxTopLevelWindow*
>(dlg);
2606wxRect rc = dlg->GetRect();
2609dlg->Move(rc.GetLeftTop());
2618vector< CIRef<IFileLoadPanelClientFactory> > file_formats;
2622 for(
size_t i= 0;
i< file_formats.size(); ++
i) {
2623 if(file_formats[
i]->GetFileLoaderId() ==
"file_loader_qual_table") {
2624format_manager.
Reset(file_formats[
i]->CreateInstance());
2626 if(
"file_loader_qual_table"== format_manager->GetFileLoaderId()) {
2628 if(const_qual_mgr) {
2640wxTextDataObject
data;
2641 if(wxTheClipboard->Open())
2643 if(wxTheClipboard->IsSupported( wxDF_UNICODETEXT ))
2644wxTheClipboard->GetData(
data);
2645wxTheClipboard->Close();
2648 if(
data.GetText().length() == 0) {
2649wxMessageBox(
"No data in clipboard for table");
2655fname =
f.GetFileName();
2658vector<wxString> fnames;
2666dlg.SetSize(760, 940);
2667dlg.Centre(wxBOTH | wxCENTRE_ON_SCREEN);
2668dlg.SetMinSize(wxSize(760, 750));
2672 if(dlg.ShowModal() == wxID_OK) {
2676 CFiletmp_file(fname);
2702 autostart_all = chrono::steady_clock::now();
2704 autodiff_all = chrono::steady_clock::now() - start_all;
2705 LOG_POST(
Info<<
"Removing all features took: "<< chrono::duration_cast<chrono::seconds>(diff_all).
count() <<
" s");
2740wxWindow* main_window =
NULL;
2755wxWindow* main_window =
NULL;
2783wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
2787edit_dlg->Show(
true);
2821wxWindow* main_window =
NULL;
2828 if(dlg.ShowModal() == wxID_OK) {
2900 if(dlg.ShowModal() == wxID_OK)
2940 if(dlg.ShowModal() == wxID_OK) {
2948wxMessageBox(
error,
wxT(
"Error"),
2949wxOK | wxICON_ERROR,
NULL);
2968wxWindow* main_window =
NULL;
2990 if(dlg.ShowModal() == wxID_OK) {
2998wxMessageBox(
error,
wxT(
"Error"),
2999wxOK | wxICON_ERROR,
NULL);
3039 if(dlg.ShowModal() == wxID_OK)
3070wxWindow* main_window =
NULL;
3090 if(dlg.ShowModal() == wxID_OK) {
3098wxMessageBox(
error,
wxT(
"Error"),
3099wxOK | wxICON_ERROR,
NULL);
3156 if(dlg.ShowModal() == wxID_OK)
3202 boolispartial5 =
true, ispartial3 =
true;
3212 boolispartial5 =
true, ispartial3 =
true;
3222 boolispartial5 =
true, ispartial3 =
true;
3247wxWindow* main_window =
NULL;
3252dlg->
Show(
true);
3342wxWindow* main_window =
NULL;
3590wxMessageBox(e.
GetMsg(),
wxT(
"Error"), wxOK | wxICON_ERROR,
NULL);
3604wxMessageBox(e.
GetMsg(),
wxT(
"Error"), wxOK | wxICON_ERROR,
NULL);
3639vector<string> format_ids;
3640format_ids.push_back(
"file_loader_qual_table");
3641fileManager->LoadFormats(format_ids);
3644 for(
size_t i= 0;
i< fileManager->GetFormatManagers().
size(); ++
i) {
3649 if(const_qual_mgr) {
3657vector<CIRef<IOpenObjectsPanelClient> > loadManagers;
3661dlg.SetSize(760, 940);
3662dlg.Centre(wxBOTH | wxCENTRE_ON_SCREEN);
3663dlg.SetMinSize(wxSize(760, 750));
3668 if(dlg.ShowModal() == wxID_OK) {
3682 if(dlg.ShowModal() == wxID_OK) {
3693 if(dlg.ShowModal() == wxID_OK)
3721 return first->Equals(*second);
3731 if(dlg.ShowModal() == wxID_OK) {
3737vector<CRef<CSeq_loc> > cpy = orig_locs;
3738vector<CRef<CSeq_loc> >::iterator lit = cpy.begin();
3739 while(lit != cpy.end()) {
3741 if(!
b||
b.IsAa()) {
3742lit = cpy.erase(lit);
3753stable_sort(cpy.begin(), cpy.end(),
CompLoc);
3754cpy.erase(unique(cpy.begin(), cpy.end(),
EqualLoc), cpy.end());
3761 cmd->AddCommand(*subcmd);
3804 if(dlg.ShowModal() == wxID_OK)
3880 boolispartial5 =
true;
3881 boolispartial3 =
true;
3890 boolispartial5 =
true;
3891 boolispartial3 =
true;
3900 boolispartial5 =
true;
3901 boolispartial3 =
true;
3910 boolispartial5 =
true;
3911 boolispartial3 =
true;
3920 boolispartial5 =
true;
3921 boolispartial3 =
true;
3977 boolshow_label =
true;
3986 boolshow_label =
true;
3995 boolshow_label =
true;
4004 boolshow_label =
true;
4013 boolshow_label =
true;
4027 if(dlg.ShowModal() == wxID_OK){
4040wxMessageBox(
_(
"Please select a single Bioseq"),
wxT(
"Error"), wxOK | wxICON_ERROR,
NULL);
4057wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
4061edit_dlg->Show(
true);
4069wxWindow* main_window =
NULL;
4089 if(!macro_dir.DirExists()) {
4090 if(!macro_dir.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL)) {
4091 LOG_POST(
Error<<
"Cannot create directory '"<<
string(macro_dir.GetPath().ToUTF8()) <<
"'");
4096wxFileName macro_file(macro_dir.GetPath(), filename);
4097 if(!macro_file.FileExists()) {
4098 const stringorig_location =
"<std>/etc/macro_scripts/";
4100 if(!orig_path.DirExists()) {
4104wxFileName orig_file(orig_path.GetPath(), filename);
4105wxFileName dst_file(macro_dir.GetPath(), filename);
4106 if(!wxCopyFile(orig_file.GetFullPath(), dst_file.GetFullPath())) {
4107 LOG_POST(
Error<<
"Cannot copy '"<< filename <<
"' to location '"<<
string(macro_dir.GetPath().ToUTF8()) <<
"'");
4111 return string(macro_file.GetFullPath().ToUTF8());
4123 charusername[1024];
4125 return string(username);
4133 if(orig_dir_path.empty() || upd_dir_path.empty()) {
4137 CDirdir(upd_dir_path);
4139 for(
auto& it : files) {
4143 stringfilename = it->GetName();
4154 if(lcl_chksum == upd_chksum) {
4157 else if(lcl_chksum == orig_chksum) {
4159 CFilelcl(lcl_filename);
4161 CFileupd(upd_filename);
4162 if(upd.
CopyToDir(
string(lcl_dir.GetFullPath().ToUTF8()))) {
4164 if(!username.empty()) {
4168 LOG_POST(
Error<<
"Cannot copy '"<< upd_filename <<
"' to location '"<<
string(lcl_dir.GetFullPath().ToUTF8()) <<
"'");
4174 if(!username.empty()) {
4376 stringtitle, filename;
4378 booladd_user_object =
false;
4380 switch(event.GetId()) {
4383title =
"Autofix(WGS)";
4388add_user_object =
true;
4392title =
"Autofix(TSA)";
4398 int id=
event.GetId();
4405 if(macros.empty() && filename.empty()) {
4410wxWindow* main_window =
NULL;
4415 const stringkMacroReport(
" Macro Report");
4418 ITERATE(wxWindowList, wit, main_window->GetChildren()){
4419wxWindow* child = *wit;
4427 boolstatus =
false;
4429 if(!macros.empty()) {
4432 else if(!filename.empty()) {
4438 if(!status || report_msg.empty()) {
4439report_msg.assign(
"Macro had no effect");
4442title.append(kMacroReport);
4451report->Show(
true);
4457vector<string> macro;
4459 booladd_user_object =
false;
4460 boolresolve_vars =
false;
4461 switch(event.GetId()) {
4464add_user_object =
true;
4467resolve_vars =
true;
4471 int id=
event.GetId();
4476 if(macro.empty() && filename.empty()) {
4483 if(!macro.empty()) {
4486 else if(!filename.empty()) {
4494 if(dlg.ShowModal() == wxID_OK)
4538wxWindow* main_window =
NULL;
4622seqdesc->
SetUser().
Assign(*edit::CGenomeAssemblyComment::MakeEmptyUserObject());
4627wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
4631edit_dlg->Show(
true);
4645new_feat->
SetData().SetProt().AutoFixEC();
4646new_feat->
SetData().SetProt().RemoveBadEC();
4661sel_srv->GetActiveObjects(
objects);
4669wxMessageBox(
_(
"Select a single Seq-entry"),
wxT(
"Error"), wxOK | wxICON_ERROR,
NULL);
4673vector<CBioseq_Handle> bioseqs;
4677 const CObject* ptr = it->object.GetPointer();
4680 constobjects::CBioseq* bioseq =
dynamic_cast<constobjects::CBioseq*
>(ptr);
4686bioseqs.push_back(bsh);
4689 constobjects::CSeq_loc* loc =
dynamic_cast<constobjects::CSeq_loc*
>(ptr);
4695bioseqs.push_back(bsh);
4700 if(bioseqs.size() == 1)
4701seh = bioseqs.front().GetSeq_entry_Handle();
4705wxMessageBox(
_(
"No Seq-entry selected"),
wxT(
"Error"), wxOK | wxICON_ERROR,
NULL);
4752sel_srv->GetActiveObjects(
objects);
4758 if(
objects.empty())
return;
4765 if(dlg.ShowModal() == wxID_OK)
4773wxWindow* main_window =
NULL;
4793wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
4797edit_dlg->Show(
true);
4803 boolmodified =
false;
4811edited_desc->
Assign(*desc_it);
4814 cmd->AddCommand(*change_molinfo);
4820edited_object->
Assign(seq_it->GetInst());
4826 cmd->AddCommand(*change_inst);
4832 boolfound =
false;
4838edited_desc->
Assign(*desc_it);
4841 cmd->AddCommand(*change_molinfo);
4849edited_object->
Assign(seq_it->GetInst());
4855 cmd->AddCommand(*change_inst);
4902wxWindow* main_window =
NULL;
4907dlg->
Show(
true);
4933frame->Show(
true);
4973 if(!
objects->GetData().front().object)
4976 static const stringsViewType(
"Sequin Desktop View");
4981prjSrv->AddProjectView(sViewType,
objects->GetData(), 0).GetPointer();
5013wxWindow* main_window =
NULL;
5032wxWindow* main_window =
NULL;
5041sel_srv->GetActiveObjects(
objects);
5050wxMessageBox(
wxT(
"No objects found"),
wxT(
"Error"), wxOK | wxICON_ERROR);
5057wxMessageBox(
wxT(
"Cannot determine scope"),
wxT(
"Error"), wxOK | wxICON_ERROR);
5060 constCSeq_loc* loc =
NULL;
5064 constCSeq_loc* obj_loc =
dynamic_cast<constCSeq_loc*
>(o.object.GetPointer());
5074wxMessageBox(
wxT(
"The selection is not a bioseq"),
wxT(
"Error"), wxOK | wxICON_ERROR);
5079wxMessageBox(
wxT(
"Multiple bioseqs in scope, opening the first one only"),
wxT(
"Warning"), wxOK | wxICON_ERROR);
5083 if(!loc->IsWhole())
5100wxMessageBox(
wxT(
"No bioseq selected"),
wxT(
"Error"), wxOK | wxICON_ERROR);
5106wxWindow* main_window =
NULL;
5120wxWindow* main_window =
NULL;
5133wxFileDialog asn_save_file(main_window,
wxT(
"Save ASN.1 File"),
m_WorkDir, wxEmptyString,
5136wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
5138 if(asn_save_file.ShowModal() == wxID_OK)
5140wxString path = asn_save_file.GetPath();
5141 if( !path.IsEmpty())
5166 if(dlg.ShowModal() == wxID_OK) {
5175wxMessageBox(
error,
wxT(
"Error"),
5176wxOK | wxICON_ERROR,
NULL);
@ eExtreme_Positional
numerical value
User-defined methods of the data storage class.
void RemoveTitlesSeqEntry(CSeq_entry_Handle seh, const CSeq_entry &entry, CCmdComposite *composite)
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
CSeq_entry_Handle GetSeqEntryForSeqdesc(CRef< CScope > scope, const CSeqdesc &seq_desc)
void ConfigureAutodefParamsForBestCombo(SAutodefParams ¶ms, objects::CSeq_entry_Handle seh)
void ConfigureAutodefParamsForID(SAutodefParams ¶ms, objects::CSeq_entry_Handle seh)
unsigned int ConfigureParamsForPrefixCombo(SAutodefParams ¶ms, objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > InstantiateProteinTitles(objects::CSeq_entry_Handle entry)
CRef< CCmdComposite > AutodefSeqEntryNoTitle(objects::CSeq_entry_Handle entry, SAutodefParams *params, bool docsum_only=false)
Checksum and hash calculation classes.
void SetInitParameters(EActionType action_type, EFieldType field_type, const string &field=kEmptyStr, const wxString &title=wxEmptyString)
@ eFieldType_StructuredComment
@ eActionType_RemoveTextOutside
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
wxString GetName() const override
string GetFileName() const
void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProccessor)
static void ExportDialog(IWorkbench *workbench)
CRef< CCmdComposite > GetCommand()
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
void x_TableReaderMacro(bool modal=false)
void ShowSourceOptions(bool show)
void SetParams(SAutodefParams *params)
void PopulateParams(SAutodefParams ¶ms)
static CRef< objects::CSeq_feat > MakeDefaultFeature(objects::CSeqFeatData::ESubtype subtype)
CRef< CCmdComposite > GetCommand()
void SetEditingType(EEditingType editing_type)
void ChooseFeatureType(objects::CSeqFeatData::ESubtype subtype)
CRef< CCmdComposite > GetCommand()
CRef< CCmdComposite > GetCommand()
CRef< CCmdComposite > GetCommand()
virtual bool OnChar(wxKeyEvent &event)
virtual void OnKeyDown(wxKeyEvent &event)
void SetMovingButton(IMovableButton *btn, bool dragging)
IMovableButton * CreateButton(wxWindow *w, int x, int y)
virtual void onMouseClick(wxMouseEvent &evt)
IMovableButton * m_MovingButton
CChecksum â Checksum calculator.
ncbi::objects::CBioseq_set::EClass GetClass()
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, bool capitalize_after_colon)
virtual void SetRegistryPath(const string &path)
static CDiscrepancyDlg * OpenDiscrepancyDlg(EReportType type, CScope &scope, IWorkbench *workbench, const wxString &workDir=wxEmptyString)
void SetEditorWindow(wxWindow *editorWindow)
void SetEditor(CIRef< IEditObject > editor)
virtual void SetWorkDir(const wxString &workDir)
virtual void SetUndoManager(ICommandProccessor *cmdProccessor)
void RemoveTextOutsideString(wxCommandEvent &evt)
void AddGSet(wxCommandEvent &event)
void ValidateSeq(wxCommandEvent &event)
void OnSetBackground(wxHyperlinkEvent &event)
void ParseText(wxCommandEvent &evt)
void PrefixHaplotToDefLine(wxCommandEvent &event)
void OnFixOrgModInstitution(wxCommandEvent &event)
void AutodefMisc(wxCommandEvent &evt)
void ApplyDbxrefs(wxCommandEvent &event)
void EditFeatQual(wxCommandEvent &evt)
void Add_rRNA(wxCommandEvent &evt)
void SwapCGPQual(wxCommandEvent &evt)
void AddDefaultMacroButtons()
bool IsLocationSelectedAa()
void RemoveStaticButtons(vector< int > &ids, vector< string > &filenames, vector< string > &button_names, vector< string > &titles)
void TrimOrganismNames(wxCommandEvent &event)
void EditSequence(wxCommandEvent &event)
void Add_gene(wxCommandEvent &evt)
void RemoveUnverified(wxCommandEvent &event)
CSeq_entry_Handle x_GetSelectedSeq()
void RemoveSourceQual(wxCommandEvent &evt)
virtual void LoadSettings()
void AutodefDefaultOptions(wxCommandEvent &evt)
void OnStripAuthorSuffixes(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON13
void RemoveDupFeats(wxCommandEvent &evt)
void OnMergePrimerSets(wxCommandEvent &event)
void RunMacro(wxCommandEvent &event)
void ParseStrainSerotypeFromNames(wxCommandEvent &event)
void RevComp16S(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON24
void OnFixCapitalizationAll(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON4
void OnAddCitSubForUpdate(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON19
void OnRemoveAuthorConsortiums(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON14
void EditFeatureEvidence(wxCommandEvent &evt)
void SaveASN1File(wxCommandEvent &event)
vector< CRef< CSeq_loc > > m_Locations
void OnAppendModToOrg(wxCommandEvent &event)
void ApplyCGPQual(wxCommandEvent &evt)
void OnRemoveAllStructuredComments(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON27
void OnCancelFindButton(wxCommandEvent &event)
void OnRemoveDescriptors(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON25
void OnCallerTool(wxCommandEvent &event)
void ImportFeatureTableClipboard(wxCommandEvent &event)
void ConvertSourceQual(wxCommandEvent &evt)
void TaxFixCleanup(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON11
void ShowAfter(wxWindow *dlg)
void ParseTextFromDefline(wxCommandEvent &evt)
void AddTranslExcept(wxCommandEvent &event)
void OnAssignFeatureIds(wxCommandEvent &event)
void AddNamedrRNALarge(wxCommandEvent &event)
void RunMacroWithReport(wxCommandEvent &event)
virtual void SaveSettings() const
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void RemoveAllFeatures(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON12
void FixupOrganismNames(wxCommandEvent &event)
ICommandProccessor * m_CmdProccessor
void RemoveFeatQual(wxCommandEvent &evt)
void ConvertCGPQual(wxCommandEvent &evt)
void RemoveUnreviewed(wxCommandEvent &event)
void EditPubs(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2
void ApplyRNAQual(wxCommandEvent &evt)
void RemoveRNAQual(wxCommandEvent &evt)
void SplitStructuredCollections(wxCommandEvent &event)
void AddCDS(wxCommandEvent &event)
void OnAddrRNA16S(wxCommandEvent &event)
void LaunchDesktop(wxCommandEvent &event)
void OnAddStructuredCommentKeyword(wxCommandEvent &event)
void ExtendPartialsConstr(wxCommandEvent &evt)
void PrefixOrgToDefLine(wxCommandEvent &event)
void IllegalQualsToNote(wxCommandEvent &event)
void LowercaseQuals(wxCommandEvent &evt)
void BulkEdit(wxCommandEvent &event)
void OnConvertComment(wxCommandEvent &event)
void ConvertRNAQual(wxCommandEvent &evt)
wxButton * m_exportTabsButton
void AddSequences(wxCommandEvent &event)
void EditSourceQual(wxCommandEvent &evt)
bool IsLocationSelected()
void EditButton(IMovableButton *button)
void MacroEditor(wxCommandEvent &event)
void SegregateSets(wxCommandEvent &event)
void TableReaderFromClipboard(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON10
void BulkEditRNA(wxCommandEvent &event)
void OnAddrRNA23S(wxCommandEvent &event)
void RemoveCGPQual(wxCommandEvent &evt)
void AddMicrosatellite(wxCommandEvent &event)
void StrainToSp(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON26
void OnResetBackground(wxHyperlinkEvent &event)
void OnFixCapitalizationTitles(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON6
void AddNamedrRNASmall(wxCommandEvent &event)
void AddRNA(wxCommandEvent &event)
void PrefixStrainToDefLine(wxCommandEvent &event)
void RetranslateCDS(wxCommandEvent &event)
void EditCGPQual(wxCommandEvent &evt)
void LabelrRNAs(wxCommandEvent &event)
void OnFixCapitalizationAffiliation(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON7
void BulkEditCDS(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON28
void AddNamedrRNA28S(wxCommandEvent &event)
void OnReorderStructuredComment(wxCommandEvent &event)
void EditSubmitBlock(wxCommandEvent &event)
wxButton * m_resetTabsButton
void OnResetTabs(wxCommandEvent &event)
void DiscrepancyReport(wxCommandEvent &event)
wxButton * m_importTabsButton
void OnRemoveGenomeProjectsDB(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON21
void CreateControls()
Creates the controls and sizers.
void EditRNAQual(wxCommandEvent &evt)
void ApplySourceQual(wxCommandEvent &event)
void VectorTrim(wxCommandEvent &event)
void OnFixiInPrimerSeqs(wxCommandEvent &event)
CConstRef< CSeq_submit > m_SeqSubmit
void EditStructField(wxCommandEvent &evt)
void UpdateMultSeqClipboard(wxCommandEvent &event)
void RetranslateCDS_NoStp(wxCommandEvent &event)
void OnRemoveUnpublishedPublications(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON9
void OnFindButton(wxCommandEvent &event)
void OnReorderSequences(wxCommandEvent &event)
void OnAddMacroClick(wxCommandEvent &event)
void UnculTaxTool(wxCommandEvent &event)
objects::CSeq_entry_Handle m_TopSeqEntry
void OnMegaReport(wxCommandEvent &event)
void UpdateSingleSeqClipboard(wxCommandEvent &event)
void RmCultureNotes(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON23
bool Create(wxWindow *parent, wxWindowID id=10020, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(600, 400), long style=wxDEFAULT_FRAME_STYLE)
Creation.
vector< CRef< CSeq_loc > > x_GetSelectedLocations()
void TrimNsTerminal(wxCommandEvent &event)
void RmWrongOrIllegalQuals(wxCommandEvent &event)
void OnParseCollectionDateDayFirst(wxCommandEvent &event)
void x_LockButtons(wxSizer *sizer, bool locked)
map< int, vector< pair< int, wxPoint > > > m_MovableButtonPosition
void OnReverseAuthorNamesClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
map< int, string > m_dynamic_buttons_name
void ClickableSortUniqueCount(wxCommandEvent &event)
void BulkEditMiscFeat(wxCommandEvent &event)
void OnRemoveStructuredCommentKeyword(wxCommandEvent &event)
void SetFrameAndPosition()
CEditingBtnsPanel()
Constructors.
void OnRemoveDefLines(wxCommandEvent &event)
void ShowFeatureTable(wxCommandEvent &event)
void CorrectGenes(wxCommandEvent &event)
bool IsLocationSelectedNa()
void RemProtTitles(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON22
void SetPanelsBackgroundColour()
void AddControlRegion(wxCommandEvent &event)
void CreateFeature(wxCommandEvent &evt)
void PrefixListToDefLine(wxCommandEvent &event)
void ExtendPartialsAll(wxCommandEvent &evt)
void ExportTable(wxCommandEvent &evt)
void AutodefOptions(wxCommandEvent &evt)
map< int, string > m_dynamic_buttons_filename
wxSearchCtrl * m_findButton
void AddOtherFeature(wxCommandEvent &event)
void OnRemoveBankitComment(wxCommandEvent &event)
void OnRemoveSequences(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON20
void OnImportBtnClick(wxCommandEvent &event)
void AddStrainSerotypeToNames(wxCommandEvent &event)
void AddIsolSource(wxCommandEvent &evt)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void ApplyFeatQual(wxCommandEvent &evt)
vector< IMovableButton * > m_all_buttons
void GroupExplode(wxCommandEvent &event)
void OnClickLock(wxCommandEvent &event)
void RemoveTextInsideStr(wxCommandEvent &evt)
void OnAddrRNA18S(wxCommandEvent &event)
void SwapRNAQual(wxCommandEvent &evt)
void ParseLocalIdToSrc(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3
void SelectTarget(wxCommandEvent &event)
void AutodefNoMods(wxCommandEvent &evt)
void SequesterSets(wxCommandEvent &event)
void OnParseCollectionDateMonthFirst(wxCommandEvent &event)
void PrefixCultivarToDefLine(wxCommandEvent &event)
void RemoveButton(IMovableButton *button)
void RemoveSrcNotes(wxCommandEvent &evt)
void Save(wxCommandEvent &evt)
void OnCountryFixupCap(wxCommandEvent &event)
void ImportFeatureTable(wxCommandEvent &event)
wxButton * m_AddMacroButton
void BarcodeTool(wxCommandEvent &event)
wxBoxSizer * m_SizerRemoved
void TrimNsRich(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON16
void rRNAtoDNA(wxCommandEvent &event)
void RmIllegalQuals(wxCommandEvent &event)
void AutodefRefresh(wxCommandEvent &evt)
void OnExportBtnClick(wxCommandEvent &event)
void AddDefLine(wxCommandEvent &event)
void ConvertFeatures(wxCommandEvent &evt)
void SwapFeatQual(wxCommandEvent &evt)
void MolInfoEdit(wxCommandEvent &evt)
void OnFixCapitalizationAuthors(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON5
void SwapSourceQual(wxCommandEvent &evt)
void AutodefPopset(wxCommandEvent &evt)
void MrnaCds(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON18
static CEditingBtnsPanel * m_Instance
static bool ShowToolTips()
Should we show tooltips?
void FindASN1(wxCommandEvent &evt)
void ECNumberCleanup(wxCommandEvent &evt)
void AutodefId(wxCommandEvent &evt)
void OnSwapPrimerSeqName(wxCommandEvent &event)
void AddNamedrRNA12S(wxCommandEvent &event)
void Add_misc_feat(wxCommandEvent &evt)
void AnnotateDescriptorComment(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON17
void AddSet(wxCommandEvent &event)
void AddNamedrRNA26S(wxCommandEvent &event)
~CEditingBtnsPanel()
Destructor.
void OnParseComment(wxCommandEvent &event)
CButtonPanel * m_panel_removed
void BulkGeneEdit(wxCommandEvent &event)
void SplitQualifiersAtCommas(wxCommandEvent &event)
void OnRemoveFeatures(wxCommandEvent &event)
void SetTextViewBackgroundColour(const wxColour &color)
void SortUniqueCount(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON8
void CreateDescGenomeAssemblyComment(wxCommandEvent &evt)
virtual bool TransferDataToWindow()
Transfer data to the window.
void Init()
Initialises member variables.
void OnCountryFixupNoCap(wxCommandEvent &event)
void TableReader(wxCommandEvent &event)
void OnChar(wxKeyEvent &evt)
void PrefixCloneToDefLine(wxCommandEvent &event)
void RmWrongQuals(wxCommandEvent &event)
void ConvertCdsToMiscFeat(wxCommandEvent &evt)
void PT_Cleanup(wxCommandEvent &event)
void OnSplitPrimerSets(wxCommandEvent &event)
void ConvertFeatQual(wxCommandEvent &evt)
map< int, string > m_dynamic_buttons_title
void EditFeatureLocation(wxCommandEvent &evt)
virtual void SetRegistryPath(const string ®_path)
void WrongQualsToNote(wxCommandEvent &event)
void OnNotebookTabChanged(wxBookCtrlEvent &event)
void PrefixIsolateToDefLine(wxCommandEvent &event)
void SaveTable(const wxString &workDir=wxEmptyString)
virtual ~CFeatureMovableButtonAa()
CFeatureMovableButtonAa(wxPanel *parent, wxWindowID id, CSeqFeatData::ESubtype subtype, const wxString &label=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
CFeatureMovableButtonAa()
virtual bool VerifySelection(CEditingBtnsPanel *e)
virtual bool VerifySelection(CEditingBtnsPanel *e)
virtual ~CFeatureMovableButtonNa()
CFeatureMovableButtonNa(wxPanel *parent, wxWindowID id, CSeqFeatData::ESubtype subtype, const wxString &label=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
CFeatureMovableButtonNa()
virtual bool VerifySelection(CEditingBtnsPanel *e)
virtual ~CFeatureMovableButton()
CFeatureMovableButton(wxPanel *parent, wxWindowID id, CSeqFeatData::ESubtype subtype, const wxString &label=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
virtual ~CFeatureSubtypeSelector()
virtual CSeqFeatData::ESubtype GetSubtype()
CSeqFeatData::ESubtype m_Subtype
CFeatureSubtypeSelector()
CFeatureSubtypeSelector(CSeqFeatData::ESubtype subtype)
void SetWorkDir(const wxString &workDir)
static wxString GetDialogFilter(EFileType fileType)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
wxString GetWorkDir() const
CUndoManager & GetUndoManager()
void SetText(const wxString &text)
void SetRefresh(IRefreshCntrl *refresh)
static void apply(IWorkbench *wb, ICommandProccessor *cmd_processor, CScope &scope)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
void Write(CNcbiOstream &ostr, int priority=ePriority_Local) const
Write the local policy to a specified stream.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
CRef< CRegistryFile > AddSite(CNcbiIstream &istr, int priority)
Add a site-specific repository.
CIRef< IEditCommand > ImportFeaturesFromClipboard(const wxString &workDir)
CIRef< IEditCommand > ImportFeaturesFromFile(const wxString &workDir=wxEmptyString, const string &format_id=kEmptyStr)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, wxWindow *parent)
bool apply(IWorkbench *wb, ICommandProccessor *cmdProcessor, const string &title, CScope &scope)
static CMacroFlowEditor * GetInstance(wxWindow *parent, CRef< IGuiCoreHelper > gui_core_helper, wxWindowID id=15000, const wxString &caption=_("Macro Flow Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(1500, 1000), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX)
void OpenScript(const wxString &path, bool recent_scripts, bool allow_empty)
static const char * sm_AutofixWGS
vector< string > TVecMacroNames
static const char * sm_AutofixGB
static TVecMacroNames s_GetMacroSteps(const CTempString ¯o_class)
bool ExecuteMacros(const vector< string > ¯o_names, CNcbiOstrstream &log, bool add_user_object=false, bool resolve_vars=false)
static const char * sm_AutofixTSA
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand()
virtual ~CMovableButton()
virtual bool VerifySelection(CEditingBtnsPanel *e)
CMovableButton(wxPanel *parent, wxWindowID id, const wxString &label=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
void SetManagers(vector< CIRef< IOpenObjectsPanelClient > > &managers)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, bool monthFirst)
void SetFromFieldType(EFieldType field_type)
void SetToFieldType(EFieldType field_type)
CRef< CCmdComposite > GetCommand()
void PopulateModifierCombo()
void SetParams(SAutodefParams *params)
CProjectService - a service providing API for operations with Workspaces and Projects.
virtual void SetFilenames(const vector< wxString > &filenames)
initilize the manager with the given filenames
virtual void SetServiceLocator(IServiceLocator *srv_locator)
Sets / unsets Service Locator.
CAttribTableColumnIdPanel * x_GetColumnIdPanel()
void SetTopLevelEntry(CSeq_entry_Handle seq_entry)
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
bool GetBool(const string &key, bool default_val=false) const
void GetIntVec(const string &key, vector< int > &val) const
string GetString(const string &key, const string &default_val=kEmptyStr) const
void GetStringVec(const string &key, vector< string > &val) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
CRef< CCmdComposite > GetCommand()
static void RemoveDuplicateFeatures(objects::CSeq_entry_Handle tse, ICommandProccessor *processor)
static void RemoveAllFeatures_Ex(CSeq_entry_Handle seh, ICommandProccessor *processor)
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
CRef< CCmdComposite > GetCommand()
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > Apply(objects::CSeq_entry_Handle tse)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
CRef< CCmdComposite > GetCommand()
virtual bool Show(bool show=1)
Report opening events in dialogs used in the editing package.
@ eRetranslateCDSChooseFrame
@ eRetranslateCDSIgnoreStopExceptEnd
void apply(objects::CSeq_entry_Handle seh, ICommandProccessor *cmdProcessor, string title, ERetranslateMethod method)
bool ApplyToPubdesc(CConstRef< CObject > obj, objects::CSeq_entry_Handle tse, CCmdComposite &composite)
void SetSeqUpdateType(ESeqUpdateType update_type)
void UpdateMultipleSequences(IWorkbench *workbench, const objects::CSeq_entry_Handle &tse, ICommandProccessor *cmdProcessor)
void UpdateSingleSequence(IWorkbench *workbench, const objects::CSeq_entry_Handle &tse, ICommandProccessor *cmdProcessor) const
namespace ncbi::objects::
Base class for all serializable objects.
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, const string &title)
@ eCommandInfluenza_fixup
@ eCommandTrimOrganismNames
@ eCommandSplitQualsAtCommas
@ eCommandSplitStructuredCollections
@ eCommandInfluenza_parse
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
static wxString ResolvePath(const wxString &path, const wxString &rel_name)
Utility function to hide the platform specifics of locating our standard directories and files.
static void SetDoInference(objects::CUser_object ¶ms, bool val)
static void SetDoAlignment(objects::CUser_object ¶ms, bool val)
static void SetTextBackground(const wxColor &color)
CTextItemPanel * GetWidget() const
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, wxWindow *parent, const wxString &workDir, const CSequenceAmbigTrimmer::TTrimRuleVec &trim_rules=CSequenceAmbigTrimmer::GetDefaultTrimRules())
static void GetInstance(wxWindow *parent, IWorkbench *workbench, CRef< objects::CUser_object > params, wxWindowID id=17000, const wxString &caption=_("Validation Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(900, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
CWorkbench - default implementation of IWorkbench.
static void RmWrongQuals(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void RmWrongOrIllegalQuals(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void IllegalQualsToNote(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void WrongQualsToNote(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void RmIllegalQuals(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
virtual string GetFileLoaderId() const =0
void SetScrollPos(wxPoint scrollpos)
wxPoint GetOrigPosition()
virtual void SetDragging(bool dragging)
virtual wxPoint FindUnoccupiedPosition(wxSizer *sizer=NULL)
void CopyButton(wxSizer *sizer, wxPoint p)
void OnPopupClick(wxCommandEvent &evt)
void OnPopupClickUpdate(wxUpdateUIEvent &event)
virtual void OnRightClick(wxContextMenuEvent &evt)
virtual void MoveButton(wxPoint mousePos)
virtual void SetSizers(wxWindow *win_top=NULL, wxSizer *sizer1=NULL, wxSizer *sizer2=NULL, wxSizer *sizer3=NULL, wxSizer *sizer_removed_actual=NULL)
void SetOriginalPosition(wxPoint p)
virtual bool OnChar(wxKeyEvent &event)
virtual bool IsOccupiedPosition()
virtual void onMouseClick(wxCommandEvent &evt)
virtual void SetLocked(bool locked)
virtual bool VerifySelection(CEditingBtnsPanel *e)=0
virtual void OnKeyDown(wxKeyEvent &evt)
virtual void SetRemoved(bool removed)
wxSizer * m_TopSizerRemoved
class IProjectView defines the abstract interface for views observing projects.
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, CConstRef< objects::CSeq_submit > submit=CConstRef< objects::CSeq_submit >(nullptr))
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
IViewManagerService IViewManagerService manages views in Workbench.
virtual wxWindow * GetWindow()=0
returns a pointer to the wxWindow representing the client
IWorkbench is the central interface in the application framework.
unsigned int m_MiscFeatRule
CRef< CCmdComposite > GetCommand()
void SetWorkDir(const wxString &workDir)
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
int main(int argc, const char *argv[])
static const char * kFrameDlgHeight
static const char * kFramePosX
static const char * kBGColor
static Uint4 s_GetCheckSumForFile(const string &filename)
static const char * kFrameDlgPosX
static const char * kFrameHeight
static bool EqualLoc(CRef< CSeq_loc > first, CRef< CSeq_loc > second)
static bool comp_buttons(const IMovableButton *a, const IMovableButton *b)
static const char * kBGColorSet
static const char * kSettingsVersion
static const char * kFilenamesArray
static const char * kDynIdsArray
static const char * kAutoStart
#define DIST_BETWEEN_BUTTONS
static const char * kFrameDlgPosY
static const char * kNamesArray
static string s_GetMacroScriptLocation(const string &filename)
static const char * kFrameDlgWidth
static bool CompLoc(CRef< CSeq_loc > first, CRef< CSeq_loc > second)
static const char * kEditingButtonsPanelLayout
static const char * kFramePosY
static const char * kCoordsArray
static const char * kFrameWidth
static const char * kTitlesArray
static string s_GetUsername()
static void s_UpdateMacros()
#define ID_CHECKBOX_AUTOSTART
#define ID_CHECKBOX_COLLAPSE
#define ID_BUTTON_DYNAMIC
#define ID_RESET_BG_COLOR
#define ID_NOTEBOOK_PANEL
std::ofstream out("events_result.xml")
main entry point for tests
CRef< CCmdComposite > CreateControlRegion(objects::CSeq_entry_Handle entry)
CRef< CCmdComposite > AddNamedrRna(objects::CSeq_entry_Handle entry, string rna_name, bool ispartial5, bool ispartial3)
CRef< CCmdComposite > CreateMicrosatellite(objects::CSeq_entry_Handle entry)
string DirName(const string &path)
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
void AddFile(const string &file_path)
Update checksum with the file data.
Uint4 GetChecksum(void) const
Return calculated checksum.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
void Info(CExceptionArgs_Base &args)
TEntries GetEntries(const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const
Get directory entries based on the specified "mask".
virtual bool Remove(TRemoveFlags flags=eRecursive) const
Remove a directory entry.
static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)
Assemble a path from basic components.
static string ConcatPathEx(const string &first, const string &second)
Concatenate two parts of the path for any OS.
bool CopyToDir(const string &dir, TCopyFlags flags=fCF_Default, size_t buf_size=0) const
Copy the entry to a specified directory.
@ eIfExists_ReturnCurrent
Return reference to current stream, create new one if it does not exists yet.
@ eNoRemove
Do not remove file.
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
vector< CIRef< IView > > TViews
virtual wxFrame * GetMainWindow()
returns a pointer to the main application frame window
virtual void GetViews(TViews &views)=0
get all registered views
objects::CSeq_entry_Handle GetTopSeqEntryFromScopedObject(SConstScopedObject &obj)
objects::CSeq_entry_Handle GetSeqEntryForPubdesc(CRef< objects::CScope > scope, const objects::CPubdesc &pubdesc)
void GetExtensionAsInterface(const string &ext_point_id, vector< CIRef< I > > &interfaces)
GetExtensionAsInterface() is a helper function that extracts all extensions implementing the specifie...
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
vector< SConstScopedObject > TConstScopedObjects
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define MSerial_AsnText
I/O stream manipulators â.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
string GetLabel(const CSeq_id &id)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
vector< STrimRule > TTrimRuleVec
Multiple STrimRules are allowed, which are applied from smallest bases_to_check to largest bases_to_c...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
TInst_Length GetInst_Length(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
CRef< CSeq_loc > GetRangeSeq_loc(TSeqPos start, TSeqPos stop, ENa_strand strand=eNa_strand_unknown) const
Return CSeq_loc referencing the given range and strand on the bioseq If start == 0,...
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
const TId & GetId(void) const
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
TObjectType * GetPointerOrNull(void) THROWS_NONE
Get pointer value.
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
const char * CORE_GetUsername(char *buf, size_t bufsize)
Equivalent to CORE_GetUsernameEx(buf, bufsize, eNCBI_UsernameLogin) except that it always returns non...
static const char label[]
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsProt(void) const
Check if variant Prot is selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
void ResetStrand(void)
Reset Strand data member.
TComment & SetComment(void)
Select the variant.
void SetTopology(TTopology value)
Assign a value to Topology data member.
void SetBiomol(TBiomol value)
Assign a value to Biomol data member.
TUser & SetUser(void)
Select the variant.
TMolinfo & SetMolinfo(void)
Select the variant.
void SetMol(TMol value)
Assign a value to Mol data member.
@ e_Molinfo
info on the molecule and techniques
@ eMol_na
just a nucleic acid
const TSub & GetSub(void) const
Get the Sub member data.
bool IsSetSub(void) const
Check if a value has been assigned to Sub data member.
unsigned int
A callback function used to compare two keys in a database.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
Macro engine for macro execution.
Functions used in the DO/DONE section affecting the top seq-entry.
void GetViewObjects(IWorkbench *workbench, TConstScopedObjects &objects)
const TYPE & Get(const CNamedParameterList *param)
void ReportMacroToBeUpdated(const string &username, const string &filename, const string &action)
Report attempt to update a local macro script.
constexpr auto sort(_Init &&init)
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
static PyObject * Connect(PyObject *self, PyObject *args, PyObject *kwargs)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
bool AddOrgToDefline(objects::CSeq_entry_Handle seh, CCmdComposite *composite)
bool AddModToDefline(objects::CSeq_entry_Handle entry, CCmdComposite *composite, const objects::CAutoDefAvailableModifier &mod, bool show_label)
wxEVT_COMMAND_MENU_SELECTED
static const sljit_gpr r1
#define row(bind, expected)
For example, if bases_to_check is 10 and max_bases_allowed_to_be_ambig is 5, then on each iteration w...
static void SetTitle(CRef< CSeq_entry > entry, string title)
CRef< CCmdComposite > CleanupCommand(objects::CSeq_entry_Handle orig_seh, bool extended, bool do_tax)
CRef< CCmdComposite > GetRmCultureNotesCommand(objects::CSeq_entry_Handle seh)
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
void CorrectWindowRect(wxTopLevelWindow *win, wxRect &rc)
wxRect GetScreenRect(const wxWindow &win)
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