wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
87 Create(parent,
id, caption, pos,
size, style);
96 constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
99SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
100wxPanel::Create( parent,
id, pos,
size, style );
105GetSizer()->SetSizeHints(
this);
143wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
144itemPanel1->SetSizer(itemBoxSizer2);
146wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
147itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
149wxStaticText* itemStaticText4 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Feature ID for this feature"), wxDefaultPosition, wxDefaultSize, 0 );
150itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
153itemBoxSizer3->Add(
m_FeatureIdCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
155wxStaticText* itemStaticText6 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"ID Xref to associated features (* indicates non-reciprocal link)"), wxDefaultPosition, wxDefaultSize, 0 );
156itemBoxSizer2->Add(itemStaticText6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
158 m_ScrolledWindow=
newwxScrolledWindow( itemPanel1,
wxID_ANY, wxDefaultPosition, wxSize(500, 100), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
159itemBoxSizer2->Add(
m_ScrolledWindow, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
161 m_Sizer=
newwxBoxSizer(wxVERTICAL);
171wxBoxSizer* sizer =
newwxBoxSizer(wxHORIZONTAL);
172 m_Sizer->Add(sizer, 0, wxALIGN_LEFT, 0);
175sizer->Add(xref, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5);
179sizer->Add(del, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
181wxStaticText*
id=
newwxStaticText(
m_ScrolledWindow, wxID_STATIC,
wxT(
"identifier"), wxDefaultPosition, wxDefaultSize, 0 );
182sizer->Add(
id, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
192 if((*xit)->IsSetId() && (*xit)->GetId().IsLocal())
194 if((*xit)->GetId().GetLocal().IsStr())
196 stringxref = (*xit)->GetId().GetLocal().GetStr();
199 else if((*xit)->GetId().GetLocal().IsId())
215 if(!wxPanel::TransferDataToWindow()) {
252vector<CConstRef<CFeat_id>> present_featids;
257 if((*xit)->IsSetId() && (*xit)->GetId().IsLocal())
259 const CFeat_id& featid = (*xit)->GetId();
260 if((*xit)->IsSetData() && (*xit)->GetData().IsGene()) {
261present_featids.push_back(
ConstRef(&featid));
271 if(seq_feat.
GetXref().empty())
276 for(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)
278wxTextCtrl* win =
dynamic_cast<wxTextCtrl*
>(*child);
281 string value= win->GetValue().ToStdString();
287 for(
auto&& it : present_featids) {
288 if(x->GetId().Equals(it.GetObject())) {
295seq_feat.
SetXref().push_back(x);
305 if(!one.IsSetId() || !two.
IsSetXref()) {
308 for(
autoit : two.
GetXref()) {
309 if(it->IsSetId() && it->GetId().IsLocal() &&
310one.GetId().Equals(it->GetId())) {
322wxHyperlinkCtrl* lastdel =
NULL;
323 for(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)
325wxTextCtrl* win =
dynamic_cast<wxTextCtrl*
>(*child);
326wxHyperlinkCtrl* del =
dynamic_cast<wxHyperlinkCtrl*
>(*child);
327wxStaticText* descr =
dynamic_cast<wxStaticText*
>(*child);
329 string value= win->GetValue().ToStdString();
345 if(handles.size() == 0) {
346descr->SetLabel(
_(
"No features with this ID"));
347}
else if(handles.size() == 1) {
348 const CSeq_feat& feat = *(handles.front().GetSeq_feat());
352descr->SetLabel(
"Feature links to itself!");
354 stringcontent_label;
357content_label =
"(*)"+ content_label;
362descr->SetLabel(
_(
"Multiple features with this ID"));
366descr->SetLabel(wxEmptyString);
371lastdel->Enable(
false);
378 if(!wxPanel::TransferDataFromWindow()) {
454wxWindow *win =
dynamic_cast<wxWindow*
>(
event.GetEventObject());
459 for(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)
463wxSizer *sizer = win->GetContainingSizer();
478wxWindowList::reverse_iterator last_child =
m_ScrolledWindow->GetChildren().rbegin();
480wxTextCtrl* childwin =
dynamic_cast<wxTextCtrl*
>(*last_child);
482 if(childwin == win) {
496wxTextCtrl *win =
dynamic_cast<wxTextCtrl*
>(
event.GetEventObject());
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CHyperlink is wrapper class for wxHyperlinkCtrl On OSX platform it posts URL click instead of sending...
void OnDelete(wxHyperlinkEvent &event)
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=ID_CIDENTIFIERSPANEL, const wxString &caption=_("IdentifiersPanel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnNewText(wxCommandEvent &event)
void Init()
Initialises member variables.
CRef< objects::CScope > m_Scope
void SetIdXrefs(objects::CSeq_feat &seq_feat)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void PopulateIdentifiers(objects::CSeq_feat &seq_feat)
void x_UpdateXrefDescriptions()
bool x_IsReciprocalXref(const objects::CSeq_feat &one, const objects::CSeq_feat &two)
CRef< objects::CSeq_feat > m_EditedFeat
void CreateControls()
Creates the controls and sizers.
wxScrolledWindow * m_ScrolledWindow
~CIdentifiersPanel()
Destructor.
bool x_IsLastXref(wxTextCtrl *win)
wxTextCtrl * m_FeatureIdCtrl
void AddXref(const string &value)
virtual bool TransferDataToWindow()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual bool TransferDataFromWindow()
CIdentifiersPanel()
Constructors.
namespace ncbi::objects::
TSeq_feat_Handles GetFeaturesWithId(CSeqFeatData::E_Choice type, TFeatureIdInt id) const
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
objects::CBioseq_Handle GetBioseqForSeqFeat(const objects::CSeq_feat &f, objects::CScope &scope)
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
string GetLabel(const CSeq_id &id)
const CTSE_Handle & GetTSE_Handle(void) const
Get CTSE_Handle of containing TSE.
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
bool IsStr(void) const
Check if variant Str is selected.
bool IsId(void) const
Check if variant Id is selected.
TStr & SetStr(void)
Select the variant.
TId & SetId(void)
Select the variant.
TXref & SetXref(void)
Assign a value to Xref data member.
const TId & GetId(void) const
Get the Id member data.
const TLocal & GetLocal(void) const
Get the variant data.
bool IsSetXref(void) const
cite other relevant features Check if a value has been assigned to Xref data member.
TLocal & SetLocal(void)
Select the variant.
void ResetId(void)
Reset Id data member.
void SetId(TId &value)
Assign a value to Id data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
const TXref & GetXref(void) const
Get the Xref member data.
vector< CRef< CSeqFeatXref > > TXref
void ResetXref(void)
Reset Xref data member.
@ e_not_set
No variant selected.
static void s_SetFeatId(CFeat_id &feat_id, string val)
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Utility macros and typedefs for exploring NCBI objects from seqfeat.asn.
#define ERASE_SEQFEATXREF_ON_SEQFEAT(Itr, Var)
ERASE_SEQFEATXREF_ON_SEQFEAT.
#define EDIT_EACH_SEQFEATXREF_ON_SEQFEAT(Itr, Var)
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