MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / AddClassificationOptionsToMenu

Method AddClassificationOptionsToMenu

Explore/HistogramView.cpp:309–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309int 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
334void HistogramCanvas::OnCustomCategorySelect(wxCommandEvent& e)
335{

Callers 1

MapMenusMethod · 0.80

Calls 4

GetTitlesMethod · 0.80
AppendMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected