1 #ifndef GUI_WIDGETS_EDIT___AUTHORNAMES_PANEL__HPP
2 #define GUI_WIDGETS_EDIT___AUTHORNAMES_PANEL__HPP
41 #include "wx/wxprec.h"
49 #include <wx/hyperlink.h>
56 #include "wx/hyperlink.h"
57 #include "wx/statline.h"
68 class wxScrolledWindow;
80 #define ID_DELETELINK 7000
81 #define ID_REPLACE_ALL_AUTHORS 7001
82 #define ID_REPLACE_SAME_AUTHORS 7002
83 #define SYMBOL_CAUTHORNAMESPANEL_STYLE wxTAB_TRAVERSAL
84 #define SYMBOL_CAUTHORNAMESPANEL_TITLE _("Author Names Panel")
85 #define SYMBOL_CAUTHORNAMESPANEL_IDNAME ID_AUTHORNAMES
86 #define SYMBOL_CAUTHORNAMESPANEL_SIZE wxSize(400, 300)
87 #define SYMBOL_CAUTHORNAMESPANEL_POSITION wxDefaultPosition
110 bool Create( wxWindow* parent,
123 void CreateControls();
125 virtual bool TransferDataToWindow();
126 virtual bool TransferDataFromWindow();
127 bool x_GetAuthors(
bool keep_blank =
false);
128 void PopulateAuthors (objects::CAuth_list& auth_list);
135 virtual void SetAuthors(
const objects::CAuth_list& auth_list);
141 void OnAddauthHyperlinkClicked( wxHyperlinkEvent& event );
144 void OnAddconsortiumHyperlinkClicked( wxHyperlinkEvent& event );
147 void OnImportAuthorsHyperlinkClicked( wxHyperlinkEvent& event );
150 void OnImportAuthorsAffiliationHyperlinkClicked( wxHyperlinkEvent& event );
152 void OnDelete(wxHyperlinkEvent& event);
154 void OnReplaceAllAuthors( wxCommandEvent& event );
155 void OnReplaceSameAuthors( wxCommandEvent& event );
162 wxBitmap GetBitmapResource(
const wxString& name );
165 wxIcon GetIconResource(
const wxString& name );
169 static bool ShowToolTips();
180 ID_AUTHORNAMES = 10022,
182 ID_ADDCONSORTIUM = 10024,
183 ID_IMPORT_AUTHORS = 10025,
184 ID_IMPORT_AUTHORS_AFFILIATION = 10026,
189 static bool IsAuthorEmpty (
const objects::CAuthor& auth);
193 virtual wxString
GetAnchor() {
return _(
"reference-sequence-authors");}
202 virtual int x_FindRow(wxWindow* wnd, wxSizerItemList& itemList);
205 void x_AddNewEmptyAuthor(
void);
206 void x_SetAffiliation();
209 void x_AdjustScroll(wxWindow*
row,
bool scroll_to_end =
true);
#define SYMBOL_CAUTHORNAMESPANEL_TITLE
#define SYMBOL_CAUTHORNAMESPANEL_SIZE
#define SYMBOL_CAUTHORNAMESPANEL_IDNAME
#define SYMBOL_CAUTHORNAMESPANEL_POSITION
#define SYMBOL_CAUTHORNAMESPANEL_STYLE
virtual void x_MoveRowUp(int row_num)=0
virtual int x_FindRow(wxWindow *wnd, wxSizerItemList &itemList)=0
virtual void AddLastAuthor(wxWindow *link)=0
virtual void x_InsertRowtoWindow(wxWindow *row, size_t index)=0
virtual void SetAuthors(const objects::CAuth_list &auth_list)=0
virtual void InsertAuthorBefore(wxWindow *link)=0
virtual void x_AddRowToWindow(wxWindow *row)=0
virtual void InsertAuthorAfter(wxWindow *link)=0
virtual wxSizerItem * x_FindSingleAuthor(wxWindow *wnd, wxSizerItemList &itemList)=0
virtual wxString GetName() const
CRef< CSerialObject > m_EditedAuthList
virtual wxString GetAnchor()
CRef< objects::CSubmit_block > m_SubmitBlock
bool m_show_replace_buttons
virtual bool IsImportEnabled(void)
virtual CRef< CSerialObject > OnExport(void)
virtual bool IsExportEnabled(void)
virtual void OnImport(CNcbiIfstream &istr)
Base class for all serializable objects.
Undo/Redo interface for editing operations.
virtual void ApplyCommand()
virtual void ApplySubmitBlock(objects::CSubmit_block &block)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
#define NCBI_GUIWIDGETS_EDIT_EXPORT
const struct ncbi::grid::netcache::search::fields::SIZE size
#define row(bind, expected)
static CSeq_entry_Handle GetSeqEntryHandle(CScope &scope, const CSerialObject &so)