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

Go to the SVN repository for this file.

1 /* $Id: add_feature_between_dlg.hpp 39649 2017-10-24 15:22:12Z 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: Colleen Bollin
27  */
28 #ifndef _ADD_FEATURE_BETWEEN_DLG_H_
29 #define _ADD_FEATURE_BETWEEN_DLG_H_
30 
31 #include <corelib/ncbistd.hpp>
45 
46 /*!
47  * Includes
48  */
49 
50 ////@begin includes
51 ////@end includes
52 
53 #include <wx/radiobox.h>
54 #include <wx/dialog.h>
55 #include <wx/radiobut.h>
56 #include <wx/sizer.h>
57 #include <wx/statbox.h>
58 #include <wx/button.h>
59 #include <wx/notebook.h>
60 
61 
62 /*!
63  * Forward declarations
64  */
65 
66 ////@begin forward declarations
67 class wxBoxSizer;
68 ////@end forward declarations
69 
71 
72 /*!
73  * Control identifiers
74  */
75 
76 ////@begin control identifiers
77 #define ID_ADD_FEATURE_BETWEEN_DLG 10029
78 #define SYMBOL_ADD_FEATURE_BETWEEN_DLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
79 #define SYMBOL_ADD_FEATURE_BETWEEN_DLG_TITLE _("Add Features")
80 #define SYMBOL_ADD_FEATURE_BETWEEN_DLG_IDNAME ID_ADD_FEATURE_BETWEEN_DLG
81 #define SYMBOL_ADD_FEATURE_BETWEEN_DLG_SIZE wxSize(400, 300)
82 #define SYMBOL_ADD_FEATURE_BETWEEN_DLG_POSITION wxDefaultPosition
83 ////@end control identifiers
84 #define ID_FEATURE_TABLE_TEXT 10030
85 #define ID_APPLY_BUTTON 10031
86 
87 /*!
88  * CAddFeatureBetweenDlg class declaration
89  */
90 
92 {
93  DECLARE_DYNAMIC_CLASS( CAddFeatureBetweenDlg )
94  DECLARE_EVENT_TABLE()
95 
96 public:
97  /// Constructors
99  CAddFeatureBetweenDlg( wxWindow* parent, objects::CSeq_entry_Handle seh, IWorkbench* workbench,
101 
102  /// Creation
103  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_ADD_FEATURE_BETWEEN_DLG_IDNAME, const wxString& caption = SYMBOL_ADD_FEATURE_BETWEEN_DLG_TITLE, const wxPoint& pos = SYMBOL_ADD_FEATURE_BETWEEN_DLG_POSITION, const wxSize& size = SYMBOL_ADD_FEATURE_BETWEEN_DLG_SIZE, long style = SYMBOL_ADD_FEATURE_BETWEEN_DLG_STYLE );
104 
105  /// Destructor
107 
108  /// Initialises member variables
109  void Init();
110 
111  /// Creates the controls and sizers
112  void CreateControls();
113 
114 ////@begin CAddFeatureBetweenDlg event handler declarations
115 
116 ////@end CAddFeatureBetweenDlg event handler declarations
117 
118 ////@begin CAddFeatureBetweenDlg member function declarations
119 
120  /// Retrieves bitmap resources
121  wxBitmap GetBitmapResource( const wxString& name );
122 
123  /// Retrieves icon resources
124  wxIcon GetIconResource( const wxString& name );
125 ////@end CAddFeatureBetweenDlg member function declarations
126 
127  /// Should we show tooltips?
128  static bool ShowToolTips();
129 
130 ////@begin CAddFeatureBetweenDlg member variables
131 
132 ////@end CAddFeatureBetweenDlg member variables
133 
135  virtual string GetErrorMessage();
136  void OnApplyButton(wxCommandEvent& event );
137  void OnFeatLeftChanged(wxCommandEvent& event);
138  void OnFeatRightChanged(wxCommandEvent& event);
139 
140 private:
141  void x_ListFeatures();
142  void GetFeatureLocations(vector<CRef<objects::CSeq_loc> > &locs);
143  void AddOneFeatureBetween(vector<CRef<objects::CSeq_loc> > &locs, TSignedSeqPos feat_left, TSignedSeqPos feat_right, bool partial_left, bool partial_right, objects::ENa_strand strand, const CSeq_id* id);
144 
145  objects::CSeq_entry_Handle m_TopSeqEntry;
147  wxNotebook *m_Notebook;
148  wxListBox *m_FeatureTypeLeft;
149  wxListBox *m_FeatureTypeRight;
150  wxArrayString m_FeatureTypeStrings;
153  vector<objects::CSeqFeatData::ESubtype> m_Subtype;
154  wxCheckBox *m_LeaveUp;
159 };
160 
161 
163 
164 #endif
165  // _ADD_FEATURE_BETWEEN_DLG_H_
#define SYMBOL_ADD_FEATURE_BETWEEN_DLG_SIZE
#define SYMBOL_ADD_FEATURE_BETWEEN_DLG_POSITION
#define SYMBOL_ADD_FEATURE_BETWEEN_DLG_TITLE
#define SYMBOL_ADD_FEATURE_BETWEEN_DLG_IDNAME
#define SYMBOL_ADD_FEATURE_BETWEEN_DLG_STYLE
static bool ShowToolTips()
Should we show tooltips?
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnApplyButton(wxCommandEvent &event)
CFeatureFieldNamePanel * m_FeatRightConstraint
virtual CRef< CCmdComposite > GetCommand()
bool Create(wxWindow *parent, wxWindowID id=10029, const wxString &caption=_("Add Features"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnFeatRightChanged(wxCommandEvent &event)
void OnFeatLeftChanged(wxCommandEvent &event)
vector< objects::CSeqFeatData::ESubtype > m_Subtype
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void CreateControls()
Creates the controls and sizers.
CStringConstraintPanel * m_StringConstraintPanelRight
void GetFeatureLocations(vector< CRef< objects::CSeq_loc > > &locs)
void AddOneFeatureBetween(vector< CRef< objects::CSeq_loc > > &locs, TSignedSeqPos feat_left, TSignedSeqPos feat_right, bool partial_left, bool partial_right, objects::ENa_strand strand, const CSeq_id *id)
CStringConstraintPanel * m_StringConstraintPanelLeft
CFeatureFieldNamePanel * m_FeatLeftConstraint
objects::CSeq_entry_Handle m_TopSeqEntry
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.
int TSignedSeqPos
Type for signed sequence position.
Definition: ncbimisc.hpp:887
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Thu Apr 11 15:13:45 2024 by modify_doxy.py rev. 669887