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/gassembly__panel_8cpp_source.html below:

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

46 #include <wx/scrolwin.h> 47 #include <wx/stattext.h> 48 #include <wx/textctrl.h> 49 #include <wx/datectrl.h> 50 #include <wx/datetime.h> 86

: m_CmdProcessor(cmdproc), m_Seh(seh)

100 

SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY);

101

wxPanel::Create( parent,

id

, pos,

size

, style );

106

GetSizer()->SetSizeHints(

this

);

149

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

150

itemPanel1->SetSizer(itemBoxSizer2);

152

wxFlexGridSizer* itemFlexGridSizer3 =

new

wxFlexGridSizer(0, 1, 0, 0);

153

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

155

wxFlexGridSizer* itemFlexGridSizer4 =

new

wxFlexGridSizer(0, 2, 0, 0);

156

itemFlexGridSizer3->Add(itemFlexGridSizer4, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);

158

wxStaticText* itemStaticText6 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Assembly date"

), wxDefaultPosition, wxDefaultSize, 0 );

159

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

161

wxStaticText* itemStaticText7 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Assembly name"

), wxDefaultPosition, wxDefaultSize, 0 );

162

itemFlexGridSizer4->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"

));

169

itemFlexGridSizer4->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."

));

174

itemFlexGridSizer4->Add(

m_AssemblyName

, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM|wxALL, 5);

176

itemFlexGridSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL, 5);

178

wxBoxSizer* itemBoxSizer10 =

new

wxBoxSizer(wxHORIZONTAL);

179

itemFlexGridSizer3->Add(itemBoxSizer10, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

181

wxStaticText* itemStaticText11 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Assembly method"

), wxDefaultPosition, wxDefaultSize, 0 );

182

itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_LEFT |wxALL, 5);

185

itemBoxSizer10->Add(32, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

186 #elif __WXOSX_COCOA__ 187

itemBoxSizer10->Add(55, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

189

itemBoxSizer10->Add(65, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

191

wxStaticText* itemStaticText13 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Version or Date program was run"

), wxDefaultPosition, wxDefaultSize, 0 );

192

itemBoxSizer10->Add(itemStaticText13, 0, wxALIGN_LEFT |wxALL, 5);

198  m_Sizer

=

new

wxFlexGridSizer(0, 2, 0, 0);

201  for

(

size_t

index = 0; index <

m_Rows

; ++index) {

205

wxHyperlinkCtrl* itemHyperlinkCtrl16 =

new

wxHyperlinkCtrl( itemPanel1,

ID_GAASSEMBLYHYPERLINK

,

_

(

"Add another assembly method"

), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );

206

itemFlexGridSizer3->Add(itemHyperlinkCtrl16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

223  m_Sizer

->Add(

row

, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 0);

225

itemHyperLink->SetVisitedColour(itemHyperLink->GetNormalColour());

226  m_Sizer

->Add(itemHyperLink, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 0);

233  int

row_width, row_height;

234  row

->GetClientSize(&row_width, &row_height);

236  int

link_width, link_height;

237

itemHyperLink->GetClientSize(&link_width, &link_height);

238  if

(link_height > row_height) {

239

row_height = link_height;

241

row_width += link_width;

261

wxWindow *win =

dynamic_cast<

wxWindow*

>

(

event

.GetEventObject());

266  for

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

270

wxSizer *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  string

vallist = field->GetData().GetStr();

382  while

(vals.size() > num_rows) {

386  auto

s = vals.begin();

392  if

(s == vals.end()) {

409

vector<string> dmy(3);

418  else if

(!dmy[1].

empty

() && !dmy[2].

empty

())

420

dmy.erase(dmy.begin());

422  else if

(!dmy[2].

empty

())

424

dmy.erase(dmy.begin());

425

dmy.erase(dmy.begin());

437

adate.SetData().SetStr(date);

453  string

new_val =

row

->GetValue();

454  if

(!new_val.empty()) {

460  if

(!

val

.empty()) {

468

method.SetData().SetStr(

val

);

475  const

objects::CComment_rule& rule = rules->FindCommentRule(

"Genome-Assembly-Data"

);

476

rule.ReorderFields(*

m_User

);

497  bool

any_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);

526

new_desc->SetUser(*

m_User

);

527

objects::CBioseq_set_Handle parent = bi->GetParentBioseq_set();

528  auto

entry = bi->GetParentEntry();

529  if

(parent && parent.IsSetClass() && parent.GetClass() == objects::CBioseq_set::eClass_nuc_prot)

530

entry = 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