* Implemented BOutlineListView::FullListSortItems() and SortItemsUnder() - dunno

what Be's implementation did wrong but instead of taking almost 30 seconds to
  sort the MIME type database (roughly 1100 entries, and yes, that's why the
  original FileTypes is that slow when it has to show the internal types), this
  one needs only 4 ms for the same task (that's an amply 7500x speedup).
* Implemented some more missing functions - it's by no means complete yet, though.
* Rewrote OutlineListView.h, ListItem.h, and StringItem.h.
* Fixed some minor bugs, but there are probably a lot more.
* Major cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16349 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-02-11 15:23:23 +00:00
parent 3da4d36c6a
commit 7c74b12b2a
4 changed files with 759 additions and 609 deletions
+27 -43
View File
@@ -1,58 +1,42 @@
////////////////////////////////////////////////////////////////////////////////
//
// File: StringItem.h
//
// Description:
//
// Copyright 2001, Ulrich Wimboeck
//
////////////////////////////////////////////////////////////////////////////////
/*
* Copyright 2006, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _STRING_ITEM_H
#define _STRING_ITEM_H
#include <ListItem.h>
#ifdef USE_OPENBEOS_NAMESPACE
namespace OpenBeOS {
#endif
class BStringItem : public BListItem {
public:
BStringItem(const char* text, uint32 outlineLevel = 0,
bool expanded = true);
BStringItem(BMessage* archive);
virtual ~BStringItem();
static BArchivable* Instantiate(BMessage* archive);
virtual status_t Archive(BMessage* archive, bool deep = true) const;
//----- BStringItem class ----------------------------------------
virtual void DrawItem(BView* owner, BRect frame, bool complete = false);
virtual void SetText(const char* text);
const char* Text() const;
class BStringItem : public BListItem
{
public:
BStringItem(const char *text, uint32 outlineLevel = 0, bool expanded = true);
BStringItem(BMessage *data);
virtual ~BStringItem();
virtual void Update(BView* owner, const BFont* font);
static BArchivable *Instantiate(BMessage *data);
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual status_t Perform(perform_code code, void* arg);
virtual void DrawItem(BView *owner, BRect frame, bool complete = false);
virtual void SetText(const char *text);
const char *Text() const;
private:
virtual void _ReservedStringItem1();
virtual void _ReservedStringItem2();
virtual void Update(BView *owner, const BFont *font);
BStringItem(const BStringItem& item);
BStringItem& operator=(const BStringItem& item);
virtual status_t Perform(perform_code code, void *arg);
private:
virtual void _ReservedStringItem1();
virtual void _ReservedStringItem2();
BStringItem(const BStringItem &);
BStringItem& operator=(const BStringItem &);
char *fText;
float fBaselineOffset;
uint32 _reserved[2];
char* fText;
float fBaselineOffset;
uint32 _reserved[2];
};
#ifdef USE_OPENBEOS_NAMESPACE
}
#endif
#endif /* _STRING_ITEM_H */
#endif // _STRING_ITEM_H