void WorkspacePanel::materialNameChanged(EventArgs& args) { MaterialEventArgs mea = dynamic_cast<MaterialEventArgs&>(args); MaterialController* mc = mea.getMaterialController(); wxTreeItemId materialId = mMaterialIdMap[mc]; mTreeCtrl->SetItemText(materialId, mc->getMaterial()->getName().c_str()); }
void WorkspacePanel::materialTechniqueAdded(EventArgs& args) { MaterialEventArgs mea = dynamic_cast<MaterialEventArgs&>(args); MaterialController* mc = mea.getMaterialController(); TechniqueController* tc = mea.getTechniqueController(); wxTreeItemId materialId = mMaterialIdMap[mc]; wxTreeItemId id = mTreeCtrl->AppendItem(materialId, tc->getTechnique()->getName().c_str(), TECHNIQUE_IMAGE); mTreeCtrl->SelectItem(id, true); mTechniqueIdMap[tc] = id; subscribe(tc); }