Added a message to change the selection.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6788 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-02-28 04:04:47 +00:00
parent 4fa250ba8d
commit 5d8680c0bb
2 changed files with 12 additions and 0 deletions

View File

@ -188,6 +188,17 @@ DataView::MessageReceived(BMessage *message)
break;
}
case kMsgSetSelection:
{
int64 start, end;
if (message->FindInt64("start", &start) != B_OK
|| message->FindInt64("end", &end) != B_OK)
break;
SetSelection(start, end);
break;
}
case B_SELECT_ALL:
SetSelection(0, fDataSize - 1);
break;

View File

@ -100,6 +100,7 @@ class DataView : public BView {
static const uint32 kMsgBaseType = 'base';
static const uint32 kMsgUpdateData = 'updt';
static const uint32 kMsgSetSelection = 'ssel';
// observer notices
static const uint32 kDataViewCursorPosition = 'curs';