: m_CmdProcessor(cmdproc), m_Seh(seh)
100SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY);
101wxPanel::Create( parent,
id, pos,
size, style );
106GetSizer()->SetSizeHints(
this);
149wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
150itemPanel1->SetSizer(itemBoxSizer2);
152wxFlexGridSizer* itemFlexGridSizer3 =
newwxFlexGridSizer(0, 1, 0, 0);
153itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_HORIZONTAL |wxALL, 5);
155wxFlexGridSizer* itemFlexGridSizer4 =
newwxFlexGridSizer(0, 2, 0, 0);
156itemFlexGridSizer3->Add(itemFlexGridSizer4, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);
158wxStaticText* itemStaticText6 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Assembly date"), wxDefaultPosition, wxDefaultSize, 0 );
159itemFlexGridSizer4->Add(itemStaticText6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
161wxStaticText* itemStaticText7 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Assembly name"), wxDefaultPosition, wxDefaultSize, 0 );
162itemFlexGridSizer4->Add(itemStaticText7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
168 m_AssemblyDate->
SetToolTip(
_(
"Year, month or day the assembly was made. Date formats:\nYYYY-MM-DD; YYYY-MM; YYYY"));
169itemFlexGridSizer4->Add(
m_AssemblyDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM|wxALL, 0);
173 m_AssemblyName->SetToolTip(
_(
"This field is usually left blank, especially for prokaryotes, but is available for the name that you are using in your manuscript or abstract to describe this assembly. A good assembly name generally includes:\n - a short 3-4 letter abbreviation for the institution,\n - a 4-6 letter abbreviation of the organism name,\n - and a version.\nFor example, UCLA_Agam_2.1 for version 2.1 of the Anopheles gambiae genome from a lab in UCLA. For the organism name abbreviation, avoid the 3+3 \"genus + species\" format (e.g. \"PanTro\" for Pan troglodytes) since that could cause conflicts with the UCSC database name; we recommend formats such as 1+3 or 2+4 for the \"genus + species\" instead (e.g. PTro or PaTrog). Do not use the full scientific name, in case that name changes in the future."));
174itemFlexGridSizer4->Add(
m_AssemblyName, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM|wxALL, 5);
176itemFlexGridSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL, 5);
178wxBoxSizer* itemBoxSizer10 =
newwxBoxSizer(wxHORIZONTAL);
179itemFlexGridSizer3->Add(itemBoxSizer10, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
181wxStaticText* itemStaticText11 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Assembly method"), wxDefaultPosition, wxDefaultSize, 0 );
182itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_LEFT |wxALL, 5);
185itemBoxSizer10->Add(32, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
186 #elif __WXOSX_COCOA__ 187itemBoxSizer10->Add(55, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
189itemBoxSizer10->Add(65, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
191wxStaticText* itemStaticText13 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Version or Date program was run"), wxDefaultPosition, wxDefaultSize, 0 );
192itemBoxSizer10->Add(itemStaticText13, 0, wxALIGN_LEFT |wxALL, 5);
198 m_Sizer=
newwxFlexGridSizer(0, 2, 0, 0);
201 for(
size_tindex = 0; index <
m_Rows; ++index) {
205wxHyperlinkCtrl* itemHyperlinkCtrl16 =
newwxHyperlinkCtrl( itemPanel1,
ID_GAASSEMBLYHYPERLINK,
_(
"Add another assembly method"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
206itemFlexGridSizer3->Add(itemHyperlinkCtrl16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
223 m_Sizer->Add(
row, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 0);
225itemHyperLink->SetVisitedColour(itemHyperLink->GetNormalColour());
226 m_Sizer->Add(itemHyperLink, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 0);
233 introw_width, row_height;
234 row->GetClientSize(&row_width, &row_height);
236 intlink_width, link_height;
237itemHyperLink->GetClientSize(&link_width, &link_height);
238 if(link_height > row_height) {
239row_height = link_height;
241row_width += link_width;
261wxWindow *win =
dynamic_cast<wxWindow*
>(
event.GetEventObject());
266 for(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)
270wxSizer *sizer = win->GetContainingSizer();
362 if(aname && aname->IsSetData() && aname->GetData().IsStr()) {
366 if(adate && adate->IsSetData() && adate->GetData().IsStr() &&
m_AssemblyDate) {
371 if(field && field->IsSetData() && field->GetData().IsStr()) {
372 stringvallist = field->GetData().GetStr();
382 while(vals.size() > num_rows) {
386 autos = vals.begin();
392 if(s == vals.end()) {
409vector<string> dmy(3);
418 else if(!dmy[1].
empty() && !dmy[2].
empty())
420dmy.erase(dmy.begin());
422 else if(!dmy[2].
empty())
424dmy.erase(dmy.begin());
425dmy.erase(dmy.begin());
437adate.SetData().SetStr(date);
453 stringnew_val =
row->GetValue();
454 if(!new_val.empty()) {
460 if(!
val.empty()) {
468method.SetData().SetStr(
val);
475 constobjects::CComment_rule& rule = rules->FindCommentRule(
"Genome-Assembly-Data");
476rule.ReorderFields(*
m_User);
497 boolany_changes =
false;
499 for(objects::CBioseq_CI bi(
m_Seh, objects::CSeq_inst::eMol_na); bi; ++bi)
502 for(objects::CSeqdesc_CI di(*bi, objects::CSeqdesc::e_User); di; ++di)
504 if(di && di->IsUser() && di->GetUser().GetObjectType() == objects::CUser_object::eObjectType_StructuredComment &&
505 NStr::Equal(objects::CComment_rule::GetStructuredCommentPrefix(di->GetUser()),
"Genome-Assembly-Data"))
511 if(!di->Equals(*cpy))
514 cmd->AddCommand(*chg);
526new_desc->SetUser(*
m_User);
527objects::CBioseq_set_Handle parent = bi->GetParentBioseq_set();
528 autoentry = bi->GetParentEntry();
529 if(parent && parent.IsSetClass() && parent.GetClass() == objects::CBioseq_set::eClass_nuc_prot)
530entry = parent.GetParentEntry();
532 cmd->AddCommand(*cmdAddDesc);
void SetToolTip(const wxString &tipString)
void SetDate(const objects::CDate &a_date)
CRef< objects::CUser_object > m_User
CFlexibleDatePanel * m_AssemblyDate
virtual bool TransferDataToWindow()
bool Create(wxWindow *parent, wxWindowID id=ID_CGASSEMBLYPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
void x_AddRowToWindow(wxWindow *row)
virtual bool TransferDataFromWindow()
void ApplyUser(objects::CUser_object &user)
void OnDeleteAssembly(wxHyperlinkEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnAddNewAssemblyMethod(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_GAASSEMBLYHYPERLINK
ICommandProccessor * m_CmdProcessor
void CreateControls()
Creates the controls and sizers.
CGAssemblyPanel()
Constructors.
void Init()
Initialises member variables.
wxTextCtrl * m_AssemblyName
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
static bool ShowToolTips()
Should we show tooltips?
~CGAssemblyPanel()
Destructor.
objects::CSeq_entry_Handle m_Seh
wxScrolledWindow * m_ScrolledWindow
virtual void ApplyCommand()
wxFlexGridSizer * m_Sizer
void SetValue(const string &val)
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
const string kAssemblyDate
const string kAssemblyMethod
const string kAssemblyName
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static string & ToUpper(string &str)
Convert string to upper case â string& version.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
#define row(bind, expected)
wxString ToWxString(const string &s)
string ToStdString(const wxString &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