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

Go to the SVN repository for this file.

1 /* $Id: bulk_rna_add_panel.hpp 47498 2023-05-19 19:50: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: Colleen Bollin
27  */
28 #ifndef _BULK_RNA_ADD_PANEL_H_
29 #define _BULK_RNA_ADD_PANEL_H_
30 
31 #include <corelib/ncbistd.hpp>
33 
36 
37 /*!
38  * Includes
39  */
40 
41 ////@begin includes
42 ////@end includes
43 
44 #include <wx/panel.h>
45 #include <wx/checkbox.h>
46 #include <wx/choice.h>
47 #include <wx/sizer.h>
48 #include <wx/textctrl.h>
49 #include <wx/combobox.h>
50 
51 /*!
52  * Forward declarations
53  */
54 
55 ////@begin forward declarations
56 class wxFlexGridSizer;
57 class wxBoxSizer;
58 class CBulkLocationPanel;
59 ////@end forward declarations
60 
62 
63 /*!
64  * Control identifiers
65  */
66 
67 ////@begin control identifiers
68 #define ID_CBULKRNAADDPANEL 10062
69 #define ID_CHOICE1 10063
70 #define ID_COMBOBOX 10064
71 #define ID_TEXTCTRL10 10067
72 #define ID_BUTTON11 10068
73 #define ID_BUTTON12 10069
74 #define ID_WINDOW1 10070
75 #define SYMBOL_CBULKRNAADDPANEL_STYLE wxTAB_TRAVERSAL
76 #define SYMBOL_CBULKRNAADDPANEL_TITLE _("BulkRNAAddPanel")
77 #define SYMBOL_CBULKRNAADDPANEL_IDNAME ID_CBULKRNAADDPANEL
78 #define SYMBOL_CBULKRNAADDPANEL_SIZE wxSize(400, 300)
79 #define SYMBOL_CBULKRNAADDPANEL_POSITION wxDefaultPosition
80 ////@end control identifiers
81 
82 
83 /*!
84  * CBulkRNAAddPanel class declaration
85  */
86 
88 {
89  DECLARE_DYNAMIC_CLASS( CBulkRNAAddPanel )
90  DECLARE_EVENT_TABLE()
91 
92 public:
93  /// Constructors
95  CBulkRNAAddPanel( wxWindow* parent, objects::CSeq_entry_Handle seh, bool add_location_panel = true, wxWindowID id = SYMBOL_CBULKRNAADDPANEL_IDNAME, const wxPoint& pos = SYMBOL_CBULKRNAADDPANEL_POSITION, const wxSize& size = SYMBOL_CBULKRNAADDPANEL_SIZE, long style = SYMBOL_CBULKRNAADDPANEL_STYLE );
96 
97  /// Creation
98  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CBULKRNAADDPANEL_IDNAME, const wxPoint& pos = SYMBOL_CBULKRNAADDPANEL_POSITION, const wxSize& size = SYMBOL_CBULKRNAADDPANEL_SIZE, long style = SYMBOL_CBULKRNAADDPANEL_STYLE );
99 
100  /// Destructor
102 
103  /// Initialises member variables
104  void Init();
105 
106  /// Creates the controls and sizers
107  void CreateControls();
108 
109 ////@begin CBulkRNAAddPanel event handler declarations
110 
111  /// wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE1
112  void OnSelectRNAType( wxCommandEvent& event );
113 
114  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON11
115  void OnAdd18SToComment( wxCommandEvent& event );
116 
117  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON12
118  void OnAdd16StoComment( wxCommandEvent& event );
119 
120 ////@end CBulkRNAAddPanel event handler declarations
121 
122 ////@begin CBulkRNAAddPanel member function declarations
123 
124  /// Retrieves bitmap resources
125  wxBitmap GetBitmapResource( const wxString& name );
126 
127  /// Retrieves icon resources
128  wxIcon GetIconResource( const wxString& name );
129 ////@end CBulkRNAAddPanel member function declarations
130 
131  /// Should we show tooltips?
132  static bool ShowToolTips();
133 
134 ////@begin CBulkRNAAddPanel member variables
135  wxChoice* m_RNAType;
136  wxComboBox* m_ncRNAClass;
137  wxFlexGridSizer* m_FieldSizer;
138  wxBoxSizer* m_RNANameSizer;
139  wxTextCtrl* m_Comment;
140  wxBoxSizer* m_ButtonsSizer;
141 ////@end CBulkRNAAddPanel member variables
143  virtual string GetErrorMessage();
144  void AddOneCommand(const objects::CBioseq_Handle& bsh, CRef<CCmdComposite> cmd) override;
145 private:
146  objects::CSeq_entry_Handle m_TopSeqEntry;
147  wxChoice* m_tRNAname;
148  wxTextCtrl* m_RNAname;
149  wxComboBox* m_rRNAname;
150  wxTextCtrl* m_Locus;
151  wxTextCtrl* m_GeneDesc;
152 
153  void x_RemoveRNANames();
154  bool x_AddrRNAName();
155  bool x_AddGeneFields();
156  bool x_RemoveGeneFields();
157  objects::CRNA_ref::TType x_GetRnaType();
158  string x_GetRnaName();
159 };
160 
162 
163 #endif
164  // _BULK_RNA_ADD_PANEL_H_
#define SYMBOL_CBULKRNAADDPANEL_POSITION
#define SYMBOL_CBULKRNAADDPANEL_STYLE
#define SYMBOL_CBULKRNAADDPANEL_SIZE
#define SYMBOL_CBULKRNAADDPANEL_IDNAME
wxBoxSizer * m_ButtonsSizer
virtual string GetErrorMessage()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnAdd16StoComment(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON12
wxBoxSizer * m_RNANameSizer
wxFlexGridSizer * m_FieldSizer
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
objects::CRNA_ref::TType x_GetRnaType()
void CreateControls()
Creates the controls and sizers.
objects::CSeq_entry_Handle m_TopSeqEntry
CBulkRNAAddPanel(wxWindow *parent, objects::CSeq_entry_Handle seh, bool add_location_panel=true, wxWindowID id=10062, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
bool Create(wxWindow *parent, wxWindowID id=10062, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
~CBulkRNAAddPanel()
Destructor.
void Init()
Initialises member variables.
void AddOneCommand(const objects::CBioseq_Handle &bsh, CRef< CCmdComposite > cmd) override
CBulkRNAAddPanel()
Constructors.
void OnSelectRNAType(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE1
void OnAdd18SToComment(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON11
virtual CRef< CCmdComposite > GetCommand()
static bool ShowToolTips()
Should we show tooltips?
Include a standard set of the NCBI C++ Toolkit most basic headers.
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
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Fri Sep 20 14:57:12 2024 by modify_doxy.py rev. 669887