ScatterCtrl: Some changes and more doc

git-svn-id: svn://ultimatepp.org/upp/trunk@6047 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2013-05-10 19:25:32 +00:00
parent 7e9d68c3d7
commit b464d47667
2 changed files with 44 additions and 43 deletions

View file

@ -121,11 +121,12 @@ public:
#define MAX_MOUSEBEHAVIOR 20
bool SetMouseBehavior(MouseBehaviour *_mouseBehavior);
ScatterCtrl& ShowContextMenu(const bool& show = true) {showContextMenu = show; return *this;}
ScatterCtrl& ShowPropertiesDlg(const bool& show = true) {showPropDlg = show; return *this;}
void SetPopText(const String x, const String y1, const String y2) {popTextX = x; popTextY = y1; popTextY2 = y2;}
ScatterCtrl& ShowContextMenu(bool show = true) {showContextMenu = show; return *this;}
ScatterCtrl& ShowPropertiesDlg(bool show = true) {showPropDlg = show; return *this;}
ScatterCtrl& SetPopText(const String x, const String y1, const String y2)
{popTextX = x; popTextY = y1; popTextY2 = y2; return *this;}
ScatterCtrl& SetMouseHandling(bool valx = true, bool valy = false);
ScatterCtrl& ShowInfo(bool show = true) {paintInfo = show; return *this;}
ScatterCtrl& ShowInfo(bool show = true) {paintInfo = show; return *this;}
#ifdef PLATFORM_WIN32
void SaveAsMetafile(const char* file);
@ -138,28 +139,28 @@ public:
ScatterCtrl& SetColor(const Upp::Color& _color) {ScatterDraw::SetColor(_color); return *this;};
ScatterCtrl& SetGridColor(const Upp::Color& grid_color) {ScatterDraw::SetGridColor(grid_color); return *this;};
ScatterCtrl& SetGridWidth(const int& grid_width) {ScatterDraw::SetGridWidth(grid_width); return *this;};
ScatterCtrl& SetGridWidth(int grid_width) {ScatterDraw::SetGridWidth(grid_width); return *this;};
ScatterCtrl& SetPlotAreaColor(const Upp::Color& p_a_color) {ScatterDraw::SetPlotAreaColor(p_a_color); return *this;};
ScatterCtrl& SetLegendWidth(const int& width) {ScatterDraw::SetLegendWidth(width); return *this;};
ScatterCtrl& SetLegendWidth(int width) {ScatterDraw::SetLegendWidth(width); return *this;};
int GetLegendWidth() {return ScatterDraw::GetLegendWidth();};
ScatterCtrl& SetAxisColor(const Upp::Color& axis_color) {ScatterDraw::SetAxisColor(axis_color); return *this;};
ScatterCtrl& SetAxisWidth(const int& axis_width) {ScatterDraw::SetAxisWidth(axis_width); return *this;};
ScatterCtrl& SetAxisWidth(int axis_width) {ScatterDraw::SetAxisWidth(axis_width); return *this;};
ScatterCtrl& SetTitle(const String& title) {ScatterDraw::SetTitle(title); return *this;};
ScatterCtrl& SetTitleFont(const Font& fontTitle) {ScatterDraw::SetTitleFont(fontTitle); return *this;};
ScatterCtrl& SetTitleColor(const Upp::Color& colorTitle) {ScatterDraw::SetTitleColor(colorTitle); return *this;};
ScatterCtrl& SetLabelsFont(const Font& fontLabels) {ScatterDraw::SetLabelsFont(fontLabels); return *this;};
ScatterCtrl& SetLabelsColor(const Upp::Color& colorLabels) {ScatterDraw::SetLabelsColor(colorLabels); return *this;};
ScatterCtrl& SetLabelX(const String& _xLabel) {ScatterDraw::SetLabelX(_xLabel); return *this;};
ScatterCtrl& SetLabelY(const String& _yLabel) {ScatterDraw::SetLabelY(_yLabel); return *this;};
ScatterCtrl& SetLabelY2(const String& _yLabel) {ScatterDraw::SetLabelY2(_yLabel); return *this;};
ScatterCtrl& SetPlotAreaMargin(const int hLeft, const int hRight, const int vTop, const int vBottom)
ScatterCtrl& SetLabelX(const String& xLabel) {ScatterDraw::SetLabelX(xLabel); return *this;};
ScatterCtrl& SetLabelY(const String& yLabel) {ScatterDraw::SetLabelY(yLabel); return *this;};
ScatterCtrl& SetLabelY2(const String& yLabel) {ScatterDraw::SetLabelY2(yLabel); return *this;};
ScatterCtrl& SetPlotAreaMargin(int hLeft, int hRight, int vTop, int vBottom)
{ScatterDraw::SetPlotAreaMargin(hLeft, hRight, vTop, vBottom); return *this;};
ScatterCtrl& SetPlotAreaLeftMargin(const int margin) {ScatterDraw::SetPlotAreaLeftMargin(margin);return *this;};
ScatterCtrl& SetPlotAreaTopMargin(const int margin) {ScatterDraw::SetPlotAreaTopMargin(margin); return *this;};
ScatterCtrl& SetPlotAreaRightMargin(const int margin) {ScatterDraw::SetPlotAreaRightMargin(margin);return *this;};
ScatterCtrl& SetPlotAreaBottomMargin(const int margin) {ScatterDraw::SetPlotAreaBottomMargin(margin);return *this;};
ScatterCtrl& SetPlotAreaLeftMargin(int margin) {ScatterDraw::SetPlotAreaLeftMargin(margin);return *this;};
ScatterCtrl& SetPlotAreaTopMargin(int margin) {ScatterDraw::SetPlotAreaTopMargin(margin); return *this;};
ScatterCtrl& SetPlotAreaRightMargin(int margin) {ScatterDraw::SetPlotAreaRightMargin(margin);return *this;};
ScatterCtrl& SetPlotAreaBottomMargin(int margin) {ScatterDraw::SetPlotAreaBottomMargin(margin);return *this;};
ScatterCtrl& ShowLegend(const bool& show = true) {ScatterDraw::ShowLegend(show); return *this;}
ScatterCtrl& ShowLegend(bool show = true) {ScatterDraw::ShowLegend(show); return *this;}
bool GetShowLegend() {return ScatterDraw::GetShowLegend();}
using ScatterDraw::AddSeries;

