A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/identifiers__panel_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/edit/identifiers_panel.cpp Source File

41 #include <wx/bitmap.h> 43 #include <wx/choice.h> 44 #include <wx/textctrl.h> 45 #include <wx/stattext.h> 46 #include <wx/valtext.h> 47 #include <wx/toplevel.h> 81

wxWindowID

id

,

const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

87  Create

(parent,

id

, caption, pos,

size

, style);

96  const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

99 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

100

wxPanel::Create( parent,

id

, pos,

size

, style );

105

GetSizer()->SetSizeHints(

this

);

143

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

144

itemPanel1->SetSizer(itemBoxSizer2);

146

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

147

itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

149

wxStaticText* itemStaticText4 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Feature ID for this feature"

), wxDefaultPosition, wxDefaultSize, 0 );

150

itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

153

itemBoxSizer3->Add(

m_FeatureIdCtrl

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

155

wxStaticText* itemStaticText6 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"ID Xref to associated features (* indicates non-reciprocal link)"

), wxDefaultPosition, wxDefaultSize, 0 );

156

itemBoxSizer2->Add(itemStaticText6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

158  m_ScrolledWindow

=

new

wxScrolledWindow( itemPanel1,

wxID_ANY

, wxDefaultPosition, wxSize(500, 100), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );

159

itemBoxSizer2->Add(

m_ScrolledWindow

, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);

161  m_Sizer

=

new

wxBoxSizer(wxVERTICAL);

171

wxBoxSizer* sizer =

new

wxBoxSizer(wxHORIZONTAL);

172  m_Sizer

->Add(sizer, 0, wxALIGN_LEFT, 0);

175

sizer->Add(xref, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5);

179

sizer->Add(del, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);

181

wxStaticText*

id

=

new

wxStaticText(

m_ScrolledWindow

, wxID_STATIC,

wxT

(

"identifier"

), wxDefaultPosition, wxDefaultSize, 0 );

182

sizer->Add(

id

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

192  if

((*xit)->IsSetId() && (*xit)->GetId().IsLocal())

194  if

((*xit)->GetId().GetLocal().IsStr())

196  string

xref = (*xit)->GetId().GetLocal().GetStr();

199  else if

((*xit)->GetId().GetLocal().IsId())

215  if

(!wxPanel::TransferDataToWindow()) {

252

vector<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()) {

261

present_featids.push_back(

ConstRef

(&featid));

271  if

(seq_feat.

GetXref

().empty())

276  for

(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)

278

wxTextCtrl* win =

dynamic_cast<

wxTextCtrl*

>

(*child);

281  string value

= win->GetValue().ToStdString();

287  for

(

auto

&& it : present_featids) {

288  if

(x->GetId().Equals(it.GetObject())) {

295

seq_feat.

SetXref

().push_back(x);

305  if

(!one.IsSetId() || !two.

IsSetXref

()) {

308  for

(

auto

it : two.

GetXref

()) {

309  if

(it->IsSetId() && it->GetId().IsLocal() &&

310

one.GetId().Equals(it->GetId())) {

322

wxHyperlinkCtrl* lastdel =

NULL

;

323  for

(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)

325

wxTextCtrl* win =

dynamic_cast<

wxTextCtrl*

>

(*child);

326

wxHyperlinkCtrl* del =

dynamic_cast<

wxHyperlinkCtrl*

>

(*child);

327

wxStaticText* descr =

dynamic_cast<

wxStaticText*

>

(*child);

329  string value

= win->GetValue().ToStdString();

345  if

(handles.size() == 0) {

346

descr->SetLabel(

_

(

"No features with this ID"

));

347

}

else if

(handles.size() == 1) {

348  const CSeq_feat

& feat = *(handles.front().GetSeq_feat());

352

descr->SetLabel(

"Feature links to itself!"

);

354  string

content_label;

357

content_label =

"(*)"

+ content_label;

362

descr->SetLabel(

_

(

"Multiple features with this ID"

));

366

descr->SetLabel(wxEmptyString);

371

lastdel->Enable(

false

);

378  if

(!wxPanel::TransferDataFromWindow()) {

454

wxWindow *win =

dynamic_cast<

wxWindow*

>

(

event

.GetEventObject());

459  for

(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)

463

wxSizer *sizer = win->GetContainingSizer();

478

wxWindowList::reverse_iterator last_child =

m_ScrolledWindow

->GetChildren().rbegin();

480

wxTextCtrl* childwin =

dynamic_cast<

wxTextCtrl*

>

(*last_child);

482  if

(childwin == win) {

496

wxTextCtrl *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