42 #include <wx/button.h>
78 wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
90 bool CApplyGCode::Create( wxWindow* parent, wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
93 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
94 wxDialog::Create( parent,
id, caption, pos,
size, style );
99 GetSizer()->SetSizeHints(
this);
127 m_GenCodes.push_back(pair<string,int>((*it)->GetName(), (*it)->GetId()));
162 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
163 itemDialog1->SetSizer(itemBoxSizer2);
166 codes.Add(wxEmptyString);
174 m_Code =
new wxChoice( itemDialog1,
wxID_ANY, wxDefaultPosition, wxDefaultSize, codes, 0 );
176 itemBoxSizer2->Add(
m_Code, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
178 wxBoxSizer* itemBoxSizer12 =
new wxBoxSizer(wxHORIZONTAL);
179 itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
181 wxButton* itemButton13 =
new wxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
182 itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
184 wxButton* itemButton14 =
new wxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
185 itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
236 new_feat->
Assign(feat_it->GetOriginalFeature());
247 if ((*it)->IsSource()) {
250 new_desc->
Assign(orig_desc);
267 if (
m_Code->GetSelection() > 0)
279 biosource.
SetOrg().SetOrgname().SetMgcode() = id;
281 biosource.
SetOrg().SetOrgname().ResetMgcode();
293 biosource.
SetOrg().SetOrgname().SetPgcode() = id;
295 biosource.
SetOrg().SetOrgname().ResetPgcode();
299 biosource.
SetOrg().SetOrgname().SetGcode() = id;
301 biosource.
SetOrg().SetOrgname().ResetGcode();
308 biosource.
SetOrg().SetOrgname().SetGcode() = id;
310 biosource.
SetOrg().SetOrgname().ResetGcode();
void x_FindBioSource(CRef< CCmdComposite > composite)
void CreateControls()
Creates the controls and sizers.
CRef< CCmdComposite > GetCommand()
void Init()
Initialises member variables.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Batch Apply Genetic Code"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
objects::CSeq_entry_Handle m_TopSeqEntry
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
~CApplyGCode()
Destructor.
static bool ShowToolTips()
Should we show tooltips?
vector< pair< string, int > > m_GenCodes
CApplyGCode()
Constructors.
void x_ApplyToBioSource(objects::CBioSource &biosource)
void x_ApplyToDescriptors(const objects::CSeq_entry &se, CCmdComposite *composite)
void AddCommand(IEditCommand &command)
static const CGenetic_code_table & GetCodeTable(void)
namespace ncbi::objects::
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
CSeq_entry_Handle GetSeq_entryHandle(CDataLoader *loader, const TBlobId &blob_id, EMissing action=eMissing_Default)
Get Seq-entry handle by its blob-id, with possible loading.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TGenome GetGenome(void) const
Get the Genome member data.
bool IsSetGenome(void) const
Check if a value has been assigned to Genome data member.
void SetOrg(TOrg &value)
Assign a value to Org data member.
list< CRef< CGenetic_code > > Tdata
void SetData(TData &value)
Assign a value to Data data member.
const Tdata & Get(void) const
Get the member data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSet(void) const
Check if variant Set is selected.
TSource & SetSource(void)
Select the variant.
const struct ncbi::grid::netcache::search::fields::SIZE size
Utility macros and typedefs for exploring NCBI objects from seqset.asn.
#define FOR_EACH_SEQENTRY_ON_SEQSET(Itr, Var)
FOR_EACH_SEQENTRY_ON_SEQSET EDIT_EACH_SEQENTRY_ON_SEQSET.
#define FOR_EACH_SEQDESC_ON_SEQENTRY(Itr, Var)
FOR_EACH_SEQDESC_ON_SEQENTRY EDIT_EACH_SEQDESC_ON_SEQENTRY.