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();
|
||||
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:
|
||||
document.sendSaveCommand();
|
||||
break;
|
||||
|
||||
@ -20,7 +20,7 @@ public:
|
||||
~TrackView();
|
||||
|
||||
HWND create(HINSTANCE hInstance, HWND hwndParent);
|
||||
HWND getWin(){ return hwnd; }
|
||||
HWND getWin() const { return hwnd; }
|
||||
|
||||
void setDocument(SyncDocument *document) { this->document = document; }
|
||||
const SyncDocument *getDocument() const { return document; }
|
||||
@ -51,13 +51,28 @@ public:
|
||||
|
||||
void selectAll()
|
||||
{
|
||||
selectStartTrack = 0;
|
||||
selectStopTrack = int(this->getTrackCount()) - 1;
|
||||
selectStartRow = 0;
|
||||
selectStopRow = int(this->getRows()) - 1;
|
||||
selectStartTrack = int(this->getTrackCount()) - 1;
|
||||
selectStopTrack = editTrack = 0;
|
||||
selectStartRow = int(this->getRows()) - 1;
|
||||
selectStopRow = editRow = 0;
|
||||
|
||||
editTrack = 0;
|
||||
editRow = 0;
|
||||
InvalidateRect(hwnd, NULL, FALSE);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user