*ScatterCtrl_Demo: Fixed some fixes

git-svn-id: svn://ultimatepp.org/upp/trunk@6182 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2013-07-10 17:20:01 +00:00
commit a39af990ac
5 changed files with 43 additions and 3 deletions

View file

@ -172,6 +172,17 @@ private:
FourierEquation fourier;
};
class Tab12 : public WithTab12<ScatterDemo> {
public:
typedef Tab12 CLASSNAME;
virtual void Init();
virtual ScatterCtrl &Scatter() {return scatter;};
private:
Vector<Pointf> s1;
};
class TabPie : public WithTabPie<StaticRect> {
public:
typedef TabPie CLASSNAME;

View file

@ -23,7 +23,7 @@ LAYOUT(Tab3, 384, 284)
END_LAYOUT
LAYOUT(Tab4, 400, 316)
ITEM(ScatterCtrl, scatter, SetLabelsFont(SansSerifZ(11)).SetTitle(t_("Temperature Average. X Axis mouse zoom + scroll")).SetTitleFont(SansSerifZ(14).Bold()).SetPlotAreaLeftMargin(40).SetLabelX(t_("Month")).SetLegendWidth(200).HSizePosZ(16, 16).VSizePosZ(16, 16))
ITEM(ScatterCtrl, scatter, SetLabelsFont(SansSerifZ(11)).SetTitle(t_("Temperature Average. X Axis mouse zoom + scroll")).SetTitleFont(SansSerifZ(14).Bold()).SetPlotAreaLeftMargin(40).SetPlotAreaBottomMargin(40).SetLabelX(t_("Month")).SetLegendWidth(200).HSizePosZ(16, 16).VSizePosZ(16, 16))
END_LAYOUT
LAYOUT(Tab5, 400, 288)
@ -70,8 +70,12 @@ LAYOUT(Tab11, 504, 468)
ITEM(Label, dv___2, SetLabel(t_("Trend Lines Details:")).LeftPosZ(8, 100).BottomPosZ(83, 21))
END_LAYOUT
LAYOUT(Tab12, 400, 260)
ITEM(ScatterCtrl, scatter, SetLabelsFont(StdFontZ(11)).SetTitle(t_("Polar Plot")).SetTitleFont(SansSerifZ(14).Bold()).SetPlotAreaColor(LtGray).HSizePosZ(4, 4).VSizePosZ(4, 4))
END_LAYOUT
LAYOUT(TabPie, 536, 440)
ITEM(PieCtrl, chart, SetLegendBackColor(Color(229, 229, 229)).SetLegendHeight(80).SetTitle(t_("Average Weather")).SetFrame(ThinInsetFrame()).HSizePosZ(8, 12).VSizePosZ(40, 12))
ITEM(PieCtrl, chart, SetLegendHeight(80).SetLegendBackColor(Color(229, 229, 229)).SetTitle(t_("Average Weather")).SetFrame(ThinInsetFrame()).HSizePosZ(8, 12).VSizePosZ(40, 12))
ITEM(Label, dv___1, SetLabel(t_(" EXPERIMENTAL")).SetFrame(ThinInsetFrame()).LeftPosZ(8, 84).TopPosZ(8, 24))
END_LAYOUT

View file

@ -21,6 +21,8 @@ file
tab8.cpp,
tab9.cpp,
tab10.cpp,
tab11.cpp,
tabPie.cpp,
symbol.iml;
mainconfig

View file

@ -52,7 +52,7 @@ ScatterCtrl_Demo::ScatterCtrl_Demo()
examplesRects.Add(Examples()[i].ctrl());
}
examplesList.Add("Pie chart");
// tabPie.Init();
tabPie.Init();
Add(tabPie.HSizePosZ(180, 4).VSizePosZ(4, 8));
examplesRects.Add(&tabPie);

View file

@ -0,0 +1,23 @@
#include "ScatterCtrl_Demo.h"
void Tab12::Init()
{
CtrlLayout(*this);
HSizePos().VSizePos();
s1 << Pointf(50, 10) << Pointf(100, 20) << Pointf(150, 30) << Pointf(200, 20) << Pointf(250, 10);
scatter.AddSeries(s1).Legend("Series 1").Fill();
scatter.SetXYMin(50, 0).SetRange(200, 40).SetMajorUnits(50, 10).SetPolar();
scatter.ShowInfo().ShowContextMenu().ShowPropertiesDlg().SetPopText("h", "v", "v2").SetMouseHandling(true, true);
}
ScatterDemo *Construct12()
{
static Tab12 tab;
return &tab;
}
INITBLOCK {
RegisterExample("Polar plot", Construct12, __FILE__);
}