* fix invalidation of changed items

* fix deselecting items
* fix selection with the mouse and also holding down modifiers
* fix some more stuff I have already forgotten
* applied coding style in most places
* renamed private functions to be consistent

needs more work though, some stuff can definitely be
removed, some needs to be added


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14932 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-11-15 01:36:10 +00:00
parent 437fc0be3f
commit 034104bc0f
3 changed files with 445 additions and 307 deletions
+15 -14
View File
@@ -148,21 +148,21 @@ class BListView : public BView, public BInvoker
BListView &operator=(const BListView &); BListView &operator=(const BListView &);
void InitObject(list_view_type type); void _InitObject(list_view_type type);
void FixupScrollBar(); void _FixupScrollBar();
void InvalidateFrom(int32 index); void _InvalidateFrom(int32 index);
status_t PostMsg(BMessage *msg); status_t _PostMessage(BMessage *msg);
void FontChanged(); void _FontChanged();
int32 RangeCheck(int32 index); int32 _RangeCheck(int32 index);
bool _Select(int32 index, bool extend); bool _Select(int32 index, bool extend);
bool _Select(int32 from, int32 to, bool extend); bool _Select(int32 from, int32 to, bool extend);
bool _Deselect(int32 index); bool _Deselect(int32 index);
void Deselect(int32 from, int32 to); // void _Deselect(int32 from, int32 to);
bool _DeselectAll(int32 except_from, int32 except_to); bool _DeselectAll(int32 except_from, int32 except_to);
void PerformDelayedSelect(); // void PerformDelayedSelect();
bool TryInitiateDrag(BPoint where); bool _TryInitiateDrag(BPoint where);
int32 CalcFirstSelected(int32 after); int32 _CalcFirstSelected(int32 after);
int32 CalcLastSelected(int32 before); int32 _CalcLastSelected(int32 before);
virtual void DrawItem(BListItem *item, BRect itemRect, bool complete = false); virtual void DrawItem(BListItem *item, BRect itemRect, bool complete = false);
bool DoSwapItems(int32 a, int32 b); bool DoSwapItems(int32 a, int32 b);
@@ -178,9 +178,10 @@ class BListView : public BView, public BInvoker
int32 fLastSelected; int32 fLastSelected;
int32 fAnchorIndex; int32 fAnchorIndex;
float fWidth; float fWidth;
BMessage *fSelectMessage; BMessage* fSelectMessage;
BScrollView *fScrollView; BScrollView* fScrollView;
track_data *fTrack; track_data* fTrack;
uint32 _reserved[3]; uint32 _reserved[3];
}; };
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -361,7 +361,7 @@ void BOutlineListView::Expand(BListItem *item)
items++; items++;
} }
FixupScrollBar(); _FixupScrollBar();
Invalidate(); Invalidate();
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@@ -391,7 +391,7 @@ void BOutlineListView::Collapse(BListItem *item)
items++; items++;
} }
FixupScrollBar(); _FixupScrollBar();
Invalidate(); Invalidate();
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------