From abc3e030074c6de83000c10d2d4c02f359873006 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sun, 22 Nov 2009 16:09:32 +0000 Subject: [PATCH] TermView can also work as a child of a BScrollView git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34187 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/terminal/TermView.cpp | 9 +++++++++ src/apps/terminal/TermView.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index ee07331c8e..bc6be493bc 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -1722,6 +1722,15 @@ TermView::ScrollTo(BPoint where) } +void +TermView::TargetedByScrollView(BScrollView *scrollView) +{ + BView::TargetedByScrollView(scrollView); + + SetScrollBar(scrollView->ScrollBar(B_VERTICAL)); +} + + BHandler* TermView::ResolveSpecifier(BMessage* message, int32 index, BMessage* specifier, int32 what, const char* property) diff --git a/src/apps/terminal/TermView.h b/src/apps/terminal/TermView.h index da9e9efc28..7a668364d6 100644 --- a/src/apps/terminal/TermView.h +++ b/src/apps/terminal/TermView.h @@ -23,11 +23,12 @@ class BClipboard; class BMessageRunner; class BScrollBar; +class BScrollView; class BString; class BStringView; -class Shell; class TermBuffer; class ResizeWindow; +class Shell; class TermView : public BView { public: @@ -108,6 +109,7 @@ protected: virtual void MessageReceived(BMessage* message); virtual void ScrollTo(BPoint where); + virtual void TargetedByScrollView(BScrollView *scrollView); virtual status_t GetSupportedSuites(BMessage* msg); virtual BHandler* ResolveSpecifier(BMessage* msg, int32 index,