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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS___LOADERS___VCF_REF_SEQUENCES_PANEL__HPP
2 #define GUI_WIDGETS___LOADERS___VCF_REF_SEQUENCES_PANEL__HPP
3 
4 /* $Id: vcf_ref_sequences_panel.hpp 47075 2022-07-13 19:02:32Z asztalos $
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: Vladislav Evgeniev
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 #include <corelib/ncbiobj.hpp>
34 
35 #include <gui/gui_export.h>
36 
38 #include <objmgr/scope.hpp>
40 #include <wx/panel.h>
41 
42 class wxRadioButton;
43 class wxCheckListBox;
44 class wxStaticText;
45 class wxSearchCtrl;
46 class wxButton;
47 
48 /*!
49  * Control identifiers
50  */
51 
52 ////@begin control identifiers
53 #define SYMBOL_CVCFREFSEQUENCESPANEL_STYLE wxTAB_TRAVERSAL
54 #define SYMBOL_CVCFREFSEQUENCESPANEL_TITLE _("VCF Referenced Sequences")
55 #define SYMBOL_CVCFREFSEQUENCESPANEL_IDNAME ID_CVCFREFSEQUENCESPANEL
56 #define SYMBOL_CVCFREFSEQUENCESPANEL_SIZE wxSize(400, 300)
57 #define SYMBOL_CVCFREFSEQUENCESPANEL_POSITION wxDefaultPosition
58 ////@end control identifiers
59 
61 
62 /*!
63  * CVcfRefSequencesPanel class declaration
64  */
65 
67 {
68  DECLARE_DYNAMIC_CLASS( CVcfRefSequencesPanel )
69  DECLARE_EVENT_TABLE()
70 
71 public:
72 
73  /// Constructors
75  CVcfRefSequencesPanel( wxWindow* parent,
76  wxWindowID id = SYMBOL_CVCFREFSEQUENCESPANEL_IDNAME,
77  const wxPoint& pos = SYMBOL_CVCFREFSEQUENCESPANEL_POSITION,
78  const wxSize& size = SYMBOL_CVCFREFSEQUENCESPANEL_SIZE,
80 
81  /// Creation
82  bool Create( wxWindow* parent,
83  wxWindowID id = SYMBOL_CVCFREFSEQUENCESPANEL_IDNAME,
84  const wxPoint& pos = SYMBOL_CVCFREFSEQUENCESPANEL_POSITION,
85  const wxSize& size = SYMBOL_CVCFREFSEQUENCESPANEL_SIZE,
87 
88  /// Destructor
90 
91  /// Initialises member variables
92  void Init();
93 
94  /// Creates the controls and sizers
95  void CreateControls();
96 
97 ////@begin CVcfRefSequencesPanel event handler declarations
98 
99  /// wxEVT_IDLE event handler for ID_CVCFREFSEQUENCESPANEL
100  void OnIdle( wxIdleEvent& event );
101 
102  /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RADIOBTNALL
103  void OnRadiobtnAllSelected( wxCommandEvent& event );
104 
105  /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RADIOBTNSEL
106  void OnRadiobtnSelSeqsSelected( wxCommandEvent& event );
107 
108  /// wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event handler for ID_CHECKLISTBOX
109  void OnChecklistboxToggled( wxCommandEvent& event );
110 
111  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SELECT_ALL_BTN
112  void OnSelectAllBtnClick( wxCommandEvent& event );
113 
114  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DESELECT_ALL_BTN
115  void OnDeselectAllBtnClick( wxCommandEvent& event );
116 
117  /// wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN event handler for ID_SEARCHCTRL
118  void OnSearchButtonClick( wxCommandEvent& event );
119 
120  /// wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN event handler for ID_SEARCHCTRL
121  void OnSearchCancelClick( wxCommandEvent& event );
122 
123  /// wxEVT_COMMAND_TEXT_ENTER event handler for ID_SEARCHCTRL
124  void OnSearchEnter( wxCommandEvent& event );
125 
126  /// wxEVT_UPDATE_UI event handler for ID_SEARCHCTRL
127  void OnSearchCtrlUpdate( wxUpdateUIEvent& event );
128 
129 ////@end CVcfRefSequencesPanel event handler declarations
130 
131 ////@begin CVcfRefSequencesPanel 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 CVcfRefSequencesPanel member function declarations
139 
140  void SetReferenceSeqIds(const vector<CConstRef<objects::CSeq_id> >& refSeqIds);
141  void GetSelectedReferenceSeqIds(vector<CConstRef<objects::CSeq_id> >& selSeqIds) const;
142  bool ImportAll() const;
143  void SetGenCollAssembly(const CRef<objects::CGC_Assembly>& gc_assm);
144  void SetTopLevelSeqCount(size_t count);
145  /// Should we show tooltips?
146  static bool ShowToolTips();
147 
148 ////@begin CVcfRefSequencesPanel member variables
149  wxRadioButton* m_LoadAllSeqsBtn;
150  wxStaticText* m_SeqSelectText;
151  wxCheckListBox* m_RefSeqList;
152  wxButton* m_SelectAllBtn;
153  wxButton* m_DeselctAllBtn;
154  wxSearchCtrl* m_SearchCtrl;
155  /// Control identifiers
156  enum {
157  ID_CVCFREFSEQUENCESPANEL = 10670,
158  ID_RADIOBTNALL = 10671,
159  ID_RADIOBTNSEL = 10672,
163  ID_SEARCHCTRL = 10676
164  };
165 ////@end CVcfRefSequencesPanel member variables
166 
167 private:
168  vector<CConstRef<objects::CSeq_id> > m_RefSeqIds;
173  unique_ptr<objects::IIdMapper> m_IdMapper;
175 
176  void x_FillList(const string& filter);
177 };
178 
180 
181 #endif // GUI_WIDGETS___LOADERS___VCF_REF_SEQUENCES_PANEL__HPP
CRef< objects::CGC_Assembly > m_GenCollAssm
set< const objects::CSeq_id * > m_SelectedSeqIds
vector< CConstRef< objects::CSeq_id > > m_RefSeqIds
CRef< objects::CScope > m_Scope
unique_ptr< objects::IIdMapper > m_IdMapper
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define ID_CHECKLISTBOX
#define ID_DESELECT_ALL_BTN
#define ID_SELECT_ALL_BTN
static void Init(void)
Definition: cursor6.c:76
#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.
#define ID_SEARCHCTRL
#define SYMBOL_CVCFREFSEQUENCESPANEL_SIZE
#define SYMBOL_CVCFREFSEQUENCESPANEL_IDNAME
#define SYMBOL_CVCFREFSEQUENCESPANEL_STYLE
#define SYMBOL_CVCFREFSEQUENCESPANEL_POSITION
Modified on Sat May 18 11:38:32 2024 by modify_doxy.py rev. 669887