Formatting and removed ini-file from the vs08 project.
This commit is contained in:
parent
bd4c5d31b3
commit
e8f1727b4c
@ -183,10 +183,6 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\inifile.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\sync\network.cpp"
|
||||
>
|
||||
</File>
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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;
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user