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

Go to the SVN repository for this file.

1 /* $Id: parse_text_dlg.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: Igor Filippov
27  *
28  * File Description:
29  *
30  */
31 
32 #ifndef PARSE_TEXT_DLG__HPP
33 #define PARSE_TEXT_DLG__HPP
34 
35 
36 #include <corelib/ncbistd.hpp>
37 
38 /*!
39  * Includes
40  */
41 
42 
43 ////@begin includes
44 #include <wx/choicebk.h>
45 ////@end includes
54 
55 
56 /*!
57  * Forward declarations
58  */
59 
60 ////@begin forward declarations
61 ////@end forward declarations
62 
64 
65 /*!
66  * Control identifiers
67  */
68 
69 ////@begin control identifiers
70 #define SYMBOL_CPARSE_TEXT_DLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
71 #define SYMBOL_CPARSE_TEXT_DLG_TITLE _("Parse Text")
72 #define SYMBOL_CPARSE_TEXT_DLG_IDNAME wxID_ANY
73 #define SYMBOL_CPARSE_TEXT_DLG_SIZE wxDefaultSize
74 #define SYMBOL_CPARSE_TEXT_DLG_POSITION wxDefaultPosition
75 
76 ////@end control identifiers
77 
78 /*!
79  * CParseTextDlg class declaration
80  */
81 
82 class CConstraintPanel;
83 class CQualChoicePanel;
84 
86 {
87  DECLARE_DYNAMIC_CLASS( CParseTextDlg )
88  DECLARE_EVENT_TABLE()
89 
90 public:
91  CParseTextDlg();
92  CParseTextDlg( wxWindow* parent, IWorkbench* wb,
93  wxWindowID id = SYMBOL_CPARSE_TEXT_DLG_IDNAME, const wxString& caption = SYMBOL_CPARSE_TEXT_DLG_TITLE, const wxPoint& pos = SYMBOL_CPARSE_TEXT_DLG_POSITION, const wxSize& size = SYMBOL_CPARSE_TEXT_DLG_SIZE, long style = SYMBOL_CPARSE_TEXT_DLG_STYLE );
94 
95  bool Create( wxWindow* parent, IWorkbench* wb,
96  wxWindowID id = SYMBOL_CPARSE_TEXT_DLG_IDNAME, const wxString& caption = SYMBOL_CPARSE_TEXT_DLG_TITLE, const wxPoint& pos = SYMBOL_CPARSE_TEXT_DLG_POSITION, const wxSize& size = SYMBOL_CPARSE_TEXT_DLG_SIZE, long style = SYMBOL_CPARSE_TEXT_DLG_STYLE );
97 
99 
100  void Init();
101 
102  void CreateControls();
103 
104 ////@begin CParseTextDlg event handler declarations
105 
106 ////@end CParseTextDlg event handler declarations
107 
108 ////@begin CParseTextDlg member function declarations
109 
110  wxBitmap GetBitmapResource( const wxString& name );
111 
112  wxIcon GetIconResource( const wxString& name );
113 ////@end CParseTextDlg member function declarations
114 
115  static bool ShowToolTips();
116 
118  virtual string GetErrorMessage() {return kEmptyStr;}
119 
120  void ProcessUpdateFeatEvent( wxCommandEvent& event );
121 
122  enum EFieldType {
142  };
143 
144  virtual void UpdateEditor(void) {}
145  void SetFromFieldType(EFieldType field_type);
146  void SetToFieldType(EFieldType field_type);
147 private:
148  void UpdateChildrenFeaturePanels( wxWindow* win );
149  virtual void SetRegistryPath(const string& reg_path);
150  virtual void LoadSettings();
151  virtual void SaveSettings() const;
152 
153 ////@begin CParseTextDlg member variables
158  string m_RegPath;
159 };
160 
161 
162 class CQualChoicePanel: public wxPanel
163 {
164  DECLARE_DYNAMIC_CLASS( CQualChoicePanel )
165  DECLARE_EVENT_TABLE()
166 public:
168  CQualChoicePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
169  bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
171  void Init();
172  void CreateControls();
173  wxBitmap GetBitmapResource( const wxString& name );
174  wxIcon GetIconResource( const wxString& name );
175  static bool ShowToolTips();
176  void SetSelection(int page);
177  string GetField(bool subfield = true);
178  string GetFieldType(void);
181 
182 private:
183  wxChoicebook* m_Notebook;
184 };
185 
186 
187 
189 
190 #endif // PARSE_TEXT_DLG__HPP
User-defined methods of the data storage class.
void UpdateChildrenFeaturePanels(wxWindow *win)
CQualChoicePanel * m_Field1
virtual void UpdateEditor(void)
CConstraintPanel * m_Constraint
virtual string GetErrorMessage()
bool Create(wxWindow *parent, IWorkbench *wb, wxWindowID id=wxID_ANY, const wxString &caption=_("Parse Text"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
static bool ShowToolTips()
virtual void LoadSettings()
void SetFromFieldType(EFieldType field_type)
virtual void SetRegistryPath(const string &reg_path)
CQualChoicePanel * m_Field2
wxIcon GetIconResource(const wxString &name)
void SetToFieldType(EFieldType field_type)
wxBitmap GetBitmapResource(const wxString &name)
virtual CRef< CCmdComposite > GetCommand()
virtual void SaveSettings() const
void ProcessUpdateFeatEvent(wxCommandEvent &event)
CParseTextOptionsDlg * m_ParseOptions
wxIcon GetIconResource(const wxString &name)
void SetSelection(int page)
CFieldNamePanel * GetFieldNamePanel(void)
static bool ShowToolTips()
wxChoicebook * m_Notebook
CIRef< IEditingAction > CreateEditingAction(CSeq_entry_Handle seh)
string GetField(bool subfield=true)
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)
string GetFieldType(void)
CSeq_entry_Handle –.
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.
#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 kEmptyStr
Definition: ncbistr.hpp:123
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SYMBOL_CPARSE_TEXT_DLG_IDNAME
#define SYMBOL_CPARSE_TEXT_DLG_SIZE
#define SYMBOL_CPARSE_TEXT_DLG_TITLE
#define SYMBOL_CPARSE_TEXT_DLG_STYLE
#define SYMBOL_CPARSE_TEXT_DLG_POSITION
static static static wxID_ANY
Modified on Wed Apr 17 13:10:07 2024 by modify_doxy.py rev. 669887