(parent,
id, caption, pos,
size, style);
106 bool CEditPubDlg::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
109SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
115GetSizer()->SetSizeHints(
this);
170 if(width >= 0 && height >= 0)
171SetSize(wxSize(width,height));
176 if(pos_x >= 0 && pos_y >= 0) {
178 for(
unsigned i= 0;
i< wxDisplay::GetCount();
i++)
180wxDisplay display(
i);
181max_x += display.GetGeometry().GetWidth();
184 if(pos_x + width > max_x)
185pos_x = wxGetDisplaySize().GetWidth()-width-5;
186 if(pos_y + height > wxGetDisplaySize().GetHeight())
187pos_y = wxGetDisplaySize().GetHeight()-height-5;
189SetPosition(wxPoint(pos_x,pos_y));
217wxBoxSizer* itemBoxSizer1 =
newwxBoxSizer(wxVERTICAL);
218SetSizer(itemBoxSizer1);
220wxPanel* itemCBulkCmdDlg1 =
newwxPanel(
this,
wxID_ANY);
221itemBoxSizer1->Add(itemCBulkCmdDlg1, 1, wxGROW, 0);
223wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
224itemCBulkCmdDlg1->SetSizer(itemBoxSizer2);
226 m_Notebook=
newwxNotebook(itemCBulkCmdDlg1,
wxID_ANY,wxDefaultPosition,wxDefaultSize);
227itemBoxSizer2->Add(
m_Notebook, 1, wxGROW|wxALL, 5);
230 m_Notebook->AddPage(panel1,
_(
"Replace section"));
233 m_Notebook->AddPage(panel2,
_(
"Replace entire pub"));
236 m_Notebook->AddPage(panel3,
_(
"Replace single field"));
247authors->
Assign(*auth_list);
252 m_Notebook->AddPage(panel4,
_(
"Global author replace"));
254wxStaticBox* constraintDetails =
newwxStaticBox(itemCBulkCmdDlg1,
wxID_ANY,
_(
"Constraint"));
255wxStaticBoxSizer* itemStaticBoxSizer9 =
newwxStaticBoxSizer(constraintDetails, wxVERTICAL);
256itemBoxSizer2->Add(itemStaticBoxSizer9, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
258wxBoxSizer* itemBoxSizer10 =
newwxBoxSizer(wxHORIZONTAL);
259itemStaticBoxSizer9->Add(itemBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
263itemBoxSizer10->Add(
m_Fieldhandler, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2);
268wxBoxSizer* itemBoxSizer13 =
newwxBoxSizer(wxHORIZONTAL);
269itemStaticBoxSizer9->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
271wxStaticText* itemStaticText14 =
newwxStaticText( itemStaticBoxSizer9->GetStaticBox(), wxID_STATIC,
_(
"Publication Status"), wxDefaultPosition, wxDefaultSize, 0 );
272itemBoxSizer13->Add(itemStaticText14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
274wxArrayString m_PubStatusConstraintStrings;
275m_PubStatusConstraintStrings.Add(
_(
"Any"));
276m_PubStatusConstraintStrings.Add(
_(
"Published"));
277m_PubStatusConstraintStrings.Add(
_(
"Unpublished"));
278m_PubStatusConstraintStrings.Add(
_(
"In Press"));
279m_PubStatusConstraintStrings.Add(
_(
"Submitter Block"));
285itemBoxSizer2->Add(
m_OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
366*constraint1 += constraint2;
368vector<CSeq_entry_Handle> descr_ctxt;
379 boolany_change(
false);
388wxMessageBox(
wxT(
"No effect!"),
wxT(
"Error"), wxOK | wxICON_ERROR,
NULL);
399sel_srv->GetCurrentSelection(
objects);
402 const CObject* ptr = it->object.GetPointer();
408 if(seqdesc && seqdesc->
IsPub()) {
414}
else if(pubdesc) {
416}
else if(block && block->
IsSetCit()) {
447wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
448itemPanel1->SetSizer(itemBoxSizer2);
450wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxVERTICAL);
451itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL, 0);
453m_AuthorListSection =
newwxCheckBox(
this,
wxID_ANY,
wxT(
"Replace author list with selected author list"), wxDefaultPosition, wxDefaultSize, 0 );
454itemBoxSizer3->Add(m_AuthorListSection, 0, wxALIGN_LEFT|wxRIGHT|wxTOP|wxBOTTOM, 5);
455m_TitleSection =
newwxCheckBox(
this,
wxID_ANY,
wxT(
"Replace title with selected title"), wxDefaultPosition, wxDefaultSize, 0 );
456itemBoxSizer3->Add(m_TitleSection, 0, wxALIGN_LEFT|wxRIGHT|wxTOP|wxBOTTOM, 5);
457m_AffiliationSection =
newwxCheckBox(
this,
wxID_ANY,
wxT(
"Replace affiliation with selected affiliation"), wxDefaultPosition, wxDefaultSize, 0 );
458itemBoxSizer3->Add(m_AffiliationSection, 0, wxALIGN_LEFT|wxRIGHT|wxTOP|wxBOTTOM, 5);
474 boolany_change =
false;
475 autoobj_it = objs.begin();
476 autoseh_it = descr_ctxt.begin();
477 _ASSERT(objs.size() == descr_ctxt.size());
478 for( ; obj_it != objs.end() && seh_it != descr_ctxt.end(); ++obj_it, ++seh_it)
480 const CSeqdesc* d =
dynamic_cast<const CSeqdesc*
>(obj_it->GetPointer());
481 if(d && d->
IsPub()) {
482 boolthis_change =
false;
492new_auth->
Assign(*this_auth);
497 boolskip_cit_sub =
true;
503 cmd->AddCommand (*ecmd);
528wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
529itemPanel1->SetSizer(itemBoxSizer2);
531wxStaticText* instructions =
newwxStaticText(
this, wxID_STATIC,
wxT(
"Replace with selected publication or submitter block"), wxDefaultPosition, wxDefaultSize, 0 );
532itemBoxSizer2->Add(instructions, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
549 boolany_change =
false;
553 autoobj_it = objs.begin();
554 autoseh_it = descr_ctxt.begin();
555 _ASSERT(objs.size() == descr_ctxt.size());
556 for(; obj_it != objs.end() && seh_it != descr_ctxt.end(); ++obj_it, ++seh_it)
558 if(obj_it->GetPointer() == sel_pub.
GetPointer()) {
569 const CSeqdesc* d =
dynamic_cast<const CSeqdesc*
>(obj_it->GetPointer());
570 if(d && d->
IsPub() && pubdesc != &(d->
GetPub())) {
572 boolthis_change =
false;
574new_desc->
Assign(*orig_desc);
576}
else if(orig_feat) {
585new_desc->
SetPub().
SetPub().Set().push_back(new_pub);
587}
else if(pubdesc) {
594 cmd->AddCommand (*ecmd);
619wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
620itemPanel1->SetSizer(itemBoxSizer2);
624itemBoxSizer2->Add(m_PubField, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
625m_FieldText =
newwxTextCtrl(
this,
wxID_ANY);
626itemBoxSizer2->Add(m_FieldText, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
652*constraint1 += constraint2;
653action->SetConstraint(constraint1);
655action->Apply(
val);
675wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
676itemPanel1->SetSizer(itemBoxSizer2);
683itemBoxSizer2->Add(m_AuthorsPanel, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
684m_AuthorsPanel->TransferDataToWindow();
709 boolany_modified =
false;
711 autoobj_it = objs.begin();
712 autoseh_it = descr_ctxt.begin();
713 _ASSERT(objs.size() == descr_ctxt.size());
714 for(; obj_it != objs.end() && seh_it != descr_ctxt.end(); ++obj_it, ++seh_it)
716 if(
const CSeqdesc* desc =
dynamic_cast<const CSeqdesc*
>(obj_it->GetPointer())) {
719replacement->
Assign(*desc);
720 boolmodified =
false;
723 switch((*pub)->Which())
726(*pub)->SetGen().SetAuthors().SetNames(edited_names);
729(*pub)->SetArticle().SetAuthors().SetNames(edited_names);
732(*pub)->SetBook().SetAuthors().SetNames(edited_names);
735(*pub)->SetProc().SetBook().SetAuthors().SetNames(edited_names);
738(*pub)->SetSub().SetAuthors().SetNames(edited_names);
741(*pub)->SetPatent().SetAuthors().SetNames(edited_names);
744(*pub)->SetMan().SetCit().SetAuthors().SetNames(edited_names);
747(*pub)->SetGen().SetAuthors().SetNames(edited_names);
756any_modified =
true;
762new_submit_block->
Assign(*block);
771any_modified =
true;
@Auth_list.hpp User-defined methods of the data storage class.
size_t GetNameCount() const
void PopulateAuthors(objects::CAuth_list &auth_list)
virtual CRef< CCmdComposite > GetCommand(const vector< CConstRef< CObject >> &objs, const vector< CSeq_entry_Handle > &descr_ctxt)
CRef< CAuth_list > m_Authors
CAuthorNamesPanel * m_AuthorsPanel
CConstRef< objects::CSeq_submit > m_SeqSubmit
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()
void AddCommand(IEditCommand &command)
virtual CRef< CCmdComposite > GetCommand(const vector< CConstRef< CObject >> &objs, const vector< CSeq_entry_Handle > &descr_ctxt)=0
~CEditPubDlg()
Destructor.
virtual CRef< CCmdComposite > GetCommand()
static bool ShowToolTips()
Should we show tooltips?
wxChoice * m_PubStatusConstraint
virtual void LoadSettings()
virtual string GetErrorMessage()
CFieldHandlerNamePanel * m_Fieldhandler
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
string GetFieldName(const bool subfield)
void Init()
Initialises member variables.
CSeq_entry_Handle GetTopSeqEntry()
string GetStatusConstraint()
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Edit Publications"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(800, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
CConstRef< CObject > GetSelectedPub()
void AppendToErrorMsg(const string &msg)
CEditPubDlg()
Constructors.
CRef< edit::CStringConstraint > GetStringConstraint()
void CreateControls()
Creates the controls and sizers.
CStringConstraintPanel * m_StrConstraintPanel
virtual void SetRegistryPath(const string ®_path)
CConstRef< objects::CSeq_submit > GetSeqSubmit()
virtual void SaveSettings() const
COkCancelPanel * m_OkCancel
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
void SetFieldNames(const vector< string > &field_names)
wxString GetWorkDir() const
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.
CProjectService - a service providing API for operations with Workspaces and Projects.
static vector< string > GetFieldNames(bool extended=false)
static string GetStatus(const CObject &obj)
static bool SetPubTitle(CPubdesc &pdesc, const string &title, objects::edit::EExistingText existing_text, bool skip_sub=false)
@Pubdesc.hpp User-defined methods of the data storage class.
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 CRef< CCmdComposite > GetCommand(const vector< CConstRef< CObject >> &objs, const vector< CSeq_entry_Handle > &descr_ctxt)
wxCheckBox * m_AuthorListSection
wxCheckBox * m_TitleSection
virtual CRef< CCmdComposite > GetCommand(const vector< CConstRef< CObject >> &objs, const vector< CSeq_entry_Handle > &descr_ctxt)
wxCheckBox * m_AffiliationSection
virtual CRef< CCmdComposite > GetCommand(const vector< CConstRef< CObject >> &objs, const vector< CSeq_entry_Handle > &descr_ctxt)
CFieldHandlerNamePanel * m_PubField
namespace ncbi::objects::
CRef< edit::CStringConstraint > GetStringConstraint()
IWorkbench is the central interface in the application framework.
CChangeUnindexedObjectCommand< objects::CSubmit_block > CChangeSubmitBlockCommand
static const char * kFramePosX
const string kUnknownError
static const char * kFrameHeight
static const char * kFramePosY
static const char * kFrameWidth
#define ID_PUB_STATUS_CONSTRAINT
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)
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))
vector< CConstRef< CObject > > GetObjects(CSeq_entry_Handle seh, const string &field, CFieldNamePanel::EFieldType field_type, int subtype, const string &ncRNA_class, CConstRef< objects::CSeq_submit > submit, CRef< CEditingActionConstraint > constraint, vector< CSeq_entry_Handle > *descr_context=nullptr)
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
vector< SConstScopedObject > TConstScopedObjects
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#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.
bool IsSetAffil(void) const
author affiliation Check if a value has been assigned to Affil data member.
const TAffil & GetAffil(void) const
Get the Affil member data.
void SetAffil(TAffil &value)
Assign a value to Affil data member.
bool IsSetNames(void) const
Check if a value has been assigned to Names data member.
void SetNames(TNames &value)
Assign a value to Names data member.
list< CRef< CPub > > Tdata
TSub & SetSub(void)
Select the variant.
@ e_Gen
general or generic unparsed
@ e_Proc
proceedings of a meeting
@ e_Man
manuscript, thesis, or letter
const TPub & GetPub(void) const
Get the variant data.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
const TData & GetData(void) const
Get the Data member data.
bool IsPub(void) const
Check if variant Pub is selected.
void SetPub(TPub &value)
Assign a value to Pub data member.
TPub & SetPub(void)
Select the variant.
const TPub & GetPub(void) const
Get the variant data.
void ResetPub(void)
Reset Pub data member.
bool IsPub(void) const
Check if variant Pub is selected.
void SetCit(TCit &value)
Assign a value to Cit data member.
bool IsSetCit(void) const
citation for this submission Check if a value has been assigned to Cit data member.
const struct ncbi::grid::netcache::search::fields::SIZE size
bool SetAuthorNames(CPubdesc &pdesc, const CAuth_list &auth_list)
bool SetAuthList(CPubdesc &pdesc, const CAuth_list &auth_list)
CConstRef< CAuth_list > GetAuthList(const CPubdesc &pubdesc)
string GetPubTitle(CConstRef< CObject > sel_pub)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
@ eExistingText_replace_old
void SetWorkDir(wxWindow *wnd, const wxString &workDir)
string ToStdString(const wxString &s)
wxRect GetScreenRect(const wxWindow &win)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4