| 307 | } |
| 308 | |
| 309 | int HistogramCanvas::AddClassificationOptionsToMenu(wxMenu* menu, |
| 310 | CatClassifManager* ccm) |
| 311 | { |
| 312 | if (!IS_VAR_STRING.empty()) { |
| 313 | if(IS_VAR_STRING[0]) { |
| 314 | return 0; |
| 315 | } |
| 316 | } |
| 317 | std::vector<wxString> titles; |
| 318 | ccm->GetTitles(titles); |
| 319 | |
| 320 | wxMenu* menu2 = new wxMenu(wxEmptyString); |
| 321 | wxString s = _("Create New Custom"); |
| 322 | int xrcid_hist_classification = GdaConst::ID_HISTOGRAM_CLASSIFICATION; |
| 323 | menu2->Append(xrcid_hist_classification, s, s); |
| 324 | menu2->AppendSeparator(); |
| 325 | |
| 326 | for (int j=0; j<titles.size(); j++) { |
| 327 | menu2->Append(xrcid_hist_classification+j+1, titles[j]); |
| 328 | } |
| 329 | s = _("Histogram Classification"); |
| 330 | menu->Insert(1, wxID_ANY, s, menu2, s); |
| 331 | return (int)titles.size(); |
| 332 | } |
| 333 | |
| 334 | void HistogramCanvas::OnCustomCategorySelect(wxCommandEvent& e) |
| 335 | { |