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

Go to the SVN repository for this file.

1 /* $Id: alnspan_settings_dlg.cpp 47392 2023-03-06 19:00:01Z evgeniev $
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:
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 
32 ////@begin includes
33 ////@end includes
34 
36 
37 ////@begin XPM images
38 ////@end XPM images
39 
40 
41 /*!
42  * CAlnSpanSettingsDlg type definition
43  */
44 
45 IMPLEMENT_DYNAMIC_CLASS( CAlnSpanSettingsDlg, wxDialog )
46 
47 
48 /*!
49  * CAlnSpanSettingsDlg event table definition
50  */
51 
52 BEGIN_EVENT_TABLE( CAlnSpanSettingsDlg, wxDialog )
53 
54 ////@begin CAlnSpanSettingsDlg event table entries
55 ////@end CAlnSpanSettingsDlg event table entries
56 
58 
59 
60 /*!
61  * CAlnSpanSettingsDlg constructors
62  */
63 
65 {
66  Init();
67 }
68 
69 CAlnSpanSettingsDlg::CAlnSpanSettingsDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
70 {
71  Init();
72  Create(parent, id, caption, pos, size, style);
73 }
74 
75 
76 /*!
77  * CAlnSpanSettingsDlg creator
78  */
79 
80 bool CAlnSpanSettingsDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
81 {
82 ////@begin CAlnSpanSettingsDlg creation
83  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
84  wxDialog::Create( parent, id, caption, pos, size, style );
85 
87  if (GetSizer())
88  {
89  GetSizer()->SetSizeHints(this);
90  }
91  Centre();
92 ////@end CAlnSpanSettingsDlg creation
93  return true;
94 }
95 
96 
97 /*!
98  * CAlnSpanSettingsDlg destructor
99  */
100 
102 {
103 ////@begin CAlnSpanSettingsDlg destruction
104 ////@end CAlnSpanSettingsDlg destruction
105 }
106 
107 
108 /*!
109  * Member initialisation
110  */
111 
113 {
114 ////@begin CAlnSpanSettingsDlg member initialisation
115  m_ThreshText = NULL;
116  m_ShowIndels = NULL;
117 ////@end CAlnSpanSettingsDlg member initialisation
118 }
119 
120 
121 /*!
122  * Control creation for CAlnSpanSettingsDlg
123  */
124 
126 {
127 ////@begin CAlnSpanSettingsDlg content construction
128  // Generated by DialogBlocks, 01/12/2009 19:48:10 (unregistered)
129 
130  CAlnSpanSettingsDlg* itemDialog1 = this;
131 
132  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
133  itemDialog1->SetSizer(itemBoxSizer2);
134 
135  wxStaticBox* itemStaticBoxSizer3Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Static"));
136  wxStaticBoxSizer* itemStaticBoxSizer3 = new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL);
137  itemBoxSizer2->Add(itemStaticBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
138 
139  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
140  itemStaticBoxSizer3->Add(itemBoxSizer4, 1, wxALIGN_CENTER_HORIZONTAL, 5);
141 
142  wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, _("Merging Window:"), wxDefaultPosition, wxDefaultSize, 0 );
143  itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
144 
145  m_ThreshText = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
146  itemBoxSizer4->Add(m_ThreshText, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
147 
148  m_ShowIndels = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Show Indels"), wxDefaultPosition, wxDefaultSize, 0 );
149  m_ShowIndels->SetValue(true);
150  itemStaticBoxSizer3->Add(m_ShowIndels, 0, wxALIGN_LEFT|wxALL, 5);
151 
152  wxStdDialogButtonSizer* itemStdDialogButtonSizer8 = new wxStdDialogButtonSizer;
153 
154  itemBoxSizer2->Add(itemStdDialogButtonSizer8, 0, wxALIGN_RIGHT|wxALL, 5);
155  wxButton* itemButton9 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
156  itemStdDialogButtonSizer8->AddButton(itemButton9);
157 
158  wxButton* itemButton10 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
159  itemStdDialogButtonSizer8->AddButton(itemButton10);
160 
161  itemStdDialogButtonSizer8->Realize();
162 
163  // Set validators
164  m_ThreshText->SetValidator( wxTextValidator(wxFILTER_NUMERIC) );
165 ////@end CAlnSpanSettingsDlg content construction
166 }
167 
168 
169 /*!
170  * Should we show tooltips?
171  */
172 
174 {
175  return true;
176 }
177 
178 /*!
179  * Get bitmap resources
180  */
181 
182 wxBitmap CAlnSpanSettingsDlg::GetBitmapResource( const wxString& name )
183 {
184  // Bitmap retrieval
185 ////@begin CAlnSpanSettingsDlg bitmap retrieval
186  wxUnusedVar(name);
187  return wxNullBitmap;
188 ////@end CAlnSpanSettingsDlg bitmap retrieval
189 }
190 
191 /*!
192  * Get icon resources
193  */
194 
195 wxIcon CAlnSpanSettingsDlg::GetIconResource( const wxString& name )
196 {
197  // Icon retrieval
198 ////@begin CAlnSpanSettingsDlg icon retrieval
199  wxUnusedVar(name);
200  return wxNullIcon;
201 ////@end CAlnSpanSettingsDlg icon retrieval
202 }
203 
205 {
206  long rv;
207  m_ThreshText->GetValue().ToLong( &rv );
208 
209  return static_cast<int>(rv);
210 }
211 
213 {
214  wxString text;
215 
216  m_ThreshText->SetValue( text << th );
217 }
218 
220 {
221  return m_ShowIndels->GetValue();
222 }
223 
225 {
226  m_ShowIndels->SetValue( indel );
227 }
228 
static bool ShowToolTips()
Should we show tooltips?
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CAlnSpanSettingsDlg()
Constructors.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Create(wxWindow *parent, wxWindowID id=ID_CALNSPANSETTINGSDLG, const wxString &caption=_("Alignment span settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void SetShowIndels(bool indel)
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#define NULL
Definition: ncbistd.hpp:225
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n th
END_EVENT_TABLE()
static void text(MDB_val *v)
Definition: mdb_dump.c:62
const struct ncbi::grid::netcache::search::fields::SIZE size
static static static wxID_ANY
Modified on Fri Sep 20 14:58:12 2024 by modify_doxy.py rev. 669887