31 #include "wx/wxprec.h"
100 wxPanel::Create( parent,
id, pos,
size, style );
105 GetSizer()->SetSizeHints(
this);
148 m_Sizer =
new wxBoxSizer(wxHORIZONTAL);
152 m_SrcModName =
new wxComboBox( itemPanel1,
ID_MODIFIER_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_SrcModNameStrings, wxCB_READONLY );
155 #ifdef __WXOSX_COCOA__
160 m_Sizer->Add(300, 10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
185 wxString s_AdjustModNameForDisplay(
const string&
orig)
187 string adjusted =
orig;
194 wxString s_AdjustDisplayNameForModName(
const wxString& display)
203 bool s_DoNotListSubSource(
int st)
223 wxArrayString choices;
225 for (
i = 0;
i < objects::CSubSource::eSubtype_other;
i++) {
229 choices.push_back(s_AdjustModNameForDisplay(qual_name));
233 catch (
const exception&) {
236 for (
i = 0;
i < objects::COrgMod::eSubtype_other;
i++) {
241 choices.push_back(s_AdjustModNameForDisplay(qual_name));
245 catch (
const exception&) {
266 auto old_editor_type = editor_type;
269 while (
m_Sizer->GetItemCount() > 1) {
271 m_Sizer->GetItem(pos)->DeleteWindows();
297 m_SrcModName->SetValue(s_AdjustModNameForDisplay(mod_name));
303 bool is_subsource = objects::CSubSource::IsValidSubtypeName(mod_name, objects::CSubSource::eVocabulary_insdc);
305 CSubSource::TSubtype st = objects::CSubSource::GetSubtypeValue (mod_name, objects::CSubSource::eVocabulary_insdc);
309 bool is_orgmod = objects::COrgMod::IsValidSubtypeName(mod_name, objects::COrgMod::eVocabulary_insdc);
311 COrgMod::TSubtype st = objects::COrgMod::GetSubtypeValue(mod_name, objects::COrgMod::eVocabulary_insdc);
376 wxWindow* parent = this->GetParent();
380 while (parent && !listpanel) {
381 parent = parent->GetParent();
static string GetSubtypeName(const CSubSource &qual)
static bool IsDiscouraged(const TSubtype stype, bool indexer=false)
static CSrcModEditPanel * Create(wxWindow *parent, CSrcModEditPanel::EEditorType editor_type)
static EEditorType GetEditorTypeForSubSource(objects::CSubSource::TSubtype st)
static EEditorType GetEditorTypeForOrgMod(objects::COrgMod::TSubtype st)
virtual string GetValue()=0
EEditorType GetEditorType()
virtual bool IsWellFormatted(const string &val)=0
virtual void SetValue(const string &val)=0
void AddLastSrcMod(wxWindow *link)
bool Create(wxWindow *parent, wxWindowID id=10013, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
const SModData & GetModifierData()
void x_SetEditor(CSrcModEditPanel::EEditorType editor_type)
void Init()
Initialises member variables.
CSrcModPanel()
Constructors.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
virtual bool DoNotListOrgMod(int st)
static bool ShowToolTips()
Should we show tooltips?
virtual bool DoNotListSubSrc(int st)
void OnLeftDown(wxMouseEvent &event)
wxArrayString s_GetModifierList()
CSrcModEditPanel * m_Editor
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnModifierNameSelected(wxCommandEvent &event)
wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_MODIFIER_NAME
void CreateControls()
Creates the controls and sizers.
void OnLeftUp(wxMouseEvent &event)
~CSrcModPanel()
Destructor.
wxComboBox * m_SrcModName
static bool IsDiscouraged(const TSubtype subtype)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
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.
@ eNocase
Case insensitive compare.
@ eSubtype_fwd_primer_seq
sequence (possibly more than one; semicolon-separated)
@ eSubtype_rev_primer_name
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
const struct ncbi::grid::netcache::search::fields::SIZE size
bool s_DoNotListOrgMod(int st)
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)