From 5d8680c0bb89588fe9d2b47f845a79a221af7a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 28 Feb 2004 04:04:47 +0000 Subject: [PATCH] Added a message to change the selection. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6788 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/diskprobe/DataView.cpp | 11 +++++++++++ src/apps/diskprobe/DataView.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/apps/diskprobe/DataView.cpp b/src/apps/diskprobe/DataView.cpp index df384b0eca..3016aef6e5 100644 --- a/src/apps/diskprobe/DataView.cpp +++ b/src/apps/diskprobe/DataView.cpp @@ -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; diff --git a/src/apps/diskprobe/DataView.h b/src/apps/diskprobe/DataView.h index 12f33ee470..a5dbea8ed7 100644 --- a/src/apps/diskprobe/DataView.h +++ b/src/apps/diskprobe/DataView.h @@ -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';