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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___MACRO_LOC_CONSTRAINT_PANEL__HPP
2 #define GUI_WIDGETS_EDIT___MACRO_LOC_CONSTRAINT_PANEL__HPP
3 /* $Id: macro_loc_constraint_panel.hpp 47519 2023-06-28 21:06:00Z 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 #include <wx/panel.h>
37 
38 class wxChoice;
39 class wxTextCtrl;
40 
42 
43 
44 /*!
45  * Control identifiers
46  */
47 
48 ////@begin control identifiers
49 #define ID_CMACROLOCATIONCONSTRAINT wxID_ANY
50 #define SYMBOL_CMACROLOCATIONCONSTRAINT_STYLE wxTAB_TRAVERSAL
51 #define SYMBOL_CMACROLOCATIONCONSTRAINT_IDNAME ID_CMACROLOCATIONCONSTRAINT
52 #define SYMBOL_CMACROLOCATIONCONSTRAINT_SIZE wxDefaultSize
53 #define SYMBOL_CMACROLOCATIONCONSTRAINT_POSITION wxDefaultPosition
54 ////@end control identifiers
55 
56 
57 /*!
58  * CMacroLocationConstraintPanel class declaration
59  */
60 
62 {
63  DECLARE_CLASS(CMacroLocationConstraintPanel)
64  DECLARE_EVENT_TABLE()
65 
66 public:
67  /// Constructors
69  CMacroLocationConstraintPanel(wxWindow* parent,
71  const wxPoint& pos = SYMBOL_CMACROLOCATIONCONSTRAINT_POSITION,
74 
75  bool Create( wxWindow* parent,
77  const wxPoint& pos = SYMBOL_CMACROLOCATIONCONSTRAINT_POSITION,
80 
81  /// Destructor
83 
84  /// Initialises member variables
85  void Init();
86 
87  /// Creates the controls and sizers
88  void CreateControls();
89 
90 ////@begin CMacroLocationConstraintPanel event handler declarations
91 
92  /// wxEVT_COMMAND_CHOICE_SELECTED event handler for wxID_ANY
93  void OnLengthSelected(wxCommandEvent& event);
94  void On5DistSelected(wxCommandEvent& event);
95  void On3DistSelected(wxCommandEvent& event);
96 
97 ////@end CMacroLocationConstraintPanel event handler declarations
98 
99 ////@begin CMacroLocationConstraintPanel member function declarations
100 
101  /// Retrieves bitmap resources
102  wxBitmap GetBitmapResource( const wxString& name );
103 
104  /// Retrieves icon resources
105  wxIcon GetIconResource( const wxString& name );
106 ////@end CMacroLocationConstraintPanel member function declarations
107 
108  /// Should we show tooltips?
109  static bool ShowToolTips();
110 
111  virtual pair<string, string> GetMatcher(const pair<string, string>& target, size_t num);
112  virtual vector<CFuncWithArgs> GetFuncWithArgs(const pair<string, string>& target, size_t num) const;
113 
114  virtual void SetMatcher(const vector<CFuncWithArgs>& func_info);
115 
116  string GetLocationConstraint();
117  string GetDescription() const;
118 
119  enum {
121  ID_5DISTCONSTR = 10891,
122  ID_3DISTCONSTR = 10892
123  };
124 private:
125  wxChoice* m_Strand;
126  wxChoice* m_NucOrProt;
127  wxChoice* m_5Partial;
128  wxChoice* m_3Partial;
129  wxChoice* m_LocType;
130  wxChoice* m_LengthType;
131  wxTextCtrl* m_Length;
132  wxChoice* m_5DistType;
133  wxTextCtrl* m_5Dist;
134  wxChoice* m_3DistType;
135  wxTextCtrl* m_3Dist;
136 };
137 
139 
140 #endif
141  // GUI_WIDGETS_EDIT___MACRO_LOC_CONSTRAINT_PANEL__HPP
virtual pair< string, string > GetMatcher(const pair< string, string > &target, size_t num)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
virtual void SetMatcher(const vector< CFuncWithArgs > &func_info)
void Init()
Initialises member variables.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual vector< CFuncWithArgs > GetFuncWithArgs(const pair< string, string > &target, size_t num) const
void CreateControls()
Creates the controls and sizers.
static bool ShowToolTips()
Should we show tooltips?
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnLengthSelected(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for wxID_ANY
void On5DistSelected(wxCommandEvent &event)
void On3DistSelected(wxCommandEvent &event)
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_CMACROLOCATIONCONSTRAINT_POSITION
#define SYMBOL_CMACROLOCATIONCONSTRAINT_STYLE
#define SYMBOL_CMACROLOCATIONCONSTRAINT_IDNAME
#define SYMBOL_CMACROLOCATIONCONSTRAINT_SIZE
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Fri Sep 20 14:57:19 2024 by modify_doxy.py rev. 669887