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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___MACRO_FEATS_ON_SEQ_CONSTRAINT_PANEL__HPP
2 #define GUI_WIDGETS_EDIT___MACRO_FEATS_ON_SEQ_CONSTRAINT_PANEL__HPP
3 /* $Id: macro_feats_on_seq_constraint_panel.hpp 46865 2021-11-15 20:54:03Z asztalos $
4  * ===========================================================================
5  *
6  * PUBLIC DOMAIN NOTICE
7  * National Center for Biotechnology Information
8  *
9  * This software/database is a "United States Government Work" under the
10  * terms of the United States Copyright Act. It was written as part of
11  * the author's official duties as a United States Government employee and
12  * thus cannot be copyrighted. This software/database is freely available
13  * to the public for use. The National Library of Medicine and the U.S.
14  * Government have not placed any restriction on its use or reproduction.
15  *
16  * Although all reasonable efforts have been taken to ensure the accuracy
17  * and reliability of the software and data, the NLM and the U.S.
18  * Government do not and cannot warrant the performance or results that
19  * may be obtained by using this software or data. The NLM and the U.S.
20  * Government disclaim all warranties, express or implied, including
21  * warranties of performance, merchantability or fitness for any particular
22  * purpose.
23  *
24  * Please cite the author in any work or product based on this material.
25  *
26  * ===========================================================================
27  *
28  * Authors: Igor Filippov
29  *
30  * File Description:
31  *
32  */
33 
34 #include <corelib/ncbistd.hpp>
36 
37 #include <wx/panel.h>
38 
39 class wxChoice;
40 class wxTextCtrl;
41 
43 
44 class CFeatureTypePanel;
45 
46 
47 /*!
48  * Control identifiers
49  */
50 
51 ////@begin control identifiers
52 #define ID_MACRO_FEATS_ON_SEQ wxID_ANY
53 #define ID_MACRO_FEATS_CHOICE 10089
54 #define ID_MACRO_FEATS_LENGTHTEXT 10090
55 #define ID_MACRO_FEATS_DISTCHOICE1 10091
56 #define ID_MACRO_FEATS_DISTCHOICE2 10092
57 #define SYMBOL_MACRO_FEATS_ON_SEQ_STYLE wxTAB_TRAVERSAL
58 #define SYMBOL_MACRO_FEATS_ON_SEQ_IDNAME ID_MACRO_FEATS_ON_SEQ
59 #define SYMBOL_MACRO_FEATS_ON_SEQ_SIZE wxDefaultSize
60 #define SYMBOL_MACRO_FEATS_ON_SEQ_POSITION wxDefaultPosition
61 ////@end control identifiers
62 
63 
64 /*!
65  * CMacroFeatsOnSeqPanel class declaration
66  */
67 
68 class CMacroFeatsOnSeqPanel : public wxPanel, public CMacroMatcherPanelBase
69 {
70  DECLARE_CLASS(CMacroFeatsOnSeqPanel)
71  DECLARE_EVENT_TABLE()
72 
73 public:
74  /// Constructors
76  CMacroFeatsOnSeqPanel(wxWindow* parent,
77  wxWindowID id = SYMBOL_MACRO_FEATS_ON_SEQ_IDNAME,
78  const wxPoint& pos = SYMBOL_MACRO_FEATS_ON_SEQ_POSITION,
79  const wxSize& size = SYMBOL_MACRO_FEATS_ON_SEQ_SIZE,
80  long style = SYMBOL_MACRO_FEATS_ON_SEQ_STYLE);
81 
82  bool Create( wxWindow* parent,
83  wxWindowID id = SYMBOL_MACRO_FEATS_ON_SEQ_IDNAME,
84  const wxPoint& pos = SYMBOL_MACRO_FEATS_ON_SEQ_POSITION,
85  const wxSize& size = SYMBOL_MACRO_FEATS_ON_SEQ_SIZE,
86  long style = SYMBOL_MACRO_FEATS_ON_SEQ_STYLE);
87 
88  /// Destructor
90 
91  /// Initialises member variables
92  void Init();
93 
94  /// Creates the controls and sizers
95  void CreateControls();
96 
97 ////@begin CMacroFeatsOnSeqPanel event handler declarations
98  void OnLengthTextCtrlUpdate(wxUpdateUIEvent &event);
99 ////@end CMacroFeatsOnSeqPanel event handler declarations
100 
101 ////@begin CMacroFeatsOnSeqPanel member function declarations
102 
103  /// Retrieves bitmap resources
104  wxBitmap GetBitmapResource( const wxString& name );
105 
106  /// Retrieves icon resources
107  wxIcon GetIconResource( const wxString& name );
108 ////@end CMacroFeatsOnSeqPanel member function declarations
109 
110  /// Should we show tooltips?
111  static bool ShowToolTips();
112 
113  void OnDistanceSelected(wxCommandEvent& event);
114 
115  virtual vector<CFuncWithArgs> GetFuncWithArgs(const pair<string, string>& target, size_t num) const;
116  virtual pair<string, string> GetMatcher(const pair<string, string>& target, size_t num);
117  virtual void SetMatcher(const vector<CFuncWithArgs>& func_info);
118 
119  string GetLocationConstraint(const string &feat, const string& target);
120  string GetDescription(const string& feat) const;
121 
122 
123 private:
124 
125  wxArrayString x_GetFeatureChoices();
126 ////@begin CMacroFeatsOnSeqPanel member variables
128  wxChoice* m_FeatChoice;
129  wxTextCtrl* m_FeatCount;
130 
131  wxChoice* m_LengthChoice;
132  wxTextCtrl* m_Length;
133 
134  wxChoice* m_SeqReprChoice;
135  wxChoice* m_Dist5EndChoice;
136  wxChoice* m_Dist3EndChoice;
137  wxTextCtrl* m_5EndDistance;
138  wxTextCtrl* m_3EndDistance;
141 
142 ////@end CMacroFeatsOnSeqPanel member variables
143 };
144 
146 
147 #endif
148  // GUI_WIDGETS_EDIT___MACRO_FEATS_ON_SEQ_CONSTRAINT_PANEL__HPP
void OnDistanceSelected(wxCommandEvent &event)
string GetLocationConstraint(const string &feat, const string &target)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnLengthTextCtrlUpdate(wxUpdateUIEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
string GetDescription(const string &feat) const
virtual void SetMatcher(const vector< CFuncWithArgs > &func_info)
virtual vector< CFuncWithArgs > GetFuncWithArgs(const pair< string, string > &target, size_t num) const
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
static bool ShowToolTips()
Should we show tooltips?
void CreateControls()
Creates the controls and sizers.
virtual pair< string, string > GetMatcher(const pair< string, string > &target, size_t num)
void Init()
Initialises member variables.
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
#define SYMBOL_MACRO_FEATS_ON_SEQ_POSITION
#define SYMBOL_MACRO_FEATS_ON_SEQ_STYLE
#define SYMBOL_MACRO_FEATS_ON_SEQ_SIZE
#define SYMBOL_MACRO_FEATS_ON_SEQ_IDNAME
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Mon Apr 22 04:00:58 2024 by modify_doxy.py rev. 669887