CMake file

Update to C++ 11: std::shared_ptr, for each loops
Update to wxWidgets 3.0+
This commit is contained in:
Twan van Laarhoven
2020-04-08 00:18:14 +02:00
parent aa39a9bc71
commit 35a89676b4
53 changed files with 343 additions and 415 deletions
+3 -3
View File
@@ -274,7 +274,7 @@ void SymbolViewer::drawSymbolShape(const SymbolShape& shape, DC* border, DC* int
border->SetPen(*wxTRANSPARENT_PEN);
border->SetBrush(Color(0, (directB ? 128 : 0), 0));
int func = border->GetLogicalFunction();
wxRasterOperationMode func = border->GetLogicalFunction();
border->SetLogicalFunction(wxCOPY);
border->DrawPolygon((int)points.size(), &points[0]);
border->SetLogicalFunction(func);
@@ -317,7 +317,7 @@ void SymbolViewer::highlightPart(DC& dc, const SymbolShape& shape, HighlightStyl
dc.DrawPolygon((int)points.size(), &points[0]);
} else if (style == HIGHLIGHT_BORDER_DOT) {
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.SetPen (wxPen(Color(255,0,0), 1, wxDOT));
dc.SetPen (wxPen(Color(255,0,0), 1, wxPENSTYLE_DOT));
dc.DrawPolygon((int)points.size(), &points[0]);
} else {
dc.SetLogicalFunction(wxOR);
@@ -351,7 +351,7 @@ void SymbolViewer::highlightPart(DC& dc, const SymbolSymmetry& sym, HighlightSty
for (int i = 0; i < copies ; ++i) {
Radians a = angle + (i + 0.5) * 2 * M_PI / copies;
Vector2D dir(cos(a), sin(a));
Vector2D dir2 = rotation.tr(sym.center + 2 * dir);
Vector2D dir2 = rotation.tr(sym.center + 2.0 * dir);
dc.DrawLine(int(center.x), int(center.y), int(dir2.x), int(dir2.y));
}
// draw center
+1 -1
View File
@@ -117,7 +117,7 @@ Bitmap ImageValueViewer::imagePlaceholder(const Rotation& rot, UInt w, UInt h, c
if (editing) {
// only when in editor mode
for (UInt size = 12 ; size > 2 ; --size) {
dc.SetFont(wxFont(size, wxSWISS, wxNORMAL, wxNORMAL));
dc.SetFont(wxFont(size, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
RealSize rs = dc.GetTextExtent(_("double click to load image"));
if (rs.width <= w - 10 && rs.height < h - 10) {
// text fits
+2 -2
View File
@@ -44,8 +44,8 @@ bool ValueViewer::setFieldBorderPen(RotatedDC& dc) {
DrawWhat what = viewer.drawWhat(this);
if (!(what & DRAW_BORDERS)) return false;
dc.SetPen( (what & DRAW_ACTIVE)
? wxPen(Color(0,128,255), 1, wxSOLID)
: wxPen(Color(128,128,128), 1, wxDOT)
? wxPen(Color(0,128,255), 1, wxPENSTYLE_SOLID)
: wxPen(Color(128,128,128), 1, wxPENSTYLE_DOT)
);
return true;
}