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

Go to the SVN repository for this file.

1 /* $Id: rrna_subpanel.cpp 29198 2013-11-13 20:34:31Z bollin $
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 
29 
30 #include <ncbi_pch.hpp>
31 ////@begin includes
32 ////@end includes
33 
34 #include "rrna_subpanel.hpp"
35 
36 #include <wx/sizer.h>
37 #include <wx/bitmap.h>
38 #include <wx/icon.h>
39 #include <wx/stattext.h>
40 #include <wx/textctrl.h>
41 
42 
44 
45 ////@begin XPM images
46 ////@end XPM images
47 
48 
49 /*!
50  * CrRNASubPanel type definition
51  */
52 
53 IMPLEMENT_DYNAMIC_CLASS( CrRNASubPanel, wxPanel )
54 
55 
56 /*!
57  * CrRNASubPanel event table definition
58  */
59 
60 BEGIN_EVENT_TABLE( CrRNASubPanel, wxPanel )
61 
62 ////@begin CrRNASubPanel event table entries
63 ////@end CrRNASubPanel event table entries
64 
66 
67 
68 /*!
69  * CrRNASubPanel constructors
70  */
71 
73 {
74  Init();
75 }
76 
77 CrRNASubPanel::CrRNASubPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
78 {
79  Init();
80  Create(parent, id, pos, size, style);
81 }
82 
83 
84 /*!
85  * CrRNASubPanel creator
86  */
87 
88 bool CrRNASubPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
89 {
90 ////@begin CrRNASubPanel creation
91  wxPanel::Create( parent, id, pos, size, style );
92 
94  if (GetSizer())
95  {
96  GetSizer()->SetSizeHints(this);
97  }
98  Centre();
99 ////@end CrRNASubPanel creation
100  return true;
101 }
102 
103 
104 /*!
105  * CrRNASubPanel destructor
106  */
107 
109 {
110 ////@begin CrRNASubPanel destruction
111 ////@end CrRNASubPanel destruction
112 }
113 
114 
115 /*!
116  * Member initialisation
117  */
118 
120 {
121 ////@begin CrRNASubPanel member initialisation
122  m_NameCtrl = NULL;
123 ////@end CrRNASubPanel member initialisation
124 }
125 
126 
127 /*!
128  * Control creation for CrRNASubPanel
129  */
130 
132 {
133 ////@begin CrRNASubPanel content construction
134  CrRNASubPanel* itemPanel1 = this;
135 
136  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
137  itemPanel1->SetSizer(itemBoxSizer2);
138 
139  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
140  itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 0);
141 
142  wxStaticText* itemStaticText4 = new wxStaticText( itemPanel1, wxID_STATIC, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
143  itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 2);
144 
145  m_NameCtrl = new CAutoCompleteTextCtrl( itemPanel1, ID_RRNA_NAME_CTRL, wxEmptyString, wxDefaultPosition, wxSize(itemPanel1->ConvertDialogToPixels(wxSize(100, -1)).x, -1), 0 );
146  itemBoxSizer3->Add(m_NameCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 2);
147 
148 ////@end CrRNASubPanel content construction
150 }
151 
152 
153 /*!
154  * Should we show tooltips?
155  */
156 
158 {
159  return true;
160 }
161 
162 /*!
163  * Get bitmap resources
164  */
165 
166 wxBitmap CrRNASubPanel::GetBitmapResource( const wxString& name )
167 {
168  // Bitmap retrieval
169 ////@begin CrRNASubPanel bitmap retrieval
170  wxUnusedVar(name);
171  return wxNullBitmap;
172 ////@end CrRNASubPanel bitmap retrieval
173 }
174 
175 /*!
176  * Get icon resources
177  */
178 
179 wxIcon CrRNASubPanel::GetIconResource( const wxString& name )
180 {
181  // Icon retrieval
182 ////@begin CrRNASubPanel icon retrieval
183  wxUnusedVar(name);
184  return wxNullIcon;
185 ////@end CrRNASubPanel icon retrieval
186 }
187 
188 
189 wxString CrRNASubPanel::GetRnaName() const
190 {
191  return m_NameCtrl->GetValue();
192 }
193 
194 
196 {
197  m_NameCtrl->SetValue(value);
198 }
199 
200 
201 
CAutoCompleteComboBox.
bool AutoComplete(wxTextCompleter *completer)
~CrRNASubPanel()
Destructor.
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=ID_CRRNASUBPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
void Init()
Initialises member variables.
CrRNASubPanel()
Constructors.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void SetRnaName(wxString value)
CAutoCompleteTextCtrl * m_NameCtrl
static bool ShowToolTips()
Should we show tooltips?
wxString GetRnaName() const
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
char value[7]
Definition: config.c:431
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#define NULL
Definition: ncbistd.hpp:225
#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 Sun Mar 03 03:11:05 2024 by modify_doxy.py rev. 669887