.TestScatter2: Included new mouse zoom and scroll

git-svn-id: svn://ultimatepp.org/upp/trunk@2170 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2010-03-03 22:00:05 +00:00
parent 44bce8e055
commit 8c080ae769
2 changed files with 10 additions and 7 deletions

View file

@ -107,8 +107,9 @@ Tab4::Tab4()
scatter4.SetRange(13,50);
scatter4.SetMajorUnits(1,10);
scatter4.SetXYMin(0,-20);
scatter4.SetMouseHandling(true);
Vector<XY> s1,s2;
s1<<XY(1,-6)<<XY(2,-4)<<XY(3,2)<<XY(4,8)<<XY(5,8)<<XY(6,15)<<XY(7,20)<<XY(8,25)<<XY(9,14)<<XY(10,10)<<XY(11,3)<<XY(12,-11);;
s1<<XY(1,-6)<<XY(2,-4)<<XY(3,2)<<XY(4,8)<<XY(5,8)<<XY(6,15)<<XY(7,20)<<XY(8,25)<<XY(9,14)<<XY(10,10)<<XY(11,3)<<XY(12,-11);
scatter4.AddSeries(s1,"2005",true);
s2<<XY(1,-12)<<XY(2,-7)<<XY(3,0)<<XY(4,2)<<XY(5,10)<<XY(6,18)<<XY(7,25)<<XY(8,26)<<XY(9,15)<<XY(10,12)<<XY(11,7)<<XY(12,-6);
@ -353,9 +354,10 @@ Tab8::Tab8()
{
CtrlLayout(*this);
HSizePos().VSizePos();
scatter8.SetRange(13,50, 20);
scatter8.SetRange(13,50,20);
scatter8.SetMajorUnits(1,10);
scatter8.SetXYMin(0,-20, 1000);
scatter8.SetMouseHandling(true, true);
Vector<XY> s1,s2;
s1<<XY(1,-6)<<XY(2,-4)<<XY(3,2)<<XY(4,8)<<XY(5,8)<<XY(6,15)<<XY(7,20)<<XY(8,25)<<XY(9,14)<<XY(10,10)<<XY(11,3)<<XY(12,-11);;
scatter8.AddSeries(s1,"Temperature",true);
@ -373,6 +375,7 @@ Tab8::Tab8()
scatter8.SetLabelY2("Pressure [mBar]");
scatter8.SetMarkStyle(1,Scatter::RECTANGLE);
scatter8.SetMarkWidth(1,24);
scatter8.ShowInfo();
}
//******************************************************************************************

View file

@ -1,4 +1,4 @@
LAYOUT(TestScatter2Layout, 504, 392)
LAYOUT(TestScatter2Layout, 572, 392)
ITEM(TabCtrl, tc1, HSizePosZ(12, 12).VSizePosZ(52, 12))
ITEM(Button, b1, SetLabel(t_("Print Preview")).LeftPosZ(12, 80).TopPosZ(12, 24))
ITEM(Button, b2, SetLabel(t_("Export as PNG")).LeftPosZ(100, 88).TopPosZ(12, 24))
@ -8,11 +8,11 @@ LAYOUT(TestScatter2Layout, 504, 392)
END_LAYOUT
LAYOUT(Tab1, 380, 292)
ITEM(Scatter, scatter1, SetTitle(t_("Basic Test")).SetTitleFont(SansSerifZ(14).Bold()).HSizePosZ(16, 12).VSizePosZ(16, 16))
ITEM(Scatter, scatter1, SetTitle(t_("Basic Test")).SetTitleFont(SansSerifZ(14).Bold()).SetLabelsFont(StdFontZ(11)).HSizePosZ(16, 12).VSizePosZ(16, 16))
END_LAYOUT
LAYOUT(Tab2, 380, 292)
ITEM(Scatter, scatter2, SetTitle(t_("Functions")).SetTitleFont(SansSerifZ(14).Bold()).HSizePosZ(16, 12).VSizePosZ(16, 16))
ITEM(Scatter, scatter2, SetTitle(t_("Functions")).SetTitleFont(SansSerifZ(14).Bold()).SetLabelsFont(StdFontZ(11)).HSizePosZ(16, 12).VSizePosZ(16, 16))
END_LAYOUT
LAYOUT(Tab3, 384, 284)
@ -20,7 +20,7 @@ LAYOUT(Tab3, 384, 284)
END_LAYOUT
LAYOUT(Tab4, 400, 316)
ITEM(Scatter, scatter4, SetLegendWeight(200).H_Border(40).V_Border(35).SetTitle(t_("Temperature Average")).SetTitleFont(SansSerifZ(14).Bold()).SetLabelX(t_("Month")).HSizePosZ(16, 16).VSizePosZ(16, 16))
ITEM(Scatter, scatter4, SetLegendWeight(200).H_Border(40).V_Border(35).SetTitle(t_("Temperature Average. X Axis mouse zoom + scroll")).SetTitleFont(SansSerifZ(14).Bold()).SetLabelX(t_("Month")).SetLabelsFont(SansSerifZ(11)).HSizePosZ(16, 16).VSizePosZ(16, 16))
END_LAYOUT
LAYOUT(Tab5, 400, 288)
@ -51,6 +51,6 @@ LAYOUT(Tab7, 388, 304)
END_LAYOUT
LAYOUT(Tab8, 400, 316)
ITEM(Scatter, scatter8, SetLegendWeight(200).H_Border(50).V_Border(35).SetTitle(t_("Temperature & Pressure Averages")).SetTitleFont(SansSerifZ(14).Bold()).SetLabelX(t_("Month")).HSizePosZ(16, 16).VSizePosZ(16, 16))
ITEM(Scatter, scatter8, SetLegendWeight(200).H_Border(50).V_Border(35).SetTitle(t_("Temperature & Pressure Averages. X-Y Axis mouse zoom + scroll")).SetTitleFont(SansSerifZ(14).Bold()).SetLabelX(t_("Month")).SetLabelsFont(SansSerifZ(11)).HSizePosZ(16, 16).VSizePosZ(16, 16))
END_LAYOUT