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 TextsTab::Init(ScatterCtrl& scatter) { CtrlLayout(*this); SizePos(); pscatter = &scatter; title <<= scatter.GetTitle(); title <<= THISBACK(Change); xLabel <<= scatter.GetLabelX(); xLabel <<= THISBACK(Change); yLabel <<= scatter.GetLabelY(); yLabel <<= THISBACK(Change); yLabel2 <<= scatter.GetLabelY2(); yLabel2 <<= THISBACK(Change); leftMargin <<= scatter.GetPlotAreaLeftMargin(); leftMargin <<= THISBACK(Change); rightMargin <<= scatter.GetPlotAreaRightMargin(); rightMargin <<= THISBACK(Change); topMargin <<= scatter.GetPlotAreaTopMargin(); topMargin <<= THISBACK(Change); bottomMargin <<= scatter.GetPlotAreaBottomMargin(); bottomMargin <<= THISBACK(Change); Change(); }
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 MeasuresTab::Init(ScatterCtrl& scatter) { CtrlLayout(*this); SizePos(); pscatter = &scatter; xMin <<= scatter.GetXMin(); xMax <<= scatter.GetXRange() + scatter.GetXMin(); yMin <<= scatter.GetYMin(); yMax <<= scatter.GetYRange() + scatter.GetYMin(); yMin2 <<= scatter.GetYMin2(); yMax2 <<= scatter.GetY2Range() + scatter.GetYMin2(); butUpdate.WhenAction = THISBACK(Change); Change(); }
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(); }
void LegendTab::Init(ScatterCtrl& scatter) { CtrlLayout(*this); SizePos(); pscatter = &scatter; showLegend <<= scatter.GetShowLegend(); showLegend <<= THISBACK(Change); legendPosition <<= (scatter.GetLegendAnchor() == ScatterDraw::LEGEND_TOP ? 0 : 1); legendPosition <<= THISBACK(Change); legendAnchorRT = true; switch(scatter.GetLegendAnchor()) { case ScatterDraw::LEGEND_ANCHOR_LEFT_TOP: legendAnchorLT = true; break; case ScatterDraw::LEGEND_ANCHOR_RIGHT_TOP: legendAnchorRT = true; break; case ScatterDraw::LEGEND_ANCHOR_LEFT_BOTTOM: legendAnchorLB = true; break; case ScatterDraw::LEGEND_ANCHOR_RIGHT_BOTTOM: legendAnchorRB = true; break; } legendAnchorLT <<= THISBACK1(ChangeAnchor, &legendAnchorLT); legendAnchorRT <<= THISBACK1(ChangeAnchor, &legendAnchorRT); legendAnchorLB <<= THISBACK1(ChangeAnchor, &legendAnchorLB); legendAnchorRB <<= THISBACK1(ChangeAnchor, &legendAnchorRB); fillColor <<= scatter.GetLegendFillColor(); fillColor <<= THISBACK(Change); borderColor <<= scatter.GetLegendBorderColor(); borderColor <<= THISBACK(Change); Point p = scatter.GetLegendPos(); tableHoriz <<= p.x; tableHoriz <<= THISBACK(Change); tableVert <<= p.y; tableVert <<= THISBACK(Change); numCols <<= scatter.GetLegendNumCols(); numCols <<= THISBACK(Change); rowSpacing <<= scatter.GetLegendRowSpacing(); rowSpacing <<= THISBACK(Change); Change(); }
void GeneralTab::Init(ScatterCtrl& scatter) { CtrlLayout(*this); SizePos(); pscatter = &scatter; title <<= scatter.GetTitle(); title <<= THISBACK(Change); xLabel <<= scatter.GetLabelX(); xLabel <<= THISBACK(Change); yLabel <<= scatter.GetLabelY(); yLabel <<= THISBACK(Change); yLabel2 <<= scatter.GetLabelY2(); yLabel2 <<= THISBACK(Change); showLegend <<= scatter.GetShowLegend(); showLegend <<= THISBACK(Change); setLegendWidth <<= scatter.GetLegendWidth(); setLegendWidth <<= THISBACK(Change); }