DataDlg::DataDlg(ScatterCtrl& scatter) { CtrlLayout(*this); Sizeable().Zoomable(); Title(t_("Scatter data")); close <<= THISBACK(OnClose); close.Exit(); pscatter = &scatter; tab.Reset(); series.Clear(); for(int c = 0; c < scatter.GetCount(); c++) if (!IsNull(scatter.GetCount(c))) { WithDataSeries <StaticRect> &dataseries = series.Add(); CtrlLayout(dataseries); dataseries.scatterIndex.Hide(); dataseries.scatterIndex = c; tab.Add(dataseries.SizePos(), scatter.GetLegend(c)); } OnTab(); tab <<= THISBACK(OnTab); }
void DataTab::Init(ScatterCtrl& scatter) { CtrlLayout(*this); SizePos(); pscatter = &scatter; tab.Reset(); series.Clear(); for(int c = 0; c < scatter.GetCount(); c++) if (!IsNull(scatter.GetCount(c))) { WithDataSeries <StaticRect> &dataseries = series.Add(); CtrlLayout(dataseries); tab.Add(dataseries.SizePos(), scatter.GetLegend(c)); } OnTab(); tab <<= THISBACK(OnTab); }
void SeriesTab::Init(ScatterCtrl& scatter) { CtrlLayout(*this); SizePos(); pscatter = &scatter; list.Reset(); list.SetLineCy(EditField::GetStdHeight()); list.AddColumn(t_("Name")); for(int i = 0; i < scatter.GetCount(); i++) list.Add(scatter.GetLegend(i)); list.SetCursor(0); list.WhenSel = THISBACK(UpdateFields); markstyle.Add(t_("No mark")); for(int i = 0; i < MarkPlot::GetCount(); i++) markstyle.Add(MarkPlot::TypeName(i)); markstyle.SetIndex(0); UpdateFields(); linecolor <<= THISBACK(Change); fillcolor <<= THISBACK(Change); visible <<= THISBACK(Change); dash <<= THISBACK(Change); linethickness <<= THISBACK(Change); markstyle <<= THISBACK(Change); markcolor <<= THISBACK(Change); markwidth <<= THISBACK(Change); unitsY <<= THISBACK(Change); unitsX <<= THISBACK(Change); name <<= THISBACK(Change); primary <<= THISBACK(Change); name.SetFocus(); }