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

Go to the SVN repository for this file.

1 /* $Id: featuretbl_frame.hpp 43488 2019-07-16 19:55:22Z 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: Andrea Asztalos
27  *
28  */
29 
30 #ifndef _FEATURETBL_FRAME_H_
31 #define _FEATURETBL_FRAME_H_
32 
33 #include <corelib/ncbistd.hpp>
36 #include <wx/frame.h>
37 
38 class wxCheckBox;
39 
41 
42 class CGenericPanel;
43 
44 /*!
45  * Control identifiers
46  */
47 
48 ////@begin control identifiers
49 #define SYMBOL_CFEATURETBLFR_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
50 #define SYMBOL_CFEATURETBLFR_TITLE _("Feature Table")
51 #define SYMBOL_CFEATURETBLFR_IDNAME ID_CFEATURETBLFR
52 #define SYMBOL_CFEATURETBLFR_SIZE wxSize(700, 600)
53 #define SYMBOL_CFEATURETBLFR_POSITION wxDefaultPosition
54 ////@end control identifiers
55 
56 
57 /*!
58  * CFeatureTblFr class declaration
59  */
60 
61 class CFeatureTblFr :
62  public wxFrame,
63  public IRegSettings,
65 {
66  DECLARE_CLASS( CFeatureTblFr )
67  DECLARE_EVENT_TABLE()
68 
69 public:
70  /// Constructors
71  CFeatureTblFr();
72  CFeatureTblFr( wxWindow* parent, IWorkbench* workbench,
73  wxWindowID id = SYMBOL_CFEATURETBLFR_IDNAME,
74  const wxString& caption = SYMBOL_CFEATURETBLFR_TITLE,
75  const wxPoint& pos = SYMBOL_CFEATURETBLFR_POSITION,
76  const wxSize& size = SYMBOL_CFEATURETBLFR_SIZE,
77  long style = SYMBOL_CFEATURETBLFR_STYLE );
78 
79  bool Create(wxWindow* parent,
80  wxWindowID id = SYMBOL_CFEATURETBLFR_IDNAME,
81  const wxString& caption = SYMBOL_CFEATURETBLFR_TITLE,
82  const wxPoint& pos = SYMBOL_CFEATURETBLFR_POSITION,
83  const wxSize& size = SYMBOL_CFEATURETBLFR_SIZE,
84  long style = SYMBOL_CFEATURETBLFR_STYLE );
85 
86  /// Destructor
88 
89  /// @name CJobAdapter::IJobCallback interface implementation
90  /// @{
91  virtual void OnJobResult(CObject* result, CJobAdapter& adapter);
92  virtual void OnJobFailed(const string&, CJobAdapter& adapter);
93  /// @}
94 
95  /// Initialises member variables
96  void Init();
97 
98  /// Creates the controls and sizers
99  void CreateControls();
100 
101 ////@begin CFeatureTblFr event handler declarations
102  void OnCloseWindow(wxCloseEvent& event);
103 
104  void OnRefreshClick(wxCommandEvent& event);
105 ////@end CFeatureTblFr event handler declarations
106 
107 ////@begin CFeatureTblFr member function declarations
108 
109  /// @name IRegSettings interface implementation
110  /// @{
111  virtual void SetRegistryPath(const string& reg_path);
112  virtual void LoadSettings();
113  virtual void SaveSettings() const;
114  /// @}
115 
116  /// Retrieves bitmap resources
117  wxBitmap GetBitmapResource( const wxString& name );
118 
119  /// Retrieves icon resources
120  wxIcon GetIconResource( const wxString& name );
121 ////@end CFeatureTblFr member function declarations
122 
123  /// Should we show tooltips?
124  static bool ShowToolTips();
125 
126  void SetWorkDir(const wxString& workDir);
127 
128 private:
129  void x_RefreshTable(const string& path = kEmptyStr);
130 
131 
132 ////@begin CFeatureTblFr member variables
133  wxCheckBox* m_ProteinId;
134  wxCheckBox* m_Source;
135  wxCheckBox* m_ProteinFeats;
137 
139 
141  string m_RegPath;
144  bool m_ShowProteinFeats{ false };
146  /// Control identifiers
147  enum {
153  ID_FTBL_GENPANEL = 10459
154  };
155 ////@end CFeatureTblFr member variables
156 };
157 
159 
160 #endif
161  // _FEATURETBL_FRAME_H_
CFeatureTblFr()
Constructors.
virtual void OnJobResult(CObject *result, CJobAdapter &adapter)
CGenericPanel * m_GenericPanel
static bool ShowToolTips()
Should we show tooltips?
virtual void LoadSettings()
virtual void OnJobFailed(const string &, CJobAdapter &adapter)
virtual void SetRegistryPath(const string &reg_path)
void OnCloseWindow(wxCloseEvent &event)
void SetWorkDir(const wxString &workDir)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxCheckBox * m_ProteinId
~CFeatureTblFr()
Destructor.
void x_RefreshTable(const string &path=kEmptyStr)
IWorkbench * m_Workbench
void Init()
Initialises member variables.
wxCheckBox * m_ProteinFeats
void OnRefreshClick(wxCommandEvent &event)
void CreateControls()
Creates the controls and sizers.
virtual void SaveSettings() const
CRef< CJobAdapter > m_JobAdapter
wxCheckBox * m_Source
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Create(wxWindow *parent, wxWindowID id=ID_CFEATURETBLFR, const wxString &caption=_("Feature Table"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(700, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
CObject –.
Definition: ncbiobj.hpp:180
IRegSettings An interface for objects that save / restore settings using CGuiRegistry.
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 SYMBOL_CFEATURETBLFR_SIZE
#define SYMBOL_CFEATURETBLFR_POSITION
#define SYMBOL_CFEATURETBLFR_IDNAME
#define SYMBOL_CFEATURETBLFR_STYLE
#define SYMBOL_CFEATURETBLFR_TITLE
#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
else result
Definition: token2.c:20
Modified on Wed Apr 17 13:08:15 2024 by modify_doxy.py rev. 669887