ScatterCtrl: Destructors set noexcept and variable initialization in declaration

git-svn-id: svn://ultimatepp.org/upp/trunk@13688 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2019-11-13 08:04:16 +00:00
parent a1d7789d60
commit ea9baea226
3 changed files with 31 additions and 48 deletions

View file

@ -132,9 +132,7 @@ public:
typedef SeriesTab CLASSNAME;
SeriesTab() : dashCount(DashStyle::GetCount()) {}
virtual ~SeriesTab() {
DashStyle::UnregisterFrom(dashCount);
}
virtual ~SeriesTab() noexcept {DashStyle::UnregisterFrom(dashCount);}
void Init(ScatterCtrl& scatter);
private:
@ -172,7 +170,7 @@ public:
typedef DataDlg CLASSNAME;
void Init(ScatterCtrl& scatter);
virtual ~DataDlg() {};
virtual ~DataDlg() noexcept {};
void OnTab();
void OnArrayBar(Bar &menu);
@ -206,7 +204,7 @@ public:
typedef PropertiesDlg CLASSNAME;
void Init(ScatterCtrl& scatter);
virtual ~PropertiesDlg() {};
virtual ~PropertiesDlg() noexcept {};
void Set(int tab);
void OnTab();
@ -232,7 +230,7 @@ public:
typedef ProcessingTab CLASSNAME;
ProcessingTab();
virtual ~ProcessingTab() {};
virtual ~ProcessingTab() noexcept {};
void Init(ScatterCtrl& scatter) {pscatter = &scatter;}
void UpdateField(const String name, int id);
@ -294,7 +292,7 @@ public:
typedef ProcessingDlg CLASSNAME;
void Init(ScatterCtrl& scatter);
virtual ~ProcessingDlg() {};
virtual ~ProcessingDlg() noexcept {};
private:
ScatterCtrl* pscatter;

View file

@ -1091,23 +1091,9 @@ inline Point &ScatterCtrl::MousePointUnrot(Point &pt) {
return pt;
}
ScatterCtrl::ScatterCtrl() : popOffset(10, 12), mouseAction(NONE)
{
showInfo = isScrolling = isLabelPopUp = isZoomWindow = false;
ScatterCtrl::ScatterCtrl() {
WantFocus();
popTextX = t_("x");
popTextY = t_("y");
popTextY2 = t_("y right");
popTextZ = t_("z");
popLT = popRB = Null;
showContextMenu = false;
showPropDlg = false;
showProcessDlg = false;
showButtons = false;
showLoadData = showSaveData = false;
defaultCSVseparator = ";";
rotate = Angle_0;
//Color(graphColor);
BackPaint();
popInfoBegin.SetColor(SColorFace);
popInfoVert.SetColor(SColorFace);
@ -1122,12 +1108,7 @@ ScatterCtrl::ScatterCtrl() : popOffset(10, 12), mouseAction(NONE)
#else
pop = false;
#endif
saveSize = Size(1000, 800);
jpgQuality = 90;
lastRefresh_ms = Null;
maxRefresh_ms = 500;
highlighting = false;
ShowInfo().ShowContextMenu().ShowPropertiesDlg();
Add(processButton.RightPosZ(0, 15).TopPosZ(0, 15));

View file

@ -142,7 +142,7 @@ public:
typedef ScatterCtrl CLASSNAME;
ScatterCtrl();
virtual ~ScatterCtrl() {RemoveInstance(this);};
virtual ~ScatterCtrl() noexcept {RemoveInstance(this);};
enum ScatterAction {NO_ACTION = 0, SCROLL, ZOOM_H_ENL, ZOOM_H_RED, ZOOM_V_ENL, ZOOM_V_RED,
SHOW_COORDINATES, CONTEXT_MENU, ZOOM_WINDOW,
@ -349,30 +349,34 @@ public:
void SetPopUp(bool _pop) {pop = _pop;}
private:
bool showInfo;
bool showInfo = false;
PopUpInfo popInfoBegin, popInfoVert, popInfoHoriz, popInfoEnd;
PopUpText popTextBegin, popTextVert, popTextHoriz, popTextEnd;
String popTextX, popTextY, popTextY2, popTextZ;
Point popLT, popRB;
String popTextX = t_("x"),
popTextY = t_("y"),
popTextY2 = t_("y right"),
popTextZ = t_("z");
Point popLT = Null, popRB = Null;
bool pop;
bool isZoomWindow;
const Point popOffset;
MouseAction mouseAction;
bool isZoomWindow = false;
const Point popOffset = Point(10, 12);
MouseAction mouseAction = NONE;
int butDownX, butDownY;
bool isScrolling, isLabelPopUp;
bool isScrolling = false,
isLabelPopUp = false;
bool showContextMenu;
bool showPropDlg;
bool showProcessDlg;
bool showButtons;
bool showLoadData, showSaveData;
bool showContextMenu = false,
showPropDlg = false,
showProcessDlg = false,
showButtons = false,
showLoadData = false, showSaveData = false;
int lastRefresh_ms;
int lastRefresh_ms = Null;
dword lastRefresh0_ms;
int maxRefresh_ms;
int maxRefresh_ms = 500;
bool highlighting;
bool highlighting = false;
Upp::Array<MouseBehavior> mouseBehavior;
Upp::Array<KeyBehavior> keyBehavior;
@ -403,7 +407,7 @@ private:
void SetDrawing(T& w, const Size &sz, bool ctrl = true);
void TimerCallback();
String defaultCSVseparator;
String defaultCSVseparator = ";";
String defaultFileNamePlot;
void OnTypeImage(FileSel *_fs);
@ -413,10 +417,10 @@ private:
Button processButton, dataButton, propertiesButton;
Size saveSize;
int jpgQuality;
Size saveSize = Size(1000, 800);
int jpgQuality = 90;
int rotate;
int rotate = Angle_0;
Point &MousePointRot(Point &pt);
Point &MousePointUnrot(Point &pt);