patch by Rene Gollent:
* BListItems now store the top offset of the frame within the parent BListView. * This allows binary searching the clicked item. * ItemFrame() is now a cheap call. * Fixed several bugs in the sorting code of BOutlineListView which lead to crashes of client applications. * Implemented previously unimplemented functions in BOutlineListView. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24092 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -43,8 +43,8 @@ class BListView : public BView, public BInvoker {
|
||||
virtual void MakeFocus(bool state = true);
|
||||
virtual void FrameResized(float newWidth, float newHeight);
|
||||
virtual void TargetedByScrollView(BScrollView* scroller);
|
||||
void ScrollTo(float x, float y);
|
||||
virtual void ScrollTo(BPoint where);
|
||||
inline void ScrollTo(float x, float y);
|
||||
virtual bool AddItem(BListItem* item);
|
||||
virtual bool AddItem(BListItem* item, int32 atIndex);
|
||||
virtual bool AddList(BList* newItems);
|
||||
@@ -136,7 +136,6 @@ class BListView : public BView, public BInvoker {
|
||||
};
|
||||
|
||||
virtual bool DoMiscellaneous(MiscCode code, MiscData *data);
|
||||
|
||||
private:
|
||||
friend class BOutlineListView;
|
||||
|
||||
@@ -161,6 +160,7 @@ class BListView : public BView, public BInvoker {
|
||||
bool _TryInitiateDrag(BPoint where);
|
||||
int32 _CalcFirstSelected(int32 after);
|
||||
int32 _CalcLastSelected(int32 before);
|
||||
void _RecalcItemTops(int32 start);
|
||||
virtual void DrawItem(BListItem* item, BRect itemRect,
|
||||
bool complete = false);
|
||||
|
||||
@@ -174,12 +174,11 @@ class BListView : public BView, public BInvoker {
|
||||
int32 fFirstSelected;
|
||||
int32 fLastSelected;
|
||||
int32 fAnchorIndex;
|
||||
float fWidth;
|
||||
BMessage* fSelectMessage;
|
||||
BScrollView* fScrollView;
|
||||
track_data* fTrack;
|
||||
|
||||
uint32 _reserved[3];
|
||||
uint32 _reserved[4];
|
||||
};
|
||||
|
||||
inline void
|
||||
|
||||
Reference in New Issue
Block a user