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

Go to the SVN repository for this file.

1 #ifndef PKG_SEQUENCE___LBLAST_PARAMS_PANEL__HPP
2 #define PKG_SEQUENCE___LBLAST_PARAMS_PANEL__HPP
3 
4 /* $Id: lblast_params_panel.hpp 33831 2015-09-18 15:20:46Z katargir $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Roman Katargin
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 #include <gui/gui_export.h>
34 
35 /*!
36  * Includes
37  */
38 
39 #include <wx/panel.h>
40 #include <wx/valgen.h>
41 #include <wx/timer.h>
42 
44 
45 class wxTextCtrl;
46 class wxRadioBox;
47 class wxCheckBox;
48 
49 /*!
50  * Forward declarations
51  */
52 
53 ////@begin forward declarations
54 class wxBoxSizer;
55 ////@end forward declarations
56 
57 /*!
58  * Control identifiers
59  */
60 
61 ////@begin control identifiers
62 #define SYMBOL_CLBLASTPARAMSPANEL_STYLE wxTAB_TRAVERSAL
63 #define SYMBOL_CLBLASTPARAMSPANEL_TITLE _("LBLAST Params Panel")
64 #define SYMBOL_CLBLASTPARAMSPANEL_IDNAME ID_CLBLASTPARAMSPANEL
65 #define SYMBOL_CLBLASTPARAMSPANEL_SIZE wxSize(400, 300)
66 #define SYMBOL_CLBLASTPARAMSPANEL_POSITION wxDefaultPosition
67 ////@end control identifiers
68 
70 
71 /*!
72  * CLBLASTParamsPanel class declaration
73  */
74 
76 {
77  DECLARE_DYNAMIC_CLASS( CLBLASTParamsPanel )
78  DECLARE_EVENT_TABLE()
79 
80 public:
81  /// Constructors
83  CLBLASTParamsPanel( wxWindow* parent, wxWindowID id = SYMBOL_CLBLASTPARAMSPANEL_IDNAME, const wxPoint& pos = SYMBOL_CLBLASTPARAMSPANEL_POSITION, const wxSize& size = SYMBOL_CLBLASTPARAMSPANEL_SIZE, long style = SYMBOL_CLBLASTPARAMSPANEL_STYLE );
84 
85  /// Creation
86  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CLBLASTPARAMSPANEL_IDNAME, const wxPoint& pos = SYMBOL_CLBLASTPARAMSPANEL_POSITION, const wxSize& size = SYMBOL_CLBLASTPARAMSPANEL_SIZE, long style = SYMBOL_CLBLASTPARAMSPANEL_STYLE );
87 
88  /// Destructor
90 
91  /// Initialises member variables
92  void Init();
93 
94  /// Creates the controls and sizers
95  void CreateControls();
96 
97  /// Transfer data to the window
98  virtual bool TransferDataToWindow();
99 
100  /// Transfer data from the window
101  virtual bool TransferDataFromWindow();
102 
103 ////@begin CLBLASTParamsPanel event handler declarations
104 
105  /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX1
106  void OnSeqTypeSelected( wxCommandEvent& event );
107 
108  /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL2
109  void OnDBTextUpdated( wxCommandEvent& event );
110 
111  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON
112  void OnSelectDir( wxCommandEvent& event );
113 
114 ////@end CLBLASTParamsPanel event handler declarations
115 
116  void OnTimer(wxTimerEvent& event);
117 
118 ////@begin CLBLASTParamsPanel member function declarations
119 
120  /// Data access
121  CLBLASTLoadParams& GetData() { return m_data; }
122  const CLBLASTLoadParams& GetData() const { return m_data; }
123  void SetData(const CLBLASTLoadParams& data) { m_data = data; }
124 
125  /// Retrieves bitmap resources
126  wxBitmap GetBitmapResource( const wxString& name );
127 
128  /// Retrieves icon resources
129  wxIcon GetIconResource( const wxString& name );
130 ////@end CLBLASTParamsPanel member function declarations
131 
132  /// Should we show tooltips?
133  static bool ShowToolTips();
134 
135  static bool ValidateLocalDatabase(const wxString& db, bool proteins);
136  static bool SelectDatabase(wxWindow* parent, wxString& db, bool proteins);
137 
138 ////@begin CLBLASTParamsPanel member variables
139  wxRadioBox* m_SeqTypeCtrl;
140  wxTextCtrl* m_DBCtrl;
141  wxBoxSizer* m_SeqCountSizer;
143  /// The data edited by this window
145  /// Control identifiers
146  enum {
147  ID_CLBLASTPARAMSPANEL = 10011,
148  ID_RADIOBOX1 = 10018,
149  ID_TEXTCTRL2 = 10015,
151  ID_CHECKBOX7 = 10019
152  };
153 ////@end CLBLASTParamsPanel member variables
154 
155 private:
156  void x_UpdateSeqCount();
157  wxTimer m_Timer;
158 };
159 
161 
162 #endif // PKG_SEQUENCE___LBLAST_PARAMS_PANEL__HPP`
#define ID_CHECKBOX7
wxCheckBox * m_CreateProjectItemsCtrl
CLBLASTLoadParams & GetData()
Data access.
const CLBLASTLoadParams & GetData() const
CLBLASTLoadParams m_data
The data edited by this window.
void SetData(const CLBLASTLoadParams &data)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define ID_BITMAPBUTTON
static void Init(void)
Definition: cursor6.c:76
char data[12]
Definition: iconv.c:80
#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 NCBI_GUIWIDGETS_LOADERS_EXPORT
Definition: gui_export.h:525
Defines to provide correct exporting from DLLs in Windows.
#define ID_RADIOBOX1
#define SYMBOL_CLBLASTPARAMSPANEL_IDNAME
#define SYMBOL_CLBLASTPARAMSPANEL_SIZE
#define SYMBOL_CLBLASTPARAMSPANEL_POSITION
#define SYMBOL_CLBLASTPARAMSPANEL_STYLE
const struct ncbi::grid::netcache::search::fields::SIZE size
#define ID_TEXTCTRL2
Modified on Fri May 24 14:55:09 2024 by modify_doxy.py rev. 669887