NCBI C++ ToolKit
|
Search Toolkit Book for CAuthorNamesPanel
#include <gui/widgets/edit/authornames_panel.hpp>
Public Types | |
enum | { ID_AUTHORNAMES = 10022 , ID_ADDAUTH = 10023 , ID_ADDCONSORTIUM = 10024 , ID_IMPORT_AUTHORS = 10025 , ID_IMPORT_AUTHORS_AFFILIATION = 10026 , ID_PANEL = 10027 } |
Control identifiers. More... | |
Public Member Functions | |
CAuthorNamesPanel () | |
Constructors. More... | |
CAuthorNamesPanel (wxWindow *parent, CSerialObject &object, bool show_replace_buttons, wxWindowID id=ID_AUTHORNAMES, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_AUTHORNAMES, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL) |
Creation. More... | |
~CAuthorNamesPanel () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
virtual bool | TransferDataToWindow () |
virtual bool | TransferDataFromWindow () |
bool | x_GetAuthors (bool keep_blank=false) |
void | PopulateAuthors (objects::CAuth_list &auth_list) |
void | OnAddauthHyperlinkClicked (wxHyperlinkEvent &event) |
wxEVT_COMMAND_HYPERLINK event handler for ID_ADDAUTH More... | |
void | OnAddconsortiumHyperlinkClicked (wxHyperlinkEvent &event) |
wxEVT_COMMAND_HYPERLINK event handler for ID_ADDCONSORTIUM More... | |
void | OnImportAuthorsHyperlinkClicked (wxHyperlinkEvent &event) |
wxEVT_COMMAND_HYPERLINK event handler for ID_IMPORT_AUTHORS More... | |
void | OnImportAuthorsAffiliationHyperlinkClicked (wxHyperlinkEvent &event) |
wxEVT_COMMAND_HYPERLINK event handler for ID_IMPORT_AUTHORS_AFFILIATION More... | |
void | OnDelete (wxHyperlinkEvent &event) |
void | OnReplaceAllAuthors (wxCommandEvent &event) |
void | OnReplaceSameAuthors (wxCommandEvent &event) |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
virtual bool | IsImportEnabled (void) |
virtual bool | IsExportEnabled (void) |
virtual CRef< CSerialObject > | OnExport (void) |
virtual void | OnImport (CNcbiIfstream &istr) |
virtual void | ApplySubmitBlock (objects::CSubmit_block &block) |
virtual void | ApplyCommand () |
virtual wxString | GetAnchor () |
virtual wxString | GetName () const |
Public Member Functions inherited from CAuthorNamesContainer | |
~CAuthorNamesContainer () | |
void | DeleteRow (wxWindow *wnd) |
void | ShiftAuthorUp (wxWindow *link) |
void | ShiftAuthorDown (wxWindow *link) |
void | ImportAuthorsFromFile () |
virtual void | SetWorkDir (const wxString &workDir) |
Public Member Functions inherited from IWorkDirClient | |
virtual | ~IWorkDirClient () |
Public Member Functions inherited from ISubmissionPage | |
virtual | ~ISubmissionPage () |
virtual bool | StepForward () |
virtual bool | StepBackward () |
virtual bool | IsFirstPage () const |
virtual bool | IsLastPage () const |
virtual void | ApplyDescriptor (objects::CSeqdesc &desc) |
virtual void | SetSeqEntryHandle (objects::CSeq_entry_Handle seh) |
CSubmissionPageChangeListener * | GetParentWizard (wxWindow *wnd) const |
virtual void | ReportMissingFields (string &text) |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
static bool | IsAuthorEmpty (const objects::CAuthor &auth) |
Private Member Functions | |
void | x_AddNewEmptyAuthor (void) |
void | x_SetAffiliation () |
ICommandProccessor * | GetUndoManager () |
objects::CSeq_entry_Handle | GetSeqEntryHandle () |
void | x_AdjustScroll (wxWindow *row, bool scroll_to_end=true) |
Private Attributes | |
CSerialObject * | m_Object |
CRef< CSerialObject > | m_EditedAuthList |
int | m_RowHeight |
bool | m_show_replace_buttons |
wxWindow * | m_Consortium |
CRef< objects::CSubmit_block > | m_SubmitBlock |
CAuthorNamesContainer implementation | |
virtual void | AddLastAuthor (wxWindow *link) |
virtual void | InsertAuthorBefore (wxWindow *link) |
virtual void | InsertAuthorAfter (wxWindow *link) |
virtual void | SetAuthors (const objects::CAuth_list &auth_list) |
virtual wxSizerItem * | x_FindSingleAuthor (wxWindow *wnd, wxSizerItemList &itemList) |
virtual void | x_AddRowToWindow (wxWindow *row) |
virtual void | x_InsertRowtoWindow (wxWindow *row, size_t index) |
virtual void | x_MoveRowUp (int row_num) |
virtual int | x_FindRow (wxWindow *wnd, wxSizerItemList &itemList) |
Additional Inherited Members | |
Protected Member Functions inherited from CAuthorNamesContainer | |
CAuthorNamesContainer () | |
Protected Member Functions inherited from ISubmissionPage | |
bool | x_DoStepForward (wxListbook *book) |
bool | x_DoStepBackward (wxListbook *book) |
Protected Attributes inherited from CAuthorNamesContainer | |
wxScrolledWindow * | m_ScrolledWindow |
wxFlexGridSizer * | m_Sizer |
wxString | m_WorkDir |
CAuthorNamesPanel class declaration
Definition at line 95 of file authornames_panel.hpp.
anonymous enum |
Control identifiers.
Enumerator | |
---|---|
ID_AUTHORNAMES | |
ID_ADDAUTH | |
ID_ADDCONSORTIUM | |
ID_IMPORT_AUTHORS | |
ID_IMPORT_AUTHORS_AFFILIATION | |
ID_PANEL |
Definition at line 179 of file authornames_panel.hpp.
CAuthorNamesPanel::CAuthorNamesPanel | ( | ) |
CAuthorNamesPanel::CAuthorNamesPanel | ( | wxWindow * | parent, |
CSerialObject & | object, | ||
bool | show_replace_buttons, | ||
wxWindowID | id = ID_AUTHORNAMES , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Definition at line 120 of file authornames_panel.cpp.
References CSerialObject::Assign(), Create(), Init(), m_EditedAuthList, m_Object, CRef< C, Locker >::Reset(), and ncbi::grid::netcache::search::fields::size.
CAuthorNamesPanel::~CAuthorNamesPanel | ( | ) |
Destructor.
Definition at line 159 of file authornames_panel.cpp.
|
virtual |
Implements CAuthorNamesContainer.
Definition at line 529 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, row, s_IsLastRow(), CAuth_list_Base::SetNames(), and x_AddRowToWindow().
|
virtual |
Reimplemented from ISubmissionPage.
Definition at line 1116 of file authornames_panel.cpp.
References CSubmissionPageChangeListener::ApplySubmitCommand(), ctll::empty(), ISubmissionPage::GetParentWizard(), m_SubmitBlock, and PopulateAuthors().
|
virtual |
Reimplemented from ISubmissionPage.
Definition at line 1110 of file authornames_panel.cpp.
References m_SubmitBlock, CRef< C, Locker >::Reset(), and SetAuthors().
Referenced by CReferencePanel::ApplySubmitBlock().
bool CAuthorNamesPanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_AUTHORNAMES , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Creation.
Definition at line 138 of file authornames_panel.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
Referenced by CAuthorNamesPanel().
void CAuthorNamesPanel::CreateControls | ( | ) |
Creates the controls and sizers.
Definition at line 183 of file authornames_panel.cpp.
References _, CAuth_list_Base::GetNames(), CAuth_list_Base::C_Names::GetStd(), ID_ADDAUTH, ID_ADDCONSORTIUM, ID_IMPORT_AUTHORS, ID_IMPORT_AUTHORS_AFFILIATION, ID_PANEL, ID_REPLACE_ALL_AUTHORS, ID_REPLACE_SAME_AUTHORS, CAuth_list_Base::IsSetNames(), CAuth_list_Base::C_Names::IsStd(), CAuthorNamesContainer::m_ScrolledWindow, m_show_replace_buttons, and CAuthorNamesContainer::m_Sizer.
Referenced by Create().
|
inlinevirtual |
Reimplemented from ISubmissionPage.
Definition at line 193 of file authornames_panel.hpp.
References _.
wxBitmap CAuthorNamesPanel::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Definition at line 700 of file authornames_panel.cpp.
wxIcon CAuthorNamesPanel::GetIconResource | ( | const wxString & | name | ) |
Retrieves icon resources.
Definition at line 713 of file authornames_panel.cpp.
|
inlinevirtual |
Reimplemented from ISubmissionPage.
Definition at line 194 of file authornames_panel.hpp.
References SYMBOL_CAUTHORNAMESPANEL_TITLE.
|
private |
Definition at line 908 of file authornames_panel.cpp.
References CSehHolderPanel::GetSEH(), and CSeq_entry_Handle::GetTopLevelEntry().
Referenced by OnReplaceAllAuthors(), and OnReplaceSameAuthors().
|
private |
Definition at line 884 of file authornames_panel.cpp.
References CEditObjViewDlg::GetUndoManager(), CEditObjViewDlgModal::GetUndoManager(), and NULL.
Referenced by OnReplaceAllAuthors(), and OnReplaceSameAuthors().
void CAuthorNamesPanel::Init | ( | void | ) |
Initialises member variables.
Definition at line 170 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, and NULL.
Referenced by CAuthorNamesPanel().
|
virtual |
Implements CAuthorNamesContainer.
Definition at line 634 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, row, x_AddRowToWindow(), and x_InsertRowtoWindow().
|
virtual |
Implements CAuthorNamesContainer.
Definition at line 606 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, row, and x_InsertRowtoWindow().
Definition at line 355 of file authornames_panel.cpp.
References CPerson_id_Base::GetConsortium(), CAuthor_Base::GetName(), CPerson_id_Base::GetName(), NStr::IsBlank(), CPerson_id_Base::IsConsortium(), CPerson_id_Base::IsName(), CName_std_Base::IsSetFirst(), CName_std_Base::IsSetInitials(), CName_std_Base::IsSetLast(), and CAuthor_Base::IsSetName().
Referenced by x_GetAuthors().
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 836 of file authornames_panel.cpp.
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 831 of file authornames_panel.cpp.
void CAuthorNamesPanel::OnAddauthHyperlinkClicked | ( | wxHyperlinkEvent & | event | ) |
wxEVT_COMMAND_HYPERLINK event handler for ID_ADDAUTH
Definition at line 738 of file authornames_panel.cpp.
References x_AddNewEmptyAuthor().
void CAuthorNamesPanel::OnAddconsortiumHyperlinkClicked | ( | wxHyperlinkEvent & | event | ) |
wxEVT_COMMAND_HYPERLINK event handler for ID_ADDCONSORTIUM
Definition at line 748 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, row, CAuth_list_Base::SetNames(), and x_AddRowToWindow().
void CAuthorNamesPanel::OnDelete | ( | wxHyperlinkEvent & | event | ) |
Definition at line 544 of file authornames_panel.cpp.
References CAuthorNamesContainer::DeleteRow(), and wxT.
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 841 of file authornames_panel.cpp.
References PopulateAuthors().
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 848 of file authornames_panel.cpp.
References MSerial_AsnText, and SetAuthors().
Referenced by OnImportAuthorsAffiliationHyperlinkClicked().
void CAuthorNamesPanel::OnImportAuthorsAffiliationHyperlinkClicked | ( | wxHyperlinkEvent & | event | ) |
wxEVT_COMMAND_HYPERLINK event handler for ID_IMPORT_AUTHORS_AFFILIATION
Definition at line 806 of file authornames_panel.cpp.
References CFileExtensions::GetDialogFilter(), CException::GetMsg(), Info(), CFileExtensions::kAllFiles, CFileExtensions::kASN, LOG_POST, CAuthorNamesContainer::m_WorkDir, msg(), OnImport(), ToWxString(), wxT, and x_SetAffiliation().
void CAuthorNamesPanel::OnImportAuthorsHyperlinkClicked | ( | wxHyperlinkEvent & | event | ) |
wxEVT_COMMAND_HYPERLINK event handler for ID_IMPORT_AUTHORS
Definition at line 797 of file authornames_panel.cpp.
References CAuthorNamesContainer::ImportAuthorsFromFile().
void CAuthorNamesPanel::OnReplaceAllAuthors | ( | wxCommandEvent & | event | ) |
Definition at line 928 of file authornames_panel.cpp.
References CCmdComposite::AddCommand(), CSerialObject::Assign(), cmd, CPub_Base::e_Article, CPub_Base::e_Book, CPub_Base::e_Gen, CPub_Base::e_Man, CPub_Base::e_Patent, CPub_Base::e_Proc, CSeqdesc_Base::e_Pub, CPub_Base::e_Sub, ICommandProccessor::Execute(), CSeq_entry_CI::fIncludeGivenEntry, CSeq_entry_CI::fRecursive, GetSeqEntryHandle(), GetUndoManager(), CAuth_list_Base::IsSetNames(), m_Object, NON_CONST_ITERATE, CAuth_list_Base::SetNames(), CPubdesc_Base::SetPub(), CSeqdesc_Base::SetPub(), and TransferDataFromWindow().
void CAuthorNamesPanel::OnReplaceSameAuthors | ( | wxCommandEvent & | event | ) |
Definition at line 1003 of file authornames_panel.cpp.
References CCmdComposite::AddCommand(), CSerialObject::Assign(), cmd, CPub_Base::e_Article, CPub_Base::e_Book, CPub_Base::e_Gen, CPub_Base::e_Man, CPub_Base::e_Patent, CPub_Base::e_Proc, CSeqdesc_Base::e_Pub, CPub_Base::e_Sub, ICommandProccessor::Execute(), CSeq_entry_CI::fIncludeGivenEntry, CSeq_entry_CI::fRecursive, CAuth_list_Base::GetNames(), GetSeqEntryHandle(), GetUndoManager(), CAuth_list_Base::IsSetNames(), m_Object, NON_CONST_ITERATE, CAuth_list_Base::SetNames(), CPubdesc_Base::SetPub(), CSeqdesc_Base::SetPub(), and TransferDataFromWindow().
void CAuthorNamesPanel::PopulateAuthors | ( | objects::CAuth_list & | auth_list | ) |
Definition at line 428 of file authornames_panel.cpp.
References CAuth_list_Base::IsSetNames(), CAuth_list_Base::ResetNames(), CAuth_list_Base::SetNames(), and TransferDataFromWindow().
Referenced by ApplyCommand(), CReferencePanel::CopyAuthors(), CAuthorReplacePanel::GetCommand(), CEditObjectSubmit_block::GetEditCommand(), CReferencePanel::MatchesCitSubAuthors(), CSubmitBlockDlg::OnCopySeqAuthToManAuthClick(), OnExport(), CPubStatusPanel::OnNewAuthorsSelected(), CSubmitBlockDlg::OnSubmitblockdlgPageChanged(), CPubStatusPanel::ReportMissingFields(), CPubStatusPanel::TransferDataFromWindow(), CReferencePanel::TransferDataFromWindow(), CPublicationTypePanel::x_CollectAuthors(), CSubmitBlockDlg::x_CreateBlock(), and CSubmitBlockDlg::x_CreateCitGen().
|
virtual |
Implements CAuthorNamesContainer.
Definition at line 440 of file authornames_panel.cpp.
References CSerialObject::Assign(), and TransferDataToWindow().
Referenced by ApplySubmitBlock(), CSubmitBlockDlg::OnClearBtnClick(), CSubmitBlockDlg::OnCopySeqAuthToManAuthClick(), OnImport(), CPubStatusPanel::OnInpressSelected(), CPubStatusPanel::OnPublishedSelected(), CSubmitBlockDlg::OnSeparateAuthorsClick(), CPubStatusPanel::OnUnpublishedSelected(), and CPubStatusPanel::TransferDataToWindow().
|
static |
Should we show tooltips?
Definition at line 691 of file authornames_panel.cpp.
|
virtual |
Definition at line 422 of file authornames_panel.cpp.
References x_GetAuthors().
Referenced by CEditObjectSubmit_block::GetEditCommand(), CSubmitBlockDlg::OnCopySeqAuthToManAuthClick(), OnReplaceAllAuthors(), OnReplaceSameAuthors(), CSubmitBlockDlg::OnSubmitblockdlgPageChanged(), PopulateAuthors(), CPublicationTypePanel::x_CollectAuthors(), CSubmitBlockDlg::x_CreateBlock(), and CSubmitBlockDlg::x_CreateCitGen().
|
virtual |
Definition at line 258 of file authornames_panel.cpp.
References CAuth_list_Base::GetNames(), CAuth_list_Base::C_Names::GetStd(), ID_DELETELINK, CSingleAuthorPanel::IsPlaceholder(), CAuth_list_Base::IsSetNames(), CAuth_list_Base::C_Names::IsStd(), m_RowHeight, CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, row, CAuth_list_Base::SetNames(), wxT, and x_AddRowToWindow().
Referenced by CSubmitBlockDlg::OnSeparateAuthorsClick(), CSubmitBlockDlg::OnSubmitblockdlgPageChanged(), SetAuthors(), CSubmitBlockDlg::x_BuildPages(), CSubmitBlockDlg::x_CreateBlock(), and CEditObjectSubmit_block::x_TransferDataToWindow().
|
private |
Definition at line 722 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, row, CAuth_list_Base::SetNames(), and x_AddRowToWindow().
Referenced by OnAddauthHyperlinkClicked().
|
privatevirtual |
Implements CAuthorNamesContainer.
Definition at line 761 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, row, wxID_ANY, wxT, and x_AdjustScroll().
Referenced by AddLastAuthor(), InsertAuthorAfter(), OnAddconsortiumHyperlinkClicked(), TransferDataToWindow(), and x_AddNewEmptyAuthor().
Definition at line 771 of file authornames_panel.cpp.
References m_RowHeight, CAuthorNamesContainer::m_ScrolledWindow, and row.
Referenced by x_AddRowToWindow(), and x_InsertRowtoWindow().
|
privatevirtual |
Implements CAuthorNamesContainer.
Definition at line 448 of file authornames_panel.cpp.
References NULL.
|
privatevirtual |
Implements CAuthorNamesContainer.
Definition at line 471 of file authornames_panel.cpp.
References NULL.
Definition at line 378 of file authornames_panel.cpp.
References CSerialObject::Assign(), CConsortiumPanel::GetAuthor(), CSingleAuthorPanel::GetAuthor(), IsAuthorEmpty(), CAuth_list_Base::IsSetNames(), CAuthorNamesContainer::m_Sizer, CAuth_list_Base::ResetNames(), CAuthor_Base::SetName(), and CAuth_list_Base::SetNames().
Referenced by TransferDataFromWindow().
|
privatevirtual |
Implements CAuthorNamesContainer.
Definition at line 678 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, row, wxID_ANY, wxT, and x_AdjustScroll().
Referenced by InsertAuthorAfter(), and InsertAuthorBefore().
|
privatevirtual |
Implements CAuthorNamesContainer.
Definition at line 553 of file authornames_panel.cpp.
References CAuthorNamesContainer::m_ScrolledWindow, CAuthorNamesContainer::m_Sizer, row, and swap().
|
private |
Definition at line 855 of file authornames_panel.cpp.
References i, CAuth_list_Base::IsSetAffil(), CAuthorAffiliationPanel::SetAffil(), and CAuth_list_Base::SetAffil().
Referenced by OnImportAuthorsAffiliationHyperlinkClicked().
|
private |
Definition at line 216 of file authornames_panel.hpp.
|
private |
Definition at line 212 of file authornames_panel.hpp.
Referenced by CAuthorNamesPanel().
|
private |
Definition at line 211 of file authornames_panel.hpp.
Referenced by CAuthorNamesPanel(), OnReplaceAllAuthors(), and OnReplaceSameAuthors().
|
private |
Definition at line 213 of file authornames_panel.hpp.
Referenced by TransferDataToWindow(), and x_AdjustScroll().
|
private |
Definition at line 214 of file authornames_panel.hpp.
Referenced by CreateControls().
|
private |
Definition at line 217 of file authornames_panel.hpp.
Referenced by ApplyCommand(), and ApplySubmitBlock().