* The previous change to reorder item->Update() and _RecalcItemTops() obviously

broke everything. If the added item has no chance to calculate it's height,
  _RecalcItemTops() won't work of course. Whatever this was supposed to fix,
  there has to be a correct way.
* Override BView::SetFont() to update all the items. I remember wanting to
  implement this, that's why I refactored a _FontChanged() method, but I
  obviousy never did...
* Moved the AttachedToWindow() and FrameMoved() implementations to a more
  logical position in the file.
* Implement B_PAGE_UP/DOWN key presses. Don't know if that's what the BeOS
  implementation did, will check later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28671 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-11-16 22:34:11 +00:00
parent 231cbd908e
commit fa6cd8ad6a
2 changed files with 54 additions and 27 deletions
+4 -3
View File
@@ -41,7 +41,11 @@ class BListView : public BView, public BInvoker {
virtual void MouseDown(BPoint where);
virtual void KeyDown(const char* bytes, int32 numBytes);
virtual void MakeFocus(bool state = true);
virtual void AttachedToWindow();
virtual void FrameResized(float newWidth, float newHeight);
virtual void FrameMoved(BPoint newPosition);
virtual void SetFont(const BFont* font,
uint32 mask = B_FONT_ALL);
virtual void TargetedByScrollView(BScrollView* scroller);
virtual void ScrollTo(BPoint where);
inline void ScrollTo(float x, float y);
@@ -98,9 +102,6 @@ class BListView : public BView, public BInvoker {
bool MoveItem(int32 from, int32 to);
bool ReplaceItem(int32 index, BListItem* item);
virtual void AttachedToWindow();
virtual void FrameMoved(BPoint newPosition);
BRect ItemFrame(int32 index);
virtual BHandler* ResolveSpecifier(BMessage* message, int32 index,