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

Go to the SVN repository for this file.

1 /* $Id: feature_create_dlg.hpp 18466 2008-12-08 19:34:39Z tereshko $
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: Roman Katargin
27  */
28 #ifndef _FEATURE_CREATE_DLG_H_
29 #define _FEATURE_CREATE_DLG_H_
30 
31 #include <corelib/ncbistd.hpp>
32 #include <gui/gui.hpp>
33 #include <wx/dialog.h>
34 #include <wx/choice.h>
36 #include <gui/objutils/objects.hpp>
37 
38 
39 
40 /*!
41  * Includes
42  */
43 
44 ////@begin includes
45 #include "wx/valtext.h"
46 #include "wx/grid.h"
47 #include "wx/statline.h"
48 ////@end includes
49 
50 #include <wx/choice.h>
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_CFEATURECREATEDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
65 #define SYMBOL_CFEATURECREATEDIALOG_TITLE _("Feature Create Dialog")
66 #define SYMBOL_CFEATURECREATEDIALOG_IDNAME ID_CFEATURECREATEDIALOG
67 #define SYMBOL_CFEATURECREATEDIALOG_SIZE wxSize(300, 300)
68 #define SYMBOL_CFEATURECREATEDIALOG_POSITION wxDefaultPosition
69 ////@end control identifiers
70 
71 
73 
74 /*!
75  * CFeatureCreateDialog class declaration
76  */
77 
79 {
80  DECLARE_DYNAMIC_CLASS( CFeatureCreateDialog )
81  DECLARE_EVENT_TABLE()
82 
83 public:
84  /// Constructors
86  CFeatureCreateDialog( wxWindow* parent, wxWindowID id = SYMBOL_CFEATURECREATEDIALOG_IDNAME, const wxString& caption = SYMBOL_CFEATURECREATEDIALOG_TITLE, const wxPoint& pos = SYMBOL_CFEATURECREATEDIALOG_POSITION, const wxSize& size = SYMBOL_CFEATURECREATEDIALOG_SIZE, long style = SYMBOL_CFEATURECREATEDIALOG_STYLE );
87 
88  /// Creation
89  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CFEATURECREATEDIALOG_IDNAME, const wxString& caption = SYMBOL_CFEATURECREATEDIALOG_TITLE, const wxPoint& pos = SYMBOL_CFEATURECREATEDIALOG_POSITION, const wxSize& size = SYMBOL_CFEATURECREATEDIALOG_SIZE, long style = SYMBOL_CFEATURECREATEDIALOG_STYLE );
90 
91  /// Destructor
93 
94  /// Initialises member variables
95  void Init();
96 
97  /// Creates the controls and sizers
98  void CreateControls();
99 
100 ////@begin CFeatureCreateDialog event handler declarations
101 
102 ////@end CFeatureCreateDialog event handler declarations
103 
104 ////@begin CFeatureCreateDialog member function declarations
105 
106  wxString GetLbl() const { return m_Label ; }
107  void SetLbl(wxString value) { m_Label = value ; }
108 
109  wxString GetComments() const { return m_Comments ; }
110  void SetComments(wxString value) { m_Comments = value ; }
111 
112  /// Retrieves bitmap resources
113  wxBitmap GetBitmapResource( const wxString& name );
114 
115  /// Retrieves icon resources
116  wxIcon GetIconResource( const wxString& name );
117 ////@end CFeatureCreateDialog member function declarations
118 
119  /// Should we show tooltips?
120  static bool ShowToolTips();
121 
122 ////@begin CFeatureCreateDialog member variables
123 public:
124  wxString m_Label;
125  wxString m_Comments;
126  /// Control identifiers
127  enum {
128  ID_CFEATURECREATEDIALOG = 10015,
129  ID_CHOICE6 = 10016,
130  ID_TEXTCTRL2 = 10017,
131  ID_TEXTCTRL3 = 10019,
132  ID_GRID1 = 10018
133  };
134 ////@end CFeatureCreateDialog member variables
135 
136  void SetConstraints(vector <objects::CSeqFeatData::ESubtype> & options,
137  objects::CSeqFeatData::ESubtype selected);
138 
140 
141  void OnFeatureTypeChanged(wxCommandEvent& event);
142 
143  virtual bool TransferDataToWindow();
144  virtual bool TransferDataFromWindow();
145 protected:
148 
149  vector <objects::CSeqFeatData::ESubtype> m_Options;
150  objects::CSeqFeatData::ESubtype m_Selected;
151 
152  wxChoice * m_pFeatType;
153  wxGrid * m_pQualifiers;
154 
155  void x_InitFeatTypes();
156  void x_UpdateQualifiers();
157 
158 };
159 
160 
162 
163 #endif
164  // _FEATURE_CREATE_DLG_H_
wxString GetComments() const
void SetLbl(wxString value)
vector< objects::CSeqFeatData::ESubtype > m_Options
objects::CSeqFeatData::ESubtype m_Selected
void SetComments(wxString value)
TConstScopedObjects * m_pOut
TConstScopedObjects * m_pIn
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
#define SYMBOL_CFEATURECREATEDIALOG_IDNAME
#define SYMBOL_CFEATURECREATEDIALOG_SIZE
#define SYMBOL_CFEATURECREATEDIALOG_POSITION
#define SYMBOL_CFEATURECREATEDIALOG_TITLE
#define SYMBOL_CFEATURECREATEDIALOG_STYLE
static void Init(void)
Definition: cursor6.c:76
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
#define NCBI_GUIWIDGETS_SEQ_EXPORT
Definition: gui_export.h:539
#define ID_TEXTCTRL3
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
std::istream & in(std::istream &in_, double &x_)
#define ID_TEXTCTRL2
Modified on Sat May 25 14:21:49 2024 by modify_doxy.py rev. 669887