34 #include "wx/wxprec.h"
43 #include <wx/display.h>
89 Create(parent, wb,
id, caption, pos,
size, style);
97 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
103 GetSizer()->SetSizeHints(
this);
152 if (width >= 0 && height >= 0)
153 SetSize(wxSize(width,height));
158 if (pos_x >= 0 && pos_y >= 0)
161 for (
auto i = 0;
i < wxDisplay::GetCount();
i++)
163 wxDisplay display(
i);
164 max_x += display.GetGeometry().GetWidth();
166 if (pos_x + width > max_x) pos_x = wxGetDisplaySize().GetWidth()-width-5;
167 if (pos_y + height > wxGetDisplaySize().GetHeight()) pos_y = wxGetDisplaySize().GetHeight()-height-5;
169 SetPosition(wxPoint(pos_x,pos_y));
185 wxBoxSizer* itemBoxSizer1 =
new wxBoxSizer(wxVERTICAL);
186 SetSizer(itemBoxSizer1);
188 wxPanel* itemCBulkCmdDlg1 =
new wxPanel(
this,
wxID_ANY);
189 itemBoxSizer1->Add(itemCBulkCmdDlg1, 1, wxGROW, 0);
191 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
192 itemCBulkCmdDlg1->SetSizer(itemBoxSizer2);
195 itemBoxSizer2->Add(
m_ParseOptions, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
197 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
198 itemBoxSizer2->Add(itemBoxSizer3, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
200 wxBoxSizer* itemBoxSizer4 =
new wxBoxSizer(wxVERTICAL);
201 itemBoxSizer3->Add(itemBoxSizer4, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
203 wxStaticText* itemStaticText1 =
new wxStaticText( itemCBulkCmdDlg1, wxID_STATIC,
_(
"From"), wxDefaultPosition, wxDefaultSize, 0 );
204 itemBoxSizer4->Add(itemStaticText1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
207 itemBoxSizer4->Add(
m_Field1, 0, wxALIGN_CENTER_HORIZONTAL, 0);
209 wxBoxSizer* itemBoxSizer5 =
new wxBoxSizer(wxVERTICAL);
210 itemBoxSizer3->Add(itemBoxSizer5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
212 wxStaticText* itemStaticText2 =
new wxStaticText( itemCBulkCmdDlg1, wxID_STATIC,
_(
"To"), wxDefaultPosition, wxDefaultSize, 0 );
213 itemBoxSizer5->Add(itemStaticText2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
216 itemBoxSizer5->Add(
m_Field2, 0, wxALIGN_CENTER_HORIZONTAL, 0);
220 itemBoxSizer2->Add(
m_Constraint, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
223 itemBoxSizer2->Add(panelOkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
254 wxWindowList &slist = win->GetChildren();
255 for (wxWindowList::iterator iter = slist.begin(); iter != slist.end(); ++iter)
257 wxWindow* child = *iter;
300 auto subtype =
GetSubtype(field_name_panel, ncRNA_class);
313 action1->SetConstraint(constraint);
321 action2->SetExistingText(existing_text);
324 cmd = action1->GetActionCommand();
347 wxPanel::Create( parent,
id, pos,
size, style );
351 GetSizer()->SetSizeHints(
this);
369 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
370 itemPanel1->SetSizer(itemBoxSizer2);
372 m_Notebook =
new wxChoicebook(itemPanel1,
wxID_ANY, wxDefaultPosition, wxDefaultSize);
373 itemBoxSizer2->Add(
m_Notebook, 0, wxGROW|wxALL, 5);
387 m_Notebook->AddPage(panel4,
_(
"CDS-Gene-Prot-mRNA"));
405 m_Notebook->AddPage(panel8,
_(
"Structured Comment"));
430 m_Notebook->AddPage(panel15, wxString(
"Dbxref"));
447 if (page != wxNOT_FOUND)
476 if (sel != wxNOT_FOUND)
478 field_type =
m_Notebook->GetPageText(sel).ToStdString();
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
bool GetTopLevelSeqEntryAndProcessor()
edit::EExistingText x_GetExistingTextHandling(int num_conflicts, bool allow_multiple=false)
virtual bool SetFieldName(const string &field)
string GetFieldType(void) const
CFieldNamePanel * GetFieldNamePanel(void)
CRef< edit::CStringConstraint > GetStringConstraint(void)
static vector< string > GetFieldNames()
void PopulateFeatureListbox(void)
void ListPresentFeaturesFirst(const objects::CSeq_entry_Handle &entry, vector< const objects::CFeatListItem * > *featlist=nullptr)
virtual bool SetFieldName(const string &field)
void SetFieldNames(const vector< string > &field_names)
virtual string GetFieldName(const bool subfield=false)=0
Returns the name of the field as selected in the panel.
static EFieldType GetFieldTypeFromName(const string &field_type_name)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
static vector< string > GetStrings()
static vector< string > GetFieldNames()
void UpdateChildrenFeaturePanels(wxWindow *win)
CQualChoicePanel * m_Field1
CConstraintPanel * m_Constraint
bool Create(wxWindow *parent, IWorkbench *wb, wxWindowID id=wxID_ANY, const wxString &caption=_("Parse Text"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
static bool ShowToolTips()
virtual void LoadSettings()
void SetFromFieldType(EFieldType field_type)
virtual void SetRegistryPath(const string ®_path)
CQualChoicePanel * m_Field2
wxIcon GetIconResource(const wxString &name)
void SetToFieldType(EFieldType field_type)
wxBitmap GetBitmapResource(const wxString &name)
virtual CRef< CCmdComposite > GetCommand()
virtual void SaveSettings() const
void ProcessUpdateFeatEvent(wxCommandEvent &event)
CParseTextOptionsDlg * m_ParseOptions
CRef< objects::edit::CParseTextOptions > GetParseOptions()
static vector< string > GetFieldNames(bool extended=false)
wxIcon GetIconResource(const wxString &name)
void SetSelection(int page)
CFieldNamePanel * GetFieldNamePanel(void)
static bool ShowToolTips()
wxChoicebook * m_Notebook
CIRef< IEditingAction > CreateEditingAction(CSeq_entry_Handle seh)
string GetField(bool subfield=true)
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)
string GetFieldType(void)
virtual bool SetFieldName(const string &field)
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
void Set(const string &key, int val)
access a named key at this level, with no recursion
virtual bool SetFieldName(const string &field)
IWorkbench is the central interface in the application framework.
CRef< CEditingActionConstraint > CreateEditingActionConstraint(const string &field, CFieldNamePanel::EFieldType field_type, int subtype, const string &ncRNA_class, const string &const_field, CFieldNamePanel::EFieldType const_field_type, int const_subtype, string &const_ncRNA_class, CRef< CConstraintMatcher >constraint)
int GetSubtype(CFieldNamePanel *field_name_panel, string &ncRNA_class)
CIRef< IEditingAction > CreateAction(CSeq_entry_Handle seh, const string &field, CFieldNamePanel::EFieldType field_type, int subtype, const string &ncRNA_class=kEmptyStr, CConstRef< objects::CSeq_submit > submit=CConstRef< objects::CSeq_submit >(NULL))
#define EVT_UPDATE_FEATURE_LIST(id, fn)
const char * kDefinitionLineLabel
const char * kTaxnameAfterBinomial
const char * kBankITComment
#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).
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * kFramePosX
static const char * kFrameHeight
static const char * kFramePosY
static const char * kFrameWidth
wxRect GetScreenRect(const wxWindow &win)