35 #include "wx/imaglist.h"
47 #include <wx/button.h>
48 #include <wx/bitmap.h>
50 #include <wx/checkbox.h>
51 #include <wx/msgdlg.h>
52 #include <wx/sstream.h>
53 #include <wx/txtstrm.h>
79 : m_PkgManager(pkgManager)
88 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
89 CDialog::Create( parent,
id, caption, pos,
size, style );
94 GetSizer()->SetSizeHints(
this);
123 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
124 itemCDialog1->SetSizer(itemBoxSizer2);
126 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
127 itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 0);
129 wxBoxSizer* itemBoxSizer4 =
new wxBoxSizer(wxVERTICAL);
130 itemBoxSizer3->Add(itemBoxSizer4, 2, wxGROW|wxALL, 0);
132 m_PkgList =
new wxListCtrl( itemCDialog1,
ID_LISTCTRL1, wxDefaultPosition, wxDLG_UNIT(itemCDialog1, wxSize(120, 110)), wxLC_REPORT|wxLC_SINGLE_SEL );
133 itemBoxSizer4->Add(
m_PkgList, 1, wxGROW|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
135 wxCheckBox* itemCheckBox6 =
new wxCheckBox( itemCDialog1,
ID_CHECKBOX1,
_(
"Show invalid packages"), wxDefaultPosition, wxDefaultSize, 0 );
136 itemCheckBox6->SetValue(
false);
137 itemBoxSizer4->Add(itemCheckBox6, 0, wxALIGN_LEFT|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
139 wxBoxSizer* itemBoxSizer7 =
new wxBoxSizer(wxVERTICAL);
140 itemBoxSizer3->Add(itemBoxSizer7, 3, wxGROW|wxALL, 0);
142 m_PkgInfo =
new wxTextCtrl( itemCDialog1,
ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
143 itemBoxSizer7->Add(
m_PkgInfo, 1, wxGROW|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
147 itemBoxSizer7->Add(
m_PkgEnable, 0, wxALIGN_LEFT|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
149 wxStaticLine* itemStaticLine10 =
new wxStaticLine( itemCDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
150 itemBoxSizer2->Add(itemStaticLine10, 0, wxGROW|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
152 wxStdDialogButtonSizer* itemStdDialogButtonSizer11 =
new wxStdDialogButtonSizer;
154 itemBoxSizer2->Add(itemStdDialogButtonSizer11, 0, wxALIGN_RIGHT|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
155 wxButton* itemButton12 =
new wxButton( itemCDialog1, wxID_OK,
_(
"&OK"), wxDefaultPosition, wxDefaultSize, 0 );
156 itemStdDialogButtonSizer11->AddButton(itemButton12);
158 wxButton* itemButton13 =
new wxButton( itemCDialog1, wxID_CANCEL,
_(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
159 itemStdDialogButtonSizer11->AddButton(itemButton13);
161 itemStdDialogButtonSizer11->Realize();
175 wxCheckBox* itemCheckBox1 = (wxCheckBox*)FindWindow(
ID_CHECKBOX1);
176 bool showInvalid = itemCheckBox1->GetValue();
180 wxCheckBox* itemCheckBox2 = (wxCheckBox*)FindWindow(
ID_CHECKBOX2);
181 itemCheckBox2->Enable(
false);
182 itemCheckBox2->SetValue(
false);
222 m_PkgList->SetColumnWidth(0, wxLIST_AUTOSIZE);
248 auto index =
event.GetIndex();
256 string descr =
"Description: ";
257 wxCheckBox* itemCheckBox = (wxCheckBox*)FindWindow(
ID_CHECKBOX2);
261 itemCheckBox->SetValue(
false);
262 itemCheckBox->Enable(
false);
265 wxStringOutputStream strstr;
266 wxTextOutputStream os(strstr);
268 m_PkgInfo->ChangeValue(strstr.GetString());
272 itemCheckBox->Enable(
false);
273 itemCheckBox->SetValue(
true);
279 itemCheckBox->Enable(
true);
283 itemCheckBox->Enable(
false);
284 itemCheckBox->SetValue(
false);
292 inline wxTextOutputStream&
operator <<( wxTextOutputStream& os,
const string&
str )
294 return os << wxString::FromAscii(
str.c_str());
303 os <<
wxT(
"Package: ") << name << endl;
304 os <<
wxT(
"Description: ") << name <<
wxT(
" application") << endl;
311 os <<
wxT(
"Package: ") << manifest->GetName() << endl;
312 os <<
wxT(
"Description: ") << manifest->GetDescription() << endl;
313 os <<
wxT(
"Version: ");
321 os << manifest->GetVersion();
332 os <<
wxT(
"Dir: ") << pkg_info.
m_Dir << endl;
333 os <<
wxT(
"Depends on: ") << endl;
334 const objects::CGuiPkgManifest::TGuiPkgDependency& deps = manifest->GetGuiPkgDependency();
335 ITERATE(objects::CGuiPkgManifest::TGuiPkgDependency, it2, deps) {
336 const objects::CGuiDependentPkg& pkg = (*it2)->GetGuiDependentPkg();
337 os <<
wxT(
" ") << pkg.GetName() <<
wxT(
" ") << pkg.GetVersion() << endl;
349 if (event.IsChecked()) {
350 vector<string> basePkgs;
353 ITERATE(vector<string>, it, basePkgs)
357 vector<string> dependents;
360 ITERATE(vector<string>, it, dependents)
367 vector<string> loadPkgs;
368 back_insert_iterator<vector<string> > dest(loadPkgs);
372 wxMessageBox(
wxT(
"Changes will take effect when you restart Genome Workbench."),
User-defined methods of the data storage class.
User-defined methods of the data storage class.
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
CPkgManager - application Package Manager.
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator find(const key_type &key) const
const_iterator end() const
CNcbiOstream & operator<<(CNcbiOstream &out, const CEquivRange &range)
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_PLUGIN_SUFFIX
#define NCBI_PLUGIN_PREFIX
CConstRef< objects::CGuiPkgManifest > m_Manifest
void OnShowInvalidPkgs(wxCommandEvent &event)
void GetDependentPkgs(const string &pkg_name, vector< string > &dependents) const
static void x_DumpPkgInfo(wxTextOutputStream &os, const string &name, const CPackageInfo &pkg_info)
void OnOkClick(wxCommandEvent &event)
const CPackageInfo * GetPkgInfo(int index, string &pkg_name) const
bool Create(wxWindow *parent, wxWindowID id=ID_CAPPPACKAGESDLG, const wxString &caption=_("Configure Packages"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
static bool ShowToolTips()
void x_LoadPkgList(bool firstTime=false)
void OnPackageSelected(wxListEvent &event)
void GetBasePkgs(const string &pkg_name, vector< string > &basePkgs) const
void SetPackagesToLoad(const vector< string > &packages)
CPkgManager * m_PkgManager
set< string > m_EnabledPkgs
wxIcon GetIconResource(const wxString &name)
#define SYMBOL_CAPPPACKAGESDLG_TITLE
void OnEnablePkg(wxCommandEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
#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 string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
Define class Dll and for Portable DLL handling.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
wxString ToWxString(const string &s)