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

Go to the SVN repository for this file.

1 /* $Id: bulk_edit_feat_dlg_std.hpp 39649 2017-10-24 15:22:12Z 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: Colleen Bollin
27  */
28 #ifndef _BULK_EDIT_FEAT_DLG_H_
29 #define _BULK_EDIT_FEAT_DLG_H_
30 
31 #include <corelib/ncbistd.hpp>
40 
41 /*!
42  * Includes
43  */
44 
45 ////@begin includes
46 ////@end includes
47 
48 #include <wx/sizer.h>
49 #include <wx/radiobut.h>
50 #include <wx/choice.h>
51 #include <wx/notebook.h>
52 #include <wx/combobox.h>
53 #include <wx/radiobox.h>
54 
55 /*!
56  * Forward declarations
57  */
58 
59 ////@begin forward declarations
60 class CFeatureTypePanel;
61 class wxBoxSizer;
63 class COkCancelPanel;
64 class CConstraintPanel;
65 ////@end forward declarations
66 
68 
69 /*!
70  * Control identifiers
71  */
72 
73 ////@begin control identifiers
74 #define ID_CBULKEDITFEATDLG 10268
75 #define ID_EFL_FEATURETYPE 10269
76 #define ID_EFL_CONSTRAINT 10272
77 #define ID_EFL_OKCANCEL 10275
78 #define SYMBOL_CBULKEDITFEATDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
79 #define SYMBOL_CBULKEDITFEATDLG_TITLE _("BulkEditFeatDlg")
80 #define SYMBOL_CBULKEDITFEATDLG_IDNAME ID_CBULKEDITFEATDLG
81 #define SYMBOL_CBULKEDITFEATDLG_SIZE wxSize(800, 300)
82 #define SYMBOL_CBULKEDITFEATDLG_POSITION wxDefaultPosition
83 ////@end control identifiers
84 
85 
86 /*!
87  * CBulkEditFeatDlg class declaration
88  */
89 
91 {
92  DECLARE_DYNAMIC_CLASS( CBulkEditFeatDlg )
93  DECLARE_EVENT_TABLE()
94 
95 public:
96  /// Constructors
98  CBulkEditFeatDlg( wxWindow* parent, IWorkbench* wb, wxWindowID id = SYMBOL_CBULKEDITFEATDLG_IDNAME, const wxString& caption = SYMBOL_CBULKEDITFEATDLG_TITLE, const wxPoint& pos = SYMBOL_CBULKEDITFEATDLG_POSITION, const wxSize& size = SYMBOL_CBULKEDITFEATDLG_SIZE, long style = SYMBOL_CBULKEDITFEATDLG_STYLE );
99 
100  /// Creation
101  bool Create( wxWindow* parent, IWorkbench* wb, wxWindowID id = SYMBOL_CBULKEDITFEATDLG_IDNAME, const wxString& caption = SYMBOL_CBULKEDITFEATDLG_TITLE, const wxPoint& pos = SYMBOL_CBULKEDITFEATDLG_POSITION, const wxSize& size = SYMBOL_CBULKEDITFEATDLG_SIZE, long style = SYMBOL_CBULKEDITFEATDLG_STYLE );
102 
103  /// Destructor
105 
106  /// Initialises member variables
107  void Init();
108 
109  /// Creates the controls and sizers
110  void CreateControls();
111 
112 ////@begin CBulkEditFeatDlg event handler declarations
113 
114  void ProcessUpdateFeatEvent( wxCommandEvent& event );
115 
116 ////@end CBulkEditFeatDlg event handler declarations
117  void UpdateChildrenFeaturePanels( wxWindow* win );
118 
119 ////@begin CBulkEditFeatDlg member function declarations
120 
121  /// Retrieves bitmap resources
122  wxBitmap GetBitmapResource( const wxString& name );
123 
124  /// Retrieves icon resources
125  wxIcon GetIconResource( const wxString& name );
126 ////@end CBulkEditFeatDlg member function declarations
127 
128  /// Should we show tooltips?
129  static bool ShowToolTips();
130 
131 ////@begin CBulkEditFeatDlg member variables
135 ////@end CBulkEditFeatDlg member variables
136 
138  virtual string GetErrorMessage();
139 
149  eInference
150  };
151 
152  void SetEditingType(EEditingType editing_type);
153 
154  // for CFieldNameParent, so that we can update the size after changing field constraint
155  virtual void UpdateEditor() {}
156 private:
157  bool x_IsRefSeq();
158 
159  virtual void SetRegistryPath(const string& reg_path);
160  virtual void LoadSettings();
161  virtual void SaveSettings() const;
162 
163  wxNotebook *m_Notebook;
165  string m_RegPath;
166 };
167 
169 {
170 public:
172  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope) { return false;}
173 };
174 
175 class CEvidencePanel: public wxPanel, public CBulkFeatEditCmdPanel
176 {
177  DECLARE_DYNAMIC_CLASS( CEvidencePanel )
178  DECLARE_EVENT_TABLE()
179 
180 public:
181  CEvidencePanel();
182  CEvidencePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
183  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
184  ~CEvidencePanel();
185  void Init();
186  void CreateControls();
187  wxBitmap GetBitmapResource( const wxString& name );
188  wxIcon GetIconResource( const wxString& name );
189  static bool ShowToolTips();
190  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
191 };
192 
193 class CBlkEdtFeatLocationPanel: public wxPanel, public CBulkFeatEditCmdPanel
194 {
195  DECLARE_DYNAMIC_CLASS( CBlkEdtFeatLocationPanel )
196  DECLARE_EVENT_TABLE()
197 
198 public:
200  CBlkEdtFeatLocationPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
201  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
203  void Init();
204  void CreateControls();
205  wxBitmap GetBitmapResource( const wxString& name );
206  wxIcon GetIconResource( const wxString& name );
207  static bool ShowToolTips();
208  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
209 private:
211 };
212 
213 class CStrandPanel: public wxPanel, public CBulkFeatEditCmdPanel
214 {
215  DECLARE_DYNAMIC_CLASS( CStrandPanel )
216  DECLARE_EVENT_TABLE()
217 
218 public:
219  CStrandPanel();
220  CStrandPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
221  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
222  ~CStrandPanel();
223  void Init();
224  void CreateControls();
225  wxBitmap GetBitmapResource( const wxString& name );
226  wxIcon GetIconResource( const wxString& name );
227  static bool ShowToolTips();
228  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
229 private:
230  wxChoice* m_StrandFrom;
231  wxChoice* m_StrandTo;
232 };
233 
234 class CRevIntPanel: public wxPanel, public CBulkFeatEditCmdPanel
235 {
236  DECLARE_DYNAMIC_CLASS( CRevIntPanel )
237  DECLARE_EVENT_TABLE()
238 
239 public:
240  CRevIntPanel();
241  CRevIntPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
242  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
243  ~CRevIntPanel();
244  void Init();
245  void CreateControls();
246  wxBitmap GetBitmapResource( const wxString& name );
247  wxIcon GetIconResource( const wxString& name );
248  static bool ShowToolTips();
249  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
250 };
251 
252 class CResyncPanel: public wxPanel, public CBulkFeatEditCmdPanel
253 {
254  DECLARE_DYNAMIC_CLASS( CResyncPanel )
255  DECLARE_EVENT_TABLE()
256 
257 public:
258  CResyncPanel();
259  CResyncPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
260  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
261  ~CResyncPanel();
262  void Init();
263  void CreateControls();
264  wxBitmap GetBitmapResource( const wxString& name );
265  wxIcon GetIconResource( const wxString& name );
266  static bool ShowToolTips();
267  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
268 };
269 
270 class CPseudoPanel: public wxPanel, public CBulkFeatEditCmdPanel
271 {
272  DECLARE_DYNAMIC_CLASS( CPseudoPanel )
273  DECLARE_EVENT_TABLE()
274 
275 public:
276  CPseudoPanel();
277  CPseudoPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
278  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
279  ~CPseudoPanel();
280  void Init();
281  void CreateControls();
282  wxBitmap GetBitmapResource( const wxString& name );
283  wxIcon GetIconResource( const wxString& name );
284  static bool ShowToolTips();
285  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
286 private:
288 };
289 
290 class CExceptionPanel: public wxPanel, public CBulkFeatEditCmdPanel
291 {
292  DECLARE_DYNAMIC_CLASS( CExceptionPanel )
293  DECLARE_EVENT_TABLE()
294 
295 public:
296  CExceptionPanel();
297  CExceptionPanel( wxWindow* parent, bool is_refseq, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
298  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
300  void Init();
301  void CreateControls();
302  wxBitmap GetBitmapResource( const wxString& name );
303  wxIcon GetIconResource( const wxString& name );
304  static bool ShowToolTips();
305  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
306 private:
307  wxComboBox* m_Exception;
308  wxRadioBox* m_FeatureProduct;
309  wxCheckBox* m_MoveToComment;
311 };
312 
313 class CExperimentPanel: public wxPanel, public CBulkFeatEditCmdPanel
314 {
315  DECLARE_DYNAMIC_CLASS( CExperimentPanel )
316  DECLARE_EVENT_TABLE()
317 
318 public:
320  CExperimentPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
321  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
323  void Init();
324  void CreateControls();
325  wxBitmap GetBitmapResource( const wxString& name );
326  wxIcon GetIconResource( const wxString& name );
327  static bool ShowToolTips();
328  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
329  void OnCreateOrDelete(wxCommandEvent& event);
330 private:
331  wxRadioBox* m_CreateOrDelete;
333 };
334 
335 
336 class CEditInferencePanel: public wxPanel, public CBulkFeatEditCmdPanel
337 {
338  DECLARE_DYNAMIC_CLASS( CEditInferencePanel )
339  DECLARE_EVENT_TABLE()
340 
341 public:
343  CEditInferencePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
344  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
346  void Init();
347  void CreateControls();
348  wxBitmap GetBitmapResource( const wxString& name );
349  wxIcon GetIconResource( const wxString& name );
350  static bool ShowToolTips();
351  virtual bool AddCommand(vector<CConstRef<CObject> > &objs, CRef<CCmdComposite> cmd, CScope &scope);
352  void OnCreateOrDelete(wxCommandEvent& event);
353 private:
354  wxRadioBox* m_CreateOrDelete;
356 };
357 
359 
360 #endif
361  // _BULK_EDIT_FEAT_DLG_H_
#define SYMBOL_CBULKEDITFEATDLG_IDNAME
#define SYMBOL_CBULKEDITFEATDLG_TITLE
#define SYMBOL_CBULKEDITFEATDLG_STYLE
#define SYMBOL_CBULKEDITFEATDLG_POSITION
#define SYMBOL_CBULKEDITFEATDLG_SIZE
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxBitmap GetBitmapResource(const wxString &name)
CBulkEditFeatDlg()
Constructors.
virtual string GetErrorMessage()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CFeatureTypePanel * m_FeatureType
virtual void SetRegistryPath(const string &reg_path)
virtual CRef< CCmdComposite > GetCommand()
void SetEditingType(EEditingType editing_type)
COkCancelPanel * m_OkCancel
void Init()
Initialises member variables.
void UpdateChildrenFeaturePanels(wxWindow *win)
void ProcessUpdateFeatEvent(wxCommandEvent &event)
bool Create(wxWindow *parent, IWorkbench *wb, wxWindowID id=10268, const wxString &caption=_("BulkEditFeatDlg"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(800, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
virtual void SaveSettings() const
static bool ShowToolTips()
Should we show tooltips?
void CreateControls()
Creates the controls and sizers.
CConstraintPanel * m_Constraint
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
void OnCreateOrDelete(wxCommandEvent &event)
CInferencePanel * m_SingleInference
wxBitmap GetBitmapResource(const wxString &name)
wxIcon GetIconResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxIcon GetIconResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxIcon GetIconResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
void OnCreateOrDelete(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
CSingleExperimentPanel * m_SingleExperiment
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
static bool ShowToolTips()
wxBitmap GetBitmapResource(const wxString &name)
wxIcon GetIconResource(const wxString &name)
wxIcon GetIconResource(const wxString &name)
wxBitmap GetBitmapResource(const wxString &name)
static bool ShowToolTips()
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
static bool ShowToolTips()
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
wxBitmap GetBitmapResource(const wxString &name)
CScope –.
Definition: scope.hpp:92
wxIcon GetIconResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxBitmap GetBitmapResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
static bool ShowToolTips()
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
Include a standard set of the NCBI C++ Toolkit most basic headers.
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
#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
static static static wxID_ANY
Modified on Mon May 27 04:35:59 2024 by modify_doxy.py rev. 669887