49 #include <wx/stattext.h>
50 #include <wx/choice.h>
51 #include <wx/listbox.h>
52 #include <wx/textctrl.h>
53 #include <wx/button.h>
54 #include <wx/bitmap.h>
102 Create(parent,
id, caption, pos,
size, style);
113 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
114 wxDialog::Create( parent,
id, caption, pos,
size, style );
119 GetSizer()->SetSizeHints(
this);
177 vector<CConstIRef<IUITool> > tools;
181 for(
size_t i = 0;
i < tools.size();
i++ ) {
206 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
207 itemDialog1->SetSizer(itemBoxSizer2);
209 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
210 itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 0);
212 wxStaticText* itemStaticText4 =
new wxStaticText( itemDialog1, wxID_STATIC,
_(
"Methods:"), wxDefaultPosition, wxDefaultSize, 0 );
213 itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
215 itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
217 wxStaticText* itemStaticText6 =
new wxStaticText( itemDialog1, wxID_STATIC,
_(
"Type:"), wxDefaultPosition, wxDefaultSize, 0 );
218 itemBoxSizer3->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
220 wxArrayString itemChoice7Strings;
221 itemChoice7Strings.Add(
_(
"DNA"));
222 itemChoice7Strings.Add(
_(
"Protein"));
223 itemChoice7Strings.Add(
_(
"Mixed"));
224 itemChoice7Strings.Add(
_(
"Homogenous"));
225 wxChoice* itemChoice7 =
new wxChoice( itemDialog1,
ID_CHOICE1, wxDefaultPosition, wxDefaultSize, itemChoice7Strings, 0 );
226 itemChoice7->SetStringSelection(
_(
"DNA"));
227 itemBoxSizer3->Add(itemChoice7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
229 wxArrayString itemListBox8Strings;
230 wxListBox* itemListBox8 =
new wxListBox( itemDialog1,
ID_LISTBOX1, wxDefaultPosition, wxSize(250, 200), itemListBox8Strings, wxLB_SINGLE );
231 itemBoxSizer2->Add(itemListBox8, 1, wxGROW|wxLEFT|wxRIGHT, 5);
233 wxTextCtrl* itemTextCtrl9 =
new wxTextCtrl( itemDialog1,
ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxSize(-1, 80), wxTE_MULTILINE|wxTE_READONLY );
234 itemBoxSizer2->Add(itemTextCtrl9, 0, wxGROW|wxALL, 5);
236 wxStaticLine* itemStaticLine10 =
new wxStaticLine( itemDialog1,
ID_STATICLINE, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
237 itemBoxSizer2->Add(itemStaticLine10, 0, wxGROW|wxALL, 0);
239 wxBoxSizer* itemBoxSizer11 =
new wxBoxSizer(wxHORIZONTAL);
240 itemBoxSizer2->Add(itemBoxSizer11, 0, wxALIGN_RIGHT|wxALL, 5);
242 wxButton* itemButton12 =
new wxButton( itemDialog1,
ID_BUTTON2,
_(
"Select Method Dlg..."), wxDefaultPosition, wxDefaultSize, 0 );
243 itemBoxSizer11->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
245 wxButton* itemButton13 =
new wxButton( itemDialog1,
ID_BUTTON1,
_(
"Properties"), wxDefaultPosition, wxDefaultSize, 0 );
246 itemBoxSizer11->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
248 wxButton* itemButton14 =
new wxButton( itemDialog1, wxID_CANCEL,
_(
"&Close"), wxDefaultPosition, wxDefaultSize, 0 );
249 itemBoxSizer11->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
298 wxListBox* itemListBox = (wxListBox*)FindWindow(
ID_LISTBOX1);
299 string methodName =
ToStdString(itemListBox->GetStringSelection());
300 if (methodName.empty())
309 if ((*it)->GetType() &
type && (*it)->GetName() == methodName) {
323 wxListBox* itemListBox = (wxListBox*)FindWindow(
ID_LISTBOX1);
324 itemListBox->Clear();
332 if ((*it)->GetType() &
type) {
333 itemListBox->Append(
ToWxString((*it)->GetName()));
337 if (itemListBox->GetCount() > 0) itemListBox->SetSelection(0);
344 wxTextCtrl* itemTextCtrl9 = (wxTextCtrl*)FindWindow(
ID_TEXTCTRL1);
345 itemTextCtrl9->Clear();
347 wxListBox* itemListBox = (wxListBox*)FindWindow(
ID_LISTBOX1);
348 string methodName =
ToStdString(itemListBox->GetStringSelection());
349 if (methodName.empty())
353 itemTextCtrl9->SetInsertionPoint(0);
358 wxChoice* itemChoice3 = (wxChoice*)FindWindow(
ID_CHOICE1);
359 int index = itemChoice3->GetSelection();
405 static string selectedMethod;
415 if (dlg.ShowModal() == wxID_OK) {
CQualityScoringMethodNA - Quality scoring method for Nucleic Acids (DNA alignments).
vector< CIRef< IScoringMethod > > m_Tools
~CScoreMethodsDlg()
Destructor.
void OnButton1Click(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
void OnButton2Click(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2
bool Create(wxWindow *parent, wxWindowID id=ID_CALIGNSCOREPROPDLG, const wxString &caption=_("Score Methods"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
Creation.
static bool ShowToolTips()
Should we show tooltips?
void OnChoice1Selected(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE1
void OnListbox1Selected(wxCommandEvent &event)
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_LISTBOX1
IAlnExplorer::EAlignType x_GetSelectedType()
void CreateControls()
Creates the controls and sizers.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void Init()
Initialises member variables.
CScoreMethodsDlg()
Constructors.
void x_UpdateDescription()
virtual bool Select(const IUITool &tool)
bool Create(wxWindow *parent, wxWindowID id=ID_CSCORINGMETHODSDLG, const wxString &caption=_("Alignment Scoring Methods"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
Creation.
void Setup(const string &sel_method, IAlnExplorer::EAlignType type)
wxString GetSelectedMethod() const
CSimpleScoringMethod - trivial implementation of IScoringMethod.
IScoringMethod represents an abstract algorithm for calculating alignment scores and assigning colors...
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
static const wxChar * kDefScoreDir
static const wxChar * kDefUserScoreDir
static const char * kUIToolsRegKey
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)