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

Go to the SVN repository for this file.

1 /* $Id: bulk_other_add_panel.hpp 32483 2015-03-06 22:14:30Z 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 _BULK_OTHER_ADD_PANEL_H_
29 #define _BULK_OTHER_ADD_PANEL_H_
30 
31 #include <corelib/ncbistd.hpp>
32 
36 
37 /*!
38  * Includes
39  */
40 
41 ////@begin includes
42 ////@end includes
43 
44 #include <wx/panel.h>
45 #include <wx/listbox.h>
46 #include <wx/sizer.h>
47 #include <wx/textctrl.h>
48 
49 /*!
50  * Forward declarations
51  */
52 
53 ////@begin forward declarations
54 class wxBoxSizer;
55 class CBulkLocationPanel;
56 ////@end forward declarations
57 
59 
60 
61 
62 /*!
63  * Control identifiers
64  */
65 
66 ////@begin control identifiers
67 #define ID_CBULKOTHERADDPANEL wxID_ANY
68 #define ID_FEATURE_TYPE_LISTBOX 10072
69 #define ID_TEXTCTRL11 10073
70 #define ID_TEXTCTRL12 10074
71 #define ID_TEXTCTRL14 10333
72 #define ID_WINDOW1 10070
73 #define SYMBOL_CBULKOTHERADDPANEL_STYLE wxTAB_TRAVERSAL
74 #define SYMBOL_CBULKOTHERADDPANEL_TITLE _("BulkOtherAddPanel")
75 #define SYMBOL_CBULKOTHERADDPANEL_IDNAME ID_CBULKOTHERADDPANEL
76 #define SYMBOL_CBULKOTHERADDPANEL_SIZE wxSize(400, 300)
77 #define SYMBOL_CBULKOTHERADDPANEL_POSITION wxDefaultPosition
78 ////@end control identifiers
79 
80 
81 /*!
82  * CBulkOtherAddPanel class declaration
83  */
84 
86 {
87  DECLARE_DYNAMIC_CLASS( CBulkOtherAddPanel )
88  DECLARE_EVENT_TABLE()
89 
90 public:
91  /// Constructors
93  CBulkOtherAddPanel( wxWindow* parent, objects::CSeq_entry_Handle seh, string key = "", bool add_location_panel = true, wxWindowID id = SYMBOL_CBULKOTHERADDPANEL_IDNAME, const wxPoint& pos = SYMBOL_CBULKOTHERADDPANEL_POSITION, const wxSize& size = SYMBOL_CBULKOTHERADDPANEL_SIZE, long style = SYMBOL_CBULKOTHERADDPANEL_STYLE );
94 
95  /// Creation
96  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CBULKOTHERADDPANEL_IDNAME, const wxPoint& pos = SYMBOL_CBULKOTHERADDPANEL_POSITION, const wxSize& size = SYMBOL_CBULKOTHERADDPANEL_SIZE, long style = SYMBOL_CBULKOTHERADDPANEL_STYLE );
97 
98  /// Destructor
100 
101  /// Initialises member variables
102  void Init();
103 
104  /// Creates the controls and sizers
105  void CreateControls();
106 
107 ////@begin CBulkOtherAddPanel event handler declarations
108 
109  /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_FEATURE_TYPE_LISTBOX
110  void OnFeatureTypeListboxSelected( wxCommandEvent& event );
111 
112 ////@end CBulkOtherAddPanel event handler declarations
113 
114 ////@begin CBulkOtherAddPanel member function declarations
115 
116  /// Retrieves bitmap resources
117  wxBitmap GetBitmapResource( const wxString& name );
118 
119  /// Retrieves icon resources
120  wxIcon GetIconResource( const wxString& name );
121 ////@end CBulkOtherAddPanel member function declarations
122 
123  /// Should we show tooltips?
124  static bool ShowToolTips();
125 
126 ////@begin CBulkOtherAddPanel member variables
127  wxListBox* m_FeatureType;
128  wxBoxSizer* m_GBQualSizer;
129  wxTextCtrl* m_Locus;
130  wxTextCtrl* m_GeneDesc;
131  wxTextCtrl* m_Comment;
132 ////@end CBulkOtherAddPanel member variables
134  virtual string GetErrorMessage();
135  virtual void AddOneCommand(const objects::CBioseq_Handle& bsh, CRef<CCmdComposite> cmd);
136 
137 private:
138 
139  objects::CSeq_entry_Handle m_TopSeqEntry;
140  string m_DefaultKey;
143  void x_ListFeatures();
144  void x_ChangeFeatureType(const string& key);
145  void x_AddQuals(objects::CSeq_feat& feat);
146  void x_AddGeneQuals(objects::CSeq_feat& gene);
147 };
148 
150 
151 #endif
152  // _BULK_OTHER_ADD_PANEL_H_
#define SYMBOL_CBULKOTHERADDPANEL_POSITION
#define SYMBOL_CBULKOTHERADDPANEL_STYLE
#define SYMBOL_CBULKOTHERADDPANEL_SIZE
#define SYMBOL_CBULKOTHERADDPANEL_IDNAME
virtual CRef< CCmdComposite > GetCommand()
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
virtual void AddOneCommand(const objects::CBioseq_Handle &bsh, CRef< CCmdComposite > cmd)
CBulkOtherAddPanel(wxWindow *parent, objects::CSeq_entry_Handle seh, string key="", bool add_location_panel=true, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnFeatureTypeListboxSelected(wxCommandEvent &event)
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_FEATURE_TYPE_LISTBOX
CBulkOtherAddPanel()
Constructors.
void Init()
Initialises member variables.
CRef< objects::CSeq_feat > m_QualFeat
void x_AddGeneQuals(objects::CSeq_feat &gene)
virtual string GetErrorMessage()
void x_ChangeFeatureType(const string &key)
static bool ShowToolTips()
Should we show tooltips?
objects::CSeq_entry_Handle m_TopSeqEntry
void x_AddQuals(objects::CSeq_feat &feat)
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
const struct ncbi::grid::netcache::search::fields::KEY key
Modified on Wed Apr 17 13:10:25 2024 by modify_doxy.py rev. 669887