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

Go to the SVN repository for this file.

1 /* $Id: suspect_product_rule_editor.hpp 39739 2017-10-31 18:00:13Z filippov $
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: Igor Filippov
27  *
28  * File Description:
29  *
30  */
31 
32 #ifndef SUSPECT_PRODUCT_RULE_EDITOR__HPP
33 #define SUSPECT_PRODUCT_RULE_EDITOR__HPP
34 
35 
36 #include <corelib/ncbistd.hpp>
37 
38 /*!
39  * Includes
40  */
41 
42 
43 ////@begin includes
44 ////@end includes
57 
58 #include <wx/valtext.h>
59 #include <wx/wxchar.h>
60 #include <wx/choicebk.h>
61 
62 /*!
63  * Forward declarations
64  */
65 
66 ////@begin forward declarations
67 ////@end forward declarations
68 
70 
71 #define ID_SUSPECT_PRODUCT_RULE wxID_ANY
72 #define SYMBOL_SUSPECT_PRODUCT_RULE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
73 #define SYMBOL_SUSPECT_PRODUCT_RULE_TITLE _("Suspect Product Rule Editor")
74 #define SYMBOL_SUSPECT_PRODUCT_RULE_IDNAME ID_SUSPECT_PRODUCT_RULE
75 #define SYMBOL_SUSPECT_PRODUCT_RULE_SIZE wxSize(704, 504)
76 #define SYMBOL_SUSPECT_PRODUCT_RULE_POSITION wxDefaultPosition
77 
78 #define ID_LOAD_RULE_LIST_MENU 11401
79 #define ID_ADD_RULE_LIST_MENU 11402
80 #define ID_SAVE_RULE_LIST_MENU 11403
81 #define ID_SAVE_AS_RULE_LIST_MENU 11404
82 #define ID_QUIT_RULE_LIST_MENU 11405
83 #define ID_LIST_MATCHES_RULE_LIST_BUTTON 11406
84 #define ID_APPLY_FIXES_RULE_LIST_BUTTON 11407
85 #define ID_SHOW_DIFFS_RULE_LIST_BUTTON 11410
86 #define ID_DISPLAY_TEXT_RULE_LIST_BUTTON 11411
87 #define ID_ADD_BEFORE_RULE_LIST_BUTTON 11412
88 #define ID_ADD_AFTER_RULE_LIST_BUTTON 11413
89 #define ID_DELETE_SELECTED_RULE_LIST_BUTTON 11414
90 #define ID_SORT_FIND_RULE_LIST_MENU 11415
91 #define ID_SORT_CAT_RULE_LIST_MENU 11416
92 
94 {
95  DECLARE_DYNAMIC_CLASS( CSuspectProductRulesEditor )
96  DECLARE_EVENT_TABLE()
97 
98 public:
99  /// Constructors
101 
102  CSuspectProductRulesEditor( wxWindow* parent, IWorkbench* workbench,
104 
105  /// Creation
106  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_SUSPECT_PRODUCT_RULE_IDNAME, const wxString& caption = SYMBOL_SUSPECT_PRODUCT_RULE_TITLE, const wxPoint& pos = SYMBOL_SUSPECT_PRODUCT_RULE_POSITION, const wxSize& size = SYMBOL_SUSPECT_PRODUCT_RULE_SIZE, long style = SYMBOL_SUSPECT_PRODUCT_RULE_STYLE );
107 
108  /// Destructor
109  virtual ~CSuspectProductRulesEditor();
110 
111  /// Initialises member variables
112  void Init();
113 
114  /// Creates the controls and sizers
115  void CreateControls();
116 
117  /// Retrieves bitmap resources
118  wxBitmap GetBitmapResource( const wxString& name );
119 
120  /// Retrieves icon resources
121  wxIcon GetIconResource( const wxString& name );
122 
123  /// Should we show tooltips?
124  static bool ShowToolTips();
125 
126  void OnFileLoad( wxCommandEvent& event );
127  void OnFileAdd( wxCommandEvent& event );
128  void OnFileSave( wxCommandEvent& event );
129  void CanFileSave(wxUpdateUIEvent &event);
130  void OnFileSaveAs( wxCommandEvent& event );
131  void CanFileSaveAs(wxUpdateUIEvent &event);
132  void OnQuit( wxCommandEvent& event );
133  void CanSort(wxUpdateUIEvent &event);
134  void OnSortByFind( wxCommandEvent& event );
135  void OnSortByCat( wxCommandEvent& event );
136  void OnDisplay( wxCommandEvent& event );
137  void OnShowDiffs( wxCommandEvent& event );
138  void OnApplyFixes( wxCommandEvent& event );
139  void OnListMatches( wxCommandEvent& event );
140  void OnDeleteRules( wxCommandEvent& event );
141  void OnAddRuleBefore( wxCommandEvent& event );
142  void OnAddRuleAfter( wxCommandEvent& event );
143 
144  virtual void UpdateCheckedState(size_t checked);
145  void AddRule(CRef<CSuspect_rule> rule, bool before);
146  void ReplaceRule(CRef<CSuspect_rule> rule, int n);
147  virtual void DoubleClick(int n);
148 
149 private:
151  bool MatchConstraint(CRef<CSuspect_rule> rule, const string &str);
152 
154  objects::CSeq_entry_Handle m_TopSeqEntry;
157  wxString m_File;
158  wxString m_DefaultDir;
159  vector< CRef<CSuspect_rule> > m_Rules;
160  wxButton *m_DeleteButton;
161 };
162 
163 
164 ////@begin control identifiers
165 #define SYMBOL_CADD_SUSPECT_RULE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
166 #define SYMBOL_CADD_SUSPECT_RULE_TITLE _("Suspect Rule")
167 #define SYMBOL_CADD_SUSPECT_RULE_IDNAME wxID_ANY
168 #define SYMBOL_CADD_SUSPECT_RULE_SIZE wxDefaultSize
169 #define SYMBOL_CADD_SUSPECT_RULE_POSITION wxDefaultPosition
170 ////@end control identifiers
171 
172 
173 class CAddSuspectProductRule: public wxFrame
174 {
175  DECLARE_DYNAMIC_CLASS( CAddSuspectProductRule )
176  DECLARE_EVENT_TABLE()
177 
178 public:
180  CAddSuspectProductRule( wxWindow* parent, bool before, objects::CSeq_entry_Handle seh,
181  wxWindowID id = SYMBOL_CADD_SUSPECT_RULE_IDNAME, const wxString& caption = SYMBOL_CADD_SUSPECT_RULE_TITLE, const wxPoint& pos = SYMBOL_CADD_SUSPECT_RULE_POSITION, const wxSize& size = SYMBOL_CADD_SUSPECT_RULE_SIZE, long style = SYMBOL_CADD_SUSPECT_RULE_STYLE );
182 
183  bool Create( wxWindow* parent,
184  wxWindowID id = SYMBOL_CADD_SUSPECT_RULE_IDNAME, const wxString& caption = SYMBOL_CADD_SUSPECT_RULE_TITLE, const wxPoint& pos = SYMBOL_CADD_SUSPECT_RULE_POSITION, const wxSize& size = SYMBOL_CADD_SUSPECT_RULE_SIZE, long style = SYMBOL_CADD_SUSPECT_RULE_STYLE );
185 
187 
188  void Init();
189 
190  void CreateControls();
191 
192 ////@begin CAddSuspectProductRule event handler declarations
193 
194 ////@end CAddSuspectProductRule event handler declarations
195 
196 ////@begin CAddSuspectProductRule member function declarations
197 
198  wxBitmap GetBitmapResource( const wxString& name );
199 
200  wxIcon GetIconResource( const wxString& name );
201 ////@end CAddSuspectProductRule member function declarations
202 
203  static bool ShowToolTips();
204 
205  void OnAccept( wxCommandEvent& event );
206  void OnCancel( wxCommandEvent& event );
207 
208  void SetRule(CRef<CSuspect_rule> rule, int pos);
209 private:
210  wxChoice *m_Type;
211  wxChoicebook *m_Matches;
212  wxChoicebook *m_DoesNotMatch;
213  wxChoicebook *m_Action;
214  wxCheckBox *m_OriginalToNote;
215  wxCheckBox *m_Fatal;
216  wxTextCtrl *m_Description;
217  bool m_before;
218  bool m_replace;
220  int m_pos;
222  objects::CSeq_entry_Handle m_TopSeqEntry;
223 };
224 
226 {
227 public:
229  virtual void SetSearchFunc(const CSearch_func &search_func) = 0;
231 };
232 
233 ////@begin control identifiers
234 #define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_STYLE wxTAB_TRAVERSAL
235 #define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_TITLE _("StringConstraintPanel")
236 #define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_IDNAME wxID_ANY
237 #define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_SIZE wxDefaultSize
238 #define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_POSITION wxDefaultPosition
239 #define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_CLEAR_ID 12010
240 #define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_WORD_SUBST_ID 12011
241 ////@end control identifiers
242 
243 
244 /*!
245  * CMacroStringConstraintPanel class declaration
246  */
248 {
249  DECLARE_DYNAMIC_CLASS( CMacroStringConstraintPanel )
250  DECLARE_EVENT_TABLE()
251 public:
252  /// Constructors
254  CMacroStringConstraintPanel( wxWindow* parent,
256  const wxPoint& pos = SYMBOL_CMACROSTRINGCONSTRAINTPANEL_POSITION,
259 
260  /// Creation
261  bool Create( wxWindow* parent,
263  const wxPoint& pos = SYMBOL_CMACROSTRINGCONSTRAINTPANEL_POSITION,
266 
267  /// Destructor
269 
270  /// Initialises member variables
271  void Init();
272 
273  /// Creates the controls and sizers
274  void CreateControls();
275 
276 ////@begin CStringConstraintPanel event handler declarations
277  void OnClear( wxCommandEvent& event );
278  void OnMatchTypeSelected( wxCommandEvent& event );
279  void OnWordSubstitution( wxCommandEvent& event );
280 ////@end CStringConstraintPanel event handler declarations
281 
282 ////@begin CStringConstraintPanel member function declarations
283 
284  enum EMatchType {
295  };
296 
297 
298  void ClearValues(void);
299  void SetChoices(const vector<string> &choices);
300  void ShowChoiceOrText(void);
301  /// Retrieves bitmap resources
302  wxBitmap GetBitmapResource( const wxString& name );
303 
304  /// Retrieves icon resources
305  wxIcon GetIconResource( const wxString& name );
306 ////@end CStringConstraintPanel member function declarations
307 
308  /// Should we show tooltips?
309  static bool ShowToolTips();
310 
312 
315  virtual void SetSearchFunc(const CSearch_func &search_func);
316 private:
317 
318 ////@begin CStringConstraintPanel member variables
319  wxChoice* m_MatchType;
320  wxTextCtrl* m_MatchText;
321  wxCheckBox* m_IgnoreCase;
322  wxCheckBox* m_IgnoreSpace;
323  wxCheckBox* m_WholeWord;
324  wxCheckBox* m_IgnorePunct;
325  wxCheckBox* m_IgnoreSyn;
326  wxRadioButton* m_AnyLetters;
327  wxRadioButton* m_AllUpper;
328  wxRadioButton* m_AllLower;
329  wxRadioButton* m_AllPunct;
330  wxComboBox* m_MatchChoice;
331  wxButton* m_ClearButton;
332  wxButton* m_WordSubst;
333 ////@end CStringConstraintPanel member variables
334 
335  wxBoxSizer* m_TextSizer;
338 };
339 
341 {
343 public:
344  /// Constructors
346  CMacroBlankConstraintPanel( wxWindow* parent, CRef<CSearch_func> search_func,
347  wxWindowID id = wxID_ANY,
348  const wxPoint& pos = wxDefaultPosition,
349  const wxSize& size = wxDefaultSize,
350  long style = wxTAB_TRAVERSAL)
351  : m_Search_func(search_func)
352  {
353  wxPanel::Create( parent, id, pos, size, style );
354  }
355 
356  /// Destructor
358 
360  virtual void SetSearchFunc(const CSearch_func &search_func) {}
361 private:
363 };
364 
365 class CMacroIntConstraintPanel: public wxPanel, public CSearch_func_provider
366 {
368 public:
369  /// Constructors
371  CMacroIntConstraintPanel( wxWindow* parent, CRef<CSearch_func> search_func, int *val,
372  wxWindowID id = wxID_ANY,
373  const wxPoint& pos = wxDefaultPosition,
374  const wxSize& size = wxDefaultSize,
375  long style = wxTAB_TRAVERSAL)
376  : m_Search_func(search_func), m_val(val)
377  {
378  wxPanel::Create( parent, id, pos, size, style );
379  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
380  SetSizer(itemBoxSizer2);
381  m_Text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
382  itemBoxSizer2->Add(m_Text, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
383  m_Text->SetValidator( wxTextValidator( wxFILTER_NUMERIC ) );
384  if (GetSizer())
385  {
386  GetSizer()->SetSizeHints(this);
387  }
388  Centre();
389  }
390 
391  /// Destructor
393 
395  {
396  if (m_Text->GetValue().IsEmpty())
397  return CRef<CSearch_func>(NULL);
398  *m_val = wxAtoi(m_Text->GetValue());
399  return m_Search_func;
400  }
401  virtual void SetSearchFunc(const CSearch_func &search_func)
402  {
403  m_Search_func->Assign(search_func);
404  wxString val;
405  m_val = NULL;
407  {
409  }
410  if (m_Search_func->IsToo_long())
411  {
413  }
414  if (m_val)
415  val << *m_val;
416  m_Text->SetValue(val);
417  }
418 private:
420  int *m_val;
421  wxTextCtrl *m_Text;
422 };
423 
424 class CMacroStrConstraintPanel: public wxPanel, public CSearch_func_provider
425 {
427 public:
428  /// Constructors
430  CMacroStrConstraintPanel( wxWindow* parent, CRef<CSearch_func> search_func, string *val,
431  wxWindowID id = wxID_ANY,
432  const wxPoint& pos = wxDefaultPosition,
433  const wxSize& size = wxDefaultSize,
434  long style = wxTAB_TRAVERSAL)
435  : m_Search_func(search_func), m_val(val)
436  {
437  wxPanel::Create( parent, id, pos, size, style );
438  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
439  SetSizer(itemBoxSizer2);
440  m_Text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
441  itemBoxSizer2->Add(m_Text, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
442  if (GetSizer())
443  {
444  GetSizer()->SetSizeHints(this);
445  }
446  Centre();
447  }
448 
449  /// Destructor
451 
453  {
454  if (m_Text->GetValue().IsEmpty())
455  return CRef<CSearch_func>(NULL);
456  *m_val = NStr::TruncateSpaces(m_Text->GetValue().ToStdString());
457  return m_Search_func;
458  }
459  virtual void SetSearchFunc(const CSearch_func &search_func)
460  {
461  m_Search_func->Assign(search_func);
462  wxString val;
463  m_val = NULL;
465  {
467  }
468  if (m_Search_func->IsHas_term())
469  {
471  }
472  if (m_val)
473  val << *m_val;
474  m_Text->SetValue(val);
475  }
476 private:
478  string *m_val;
479  wxTextCtrl *m_Text;
480 };
481 
483 {
484 public:
486  virtual void SetReplace(const CReplace_rule &replace) = 0;
488 };
489 
490 class CReplacementActionNone: public wxPanel, public CReplace_rule_provider
491 {
492  DECLARE_DYNAMIC_CLASS( CReplacementActionNone )
493  DECLARE_EVENT_TABLE()
494 public:
496  CReplacementActionNone( wxWindow* parent,
497  wxWindowID id = wxID_ANY,
498  const wxPoint& pos = wxDefaultPosition,
499  const wxSize& size = wxDefaultSize,
500  long style = wxTAB_TRAVERSAL);
501 
502  bool Create( wxWindow* parent,
503  wxWindowID id = wxID_ANY,
504  const wxPoint& pos = wxDefaultPosition,
505  const wxSize& size = wxDefaultSize,
506  long style = wxTAB_TRAVERSAL);
507 
509  void Init();
510  void CreateControls();
511  wxBitmap GetBitmapResource( const wxString& name );
512  wxIcon GetIconResource( const wxString& name );
513  static bool ShowToolTips();
515  virtual void SetReplace(const CReplace_rule &replace) {}
516 };
517 
519 {
520  DECLARE_DYNAMIC_CLASS( CReplacementActionSimple )
521  DECLARE_EVENT_TABLE()
522 public:
524  CReplacementActionSimple( wxWindow* parent,
525  wxWindowID id = wxID_ANY,
526  const wxPoint& pos = wxDefaultPosition,
527  const wxSize& size = wxDefaultSize,
528  long style = wxTAB_TRAVERSAL);
529 
530  bool Create( wxWindow* parent,
531  wxWindowID id = wxID_ANY,
532  const wxPoint& pos = wxDefaultPosition,
533  const wxSize& size = wxDefaultSize,
534  long style = wxTAB_TRAVERSAL);
535 
537  void Init();
538  void CreateControls();
539  wxBitmap GetBitmapResource( const wxString& name );
540  wxIcon GetIconResource( const wxString& name );
541  static bool ShowToolTips();
543  virtual void SetReplace(const CReplace_rule &replace);
544 private:
545  wxTextCtrl *m_Text;
546  wxCheckBox *m_Replace;
547  wxCheckBox *m_Retain;
548 };
549 
550 class CReplacementActionHaem: public wxPanel, public CReplace_rule_provider
551 {
552  DECLARE_DYNAMIC_CLASS( CReplacementActionHaem )
553  DECLARE_EVENT_TABLE()
554 public:
556  CReplacementActionHaem( wxWindow* parent,
557  wxWindowID id = wxID_ANY,
558  const wxPoint& pos = wxDefaultPosition,
559  const wxSize& size = wxDefaultSize,
560  long style = wxTAB_TRAVERSAL);
561 
562  bool Create( wxWindow* parent,
563  wxWindowID id = wxID_ANY,
564  const wxPoint& pos = wxDefaultPosition,
565  const wxSize& size = wxDefaultSize,
566  long style = wxTAB_TRAVERSAL);
567 
569  void Init();
570  void CreateControls();
571  wxBitmap GetBitmapResource( const wxString& name );
572  wxIcon GetIconResource( const wxString& name );
573  static bool ShowToolTips();
575  virtual void SetReplace(const CReplace_rule &replace);
576 private:
577  wxTextCtrl *m_Text;
578 };
579 
581 {
582  DECLARE_DYNAMIC_CLASS( CReplacementActionHypothetical )
583  DECLARE_EVENT_TABLE()
584 public:
586  CReplacementActionHypothetical( wxWindow* parent,
587  wxWindowID id = wxID_ANY,
588  const wxPoint& pos = wxDefaultPosition,
589  const wxSize& size = wxDefaultSize,
590  long style = wxTAB_TRAVERSAL);
591 
592  bool Create( wxWindow* parent,
593  wxWindowID id = wxID_ANY,
594  const wxPoint& pos = wxDefaultPosition,
595  const wxSize& size = wxDefaultSize,
596  long style = wxTAB_TRAVERSAL);
597 
599  void Init();
600  void CreateControls();
601  wxBitmap GetBitmapResource( const wxString& name );
602  wxIcon GetIconResource( const wxString& name );
603  static bool ShowToolTips();
605  virtual void SetReplace(const CReplace_rule &replace) {}
606 };
607 
608 
610 
611 #endif // SUSPECT_PRODUCT_RULE_EDITOR__HPP
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
wxBitmap GetBitmapResource(const wxString &name)
void SetRule(CRef< CSuspect_rule > rule, int pos)
wxIcon GetIconResource(const wxString &name)
CSuspectCompoundConstraintPanel * m_CompoundConstraintPanel
void OnAccept(wxCommandEvent &event)
void OnCancel(wxCommandEvent &event)
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Suspect Rule"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
virtual void SetSearchFunc(const CSearch_func &search_func)
virtual ~CMacroBlankConstraintPanel()
Destructor.
virtual CRef< CSearch_func > GetSearchFunc()
CMacroBlankConstraintPanel(wxWindow *parent, CRef< CSearch_func > search_func, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxDECLARE_NO_COPY_CLASS(CMacroBlankConstraintPanel)
CMacroBlankConstraintPanel()
Constructors.
CMacroIntConstraintPanel(wxWindow *parent, CRef< CSearch_func > search_func, int *val, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
virtual ~CMacroIntConstraintPanel()
Destructor.
virtual CRef< CSearch_func > GetSearchFunc()
CMacroIntConstraintPanel()
Constructors.
virtual void SetSearchFunc(const CSearch_func &search_func)
wxDECLARE_NO_COPY_CLASS(CMacroIntConstraintPanel)
virtual void SetSearchFunc(const CSearch_func &search_func)
virtual ~CMacroStrConstraintPanel()
Destructor.
CMacroStrConstraintPanel(wxWindow *parent, CRef< CSearch_func > search_func, string *val, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxDECLARE_NO_COPY_CLASS(CMacroStrConstraintPanel)
CMacroStrConstraintPanel()
Constructors.
virtual CRef< CSearch_func > GetSearchFunc()
CRef< objects::CWord_substitution_set > m_word_subst
void SetChoices(const vector< string > &choices)
virtual CRef< CSearch_func > GetSearchFunc()
CRef< objects::CString_constraint > GetStringConstraint()
void CreateControls()
Creates the controls and sizers.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void Init()
Initialises member variables.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Creation.
virtual void AddWordSubstSet(CRef< objects::CWord_substitution_set > word_subst)
static bool ShowToolTips()
Should we show tooltips?
void OnWordSubstitution(wxCommandEvent &event)
void OnMatchTypeSelected(wxCommandEvent &event)
virtual void SetSearchFunc(const CSearch_func &search_func)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual void SetReplace(const CReplace_rule &replace)=0
virtual CRef< CReplace_rule > GetReplace()=0
wxBitmap GetBitmapResource(const wxString &name)
virtual void SetReplace(const CReplace_rule &replace)
wxIcon GetIconResource(const wxString &name)
virtual CRef< CReplace_rule > GetReplace()
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)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
virtual void SetReplace(const CReplace_rule &replace)
virtual CRef< CReplace_rule > GetReplace()
wxBitmap GetBitmapResource(const wxString &name)
virtual CRef< CReplace_rule > GetReplace()
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)
virtual void SetReplace(const CReplace_rule &replace)
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)
virtual void SetReplace(const CReplace_rule &replace)
virtual CRef< CReplace_rule > GetReplace()
wxBitmap GetBitmapResource(const wxString &name)
virtual CRef< CSearch_func > GetSearchFunc()=0
virtual void SetSearchFunc(const CSearch_func &search_func)=0
void OnAddRuleAfter(wxCommandEvent &event)
objects::CSeq_entry_Handle m_TopSeqEntry
virtual ~CSuspectProductRulesEditor()
Destructor.
void OnListMatches(wxCommandEvent &event)
virtual void UpdateCheckedState(size_t checked)
void OnSortByCat(wxCommandEvent &event)
void ReplaceRule(CRef< CSuspect_rule > rule, int n)
void AddRule(CRef< CSuspect_rule > rule, bool before)
void OnFileAdd(wxCommandEvent &event)
void CreateControls()
Creates the controls and sizers.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnApplyFixes(wxCommandEvent &event)
void OnAddRuleBefore(wxCommandEvent &event)
vector< CRef< CSuspect_rule > > m_Rules
void OnDeleteRules(wxCommandEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void CanFileSaveAs(wxUpdateUIEvent &event)
void OnDisplay(wxCommandEvent &event)
void OnShowDiffs(wxCommandEvent &event)
void OnFileSaveAs(wxCommandEvent &event)
bool MatchConstraint(CRef< CSuspect_rule > rule, const string &str)
void OnQuit(wxCommandEvent &event)
void OnFileSave(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Suspect Product Rule Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(704, 504), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnFileLoad(wxCommandEvent &event)
void OnSortByFind(wxCommandEvent &event)
void CanSort(wxUpdateUIEvent &event)
void Init()
Initialises member variables.
static bool ShowToolTips()
Should we show tooltips?
void CanFileSave(wxUpdateUIEvent &event)
Undo/Redo interface for editing operations.
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 const char * str(char *buf, int n)
Definition: stats.c:84
#define NULL
Definition: ncbistd.hpp:225
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
Definition: ncbistr.cpp:3177
bool IsPrefix_and_numbers(void) const
Check if variant Prefix_and_numbers is selected.
THas_term & SetHas_term(void)
Select the variant.
bool IsToo_long(void) const
Check if variant Too_long is selected.
bool IsN_or_more_brackets_or_parentheses(void) const
Check if variant N_or_more_brackets_or_parentheses is selected.
bool IsHas_term(void) const
Check if variant Has_term is selected.
TPrefix_and_numbers & SetPrefix_and_numbers(void)
Select the variant.
TN_or_more_brackets_or_parentheses & SetN_or_more_brackets_or_parentheses(void)
Select the variant.
TToo_long & SetToo_long(void)
Select the variant.
yy_size_t n
const struct ncbi::grid::netcache::search::fields::SIZE size
static static static wxID_ANY
#define SYMBOL_CADD_SUSPECT_RULE_TITLE
#define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_IDNAME
#define SYMBOL_SUSPECT_PRODUCT_RULE_STYLE
#define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_STYLE
#define SYMBOL_CADD_SUSPECT_RULE_IDNAME
#define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_POSITION
#define SYMBOL_CADD_SUSPECT_RULE_SIZE
#define SYMBOL_SUSPECT_PRODUCT_RULE_TITLE
#define SYMBOL_SUSPECT_PRODUCT_RULE_IDNAME
#define SYMBOL_CMACROSTRINGCONSTRAINTPANEL_SIZE
#define SYMBOL_SUSPECT_PRODUCT_RULE_SIZE
#define SYMBOL_CADD_SUSPECT_RULE_STYLE
#define SYMBOL_CADD_SUSPECT_RULE_POSITION
#define SYMBOL_SUSPECT_PRODUCT_RULE_POSITION
Modified on Fri Sep 20 14:58:15 2024 by modify_doxy.py rev. 669887