Implemented select all, select track and select row.
This commit is contained in:
parent
6fcd107159
commit
c463800979
@ -372,6 +372,18 @@ static LRESULT CALLBACK mainWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
|
|||||||
fileSave();
|
fileSave();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ID_EDIT_SELECTALL:
|
||||||
|
trackView->selectAll();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ID_EDIT_SELECTTRACK:
|
||||||
|
trackView->selectTrack(trackView->getEditTrack());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ID_EDIT_SELECTROW:
|
||||||
|
trackView->selectRow(trackView->getEditRow());
|
||||||
|
break;
|
||||||
|
|
||||||
case ID_FILE_REMOTEEXPORT:
|
case ID_FILE_REMOTEEXPORT:
|
||||||
document.sendSaveCommand();
|
document.sendSaveCommand();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -20,7 +20,7 @@ public:
|
|||||||
~TrackView();
|
~TrackView();
|
||||||
|
|
||||||
HWND create(HINSTANCE hInstance, HWND hwndParent);
|
HWND create(HINSTANCE hInstance, HWND hwndParent);
|
||||||
HWND getWin(){ return hwnd; }
|
HWND getWin() const { return hwnd; }
|
||||||
|
|
||||||
void setDocument(SyncDocument *document) { this->document = document; }
|
void setDocument(SyncDocument *document) { this->document = document; }
|
||||||
const SyncDocument *getDocument() const { return document; }
|
const SyncDocument *getDocument() const { return document; }
|
||||||
@ -32,7 +32,7 @@ public:
|
|||||||
if (NULL == document) return 0;
|
if (NULL == document) return 0;
|
||||||
return document->getRows();
|
return document->getRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFont(HFONT font);
|
void setFont(HFONT font);
|
||||||
|
|
||||||
void editEnterValue();
|
void editEnterValue();
|
||||||
@ -51,13 +51,28 @@ public:
|
|||||||
|
|
||||||
void selectAll()
|
void selectAll()
|
||||||
{
|
{
|
||||||
selectStartTrack = 0;
|
selectStartTrack = int(this->getTrackCount()) - 1;
|
||||||
selectStopTrack = int(this->getTrackCount()) - 1;
|
selectStopTrack = editTrack = 0;
|
||||||
selectStartRow = 0;
|
selectStartRow = int(this->getRows()) - 1;
|
||||||
selectStopRow = int(this->getRows()) - 1;
|
selectStopRow = editRow = 0;
|
||||||
|
|
||||||
editTrack = 0;
|
InvalidateRect(hwnd, NULL, FALSE);
|
||||||
editRow = 0;
|
}
|
||||||
|
|
||||||
|
void selectTrack(int track)
|
||||||
|
{
|
||||||
|
selectStartTrack = selectStopTrack = editTrack = track;
|
||||||
|
selectStartRow = int(this->getRows()) - 1;
|
||||||
|
selectStopRow = editRow = 0;
|
||||||
|
|
||||||
|
InvalidateRect(hwnd, NULL, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void selectRow(int row)
|
||||||
|
{
|
||||||
|
selectStartTrack = int(this->getTrackCount()) - 1;
|
||||||
|
selectStopTrack = editTrack = 0;
|
||||||
|
selectStartRow = selectStopRow = editRow = row;
|
||||||
|
|
||||||
InvalidateRect(hwnd, NULL, FALSE);
|
InvalidateRect(hwnd, NULL, FALSE);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user