diff --git a/editor/editor_vs2008.vcproj b/editor/editor_vs2008.vcproj
index 7f282e7..0093124 100644
--- a/editor/editor_vs2008.vcproj
+++ b/editor/editor_vs2008.vcproj
@@ -183,10 +183,6 @@
>
-
-
diff --git a/editor/synctracker2.cpp b/editor/synctracker2.cpp
index 22d5abc..3f6f0e9 100644
--- a/editor/synctracker2.cpp
+++ b/editor/synctracker2.cpp
@@ -13,11 +13,11 @@
// Windows XP look and feel. Seems to enable Vista look as well.
#pragma comment(linker, \
- "\"/manifestdependency:type='Win32' "\
- "name='Microsoft.Windows.Common-Controls' "\
- "version='6.0.0.0' "\
- "processorArchitecture='*' "\
- "publicKeyToken='6595b64144ccf1df' "\
+ "\"/manifestdependency:type='Win32' " \
+ "name='Microsoft.Windows.Common-Controls' " \
+ "version='6.0.0.0' " \
+ "processorArchitecture='*' " \
+ "publicKeyToken='6595b64144ccf1df' " \
"language='*'\"")
#include "trackview.h"
@@ -167,7 +167,7 @@ std::string fileName;
void fileNew()
{
-/* document.purgeUnusedTracks(); */
+ // document.purgeUnusedTracks();
for (size_t i = 0; i < document.getTrackCount(); ++i)
{
document.getTrack(i).truncate();
@@ -428,7 +428,7 @@ static LRESULT CALLBACK mainWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
SendMessage(statusBarWin, SB_SETTEXT, 1, (LPARAM)temp);
}
break;
-
+
case WM_TRACKCHANGED:
{
TCHAR temp[256];
@@ -436,7 +436,7 @@ static LRESULT CALLBACK mainWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
SendMessage(statusBarWin, SB_SETTEXT, 2, (LPARAM)temp);
}
break;
-
+
case WM_CURRVALDIRTY:
{
TCHAR temp[256];
diff --git a/editor/trackview.cpp b/editor/trackview.cpp
index c83690c..a18e693 100644
--- a/editor/trackview.cpp
+++ b/editor/trackview.cpp
@@ -29,26 +29,6 @@ static int getMaxCharacterWidthFromString(HDC hdc, TCHAR *chars)
return getMaxCharacterWidth(hdc, chars, _tcslen(chars));
}
-
-void TrackView::setFont(HFONT font)
-{
- this->font = font;
-
- assert(NULL != hwnd);
- HDC hdc = GetDC(hwnd);
- SelectObject(hdc, font);
-
- TEXTMETRIC tm;
- GetTextMetrics(hdc, &tm);
-
- rowHeight = tm.tmHeight + tm.tmExternalLeading;
- fontWidth = tm.tmAveCharWidth;
- trackWidth = getMaxCharacterWidthFromString(hdc, _T("0123456789.")) * 16;
-
- topMarginHeight = rowHeight + 4;
- leftMarginWidth = getMaxCharacterWidthFromString(hdc, _T("0123456789abcdefh")) * 8;
-}
-
TrackView::TrackView()
{
scrollPosX = 0;
@@ -72,7 +52,7 @@ TrackView::TrackView()
rowPen = CreatePen(PS_SOLID, 1, darken(GetSysColor(COLOR_WINDOW), 0.7f));
rowSelectPen = CreatePen(PS_SOLID, 1, darken(GetSysColor(COLOR_HIGHLIGHT), 0.7f));
-
+
lerpPen = CreatePen(PS_SOLID, 2, RGB(255, 0, 0));
cosinePen = CreatePen(PS_SOLID, 2, RGB(0, 255, 0));
rampPen = CreatePen(PS_SOLID, 2, RGB(0, 0, 255));
@@ -97,6 +77,25 @@ TrackView::~TrackView()
DeleteObject(rowSelectPen);
}
+void TrackView::setFont(HFONT font)
+{
+ this->font = font;
+
+ assert(NULL != hwnd);
+ HDC hdc = GetDC(hwnd);
+ SelectObject(hdc, font);
+
+ TEXTMETRIC tm;
+ GetTextMetrics(hdc, &tm);
+
+ rowHeight = tm.tmHeight + tm.tmExternalLeading;
+ fontWidth = tm.tmAveCharWidth;
+ trackWidth = getMaxCharacterWidthFromString(hdc, _T("0123456789.")) * 16;
+
+ topMarginHeight = rowHeight + 4;
+ leftMarginWidth = getMaxCharacterWidthFromString(hdc, _T("0123456789abcdefh")) * 8;
+}
+
int TrackView::getScreenY(int row) const
{
return topMarginHeight + (row * rowHeight) - scrollPosY;
@@ -200,7 +199,7 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks)
{
const SyncDocument *doc = getDocument();
if (NULL == doc) return;
-
+
TCHAR temp[256];
int firstRow = editRow - windowRows / 2 - 1;
@@ -841,7 +840,7 @@ void TrackView::editDelete()
{
SyncDocument *doc = getDocument();
if (NULL == doc) return;
-
+
int selectLeft = min(selectStartTrack, selectStopTrack);
int selectRight = max(selectStartTrack, selectStopTrack);
int selectTop = min(selectStartRow, selectStopRow);
@@ -889,7 +888,7 @@ void TrackView::editBiasValue(float amount)
int selectRight = max(selectStartTrack, selectStopTrack);
int selectTop = min(selectStartRow, selectStopRow);
int selectBottom = max(selectStartRow, selectStopRow);
-
+
if (0 == getTrackCount())
{
MessageBeep(-1);