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

Go to the SVN repository for this file.

1 /* $Id: convert_set_type_dlg.hpp 38635 2017-06-05 18:51:04Z 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: Colleen Bollin
27  */
28 #ifndef _CONVERT_SET_TYPE_DLG_H_
29 #define _CONVERT_SET_TYPE_DLG_H_
30 
31 #include <corelib/ncbistd.hpp>
33 #include <objmgr/scope.hpp>
37 /*!
38  * Includes
39  */
40 
41 ////@begin includes
42 #include "wx/treectrl.h"
43 ////@end includes
44 
45 #include <wx/icon.h>
46 #include <wx/bitmap.h>
47 
48 /*!
49  * Forward declarations
50  */
51 
52 ////@begin forward declarations
53 class wxTreeCtrl;
54 class CSetClassPanel;
55 ////@end forward declarations
56 
58 
59 /*!
60  * Control identifiers
61  */
62 
63 ////@begin control identifiers
64 #define ID_CCONVERTSETTYPEDLG 10420
65 #define ID_TREEBOOK 10421
66 #define ID_WINDOW8 10422
67 #define SYMBOL_CCONVERTSETTYPEDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
68 #define SYMBOL_CCONVERTSETTYPEDLG_TITLE _("Convert Set Type")
69 #define SYMBOL_CCONVERTSETTYPEDLG_IDNAME ID_CCONVERTSETTYPEDLG
70 #define SYMBOL_CCONVERTSETTYPEDLG_SIZE wxSize(400, 300)
71 #define SYMBOL_CCONVERTSETTYPEDLG_POSITION wxDefaultPosition
72 ////@end control identifiers
73 
74 
75 /*!
76  * CConvertSetTypeDlg class declaration
77  */
78 
80 {
81  DECLARE_DYNAMIC_CLASS( CConvertSetTypeDlg )
82  DECLARE_EVENT_TABLE()
83 
84 public:
85  /// Constructors
87  CConvertSetTypeDlg( wxWindow* parent, const objects::CBioseq_set& set, wxWindowID id = SYMBOL_CCONVERTSETTYPEDLG_IDNAME, const wxString& caption = SYMBOL_CCONVERTSETTYPEDLG_TITLE, const wxPoint& pos = SYMBOL_CCONVERTSETTYPEDLG_POSITION, const wxSize& size = SYMBOL_CCONVERTSETTYPEDLG_SIZE, long style = SYMBOL_CCONVERTSETTYPEDLG_STYLE );
88 
89  /// Creation
90  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CCONVERTSETTYPEDLG_IDNAME, const wxString& caption = SYMBOL_CCONVERTSETTYPEDLG_TITLE, const wxPoint& pos = SYMBOL_CCONVERTSETTYPEDLG_POSITION, const wxSize& size = SYMBOL_CCONVERTSETTYPEDLG_SIZE, long style = SYMBOL_CCONVERTSETTYPEDLG_STYLE );
91 
92  /// Destructor
94 
95  /// Initialises member variables
96  void Init();
97 
98  /// Creates the controls and sizers
99  void CreateControls();
100 
101 ////@begin CConvertSetTypeDlg event handler declarations
102 
103  /// wxEVT_COMMAND_TREE_SEL_CHANGED event handler for ID_TREEBOOK
104  void OnTreebookSelChanged( wxTreeEvent& event );
105 
106  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
107  void OnOkClick( wxCommandEvent& event );
108 
109 ////@end CConvertSetTypeDlg event handler declarations
110 
111 ////@begin CConvertSetTypeDlg member function declarations
112 
113  /// Retrieves bitmap resources
114  wxBitmap GetBitmapResource( const wxString& name );
115 
116  /// Retrieves icon resources
117  wxIcon GetIconResource( const wxString& name );
118 ////@end CConvertSetTypeDlg member function declarations
119 
120  /// Should we show tooltips?
121  static bool ShowToolTips();
122 
123 ////@begin CConvertSetTypeDlg member variables
124  wxTreeCtrl* m_Tree;
126 ////@end CConvertSetTypeDlg member variables
127 
128  CRef<CCmdComposite> GetCommand(objects::CScope& scope, const objects::CBioseq_set& orig, bool& error);
129  CRef<CCmdComposite> GetCommand(objects::CScope& scope,
130  const objects::CBioseq_set& orig,
131  const objects::CBioseq_set& new_set,
132  bool& error);
133 
134  virtual void ChangeNotify();
135 
136 protected:
138 
139  void x_AddSet(objects::CBioseq_set& set, wxTreeItemId parent);
140 
141  typedef pair<wxTreeItemId, objects::CBioseq_set* > TItemSet;
142 
143  vector<TItemSet> m_ItemSets;
144 
145  objects::CBioseq_set &x_GetSetFromId(wxTreeItemId id);
146  wxTreeItemId x_GetIdFromSet( objects::CBioseq_set *set);
147 };
148 
150 
151 #endif
152  // _CONVERT_SET_TYPE_DLG_H_
wxTreeItemId x_GetIdFromSet(objects::CBioseq_set *set)
static bool ShowToolTips()
Should we show tooltips?
CRef< CCmdComposite > GetCommand(objects::CScope &scope, const objects::CBioseq_set &orig, const objects::CBioseq_set &new_set, bool &error)
void OnOkClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
CConvertSetTypeDlg(wxWindow *parent, const objects::CBioseq_set &set, wxWindowID id=10420, const wxString &caption=_("Convert Set Type"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
CRef< objects::CBioseq_set > m_Set
void x_AddSet(objects::CBioseq_set &set, wxTreeItemId parent)
pair< wxTreeItemId, objects::CBioseq_set * > TItemSet
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
bool Create(wxWindow *parent, wxWindowID id=10420, const wxString &caption=_("Convert Set Type"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
objects::CBioseq_set & x_GetSetFromId(wxTreeItemId id)
void OnTreebookSelChanged(wxTreeEvent &event)
wxEVT_COMMAND_TREE_SEL_CHANGED event handler for ID_TREEBOOK
CSetClassPanel * m_ClassChoice
CRef< CCmdComposite > GetCommand(objects::CScope &scope, const objects::CBioseq_set &orig, bool &error)
void Init()
Initialises member variables.
vector< TItemSet > m_ItemSets
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void CreateControls()
Creates the controls and sizers.
CConvertSetTypeDlg()
Constructors.
Definition: set.hpp:45
#define SYMBOL_CCONVERTSETTYPEDLG_POSITION
#define SYMBOL_CCONVERTSETTYPEDLG_SIZE
#define SYMBOL_CCONVERTSETTYPEDLG_TITLE
#define SYMBOL_CCONVERTSETTYPEDLG_STYLE
#define SYMBOL_CCONVERTSETTYPEDLG_IDNAME
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
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Sun Mar 03 03:11:39 2024 by modify_doxy.py rev. 669887