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

Go to the SVN repository for this file.

1 /* $Id: validate_frame.hpp 43609 2019-08-08 16:12:53Z 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  */
29 
30 #ifndef _VALIDATE_FRAME_H_
31 #define _VALIDATE_FRAME_H_
32 
33 #include <corelib/ncbistd.hpp>
34 
42 #include <objmgr/scope.hpp>
44 #include <objmgr/bioseq_handle.hpp>
48 
49 /*!
50  * Includes
51  */
52 
53 ////@begin includes
54 #include "wx/frame.h"
55 #include <wx/listctrl.h>
56 #include <wx/stattext.h>
57 ////@end includes
58 
59 
61 
62 
63 /*!
64  * Forward declarations
65  */
66 
67 ////@begin forward declarations
68 class CValidatePanel;
69 ////@end forward declarations
70 
71 /*!
72  * Control identifiers
73  */
74 
75 ////@begin control identifiers
76 #define ID_VALIDATE_FRAME 17000
77 #define ID_VALIDATE_FRAME_REFRESH 17004
78 #define ID_VALIDATE_FRAME_REPORT_BTN 17006
79 #define ID_VALIDATE_FRAME_DISMISS 17007
80 #define ID_VALIDATE_FRAME_SEQUESTER_BTN 17008
81 #define ID_VALIDATE_FRAME_SEGREGATE_BTN 17009
82 #define ID_VALIDATE_FRAME_DONE_BTN 17010
83 #define SYMBOL_VALIDATE_FRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL
84 #define SYMBOL_VALIDATE_FRAME_TITLE _("Validation Errors")
85 #define SYMBOL_VALIDATE_FRAME_IDNAME ID_VALIDATE_FRAME
86 #define SYMBOL_VALIDATE_FRAME_SIZE wxSize(900, 600)
87 #define SYMBOL_VALIDATE_FRAME_POSITION wxDefaultPosition
88 ////@end control identifiers
89 
90 
91 /*!
92  * CValidateFrame class declaration
93  */
94 
95 class CValidateFrame : public wxFrame
96 {
97  DECLARE_CLASS( CValidateFrame )
98  DECLARE_EVENT_TABLE()
99 
100 
101 public:
102  static void GetInstance( wxWindow* parent, IWorkbench* workbench, CRef<objects::CUser_object> params, wxWindowID id = SYMBOL_VALIDATE_FRAME_IDNAME, const wxString& caption = SYMBOL_VALIDATE_FRAME_TITLE, const wxPoint& pos = SYMBOL_VALIDATE_FRAME_POSITION, const wxSize& size = SYMBOL_VALIDATE_FRAME_SIZE, long style = SYMBOL_VALIDATE_FRAME_STYLE );
103 
104  /// Constructors
105  CValidateFrame();
106  CValidateFrame( wxWindow* parent, IWorkbench* wb, CRef<objects::CUser_object> params, wxWindowID id = SYMBOL_VALIDATE_FRAME_IDNAME, const wxString& caption = SYMBOL_VALIDATE_FRAME_TITLE, const wxPoint& pos = SYMBOL_VALIDATE_FRAME_POSITION, const wxSize& size = SYMBOL_VALIDATE_FRAME_SIZE, long style = SYMBOL_VALIDATE_FRAME_STYLE );
107 
108  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_VALIDATE_FRAME_IDNAME, const wxString& caption = SYMBOL_VALIDATE_FRAME_TITLE, const wxPoint& pos = SYMBOL_VALIDATE_FRAME_POSITION, const wxSize& size = SYMBOL_VALIDATE_FRAME_SIZE, long style = SYMBOL_VALIDATE_FRAME_STYLE );
109 
110  /// Destructor
111  virtual ~CValidateFrame();
112 
113  /// Initialises member variables
114  void Init();
115 
116  /// Creates the controls and sizers
117  void CreateControls();
118 
119 
120 ////@begin CValidateFrame event handler declarations
121  void OnRefresh(wxCommandEvent& event );
122  void OnDismiss(wxCommandEvent& event );
123  void OnSequester( wxCommandEvent& event );
124  void OnSegregate( wxCommandEvent& event );
125  void OnReport( wxCommandEvent& event );
126  void OnDone( wxCommandEvent& event );
127  void OnUpdateDoneBtn(wxUpdateUIEvent& event);
128 ////@end CValidateFrame event handler declarations
129 
130 
131 ////@begin CValidateFrame member function declarations
132 
133  /// Retrieves bitmap resources
134  wxBitmap GetBitmapResource( const wxString& name );
135 
136  /// Retrieves icon resources
137  wxIcon GetIconResource( const wxString& name );
138 ////@end CValidateFrame member function declarations
139 
140  /// Should we show tooltips?
141  static bool ShowToolTips();
142 
143 ////@begin CValidateFrame member variables
144 ////@end CValidateFrame member variables
145 
146 private:
147  virtual void SetRegistryPath(const string& reg_path);
148  virtual void LoadSettings();
149  virtual void SaveSettings() const;
150  bool x_AllowDoneButton();
151  void LoadData(void);
152 
157  string m_RegPath;
158  wxButton *m_DoneButton;
159 };
160 
161 
163 
164 #endif
165  // _VALIDATE_FRAME_H_
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void Init()
Initialises member variables.
void LoadData(void)
void OnSegregate(wxCommandEvent &event)
static bool ShowToolTips()
Should we show tooltips?
CValidatePanel * m_Panel
virtual void SaveSettings() const
CValidateFrame()
Constructors.
CRef< objects::CUser_object > m_params
void OnDone(wxCommandEvent &event)
void OnDismiss(wxCommandEvent &event)
static CValidateFrame * m_Instance
void OnRefresh(wxCommandEvent &event)
virtual ~CValidateFrame()
Destructor.
wxButton * m_DoneButton
void CreateControls()
Creates the controls and sizers.
void OnSequester(wxCommandEvent &event)
void OnReport(wxCommandEvent &event)
static void GetInstance(wxWindow *parent, IWorkbench *workbench, CRef< objects::CUser_object > params, wxWindowID id=17000, const wxString &caption=_("Validation Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(900, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
virtual void LoadSettings()
void OnUpdateDoneBtn(wxUpdateUIEvent &event)
CValidateFrame(wxWindow *parent, IWorkbench *wb, CRef< objects::CUser_object > params, wxWindowID id=17000, const wxString &caption=_("Validation Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(900, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
bool Create(wxWindow *parent, wxWindowID id=17000, const wxString &caption=_("Validation Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(900, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
IWorkbench * m_Workbench
virtual void SetRegistryPath(const string &reg_path)
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
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SYMBOL_VALIDATE_FRAME_POSITION
#define SYMBOL_VALIDATE_FRAME_IDNAME
#define SYMBOL_VALIDATE_FRAME_TITLE
#define SYMBOL_VALIDATE_FRAME_SIZE
#define SYMBOL_VALIDATE_FRAME_STYLE
Modified on Wed Apr 17 13:10:34 2024 by modify_doxy.py rev. 669887