for(int i=1;i<=numLev;i++)
{
out<<i;
- as.Add(out.str());
+ as.Add(crea::std2wx(out.str()));
out.str("");
}
- levels=new wxComboBox(this, ID_COMBO,"1",wxPoint(190, 5),wxDefaultSize,as);
+ levels=new wxComboBox(this, ID_COMBO,_T("1"),wxPoint(190, 5),wxDefaultSize,as);
wxStaticText * na=new wxStaticText(this,-1,_T(" Currently hidden attributes: "), wxPoint(255,10));
shownAtts=new wxListCtrl(this, wxID_ANY, wxPoint(5,30), wxSize(160,90), wxLC_REPORT | wxLC_NO_HEADER );
for ( ;; )
{
item = shownAtts->GetNextItem(item,
- wxLIST_NEXT_ALL,
- wxLIST_STATE_SELECTED);
+ wxLIST_NEXT_ALL,
+ wxLIST_STATE_SELECTED);
if ( item == -1 )
break;
- std::string change=shownAtts->GetItemText(item);
+ std::string change = crea::wx2std(shownAtts->GetItemText(item));
std::vector<std::string>::iterator it;
bool found=false;
for(it=shownA.begin();it!=shownA.end()&&!found;++it)
for ( ;; )
{
item = notShownAtts->GetNextItem(item,
- wxLIST_NEXT_ALL,
- wxLIST_STATE_SELECTED);
+ wxLIST_NEXT_ALL,
+ wxLIST_STATE_SELECTED);
if ( item == -1 )
break;
- std::string change=notShownAtts->GetItemText(item);
+ std::string change = crea::wx2std(notShownAtts->GetItemText(item));
std::vector<std::string>::iterator it;
bool found=false;
for(it=notShownA.begin();it!=notShownA.end()&&!found;++it)
//using namespace tree;
namespace creaImageIO
{
- const int ID_COMBO = 140;
+ const int ID_COMBO = 140;
// CTor
- WxEditFieldsPanel::WxEditFieldsPanel(wxWindow *parent, wxDialog* dial, WxGimmickView* view, tree::Node* nod,
- const std::vector<std::string> name,
- const std::vector<std::string> key)
+ WxEditFieldsPanel::WxEditFieldsPanel(wxWindow *parent, wxDialog* dial, WxGimmickView* view, tree::Node* nod,
+ const std::vector<std::string> name,
+ const std::vector<std::string> key)
: wxPanel( parent,
- -1, wxDefaultPosition,
- wxDefaultSize,
- wxRESIZE_BORDER |
- wxSYSTEM_MENU |
- wxCLOSE_BOX |
- wxMAXIMIZE_BOX |
- wxMINIMIZE_BOX |
- wxCAPTION
- ),
- dialog(dial),
- node (nod),
- names(name),
- keys(key),
- mView(view)
+ -1, wxDefaultPosition,
+ wxDefaultSize,
+ wxRESIZE_BORDER |
+ wxSYSTEM_MENU |
+ wxCLOSE_BOX |
+ wxMAXIMIZE_BOX |
+ wxMINIMIZE_BOX |
+ wxCAPTION
+ ),
+ dialog(dial),
+ node (nod),
+ names(name),
+ keys(key),
+ mView(view)
{
GimmickDebugMessage(1,"WxCustomizeConfigPanel::WxCustomizeConfigPanel"
- <<std::endl);
+ <<std::endl);
wxStaticText * cp=new wxStaticText(this,-1,_T(" Attribute to change: "), wxPoint(5,10));
wxArrayString as;
std::vector<std::string>::const_iterator it;
for(it=names.begin();it!=names.end();++it)
{
- as.Add(*it);
+ as.Add(crea::std2wx(*it));
}
- attributes=new wxComboBox(this, ID_COMBO,names.front(),wxPoint(110, 10),wxDefaultSize,as);
+ attributes=new wxComboBox(this, ID_COMBO, crea::std2wx(names.front()), wxPoint(110, 10), wxDefaultSize,as);
std::string val=node->GetAttribute(keys[0]);
if(val.compare("")==0){val="?";}
wxStaticText * av=new wxStaticText(this,-1,_T(" Current Value: "), wxPoint(5,40));
- actualVal=new wxStaticText(this,-1,_T(val), wxPoint(110,40));
+ actualVal=new wxStaticText(this,-1,crea::std2wx(val), wxPoint(110,40));
wxStaticText * nv=new wxStaticText(this,-1,_T(" New Value: "), wxPoint(5,70));
- newVal=new wxTextCtrl(this, wxID_ANY, _T(val), wxPoint(110,70), wxSize(220,20));
+ newVal=new wxTextCtrl(this, wxID_ANY, crea::std2wx(val), wxPoint(110,70), wxSize(220,20));
wxButton *save = new wxButton(this,wxID_ANY,_T("Save Changes"), wxPoint(5,100) );
Connect( save->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxEditFieldsPanel::OnEdit );
WxEditFieldsPanel::~WxEditFieldsPanel()
{
GimmickDebugMessage(1,"WxEditFieldsPanel::~WxEditFieldsPanel"
- <<std::endl);
+ <<std::endl);
}
void WxEditFieldsPanel::OnEdit(wxCommandEvent& event)
int sel=attributes->GetSelection();
if(sel==-1)
{
- sel=0;
+ sel=0;
}
mView->OnFieldsEdited(node,names[sel],keys[sel],val);
dialog->Destroy();