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

Go to the SVN repository for this file.

1 /* $Id: bulk_cds_edit.hpp 38632 2017-06-05 17:16:13Z 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: Igor Filippov
27  */
28 #ifndef _BULK_CDS_EDIT_H_
29 #define _BULK_CDS_EDIT_H_
30 
31 #include <corelib/ncbistd.hpp>
37 
38 #include <wx/dialog.h>
40 
41 
42 #define SYMBOL_CDSEDITDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
43 #define SYMBOL_CDSEDITDIALOG_TITLE _("CDS Editing")
44 #define SYMBOL_CDSEDITDIALOG_IDNAME wxID_ANY
45 #define SYMBOL_CDSEDITDIALOG_SIZE wxDefaultSize
46 #define SYMBOL_CDSEDITDIALOG_POSITION wxDefaultPosition
47 
48 
50 {
51  DECLARE_DYNAMIC_CLASS( CBulkCDS )
52  DECLARE_EVENT_TABLE()
53 
54 public:
55  /// Constructors
56  CBulkCDS();
57  CBulkCDS( wxWindow* parent, objects::CSeq_entry_Handle seh, IWorkbench* workbench, CConstRef<objects::CSeq_submit> seqSubmit,
58  wxWindowID id = SYMBOL_CDSEDITDIALOG_IDNAME, const wxString& caption = SYMBOL_CDSEDITDIALOG_TITLE, const wxPoint& pos = SYMBOL_CDSEDITDIALOG_POSITION, const wxSize& size = SYMBOL_CDSEDITDIALOG_SIZE, long style = SYMBOL_CDSEDITDIALOG_STYLE );
59 
60  CBulkCDS( wxWindow* parent, const vector<CSeq_feat_Handle> &feat_handles, IWorkbench* workbench = NULL,
61  wxWindowID id = SYMBOL_CDSEDITDIALOG_IDNAME, const wxString& caption = SYMBOL_CDSEDITDIALOG_TITLE, const wxPoint& pos = SYMBOL_CDSEDITDIALOG_POSITION, const wxSize& size = SYMBOL_CDSEDITDIALOG_SIZE, long style = SYMBOL_CDSEDITDIALOG_STYLE );
62 
63  /// Creation
64  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDSEDITDIALOG_IDNAME, const wxString& caption = SYMBOL_CDSEDITDIALOG_TITLE, const wxPoint& pos = SYMBOL_CDSEDITDIALOG_POSITION, const wxSize& size = SYMBOL_CDSEDITDIALOG_SIZE, long style = SYMBOL_CDSEDITDIALOG_STYLE );
65 
66  /// Destructor
67  ~CBulkCDS();
68 
69  /// Initialises member variables
70  void Init();
71 
72  /// Creates the controls and sizers
73  void CreateControls();
74 
79  int GetCollapsible() {return 0;}
80 
81  string GetErrorMessage();
82  bool IsReadOnlyColumn(string column_name) { if (column_name == "location" || column_name.empty() || column_name == "expand") return true; return false; };
83  /// Retrieves bitmap resources
84  wxBitmap GetBitmapResource( const wxString& name );
85 
86  /// Retrieves icon resources
87  wxIcon GetIconResource( const wxString& name );
88 
89  /// Should we show tooltips?
90  static bool ShowToolTips();
91  void OnClickOk( wxCommandEvent& event );
92  void OnClickCancel( wxCommandEvent& event );
94  void GetUpdateMRNAProductNameCmd(CRef<CSeq_feat> cds, CScope& scope, const string& prot_name, CRef<CCmdComposite> composite);
95 
96 private:
97  wxGrid* m_Grid;
98  vector<CSeq_feat_Handle> m_FeatHandles;
104 };
105 
107 #endif
#define SYMBOL_CDSEDITDIALOG_STYLE
#define SYMBOL_CDSEDITDIALOG_IDNAME
#define SYMBOL_CDSEDITDIALOG_TITLE
#define SYMBOL_CDSEDITDIALOG_POSITION
#define SYMBOL_CDSEDITDIALOG_SIZE
CBioseq_Handle –.
CBulkCDS()
Constructors.
vector< CSeq_feat_Handle > m_FeatHandles
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("CDS Editing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void CreateControls()
Creates the controls and sizers.
CRef< CCmdComposite > GetCommandFromValuesTable(CRef< objects::CSeq_table >)
void OnClickCancel(wxCommandEvent &event)
CSeqTableGridPanel * m_GridPanel
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void GetUpdateMRNAProductNameCmd(CRef< CSeq_feat > cds, CScope &scope, const string &prot_name, CRef< CCmdComposite > composite)
wxGrid * m_Grid
~CBulkCDS()
Destructor.
void Init()
Initialises member variables.
wxCheckBox * m_CopyProtNameToComment
string GetErrorMessage()
virtual const CObject * RowToScopedObjects(int row, TConstScopedObjects &objects, CBioseq_Handle &bsh)
CRef< objects::CSeq_table > GetChoices(CRef< objects::CSeq_table > values_table)
CRef< CCmdComposite > GetCommand()
int GetCollapsible()
CApplyEditconvertPanel * m_AecrPanel
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CRef< objects::CSeq_table > GetValuesTableFromSeqEntry()
CStringConstraintSelect * m_StringConstraintPanel
void OnClickOk(wxCommandEvent &event)
bool IsReadOnlyColumn(string column_name)
CObject –.
Definition: ncbiobj.hpp:180
CScope –.
Definition: scope.hpp:92
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.
#define NULL
Definition: ncbistd.hpp:225
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 Sun Apr 21 03:40:21 2024 by modify_doxy.py rev. 669887