48 #include <wx/button.h>
49 #include <wx/statbox.h>
50 #include <wx/stattext.h>
84 wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
96 bool CClearKeywords::Create( wxWindow* parent, wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
99 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
100 wxDialog::Create( parent,
id, caption, pos,
size, style );
105 GetSizer()->SetSizeHints(
this);
142 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
143 itemDialog1->SetSizer(itemBoxSizer2);
145 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
146 itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
148 wxStaticText* stattext2 =
new wxStaticText( itemDialog1, wxID_STATIC,
_(
"Remove Keyword"), wxDefaultPosition, wxDefaultSize, 0 );
149 itemBoxSizer3->Add(stattext2, 0, wxALIGN_TOP|wxALL, 5);
150 m_Keyword =
new wxTextCtrl( itemDialog1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(100, -1), 0 );
151 itemBoxSizer3->Add(
m_Keyword, 0, wxALIGN_TOP|wxLEFT|wxRIGHT|wxBOTTOM, 5);
152 m_AllKeywords =
new wxCheckBox(itemDialog1,
wxID_ANY,
_(
"All Keywords"), wxDefaultPosition, wxDefaultSize, 0);
153 itemBoxSizer3->Add(
m_AllKeywords, 0, wxALIGN_TOP | wxLEFT | wxRIGHT | wxBOTTOM, 5);
155 wxStaticBox* itemStaticBoxSizer3Static =
new wxStaticBox(itemDialog1,
wxID_ANY,
_(
"Constraints"));
156 wxStaticBoxSizer* itemStaticBoxSizer3 =
new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL);
157 itemBoxSizer2->Add(itemStaticBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
159 wxBoxSizer* itemBoxSizer7 =
new wxBoxSizer(wxHORIZONTAL);
160 itemStaticBoxSizer3->Add(itemBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
162 m_Any =
new wxRadioButton( itemDialog1,
wxID_ANY,
_(
"Any sequence"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
163 m_Any->SetValue(
true);
164 itemBoxSizer7->Add(
m_Any, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
166 m_Nuc =
new wxRadioButton( itemDialog1,
wxID_ANY,
_(
"Nucleotides"), wxDefaultPosition, wxDefaultSize, 0 );
167 m_Nuc->SetValue(
false);
168 itemBoxSizer7->Add(
m_Nuc, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
170 m_DNA =
new wxRadioButton( itemDialog1,
wxID_ANY,
_(
"DNA"), wxDefaultPosition, wxDefaultSize, 0 );
171 m_DNA->SetValue(
false);
172 itemBoxSizer7->Add(
m_DNA, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
174 m_RNA =
new wxRadioButton( itemDialog1,
wxID_ANY,
_(
"RNA"), wxDefaultPosition, wxDefaultSize, 0 );
175 m_RNA->SetValue(
false);
176 itemBoxSizer7->Add(
m_RNA, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
178 m_Proteins =
new wxRadioButton( itemDialog1,
wxID_ANY,
_(
"Proteins"), wxDefaultPosition, wxDefaultSize, 0 );
180 itemBoxSizer7->Add(
m_Proteins, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
182 wxArrayString choices;
188 if (biosource_it->GetSource().IsSetGenome())
197 choices.Add(wxString(*str_it));
200 wxBoxSizer* itemBoxSizer9 =
new wxBoxSizer(wxHORIZONTAL);
201 itemStaticBoxSizer3->Add(itemBoxSizer9, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
203 wxStaticText* itemStaticText12 =
new wxStaticText( itemDialog1, wxID_STATIC,
_(
"Where source location is "), wxDefaultPosition, wxDefaultSize, 0 );
204 itemBoxSizer9->Add(itemStaticText12, 0, wxALIGN_TOP|wxALL, 5);
206 m_SourceLoc =
new wxListBox( itemDialog1,
wxID_ANY, wxDefaultPosition, wxDefaultSize, choices, wxLB_SINGLE );
207 itemBoxSizer9->Add(
m_SourceLoc, 0, wxALIGN_TOP|wxALL, 5);
209 wxBoxSizer* itemBoxSizer10 =
new wxBoxSizer(wxHORIZONTAL);
210 itemStaticBoxSizer3->Add(itemBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
212 wxStaticText* itemStaticText11 =
new wxStaticText( itemDialog1, wxID_STATIC,
_(
"Where Sequence ID"), wxDefaultPosition, wxDefaultSize, 0 );
213 itemBoxSizer10->Add(itemStaticText11, 0, wxALIGN_TOP|wxALL, 5);
219 wxBoxSizer* itemBoxSizer12 =
new wxBoxSizer(wxHORIZONTAL);
220 itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
222 wxButton* itemButton13 =
new wxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
223 itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
225 wxButton* itemButton14 =
new wxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
226 itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
267 bool pass_genome =
true;
283 if ((*it)->IsSource() && (*it)->GetSource().IsSetGenome() && (*it)->GetSource().GetGenome() == organelle)
300 if (
m_Any->GetValue())
318 if (constraint && se.
IsSeq())
325 if (constraint->DoesTextMatch(
label))
337 if ((*it)->IsGenbank())
341 edited_object->
Assign((*it)->GetGenbank());
346 if (remove_all || *keyword ==
remove)
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
static string GetOrganelleByGenome(unsigned int genome)
static CBioSource::EGenome GetGenomeByOrganelle(const string &organelle, NStr::ECase use_case=NStr::eCase, bool starts_with=false)
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnAllKeywordsSelected(wxCommandEvent &event)
CRef< CCmdComposite > GetCommand()
CChangeUnindexedObjectCommand< objects::CGB_block > CChangeGenbankBlockCommand
~CClearKeywords()
Destructor.
static bool ShowToolTips()
Should we show tooltips?
CStringConstraintPanel * m_StringConstraintPanel
wxCheckBox * m_AllKeywords
void CreateControls()
Creates the controls and sizers.
CClearKeywords()
Constructors.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxRadioButton * m_Proteins
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Clear Keywords"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
objects::CSeq_entry_Handle m_TopSeqEntry
void ApplyToCSeq_entry(const CSeq_entry &se, CCmdComposite *composite, bool pass_genome)
void AddCommand(IEditCommand &command)
Base class for all serializable objects.
void SetStringSelection(const wxString &str)
CRef< edit::CStringConstraint > GetStringConstraint()
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator end() const
static void DLIST_NAME() remove(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
@ eContent
Untagged human-readable accession or the like.
@ fIncludeGivenEntry
Include the top (given) entry.
@ fRecursive
Iterate recursively.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
void ResetKeywords(void)
Reset Keywords data member.
const TKeywords & GetKeywords(void) const
Get the Keywords member data.
bool IsSetKeywords(void) const
Check if a value has been assigned to Keywords data member.
EGenome
biological context
const TSeq & GetSeq(void) const
Get the variant data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSet(void) const
Check if variant Set is selected.
const TInst & GetInst(void) const
Get the Inst member data.
bool IsSetMol(void) const
Check if a value has been assigned to Mol data member.
bool IsSetInst(void) const
the sequence data Check if a value has been assigned to Inst data member.
TMol GetMol(void) const
Get the Mol member data.
@ e_Source
source of materials, includes Org-ref
const struct ncbi::grid::netcache::search::fields::SIZE size
#define FOR_EACH_SEQID_ON_BIOSEQ(Itr, Var)
FOR_EACH_SEQID_ON_BIOSEQ EDIT_EACH_SEQID_ON_BIOSEQ.
#define ERASE_KEYWORD_ON_GENBANKBLOCK(Itr, Var)
ERASE_KEYWORD_ON_GENBANKBLOCK.
#define EDIT_EACH_KEYWORD_ON_GENBANKBLOCK(Itr, Var)
#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.