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

Go to the SVN repository for this file.

1 #ifndef GUI_PKG_SEQ_EDIT___SUBANNOTATION_PANEL__HPP
2 #define GUI_PKG_SEQ_EDIT___SUBANNOTATION_PANEL__HPP
3 
4 /* $Id: subannotation_panel.hpp 46622 2021-08-06 20:19:47Z asztalos $
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: Andrea Asztalos
30  */
31 
32 #include <corelib/ncbiobj.hpp>
36 
37 #include <wx/panel.h>
38 
40 
41 
42 /*!
43  * Control identifiers
44  */
45 
46 ////@begin control identifiers
47 #define SYMBOL_CSUBANNOTATIONPANEL_STYLE wxTAB_TRAVERSAL
48 #define SYMBOL_CSUBANNOTATIONPANEL_TITLE _("Submission Annotation Panel")
49 #define SYMBOL_CSUBANNOTATIONPANEL_IDNAME ID_CSUBANNOTATIONPANEL
50 #define SYMBOL_CSUBANNOTATIONPANEL_SIZE wxSize(400, 300)
51 #define SYMBOL_CSUBANNOTATIONPANEL_POSITION wxDefaultPosition
52 ////@end control identifiers
53 
54 
55 /*!
56  * CSubAnnotationPanel class declaration
57  */
58 
59 class CSubAnnotationPanel: public wxPanel, public ISubmissionPage, public CJobAdapter::IJobCallback
60 {
61  DECLARE_DYNAMIC_CLASS( CSubAnnotationPanel )
62  DECLARE_EVENT_TABLE()
63 
64 public:
65  /// Constructors
67  CSubAnnotationPanel( wxWindow* parent, ICommandProccessor* proc, const wxString &dir, objects::CSeq_entry_Handle seh,
68  wxWindowID id = SYMBOL_CSUBANNOTATIONPANEL_IDNAME,
69  const wxPoint& pos = SYMBOL_CSUBANNOTATIONPANEL_POSITION,
70  const wxSize& size = SYMBOL_CSUBANNOTATIONPANEL_SIZE,
71  long style = SYMBOL_CSUBANNOTATIONPANEL_STYLE );
72 
73  /// Creation
74  bool Create( wxWindow* parent,
75  wxWindowID id = SYMBOL_CSUBANNOTATIONPANEL_IDNAME,
76  const wxPoint& pos = SYMBOL_CSUBANNOTATIONPANEL_POSITION,
77  const wxSize& size = SYMBOL_CSUBANNOTATIONPANEL_SIZE,
78  long style = SYMBOL_CSUBANNOTATIONPANEL_STYLE );
79 
80  /// Destructor
82 
83  /// Initialises member variables
84  void Init();
85 
86  /// Creates the controls and sizers
87  void CreateControls();
88 
89 ////@begin CSubAnnotationPanel event handler declarations
90 
91  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ORGINFOBTN
92  void OnImportFeatTableClick( wxCommandEvent& event );
93 
94  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CONTEXT_HELP
95  void OnContextHelpClick( wxCommandEvent& event );
96 
97 ////@end CSubAnnotationPanel event handler declarations
98 
99 ////@begin CSubAnnotationPanel member function declarations
100 
101  /// Retrieves bitmap resources
102  wxBitmap GetBitmapResource( const wxString& name );
103 
104  /// Retrieves icon resources
105  wxIcon GetIconResource( const wxString& name );
106 ////@end CSubAnnotationPanel member function declarations
107 
108  /// Should we show tooltips?
109  static bool ShowToolTips();
110 
111  /// @name CJobAdapter::IJobCallback interface implementation
112 /// @{
113  virtual void OnJobResult(CObject* result, CJobAdapter& adapter);
114  virtual void OnJobFailed(const string&, CJobAdapter& adapter);
115  /// @}
116 
117  virtual void SetSeqEntryHandle(objects::CSeq_entry_Handle seh) { m_Seh = seh;}
118  virtual wxString GetAnchor() { return _("annotation"); }
119  virtual wxString GetName() const { return SYMBOL_CSUBANNOTATIONPANEL_TITLE; }
120 
121 private:
122  void x_SetFontAsTextPanel();
123 ////@begin CSubAnnotationPanel member variables
125 public:
126  /// Control identifiers
127  enum {
130  ID_SUBANNOTFEATTBL = 6638
131  };
132 ////@end CSubAnnotationPanel member variables
133 
134  virtual bool TransferDataToWindow();
135 
136 private:
139  wxString m_WorkDir;
140  objects::CSeq_entry_Handle m_Seh;
141 
142 public:
144  objects::CSeq_entry_Handle seh;
145 
148 
149  SFeatTableParams(bool protein_id, bool src_feat)
150  : showProteinId(protein_id),
151  showSrcFeature(src_feat) {}
152  };
153 
154  static bool Create5ColFeatTable(SFeatTableParams& input, string& output, string& error, ICanceled& canceled);
155 };
156 
158 
159 #endif
160  // GUI_PKG_SEQ_EDIT___SUBANNOTATION_PANEL__HPP
CObject –.
Definition: ncbiobj.hpp:180
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void Init()
Initialises member variables.
void CreateControls()
Creates the controls and sizers.
void OnImportFeatTableClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ORGINFOBTN
virtual void OnJobFailed(const string &, CJobAdapter &adapter)
void OnContextHelpClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CONTEXT_HELP
static bool Create5ColFeatTable(SFeatTableParams &input, string &output, string &error, ICanceled &canceled)
virtual void SetSeqEntryHandle(objects::CSeq_entry_Handle seh)
virtual bool TransferDataToWindow()
bool Create(wxWindow *parent, wxWindowID id=ID_CSUBANNOTATIONPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
CSubAnnotationPanel()
Constructors.
ICommandProccessor * m_CmdProcessor
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual wxString GetAnchor()
virtual wxString GetName() const
CGenericPanel * m_FeatureTable
objects::CSeq_entry_Handle m_Seh
CRef< CJobAdapter > m_JobAdapter
virtual void OnJobResult(CObject *result, CJobAdapter &adapter)
static bool ShowToolTips()
Should we show tooltips?
Interface for testing cancellation request in a long lasting operation.
Definition: icanceled.hpp:51
Undo/Redo interface for editing operations.
#define _(proto)
Definition: ct_nlmzip_i.h:78
static SQLCHAR output[256]
Definition: print.c:5
static const char * proc
Definition: stats.c:21
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static int input()
const struct ncbi::grid::netcache::search::fields::SIZE size
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
SFeatTableParams(bool protein_id, bool src_feat)
#define SYMBOL_CSUBANNOTATIONPANEL_STYLE
#define SYMBOL_CSUBANNOTATIONPANEL_TITLE
#define SYMBOL_CSUBANNOTATIONPANEL_SIZE
#define SYMBOL_CSUBANNOTATIONPANEL_IDNAME
#define SYMBOL_CSUBANNOTATIONPANEL_POSITION
else result
Definition: token2.c:20
Modified on Mon Jun 24 05:19:18 2024 by modify_doxy.py rev. 669887