38 #include <wx/stattext.h>
39 #include <wx/button.h>
40 #include <wx/msgdlg.h>
94 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
100 GetSizer()->SetSizeHints(
this);
143 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
144 itemCBulkCmdDlg1->SetSizer(itemBoxSizer2);
147 itemBoxSizer2->Add(
m_ParseOptions, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
149 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
150 itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
152 m_RemoveFirstOnly =
new wxRadioButton( itemCBulkCmdDlg1,
wxID_ANY,
_(
"Remove first instance in each string"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
156 wxRadioButton *remove_all =
new wxRadioButton( itemCBulkCmdDlg1,
wxID_ANY,
_(
"Remove all instances"), wxDefaultPosition, wxDefaultSize, 0 );
157 remove_all->SetValue(
false);
158 itemBoxSizer3->Add(remove_all, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);
160 wxBoxSizer* itemBoxSizer4 =
new wxBoxSizer(wxHORIZONTAL);
161 itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
166 wxStaticText* itemStaticText6 =
new wxStaticText( itemCBulkCmdDlg1, wxID_STATIC,
_(
"From"), wxDefaultPosition, wxDefaultSize, 0 );
167 m_FromFieldSizer->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
170 itemBoxSizer2->Add(
m_OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
174 vector<CFieldNamePanel::EFieldType> field_types;
176 size_t not_TOList = 4;
238 if (!string_constraint) {
261 if (src_objects.size() == 0) {
262 wxMessageBox(
wxT(
"No source objects found!"),
wxT(
"Error"),
263 wxOK | wxICON_ERROR,
NULL);
274 if (!(*src_it)->PreExists()) {
277 string orig_val = src_col->
GetVal((*src_it)->GetObject());
281 bool changed =
false;
285 src_col->
ClearVal((*src_it)->SetObject());
295 cmd->AddCommand(*ecmd);
313 if (
orig.GetWidth() < add.GetWidth() + borders) {
314 orig.SetWidth(add.GetWidth() + borders);
316 orig.SetHeight(
orig.GetHeight() + add.GetHeight() + borders);
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)
void UpdateChildrenFeaturePanels(wxSizer *sizer)
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
bool SetFieldType(CFieldNamePanel::EFieldType field_type, bool is_pair=false)
CRef< edit::CStringConstraint > GetStringConstraint()
bool SetFieldType(CFieldNamePanel::EFieldType field_type)
@ eFieldType_TaxnameAfterBinomial
vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
void ClearVal(CObject &object)
string GetVal(const CObject &object)
bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
string GetSelectedText(const string &input)
CRef< objects::edit::CParseTextOptions > GetParseOptions()
COkCancelPanel * m_OkCancel
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CRemoveTextInsideStrDlg()
Constructors.
CFieldConstraintPanel * m_ConstraintPanel
~CRemoveTextInsideStrDlg()
Destructor.
void SetFromFieldType(CFieldNamePanel::EFieldType field_type)
void ProcessUpdateFeatEvent(wxCommandEvent &event)
CFieldChoicePanel * m_FieldFrom
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
bool Create(wxWindow *parent, wxWindowID id=10161, const wxString &caption=_("Remove Text Inside String"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
static bool ShowToolTips()
Should we show tooltips?
virtual CRef< CCmdComposite > GetCommand()
virtual void UpdateEditor()
wxRadioButton * m_RemoveFirstOnly
wxBoxSizer * m_FromFieldSizer
CParseTextOptionsDlg * m_ParseOptions
virtual string GetErrorMessage()
IWorkbench is the central interface in the application framework.
#define EVT_UPDATE_FEATURE_LIST(id, fn)
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#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 void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string (in-place)
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
CRef< CCmdComposite > GetCommandFromApplyObject(objects::edit::CApplyObject &obj)
const struct ncbi::grid::netcache::search::fields::SIZE size
static void s_AddwxSize(wxSize &orig, const wxSize &add, int borders)
@ eExistingText_replace_old