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

Go to the SVN repository for this file.

1 /* $Id: bulk_miscfeat_edit.hpp 45131 2020-06-04 17:41:11Z asztalos $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: AndreA Asztalos, based on a file written by Igor Filippov
27  */
28 
29 #ifndef _BULK_MISCFEAT_EDIT_H_
30 #define _BULK_MISCFEAT_EDIT_H_
31 
32 
33 #include <corelib/ncbistd.hpp>
39 
40 
42 
44 
45 #define SYMBOL_MISCFEATEDITDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
46 #define SYMBOL_MISCFEATEDITDIALOG_TITLE _("Misc Feature Editing")
47 #define SYMBOL_MISCFEATEDITDIALOG_IDNAME wxID_ANY
48 #define SYMBOL_MISCFEATEDITDIALOG_SIZE wxDefaultSize
49 #define SYMBOL_MISCFEATEDITDIALOG_POSITION wxDefaultPosition
50 
51 
53 {
54  DECLARE_DYNAMIC_CLASS(CBulkMiscFeat)
55  DECLARE_EVENT_TABLE()
56 
57 public:
58  /// Constructors
59  CBulkMiscFeat();
60  CBulkMiscFeat( wxWindow* parent,
61  objects::CSeq_entry_Handle seh,
62  IWorkbench* workbench,
64  wxWindowID id = SYMBOL_MISCFEATEDITDIALOG_IDNAME,
65  const wxString& caption = SYMBOL_MISCFEATEDITDIALOG_TITLE,
66  const wxPoint& pos = SYMBOL_MISCFEATEDITDIALOG_POSITION,
67  const wxSize& size = SYMBOL_MISCFEATEDITDIALOG_SIZE,
68  long style = SYMBOL_MISCFEATEDITDIALOG_STYLE );
69 
70  CBulkMiscFeat( wxWindow* parent,
71  const vector<CSeq_feat_Handle> &feat_handles,
72  IWorkbench* workbench = nullptr,
73  wxWindowID id = SYMBOL_MISCFEATEDITDIALOG_IDNAME,
74  const wxString& caption = SYMBOL_MISCFEATEDITDIALOG_TITLE,
75  const wxPoint& pos = SYMBOL_MISCFEATEDITDIALOG_POSITION,
76  const wxSize& size = SYMBOL_MISCFEATEDITDIALOG_SIZE,
77  long style = SYMBOL_MISCFEATEDITDIALOG_STYLE );
78 
79  /// Creation
80  bool Create( wxWindow* parent,
81  wxWindowID id = SYMBOL_MISCFEATEDITDIALOG_IDNAME,
82  const wxString& caption = SYMBOL_MISCFEATEDITDIALOG_TITLE,
83  const wxPoint& pos = SYMBOL_MISCFEATEDITDIALOG_POSITION,
84  const wxSize& size = SYMBOL_MISCFEATEDITDIALOG_SIZE,
85  long style = SYMBOL_MISCFEATEDITDIALOG_STYLE );
86 
87  /// Destructor
89 
90  /// Initialises member variables
91  void Init();
92 
93  /// Creates the controls and sizers
94  void CreateControls();
95 
96  void OnClickOk(wxCommandEvent& event);
97  void OnClickCancel(wxCommandEvent& event);
98 
101 
102  string GetErrorMessage();
103 
104  bool IsReadOnlyColumn(string column_name)
105  {
106  return (column_name == "location" || column_name.empty() || column_name == "expand");
107  };
108 
109  int GetCollapsible() { return 0;}
110 
112 
114  {
115  CRef<objects::CSeq_table> choices;
116  return choices;
117  }
118 
119  wxBitmap GetBitmapResource( const wxString& name );
120 
121  /// Retrieves icon resources
122  wxIcon GetIconResource( const wxString& name );
123 
124  /// Should we show tooltips?
125  static bool ShowToolTips();
126 
128 private:
129  wxGrid* m_Grid;
130  vector<CSeq_feat_Handle> m_FeatHandles;
132  bool m_Modified{ false };
134 };
135 
137 
138 #endif
#define SYMBOL_MISCFEATEDITDIALOG_IDNAME
#define SYMBOL_MISCFEATEDITDIALOG_POSITION
#define SYMBOL_MISCFEATEDITDIALOG_SIZE
#define SYMBOL_MISCFEATEDITDIALOG_STYLE
#define SYMBOL_MISCFEATEDITDIALOG_TITLE
CBioseq_Handle –.
bool IsReadOnlyColumn(string column_name)
CBulkMiscFeat(wxWindow *parent, objects::CSeq_entry_Handle seh, IWorkbench *workbench, CConstRef< objects::CSeq_submit > seqSubmit, wxWindowID id=wxID_ANY, const wxString &caption=_("Misc Feature Editing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Misc Feature Editing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
CRef< CCmdComposite > GetCommand()
wxBitmap GetBitmapResource(const wxString &name)
CRef< CCmdComposite > GetCommandFromValuesTable(CRef< objects::CSeq_table >)
void CreateControls()
Creates the controls and sizers.
vector< CSeq_feat_Handle > m_FeatHandles
CSeqTableGridPanel * m_GridPanel
CRef< objects::CSeq_table > GetValuesTableFromSeqEntry()
void OnClickCancel(wxCommandEvent &event)
CBulkMiscFeat()
Constructors.
virtual const CObject * RowToScopedObjects(int row, TConstScopedObjects &objects, CBioseq_Handle &bsh)
CRef< objects::CSeq_table > GetChoices(CRef< objects::CSeq_table > values_table)
void Init()
Initialises member variables.
CApplyEditconvertPanel * m_AecrPanel
static bool ShowToolTips()
Should we show tooltips?
void OnClickOk(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
~CBulkMiscFeat()
Destructor.
CObject –.
Definition: ncbiobj.hpp:180
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
Include a standard set of the NCBI C++ Toolkit most basic headers.
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const struct ncbi::grid::netcache::search::fields::SIZE size
#define row(bind, expected)
Definition: string_bind.c:73
Modified on Sat Apr 13 11:43:58 2024 by modify_doxy.py rev. 669887