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

Go to the SVN repository for this file.

1 /* $Id: correct_rna_strand_dlg.hpp 30500 2014-06-03 16:08:32Z filippov $
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 _CORRECT_RNA_STRAND_DLG_H_
29 #define _CORRECT_RNA_STRAND_DLG_H_
30 
31 #include <corelib/ncbistd.hpp>
32 #include <objmgr/bioseq_handle.hpp>
34 
35 /*!
36  * Includes
37  */
38 
39 ////@begin includes
40 ////@end includes
41 
42 #include <wx/sizer.h>
43 #include <wx/checkbox.h>
44 #include <wx/scrolwin.h>
45 
46 /*!
47  * Forward declarations
48  */
49 
50 ////@begin forward declarations
51 class wxBoxSizer;
52 ////@end forward declarations
53 
55 
56 /*!
57  * Control identifiers
58  */
59 
60 ////@begin control identifiers
61 #define ID_CCORRECTRNASTRANDDLG 10299
62 #define ID_RNA_STRAND_SCROLLEDWINDOW 10300
63 #define ID_REFRESH_STRAND_BTN 10301
64 #define ID_REVERSE_FEATURES_BTN 10302
65 #define ID_USE_SMART_FOR_STRAND_BTN 10303
66 #define ID_AUTOCORRECT_STRAND_BTN 10304
67 #define ID_CANCEL_RNA_STRAND_BTN 10305
68 #define SYMBOL_CCORRECTRNASTRANDDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
69 #define SYMBOL_CCORRECTRNASTRANDDLG_TITLE _("Correct RNA Strandedness")
70 #define SYMBOL_CCORRECTRNASTRANDDLG_IDNAME ID_CCORRECTRNASTRANDDLG
71 #define SYMBOL_CCORRECTRNASTRANDDLG_SIZE wxSize(400, 300)
72 #define SYMBOL_CCORRECTRNASTRANDDLG_POSITION wxDefaultPosition
73 ////@end control identifiers
74 
75 
76 /*!
77  * CCorrectRNAStrandDlg class declaration
78  */
79 
81 {
82  DECLARE_DYNAMIC_CLASS( CCorrectRNAStrandDlg )
83  DECLARE_EVENT_TABLE()
84 
85 public:
86  /// Constructors
88  CCorrectRNAStrandDlg( wxWindow* parent, IWorkbench* wb, wxWindowID id = SYMBOL_CCORRECTRNASTRANDDLG_IDNAME, const wxString& caption = SYMBOL_CCORRECTRNASTRANDDLG_TITLE, const wxPoint& pos = SYMBOL_CCORRECTRNASTRANDDLG_POSITION, const wxSize& size = SYMBOL_CCORRECTRNASTRANDDLG_SIZE, long style = SYMBOL_CCORRECTRNASTRANDDLG_STYLE );
89 
90  /// Creation
91  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CCORRECTRNASTRANDDLG_IDNAME, const wxString& caption = SYMBOL_CCORRECTRNASTRANDDLG_TITLE, const wxPoint& pos = SYMBOL_CCORRECTRNASTRANDDLG_POSITION, const wxSize& size = SYMBOL_CCORRECTRNASTRANDDLG_SIZE, long style = SYMBOL_CCORRECTRNASTRANDDLG_STYLE );
92 
93  /// Destructor
95 
96  /// Initialises member variables
97  void Init();
98 
99  /// Creates the controls and sizers
100  void CreateControls();
101 
102 ////@begin CCorrectRNAStrandDlg event handler declarations
103 
104  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_REFRESH_STRAND_BTN
105  void OnRefreshStrandBtnClick( wxCommandEvent& event );
106 
107  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_AUTOCORRECT_STRAND_BTN
108  void OnAutocorrectStrandBtnClick( wxCommandEvent& event );
109 
110  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CANCEL_RNA_STRAND_BTN
111  void OnCancelRnaStrandBtnClick( wxCommandEvent& event );
112 
113 ////@end CCorrectRNAStrandDlg event handler declarations
114 
115 ////@begin CCorrectRNAStrandDlg member function declarations
116 
117  /// Retrieves bitmap resources
118  wxBitmap GetBitmapResource( const wxString& name );
119 
120  /// Retrieves icon resources
121  wxIcon GetIconResource( const wxString& name );
122 ////@end CCorrectRNAStrandDlg member function declarations
123 
124  /// Should we show tooltips?
125  static bool ShowToolTips();
126 
127 ////@begin CCorrectRNAStrandDlg member variables
128  wxScrolledWindow* m_SequenceListWindow;
129  wxBoxSizer* m_SequenceListSizer;
130  wxCheckBox* m_ReverseFeaturesBtn;
131  wxCheckBox* m_UseSmart;
132 ////@end CCorrectRNAStrandDlg member variables
133 
134  // for CBulkCmdDlg
136  virtual string GetErrorMessage();
137 
138 protected:
143  vector<CBioseq_Handle> m_SeqList;
144  vector<wxCheckBox *>m_PickList;
146  vector<string> m_AccessionList;
147 
149  void x_AddRow(const string& text, const string& status, bool selected);
150 
151  void x_GetStatusSMART();
152  void x_ProcessRNAStrandLine(const CTempString& line, size_t pos, size_t max);
153  void x_GetStatusLocal();
154 
155  typedef enum {
164 
165  ERNAstrand_return_val x_StrandFromString(const string& status);
168 
169  vector<ERNAstrand_return_val> m_StatusList;
170 };
171 
173 
174 #endif
175  // _CORRECT_RNA_STRAND_DLG_H_
CBioseq_Handle –.
void Init()
Initialises member variables.
void x_ProcessRNAStrandLine(const CTempString &line, size_t pos, size_t max)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
ERNAstrand_return_val x_StrandFromString(const string &status)
static bool ShowToolTips()
Should we show tooltips?
wxScrolledWindow * m_SequenceListWindow
vector< ERNAstrand_return_val > m_StatusList
vector< CBioseq_Handle > m_SeqList
void OnCancelRnaStrandBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CANCEL_RNA_STRAND_BTN
void CreateControls()
Creates the controls and sizers.
void x_AddRow(const string &text, const string &status, bool selected)
vector< wxCheckBox * > m_PickList
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void x_ReverseFeatures(CBioseq_Handle bsh, CRef< CCmdComposite > cmd)
void OnRefreshStrandBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_REFRESH_STRAND_BTN
bool Create(wxWindow *parent, wxWindowID id=10299, const wxString &caption=_("Correct RNA Strandedness"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
virtual CRef< CCmdComposite > GetCommand()
void OnAutocorrectStrandBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_AUTOCORRECT_STRAND_BTN
string x_StringFromStrand(ERNAstrand_return_val rval)
map< string, CBioseq_Handle > m_SeqMap
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
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 SYMBOL_CCORRECTRNASTRANDDLG_IDNAME
#define SYMBOL_CCORRECTRNASTRANDDLG_SIZE
#define SYMBOL_CCORRECTRNASTRANDDLG_TITLE
#define SYMBOL_CCORRECTRNASTRANDDLG_STYLE
#define SYMBOL_CCORRECTRNASTRANDDLG_POSITION
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
#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 void text(MDB_val *v)
Definition: mdb_dump.c:62
const struct ncbi::grid::netcache::search::fields::SIZE size
T max(T x_, T y_)
Modified on Fri Apr 12 17:23:27 2024 by modify_doxy.py rev. 669887