37 #include <wx/stattext.h>
38 #include <wx/listbox.h>
87 wxPanel::Create( parent,
id, pos,
size, style );
128 wxBoxSizer* itemBoxSizer1 =
new wxBoxSizer(wxVERTICAL);
129 itemPanel2->SetSizer(itemBoxSizer1);
131 wxStaticText* itemStaticText18 =
new wxStaticText( itemPanel2, wxID_STATIC,
_(
"Select only"), wxDefaultPosition, wxDefaultSize, 0 );
132 itemBoxSizer1->Add(itemStaticText18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
134 wxArrayString listStrings;
135 m_List =
new wxListBox( itemPanel2,
wxID_ANY, wxDefaultPosition, wxSize(-1,109), listStrings, wxLB_SINGLE );
137 m_List->SetMinSize(wxSize(170,109));
140 itemBoxSizer1->Add(
m_List, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
148 if (
m_target == macro::CMacroBioData::sm_SeqFeat) {
167 m_List->Append(
_(
"non-std-residue"));
171 m_List->Append(
_(
"variation"));
174 if (
m_target == macro::CMacroBioData::sm_Seqdesc) {
181 if (
m_target == macro::CMacroBioData::sm_UserObject) {
186 if (
m_target == macro::CMacroBioData::sm_ImpFeat) {
195 if (
m_target == macro::CMacroBioData::sm_RNA) {
198 for (CEnumeratedTypeValues::TValues::const_iterator
i = type_values.begin();
i != type_values.end(); ++
i) {
199 m_List->Append(wxString(
i->first));
203 if (
m_target == macro::CMacroBioData::sm_SeqSet) {
206 for (CEnumeratedTypeValues::TValues::const_iterator
i = type_values.begin();
i != type_values.end(); ++
i) {
207 m_List->Append(wxString(
i->first));
251 string choice =
m_List->GetStringSelection().ToStdString();
258 if (!choice.empty()) {
259 if (
m_target == macro::CMacroBioData::sm_ImpFeat ||
260 m_target == macro::CMacroBioData::sm_RNA ||
261 m_target == macro::CMacroBioData::sm_SeqSet) {
265 str =
"CHOICETYPE(" +
m_field +
") = \"" + choice +
"\"";
275 if (!choice.empty()) {
276 if (
m_target == macro::CMacroBioData::sm_SeqFeat)
278 if (
m_target == macro::CMacroBioData::sm_Seqdesc)
280 if (
m_target == macro::CMacroBioData::sm_UserObject)
281 str =
"User object ";
282 if (
m_target == macro::CMacroBioData::sm_ImpFeat ||
283 m_target == macro::CMacroBioData::sm_RNA ||
284 m_target == macro::CMacroBioData::sm_SeqSet) {
287 str +=
"is of the type " + choice;
static bool ShowToolTips()
Should we show tooltips?
string GetDescription(const string &feat) const
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
string GetLocationConstraint(const string &feat)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CMacroChoiceTypePanel()
Constructors.
void Init()
Initialises member variables.
~CMacroChoiceTypePanel()
Destructor.
virtual pair< string, string > GetMatcher(const pair< string, string > &target, size_t num)
static E_Choice GetTypeFromSubtype(ESubtype subtype)
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
static CTempString SubtypeValueToName(ESubtype eSubtype)
Turns a ESubtype into its string value which is NOT necessarily related to the identifier of the enum...
IMPLEMENT_CLASS(CFloatingFrame, CFloatingFrameBaseClass) const static long kFloatFrameStyle
CFloatingFrame.
list< pair< string, TEnumValueType > > TValues
#define ENUM_METHOD_NAME(EnumName)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
@ e_MaxChoice
== e_Modelev+1
@ e_not_set
No variant selected.
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * str(char *buf, int n)