void WorkspacePanel::projectNameChanged(EventArgs& args) { ProjectEventArgs pea = dynamic_cast<ProjectEventArgs&>(args); Project* project = pea.getProject(); wxTreeItemId projectId = mProjectIdMap[project]; mTreeCtrl->SetItemText(projectId, project->getName().c_str()); }
void WorkspacePanel::projectMaterialAdded(EventArgs& args) { ProjectEventArgs pea = dynamic_cast<ProjectEventArgs&>(args); Project* project = pea.getProject(); MaterialController* material = pea.getMaterial(); wxTreeItemId projectId = mProjectIdMap[project]; wxTreeItemId id = mTreeCtrl->AppendItem(projectId, material->getMaterial()->getName().c_str(), MATERIAL_IMAGE); mTreeCtrl->SelectItem(id, true); mMaterialIdMap[material] = id; subscribe(material); }