Formatting and removed ini-file from the vs08 project.
This commit is contained in:
parent
bd4c5d31b3
commit
e8f1727b4c
@ -183,10 +183,6 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\inifile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\sync\network.cpp"
|
RelativePath="..\sync\network.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@ -167,7 +167,7 @@ std::string fileName;
|
|||||||
|
|
||||||
void fileNew()
|
void fileNew()
|
||||||
{
|
{
|
||||||
/* document.purgeUnusedTracks(); */
|
// document.purgeUnusedTracks();
|
||||||
for (size_t i = 0; i < document.getTrackCount(); ++i)
|
for (size_t i = 0; i < document.getTrackCount(); ++i)
|
||||||
{
|
{
|
||||||
document.getTrack(i).truncate();
|
document.getTrack(i).truncate();
|
||||||
|
|||||||
@ -29,26 +29,6 @@ static int getMaxCharacterWidthFromString(HDC hdc, TCHAR *chars)
|
|||||||
return getMaxCharacterWidth(hdc, chars, _tcslen(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()
|
TrackView::TrackView()
|
||||||
{
|
{
|
||||||
scrollPosX = 0;
|
scrollPosX = 0;
|
||||||
@ -97,6 +77,25 @@ TrackView::~TrackView()
|
|||||||
DeleteObject(rowSelectPen);
|
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
|
int TrackView::getScreenY(int row) const
|
||||||
{
|
{
|
||||||
return topMarginHeight + (row * rowHeight) - scrollPosY;
|
return topMarginHeight + (row * rowHeight) - scrollPosY;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user