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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS___LOADERS___ASSEMBLY_SEL_PANEL__HPP
2 #define GUI_WIDGETS___LOADERS___ASSEMBLY_SEL_PANEL__HPP
3 
4 /* $Id: assembly_sel_panel.hpp 45881 2021-01-05 03:10:02Z rudnev $
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  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbiobj.hpp>
36 
37 #include <gui/gui_export.h>
39 
40 #include "wx/panel.h"
41 #include <wx/string.h>
42 
43 /*!
44  * Includes
45  */
46 
47 ////@begin includes
48 #include "map_assembly_params.hpp"
49 #include "wx/valgen.h"
50 ////@end includes
51 
52 /*!
53  * Forward declarations
54  */
55 
56 ////@begin forward declarations
57 ////@end forward declarations
58 
59 /*!
60  * Control identifiers
61  */
62 
63 ////@begin control identifiers
64 #define SYMBOL_CASSEMBLYSELPANEL_STYLE wxTAB_TRAVERSAL
65 #define SYMBOL_CASSEMBLYSELPANEL_TITLE _("Assembly Selection Panel")
66 #define SYMBOL_CASSEMBLYSELPANEL_IDNAME ID_CASSEMBLYSELPANEL
67 #define SYMBOL_CASSEMBLYSELPANEL_SIZE wxDefaultSize
68 #define SYMBOL_CASSEMBLYSELPANEL_POSITION wxDefaultPosition
69 ////@end control identifiers
70 
71 class wxTextCtrl;
72 class wxStaticText;
73 class wxCheckBox;
74 class wxTextCompleter;
75 
77 
78 DECLARE_EXPORTED_EVENT_TYPE(NCBI_GUIWIDGETS_LOADERS_EXPORT, wxEVT_ASSEMBLY_CHANGED_EVENT, -1)
79 
80 /*!
81  * CAssemblySelPanel class declaration
82  */
83 
85 {
86  DECLARE_DYNAMIC_CLASS( CAssemblySelPanel )
87  DECLARE_EVENT_TABLE()
88 
89 public:
91  CAssemblySelPanel( wxWindow* parent,
92  wxWindowID id = SYMBOL_CASSEMBLYSELPANEL_IDNAME,
93  const wxPoint& pos = SYMBOL_CASSEMBLYSELPANEL_POSITION,
94  const wxSize& size = SYMBOL_CASSEMBLYSELPANEL_SIZE,
95  long style = SYMBOL_CASSEMBLYSELPANEL_STYLE );
96 
97  bool Create( wxWindow* parent,
98  wxWindowID id = SYMBOL_CASSEMBLYSELPANEL_IDNAME,
99  const wxPoint& pos = SYMBOL_CASSEMBLYSELPANEL_POSITION,
100  const wxSize& size = SYMBOL_CASSEMBLYSELPANEL_SIZE,
101  long style = SYMBOL_CASSEMBLYSELPANEL_STYLE );
102 
104 
105  void Init();
106 
107  void CreateControls();
108 
109  virtual bool TransferDataToWindow();
110 
111  virtual bool TransferDataFromWindow();
112 
113 ////@begin CAssemblySelPanel event handler declarations
114 
115  /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX6
116  void OnUseMappingClick( wxCommandEvent& event );
117 
118  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
119  void OnSelectAssemBtnClick( wxCommandEvent& event );
120 
121 ////@end CAssemblySelPanel event handler declarations
122 
123 ////@begin CAssemblySelPanel member function declarations
124 
125  /// Data access
126  CMapAssemblyParams& GetData() { return m_data; }
127  const CMapAssemblyParams& GetData() const { return m_data; }
128  void SetData(const CMapAssemblyParams& data) { m_data = data; }
129 
130  void EnableUseMapping(bool enable = true);
131  void SetUseMapping(bool mapping = true);
132 
133  /// Retrieves bitmap resources
134  wxBitmap GetBitmapResource( const wxString& name );
135 
136  /// Retrieves icon resources
137  wxIcon GetIconResource( const wxString& name );
138 ////@end CAssemblySelPanel member function declarations
139 
140  static bool ShowToolTips();
141 
142  /// Control identifiers
143  enum {
144  ID_CASSEMBLYSELPANEL = 10116,
145  ID_CHECKBOX6 = 10038,
146  ID_BUTTON1 = 10118
147  };
148 
149 protected:
150  void x_UpdateControls();
151  void x_UpdateAssembly();
152  void x_SetTextCompleter(wxTextCompleter* textCompleter);
153 
154 private:
155  ////@begin CAssemblySelPanel member variables
156  wxCheckBox* m_UseMappingCtrl;
157  wxStaticText* m_AssemblyName;
158  wxStaticText* m_AssemblyAccession;
159  wxStaticText* m_AssemblyDescription;
160  /// The data edited by this window
162  ////@end CAssemblySelPanel member variables
163 };
164 
166 
167 #endif /// GUI_WIDGETS___LOADERS___ASSEMBLY_SEL_PANEL__HPP
#define SYMBOL_CASSEMBLYSELPANEL_SIZE
#define SYMBOL_CASSEMBLYSELPANEL_POSITION
#define SYMBOL_CASSEMBLYSELPANEL_IDNAME
#define SYMBOL_CASSEMBLYSELPANEL_STYLE
CMapAssemblyParams m_data
The data edited by this window.
const CMapAssemblyParams & GetData() const
CMapAssemblyParams & GetData()
Data access.
wxStaticText * m_AssemblyName
wxStaticText * m_AssemblyDescription
wxCheckBox * m_UseMappingCtrl
void SetData(const CMapAssemblyParams &data)
void x_SetTextCompleter(wxTextCompleter *textCompleter)
wxStaticText * m_AssemblyAccession
#define ID_BUTTON1
DECLARE_EXPORTED_EVENT_TYPE(, wxEVT_COMMAND_UPDATE_FEATLIST, wxCommandEvent)
static void Init(void)
Definition: cursor6.c:76
char data[12]
Definition: iconv.c:80
#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 NCBI_GUIWIDGETS_LOADERS_EXPORT
Definition: gui_export.h:525
Defines to provide correct exporting from DLLs in Windows.
const struct ncbi::grid::netcache::search::fields::SIZE size
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
Modified on Fri Sep 20 14:57:33 2024 by modify_doxy.py rev. 669887