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

Go to the SVN repository for this file.

1 #ifndef PKG_SEQUENCE___WINDOWMASKER_PANEL__HPP
2 #define PKG_SEQUENCE___WINDOWMASKER_PANEL__HPP
3 
4 /* $Id: windowmasker_panel.hpp 37352 2016-12-27 19:46:15Z katargir $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Roman Katargin
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 
37 
38 #include <wx/combobox.h>
39 
40 ////@begin control identifiers
41 #define SYMBOL_CWINDOWMASKERPANEL_STYLE wxTAB_TRAVERSAL
42 #define SYMBOL_CWINDOWMASKERPANEL_TITLE _("WindowMasker Panel")
43 #define SYMBOL_CWINDOWMASKERPANEL_IDNAME ID_CWINDOWMASKERPANEL
44 #define SYMBOL_CWINDOWMASKERPANEL_SIZE wxSize(400, 300)
45 #define SYMBOL_CWINDOWMASKERPANEL_POSITION wxDefaultPosition
46 ////@end control identifiers
47 
48 class wxComboBox;
49 class wxChoice;
50 class wxButton;
51 class wxStaticText;
52 class wxBoxSizer;
53 
55 
56 class CObjectListWidget;
57 
58 
61 {
62  DECLARE_DYNAMIC_CLASS( CWindowMaskerPanel )
63  DECLARE_EVENT_TABLE()
64 
65 public:
66  /// Constructors
68  CWindowMaskerPanel( wxWindow* parent, wxWindowID id = SYMBOL_CWINDOWMASKERPANEL_IDNAME, const wxPoint& pos = SYMBOL_CWINDOWMASKERPANEL_POSITION, const wxSize& size = SYMBOL_CWINDOWMASKERPANEL_SIZE, long style = SYMBOL_CWINDOWMASKERPANEL_STYLE );
69 
70  /// Creation
71  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CWINDOWMASKERPANEL_IDNAME, const wxPoint& pos = SYMBOL_CWINDOWMASKERPANEL_POSITION, const wxSize& size = SYMBOL_CWINDOWMASKERPANEL_SIZE, long style = SYMBOL_CWINDOWMASKERPANEL_STYLE );
72 
73  /// Destructor
75 
76  /// Initialises member variables
77  void Init();
78 
79  /// @name CTaxIdHelper::ICallback interface implementation
80  /// @{
81  virtual void TaxonsLoaded(bool local);
82  /// @}
83 
84  /// Creates the controls and sizers
85  void CreateControls();
86 
87  /// Transfer data to the window
88  virtual bool TransferDataToWindow();
89 
90  /// Transfer data from the window
91  virtual bool TransferDataFromWindow();
92 
93  /// @name CAlgoToolManagerParamsPanel implementation
94  void RestoreDefaults();
95  /// @}
96 
97 ////@begin CWindowMaskerPanel event handler declarations
98 
99  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON5
100  void OnWMDownload( wxCommandEvent& event );
101 
102 ////@end CWindowMaskerPanel event handler declarations
103 
104 ////@begin CWindowMaskerPanel member function declarations
105 
106  /// Data access
108  const CWindowMaskerParams& GetData() const { return m_data; }
110 
111  /// Retrieves bitmap resources
112  wxBitmap GetBitmapResource( const wxString& name );
113 
114  /// Retrieves icon resources
115  wxIcon GetIconResource( const wxString& name );
116 ////@end CWindowMaskerPanel member function declarations
117 
118  /// Should we show tooltips?
119  static bool ShowToolTips();
120 
121 ////@begin CWindowMaskerPanel member variables
123  wxBoxSizer* m_WMStaticBoxSizer;
124  wxStaticText* m_WMStatic;
125  wxChoice* m_WMTaxIds;
126  wxButton* m_WMDownload;
127  /// The data edited by this window
129  /// Control identifiers
130  enum {
133  ID_CHOICE7 = 10017,
134  ID_BUTTON5 = 10073,
135  ID_COMBOBOX2 = 10018,
136  ID_LOCALRUN = 10063
137  };
138 ////@end CWindowMaskerPanel member variables
139 
140  enum {
142  ID_LOADING_PROGRESS = 10101
143  };
144 
145  /// @name IRegSettings interface implementation
146  virtual void LoadSettings();
147  virtual void SaveSettings() const;
148  /// @}
149 
151 
153 
154 
155  struct SMaskerInfo {
157  : taxid(0)
158  {
159  }
160 
161  int taxid;
162  string org_name;
163  string build;
164  string path;
165  };
168 
169 protected:
170  void x_InitTaxons();
171  void x_ShowWM(bool show);
172 
174 };
175 
176 
178 
179 #endif // PKG_SEQUENCE___WINDOWMASKER_PANEL__HPP
CAlgoToolManagerParamsPanel.
CObjectListWidget - mediator widget.
void x_ShowWM(bool show)
const CWindowMaskerParams & GetData() const
virtual void TaxonsLoaded(bool local)
static bool ShowToolTips()
Should we show tooltips?
CObjectListWidget * m_ObjectList
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual bool TransferDataToWindow()
Transfer data to the window.
void SetObjects(TConstScopedObjects *objects)
CWindowMaskerParams & GetData()
Data access.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void RestoreDefaults()
override in derived classes
void OnWMDownload(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON5
CWindowMaskerPanel()
Constructors.
map< string, SMaskerInfo > TMaskerPaths
CWindowMaskerParams m_data
The data edited by this window.
void SetData(const CWindowMaskerParams &data)
~CWindowMaskerPanel()
Destructor.
CTaxIdHelper::CAutoDelete m_AutoDelete
void Init()
Initialises member variables.
TConstScopedObjects * m_InputObjects
virtual bool TransferDataFromWindow()
Transfer data from the window.
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=ID_CWINDOWMASKERPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
virtual void LoadSettings()
static TMaskerPaths sm_MaskerPaths
wxBoxSizer * m_WMStaticBoxSizer
virtual void SaveSettings() const
override in derived classes
Definition: map.hpp:338
Include a standard set of the NCBI C++ Toolkit most basic headers.
char data[12]
Definition: iconv.c:80
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
#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_CWINDOWMASKERPANEL_STYLE
#define SYMBOL_CWINDOWMASKERPANEL_POSITION
#define SYMBOL_CWINDOWMASKERPANEL_IDNAME
#define SYMBOL_CWINDOWMASKERPANEL_SIZE
#define local
Definition: zutil.h:33
Modified on Wed Apr 17 13:09:29 2024 by modify_doxy.py rev. 669887