43 #include <wx/statbox.h>
44 #include <wx/radiobox.h>
45 #include <wx/msgdlg.h>
46 #include <wx/stattext.h>
47 #include <wx/choice.h>
48 #include <wx/combobox.h>
49 #include <wx/checkbox.h>
50 #include <wx/imaglist.h>
51 #include <wx/filename.h>
105 CAlgoToolManagerParamsPanel::Create( parent,
id, pos,
size, style );
110 GetSizer()->SetSizeHints(
this);
154 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
155 itemCAlgoToolManagerParamsPanel1->SetSizer(itemBoxSizer2);
163 m_WMStatic =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Mask using parameters for"), wxDefaultPosition, wxDefaultSize, 0 );
166 wxArrayString m_WMTaxIdsStrings;
167 m_WMTaxIds =
new wxChoice( itemCAlgoToolManagerParamsPanel1,
ID_CHOICE7, wxDefaultPosition, wxDefaultSize, m_WMTaxIdsStrings, 0 );
172 m_WMDownload =
new wxButton( itemCAlgoToolManagerParamsPanel1,
ID_BUTTON5,
_(
"Configure..."), wxDefaultPosition, wxDefaultSize, 0 );
175 wxBoxSizer* itemBoxSizer9 =
new wxBoxSizer(wxHORIZONTAL);
176 itemBoxSizer2->Add(itemBoxSizer9, 0, wxALIGN_LEFT|wxALL, 5);
178 wxStaticText* itemStaticText10 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Objects to Create"), wxDefaultPosition, wxDefaultSize, 0 );
179 itemBoxSizer9->Add(itemStaticText10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
181 wxArrayString itemComboBox11Strings;
182 itemComboBox11Strings.Add(
_(
"Features representing masked regions"));
183 itemComboBox11Strings.Add(
_(
"A sequence location representing masked regions"));
184 itemComboBox11Strings.Add(
_(
"\"Both features and sequence location"));
185 wxComboBox* itemComboBox11 =
new wxComboBox( itemCAlgoToolManagerParamsPanel1,
ID_COMBOBOX2, wxEmptyString, wxDefaultPosition, wxDefaultSize, itemComboBox11Strings, wxCB_READONLY );
186 itemBoxSizer9->Add(itemComboBox11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
188 wxCheckBox* itemCheckBox12 =
new wxCheckBox( itemCAlgoToolManagerParamsPanel1,
ID_LOCALRUN,
_(
"Run tool as standalone"), wxDefaultPosition, wxDefaultSize, 0 );
189 itemCheckBox12->SetValue(
true);
190 itemBoxSizer2->Add(itemCheckBox12, 0, wxALIGN_LEFT|wxALL, 5);
193 itemComboBox11->SetValidator( wxGenericValidator(&
GetData().m_OutputType) );
194 itemCheckBox12->SetValidator( wxGenericValidator(&
GetData().m_Standalone) );
197 wxStaticText* loadingText =
new wxStaticText(itemCAlgoToolManagerParamsPanel1,
ID_LOADING_TEXT,
wxT(
"Windomasker tax ID: none. Loading..."), wxDefaultPosition, wxDefaultSize, 0);
198 wxFont bold(wxNORMAL_FONT->GetPointSize(), wxNORMAL_FONT->GetFamily(), wxNORMAL_FONT->GetStyle(), wxFONTWEIGHT_BOLD, wxNORMAL_FONT->GetUnderlined(), wxNORMAL_FONT->GetFaceName());
199 loadingText->SetFont(bold);
200 loadingText->SetForegroundColour(*wxBLACK);
288 return wxPanel::TransferDataToWindow();
314 GetSizer()->Layout();
324 if (!wxPanel::TransferDataFromWindow())
329 if (selection.empty()) {
331 wxT(
"Please, select sequences to mask."),
wxT(
"Error"),
332 wxOK | wxICON_ERROR,
this
339 int taxId = 0, index =
m_WMTaxIds->GetSelection();
340 if (wxNOT_FOUND != index)
345 wxT(
"Please, select organism."),
wxT(
"Error"),
346 wxOK | wxICON_ERROR,
this
static string MakeKey(const string §ion, const string &key, const string &delim=CGuiRegistry::kDecimalDot)
create a key from a section and a subkey
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
class CRegistryReadView provides a nested hierarchical view at a particular key.
bool FillControl(ICallback *callback, wxControlWithItems &ctrl, bool local, int selectTaxId)
static CTaxIdHelper & GetInstance()
static CWinMaskerFileStorage & GetInstance()
access the application-wide singleton
virtual void TaxonsLoaded(bool local)
static bool ShowToolTips()
Should we show tooltips?
CObjectListWidget * m_ObjectList
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual bool TransferDataToWindow()
Transfer data to the window.
CWindowMaskerParams & GetData()
Data access.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void RestoreDefaults()
override in derived classes
void OnWMDownload(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON5
CWindowMaskerPanel()
Constructors.
~CWindowMaskerPanel()
Destructor.
wxStaticText * m_WMStatic
void Init()
Initialises member variables.
TConstScopedObjects * m_InputObjects
virtual bool TransferDataFromWindow()
Transfer data from the window.
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=ID_CWINDOWMASKERPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
virtual void LoadSettings()
wxBoxSizer * m_WMStaticBoxSizer
virtual void SaveSettings() const
override in derived classes
void Init()
Initialises member variables.
TConstScopedObjects & SetObjects()
void LoadTableSettings(const CRegistryReadView &view, bool byName=false)
void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const
vector< SConstScopedObject > TConstScopedObjects
TTaxId GetTaxId(const CBioseq_Handle &handle)
return the tax-id associated with a given sequence.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
Process information in the NCBI Registry, including working with configuration files.
static const char * kTableTag