NCBI C++ ToolKit
author_names_container.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___AUTHOR_NAMES_CONTAINER__HPP
2 #define GUI_WIDGETS_EDIT___AUTHOR_NAMES_CONTAINER__HPP
3 
4 /* $Id: author_names_container.hpp 41446 2018-07-31 15:24:14Z katargir $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Colleen Bollin
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 #include <wx/panel.h>
34 #include <wx/sizer.h>
35 #include <wx/hyperlink.h>
36 
38 
39 class wxScrolledWindow;
40 
42 
44 {
45  DECLARE_ABSTRACT_CLASS(CAuthorNamesPanel)
46  DECLARE_EVENT_TABLE()
47 
48 public:
50 
51  void DeleteRow(wxWindow* wnd);
52 
53  void ShiftAuthorUp(wxWindow* link);
54  void ShiftAuthorDown(wxWindow* link);
55  virtual void InsertAuthorBefore(wxWindow* link) = 0;
56  virtual void InsertAuthorAfter(wxWindow* link) = 0;
57 
58  virtual void AddLastAuthor(wxWindow* link) = 0;
59 
60  void ImportAuthorsFromFile();
61  virtual void SetAuthors(const objects::CAuth_list& auth_list) = 0;
62 
63  /// @name IWorkDirClient implementation
64  /// @{
65  virtual void SetWorkDir(const wxString& workDir) { m_WorkDir = workDir; }
66  /// @}
67 
68 protected:
70 
71  wxScrolledWindow* m_ScrolledWindow;
72  wxFlexGridSizer* m_Sizer;
73 
74  wxString m_WorkDir;
75 
76 private:
77  virtual wxSizerItem* x_FindSingleAuthor(wxWindow* wnd, wxSizerItemList& itemList) = 0;
78  virtual void x_AddRowToWindow(wxWindow* row) = 0;
79  virtual void x_InsertRowtoWindow(wxWindow* row, size_t index) = 0;
80  virtual void x_MoveRowUp(int row_num) = 0;
81  virtual int x_FindRow(wxWindow* wnd, wxSizerItemList& itemList) = 0;
82 
83  void x_DeleteAuthor(wxSizerItem* link);
84 };
85 
87 
88 #endif // GUI_WIDGETS_EDIT___AUTHOR_NAMES_CONTAINER__HPP
virtual void x_MoveRowUp(int row_num)=0
wxScrolledWindow * m_ScrolledWindow
virtual void SetWorkDir(const wxString &workDir)
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
IWorkDirClient.
Definition: work_dir.hpp:45
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIWIDGETS_EDIT_EXPORT
Definition: gui_export.h:526
#define row(bind, expected)
Definition: string_bind.c:73
Modified on Fri Sep 20 14:57:06 2024 by modify_doxy.py rev. 669887