NCBI C++ ToolKit
experiments_panel.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: experiments_panel.cpp 25851 2012-05-23 15:45:28Z katargir $
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 
29 
30 // Generated by DialogBlocks (unregistered), 07/12/2011 12:09:53
31 
32 #include <ncbi_pch.hpp>
33 ////@begin includes
34 #include "string_list_ctrl.hpp"
35 ////@end includes
36 
37 #include "experiments_panel.hpp"
39 
41 
42 ////@begin XPM images
43 ////@end XPM images
44 
47 
48 
49 /*!
50  * CExperimentsPanel type definition
51  */
52 
53 IMPLEMENT_DYNAMIC_CLASS( CExperimentsPanel, wxPanel )
54 
55 
56 /*!
57  * CExperimentsPanel event table definition
58  */
59 
60 BEGIN_EVENT_TABLE( CExperimentsPanel, wxPanel )
61 
62 ////@begin CExperimentsPanel event table entries
63 ////@end CExperimentsPanel event table entries
64 
66 
67 
68 /*!
69  * CExperimentsPanel constructors
70  */
71 
73 {
74  Init();
75 }
76 
77 CExperimentsPanel::CExperimentsPanel( wxWindow* parent, CSerialObject& object, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
78  : m_Object(&object)
79 {
80  Init();
81  m_Object = dynamic_cast<CSeq_feat*>(&object);
82  const CSeq_feat& seqfeat = dynamic_cast<const CSeq_feat&>(*m_Object);
83  m_EditedFeat.Reset((CSerialObject*)CSeq_feat::GetTypeInfo()->Create());
84  m_EditedFeat->Assign(seqfeat);
85  Create(parent, id, pos, size, style);
86 }
87 
88 
89 /*!
90  * CExperimentsPanel creator
91  */
92 
93 bool CExperimentsPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
94 {
95 ////@begin CExperimentsPanel creation
96  wxPanel::Create( parent, id, pos, size, style );
97 
99  if (GetSizer())
100  {
101  GetSizer()->SetSizeHints(this);
102  }
103  Centre();
104 ////@end CExperimentsPanel creation
105  return true;
106 }
107 
108 
109 /*!
110  * CExperimentsPanel destructor
111  */
112 
114 {
115 ////@begin CExperimentsPanel destruction
116 ////@end CExperimentsPanel destruction
117 }
118 
119 
120 /*!
121  * Member initialisation
122  */
123 
125 {
126 ////@begin CExperimentsPanel member initialisation
127 ////@end CExperimentsPanel member initialisation
128 }
129 
130 
131 /*!
132  * Control creation for CExperimentsPanel
133  */
134 
136 {
137 ////@begin CExperimentsPanel content construction
138  CExperimentsPanel* itemPanel1 = this;
139 
140  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
141  itemPanel1->SetSizer(itemBoxSizer2);
142 
143  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
144  itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 0);
145 
146  CStringListCtrl* itemScrolledWindow4 = new CStringListCtrl( itemPanel1, ID_WINDOW, wxDefaultPosition, itemPanel1->ConvertDialogToPixels(wxSize(66, 61)), wxSUNKEN_BORDER|wxScrolledWindowStyle|wxTAB_TRAVERSAL );
148  itemScrolledWindow4->SetToolTip(_("Enter wet-bench experimental evidence as free text. Please be as brief as possible."));
149  itemBoxSizer3->Add(itemScrolledWindow4, 1, wxGROW|wxALL, 0);
150 
151  // Set validators
152  itemScrolledWindow4->SetValidator( CGBQualStringListValidator(*m_Object, "experiment") );
153 ////@end CExperimentsPanel content construction
154 }
155 
156 
157 /*!
158  * Should we show tooltips?
159  */
160 
162 {
163  return true;
164 }
165 
166 /*!
167  * Get bitmap resources
168  */
169 
170 wxBitmap CExperimentsPanel::GetBitmapResource( const wxString& name )
171 {
172  // Bitmap retrieval
173 ////@begin CExperimentsPanel bitmap retrieval
174  wxUnusedVar(name);
175  return wxNullBitmap;
176 ////@end CExperimentsPanel bitmap retrieval
177 }
178 
179 /*!
180  * Get icon resources
181  */
182 
183 wxIcon CExperimentsPanel::GetIconResource( const wxString& name )
184 {
185  // Icon retrieval
186 ////@begin CExperimentsPanel icon retrieval
187  wxUnusedVar(name);
188  return wxNullIcon;
189 ////@end CExperimentsPanel icon retrieval
190 }
191 
CExperimentsPanel()
Constructors.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CSerialObject * m_Object
void CreateControls()
Creates the controls and sizers.
CRef< CSerialObject > m_EditedFeat
void Init()
Initialises member variables.
bool Create(wxWindow *parent, wxWindowID id=ID_CEXPERIMENTSSPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(266, 184), long style=wxTAB_TRAVERSAL)
Creation.
static bool ShowToolTips()
Should we show tooltips?
~CExperimentsPanel()
Destructor.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
Base class for all serializable objects.
Definition: serialbase.hpp:150
#define _(proto)
Definition: ct_nlmzip_i.h:78
USING_SCOPE(objects)
static void Init(void)
Definition: cursor6.c:76
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
END_EVENT_TABLE()
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Tue Apr 23 07:40:21 2024 by modify_doxy.py rev. 669887