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 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 #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 OnAnySelected( wxCommandEvent& event );
94 
95 ////@end CMacroLocationConstraintPanel event handler declarations
96 
97 ////@begin CMacroLocationConstraintPanel member function declarations
98 
99  /// Retrieves bitmap resources
100  wxBitmap GetBitmapResource( const wxString& name );
101 
102  /// Retrieves icon resources
103  wxIcon GetIconResource( const wxString& name );
104 ////@end CMacroLocationConstraintPanel member function declarations
105 
106  /// Should we show tooltips?
107  static bool ShowToolTips();
108 
109  virtual pair<string, string> GetMatcher(const pair<string, string>& target, size_t num);
110  virtual vector<CFuncWithArgs> GetFuncWithArgs(const pair<string, string>& target, size_t num) const;
111 
112  virtual void SetMatcher(const vector<CFuncWithArgs>& func_info);
113 
114  string GetLocationConstraint();
115  string GetDescription() const;
116 private:
117  wxChoice* m_Strand;
118  wxChoice* m_NucOrProt;
119  wxChoice* m_5Partial;
120  wxChoice* m_3Partial;
121  wxChoice* m_LocType;
122  wxChoice* m_5DistType;
123  wxTextCtrl* m_5Dist;
124  wxChoice* m_3DistType;
125  wxTextCtrl* m_3Dist;
126 };
127 
129 
130 #endif
131  // 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.
void OnAnySelected(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for wxID_ANY
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.
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 Thu Feb 22 17:07:03 2024 by modify_doxy.py rev. 669887