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

Go to the SVN repository for this file.

1 /* $Id: apply_gcode.hpp 42311 2019-01-31 14:37:04Z 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 _APPLY_GCODE_H_
29 #define _APPLY_GCODE_H_
30 
31 #include <corelib/ncbistd.hpp>
36 #include <wx/dialog.h>
37 #include <wx/choice.h>
38 
40 
41 #define ID_APPLY_GCODE wxID_ANY
42 #define SYMBOL_APPLY_GCODE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
43 #define SYMBOL_APPLY_GCODE_TITLE _("Batch Apply Genetic Code")
44 #define SYMBOL_APPLY_GCODE_IDNAME ID_APPLY_GCODE
45 #define SYMBOL_APPLY_GCODE_SIZE wxDefaultSize
46 #define SYMBOL_APPLY_GCODE_POSITION wxDefaultPosition
47 
49 {
50  DECLARE_DYNAMIC_CLASS( CApplyGCode )
51  DECLARE_EVENT_TABLE()
52 
53 public:
54  /// Constructors
55  CApplyGCode();
56  CApplyGCode( wxWindow* parent, objects::CSeq_entry_Handle seh, wxWindowID id = SYMBOL_APPLY_GCODE_IDNAME, const wxString& caption = SYMBOL_APPLY_GCODE_TITLE, const wxPoint& pos = SYMBOL_APPLY_GCODE_POSITION, const wxSize& size = SYMBOL_APPLY_GCODE_SIZE, long style = SYMBOL_APPLY_GCODE_STYLE );
57 
58  /// Creation
59  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_APPLY_GCODE_IDNAME, const wxString& caption = SYMBOL_APPLY_GCODE_TITLE, const wxPoint& pos = SYMBOL_APPLY_GCODE_POSITION, const wxSize& size = SYMBOL_APPLY_GCODE_SIZE, long style = SYMBOL_APPLY_GCODE_STYLE );
60 
61  /// Destructor
62  ~CApplyGCode();
63 
64  /// Initialises member variables
65  void Init();
66 
67  /// Creates the controls and sizers
68  void CreateControls();
69 
70  /// Retrieves bitmap resources
71  wxBitmap GetBitmapResource( const wxString& name );
72 
73  /// Retrieves icon resources
74  wxIcon GetIconResource( const wxString& name );
75 
76  /// Should we show tooltips?
77  static bool ShowToolTips();
78 
80 
81 private:
82  void x_FindBioSource(CRef<CCmdComposite> composite);
83  void x_ApplyToDescriptors(const objects::CSeq_entry& se, CCmdComposite* composite);
84  void x_ApplyToBioSource(objects::CBioSource& biosource);
85 
86  objects::CSeq_entry_Handle m_TopSeqEntry;
87  vector<pair<string,int> > m_GenCodes;
88  wxChoice *m_Code;
89 
90 };
91 
93 
94 #endif
95  // _APPLY_GCODE_H_
#define SYMBOL_APPLY_GCODE_IDNAME
Definition: apply_gcode.hpp:44
#define SYMBOL_APPLY_GCODE_SIZE
Definition: apply_gcode.hpp:45
#define SYMBOL_APPLY_GCODE_STYLE
Definition: apply_gcode.hpp:42
#define SYMBOL_APPLY_GCODE_TITLE
Definition: apply_gcode.hpp:43
#define SYMBOL_APPLY_GCODE_POSITION
Definition: apply_gcode.hpp:46
void x_FindBioSource(CRef< CCmdComposite > composite)
void CreateControls()
Creates the controls and sizers.
CRef< CCmdComposite > GetCommand()
void Init()
Initialises member variables.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Batch Apply Genetic Code"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
Definition: apply_gcode.cpp:90
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
objects::CSeq_entry_Handle m_TopSeqEntry
Definition: apply_gcode.hpp:86
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
~CApplyGCode()
Destructor.
static bool ShowToolTips()
Should we show tooltips?
wxChoice * m_Code
Definition: apply_gcode.hpp:88
vector< pair< string, int > > m_GenCodes
Definition: apply_gcode.hpp:87
CApplyGCode()
Constructors.
Definition: apply_gcode.cpp:72
void x_ApplyToBioSource(objects::CBioSource &biosource)
void x_ApplyToDescriptors(const objects::CSeq_entry &se, CCmdComposite *composite)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#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 Sat Feb 24 07:49:23 2024 by modify_doxy.py rev. 669887