View file

@ -1200,16 +1200,14 @@ in ScatterCtrl.&]
or].&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:ShowContextMenu`(const bool`&`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* ShowContextMenu]([@(0.0.255) const]_[@(0.0.255) bool`&]_[*@3 show]_`=_[@(0.0.255) true
])&]
[s5;:ScatterCtrl`:`:ShowContextMenu`(bool`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* ShowContextMenu]([@(0.0.255) bool]_[*@3 show]_`=_[@(0.0.255) true])&]
[s3; If [%-*@3 show] is true the context menu can be opened (right
clicking by default).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:ShowPropertiesDlg`(const bool`&`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* ShowPropertiesDlg]([@(0.0.255) const]_[@(0.0.255) bool`&]_[*@3 show]_`=_[@(0.0.255) tr
ue])&]
[s5;:ScatterCtrl`:`:ShowPropertiesDlg`(bool`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* ShowPropertiesDlg]([@(0.0.255) bool]_[*@3 show]_`=_[@(0.0.255) true])&]
[s3; If [%-*@3 show] is true, the context menu will have a `"Properties`"
dialog.&]
[s3; In DEBUG mode the `"Properties`" menu will always appear.&]
@ -1263,8 +1261,8 @@ onst]&]
[s3; Calls to ScatterDraw`::SetGridColor(grid`_color).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:SetGridWidth`(const int`&`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetGridWidth]([@(0.0.255) const]_[@(0.0.255) int`&]_[*@3 grid`_width])&]
[s5;:ScatterCtrl`:`:SetGridWidth`(int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&]_[* S
etGridWidth]([@(0.0.255) int]_[*@3 grid`_width])&]
[s3; Calls to ScatterDraw`::SetGridWidth(grid`_width).&]
[s1; &]
[s6;%- &]
@ -1274,19 +1272,23 @@ olor])&]
[s3; Calls to ScatterDraw`::SetPlotAreaColor(p`_a`_color).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:SetLegendWidth`(const int`&`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetLegendWidth]([@(0.0.255) const]_[@(0.0.255) int`&]_[*@3 width])&]
[s5;:ScatterCtrl`:`:SetLegendWidth`(int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&]_
[* SetLegendWidth]([@(0.0.255) int]_[*@3 width])&]
[s3; Calls to ScatterDraw`::SetLegendWidth(width).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:GetLegendWidth`(`):%- [@(0.0.255) int]_[* GetLegendWidth]()&]
[s3; Calls to ScatterDraw`::GetLegendWidth().&]
[s1;%- &]
[s6;%- &]
[s5;:ScatterCtrl`:`:SetAxisColor`(const Color`&`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetAxisColor]([@(0.0.255) const]_[_^Color^ Upp`::Color][@(0.0.255) `&]_[*@3 axis`_color
])&]
[s3; Calls to ScatterDraw`::SetAxisColor(axis`_color).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:SetAxisWidth`(const int`&`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetAxisWidth]([@(0.0.255) const]_[@(0.0.255) int`&]_[*@3 axis`_width])&]
[s5;:ScatterCtrl`:`:SetAxisWidth`(int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&]_[* S
etAxisWidth]([@(0.0.255) int]_[*@3 axis`_width])&]
[s3; ScatterDraw`::SetAxisWidth(axis`_width)&]
[s1; &]
[s6;%- &]
@ -1331,38 +1333,36 @@ ls])&]
]_[* SetLabelY2]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 yLabel])&]
[s3; Calls to ScatterDraw`::SetLabelY(yLabel).&]
[s1; &]
[s6;%- &]
[s6;:ScatterCtrl`:`:SetPlotAreaMargin`(int`,int`,int`,int`):%- &]
[s5;:ScatterCtrl`:`:SetPlotAreaMargin`(const int`,const int`,const int`,const int`):%- [_^ScatterCtrl^ S
catterCtrl][@(0.0.255) `&]_[* SetPlotAreaMargin]([@(0.0.255) const]_[@(0.0.255) int]_[*@3 h
Left], [@(0.0.255) const]_[@(0.0.255) int]_[*@3 hRight], [@(0.0.255) const]_[@(0.0.255) int
]_[*@3 vTop], [@(0.0.255) const]_[@(0.0.255) int]_[*@3 vBottom])&]
catterCtrl][@(0.0.255) `&]_[* SetPlotAreaMargin]([@(0.0.255) int]_[*@3 hLeft],
[@(0.0.255) int]_[*@3 hRight], [@(0.0.255) int]_[*@3 vTop], [@(0.0.255) int]_[*@3 vBottom])&]
[s3; Calls to ScatterDraw`::SetPlotAreaMargin(hLeft, hRight, vTop,
vBottom).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:SetPlotAreaLeftMargin`(const int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetPlotAreaLeftMargin]([@(0.0.255) const]_[@(0.0.255) int]_[*@3 margin])&]
[s5;:ScatterCtrl`:`:SetPlotAreaLeftMargin`(int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetPlotAreaLeftMargin]([@(0.0.255) int]_[*@3 margin])&]
[s3; Calls ScatterDraw`::SetPlotAreaLeftMargin(margin).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:SetPlotAreaTopMargin`(const int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetPlotAreaTopMargin]([@(0.0.255) const]_[@(0.0.255) int]_[*@3 margin])&]
[s5;:ScatterCtrl`:`:SetPlotAreaTopMargin`(int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetPlotAreaTopMargin]([@(0.0.255) int]_[*@3 margin])&]
[s3; Calls to ScatterDraw`::SetPlotAreaTopMargin(margin).&]
[s1; &]
[s6;%- &]
[s6;:ScatterCtrl`:`:SetPlotAreaRightMargin`(int`):%- &]
[s5;:ScatterCtrl`:`:SetPlotAreaRightMargin`(const int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetPlotAreaRightMargin]([@(0.0.255) const]_[@(0.0.255) int]_[*@3 margin])&]
]_[* SetPlotAreaRightMargin]([@(0.0.255) int]_[*@3 margin])&]
[s3; Calls to ScatterDraw`::SetPlotAreaRightMargin(margin).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:SetPlotAreaBottomMargin`(const int`):%- [_^ScatterCtrl^ ScatterCtrl
][@(0.0.255) `&]_[* SetPlotAreaBottomMargin]([@(0.0.255) const]_[@(0.0.255) int]_[*@3 margi
n])&]
[s5;:ScatterCtrl`:`:SetPlotAreaBottomMargin`(int`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* SetPlotAreaBottomMargin]([@(0.0.255) int]_[*@3 margin])&]
[s3; Calls to ScatterDraw`::SetPlotAreaBottomMargin(margin).&]
[s1; &]
[s6;%- &]
[s5;:ScatterCtrl`:`:ShowLegend`(const bool`&`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&
]_[* ShowLegend]([@(0.0.255) const]_[@(0.0.255) bool`&]_[*@3 show]_`=_[@(0.0.255) true])&]
[s5;:ScatterCtrl`:`:ShowLegend`(bool`):%- [_^ScatterCtrl^ ScatterCtrl][@(0.0.255) `&]_[* Sh
owLegend]([@(0.0.255) bool]_[*@3 show]_`=_[@(0.0.255) true])&]
[s3; Calls to ScatterDraw`::ShowLegend(show).&]
[s1; &]
[s6;%- &]