# ListView Support Tasks

Task Summary

Owner

BListItem

Ulrich Wimboeck

BStringItem

Greg Gelfond

BListView

Ulrich Wimboeck

BOutlineListView

Ulrich Wimboeck

Task Details

BListItem Class

BListItem(uint32 outlineLevel = 0, bool expanded = true);

BListItem(BMessage* data);

virtual ~BListItem();

virtual status_t Archive(BMessage* data, bool deep = true) const;

float Height() const;

float Width() const;

bool IsSelected() const;

void Select();

void Deselect();

virtual void SetEnabled(bool on);

bool IsEnabled() const;

void SetHeight(float height);

void SetWidth(float width);

virtual void DrawItem(BView* owner, BRect bounds, bool complete = false) = 0;

virtual void Update(BView* owner, const BFont* font);

virtual status_t Perform(perform_code d, void* arg);

bool IsExpanded() const;

void SetExpanded(bool expanded);

uint32 OutlineLevel() const;

bool IsItemVisible() const;

void SetItemVisible(bool);

BStringItem Class

BStringItem(const char* text, uint32 outlineLevel = 0, bool expanded = true);

virtual ~BStringItem();

BStringItem(BMessage* data);

static BArchivable* Instantiate(BMessage* data);

virtual status_t Archive(BMessage* data, bool deep = true) const;

virtual void DrawItem(BView* owner, BRect frame, bool complete = false);

virtual void SetText(const char* text);

const char* Text() const;

virtual void Update(BView* owner, const BFont* font);

virtual status_t Perform(perform_code d, void* arg);

BListView Class

BListView(BRect frame, const char *name, list_view_type type = B_SINGLE_SELECTION_LIST, uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);

BListView(BMessage *data);

virtual ~BListView();

static BArchivable *Instantiate(BMessage *data);

virtual status_t Archive(BMessage *data, bool deep = true) const;

virtual void Draw(BRect updateRect);

virtual void MessageReceived(BMessage *msg);

virtual void MouseDown(BPoint where);

virtual void KeyDown(const char *bytes, int32 numBytes);

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);

virtual bool AddItem(BListItem *item);

virtual bool AddItem(BListItem *item, int32 atIndex);

virtual bool AddList(BList *newItems);

virtual bool AddList(BList *newItems, int32 atIndex);

virtual bool RemoveItem(BListItem *item);

virtual BListItem *RemoveItem(int32 index);

virtual bool RemoveItems(int32 index, int32 count);

virtual void SetSelectionMessage(BMessage *message);

virtual void SetInvocationMessage(BMessage *message);

BMessage *SelectionMessage() const;

uint32 SelectionCommand() const;

BMessage *InvocationMessage() const;

uint32 InvocationCommand() const;

virtual void SetListType(list_view_type type);

list_view_type ListType() const;

BListItem *ItemAt(int32 index) const;

int32 IndexOf(BPoint point) const;

int32 IndexOf(BListItem *item) const;

BListItem *FirstItem() const;

BListItem *LastItem() const;

bool HasItem(BListItem *item) const;

int32 CountItems() const;

virtual void MakeEmpty();

bool IsEmpty() const;

void DoForEach(bool (*func)(BListItem *));

void DoForEach(bool (*func)(BListItem *, void *), void *);

const BListItem **Items() const;

void InvalidateItem(int32 index);

void ScrollToSelection();

void Select(int32 index, bool extend = false);

void Select(int32 from, int32 to, bool extend = false);

bool IsItemSelected(int32 index) const;

int32 CurrentSelection(int32 index = 0) const;

virtual status_t Invoke(BMessage *msg = NULL);

void DeselectAll();

void DeselectExcept(int32 except_from, int32 except_to);

void Deselect(int32 index);

virtual void SelectionChanged();

void SortItems(int (*cmp)(const void *, const void *));

bool SwapItems(int32 a, int32 b);

bool MoveItem(int32 from, int32 to);

bool ReplaceItem(int32 index, BListItem * item);

virtual void AttachedToWindow();

virtual void FrameMoved(BPoint new_position);

BRect ItemFrame(int32 index);

virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property);

virtual status_t GetSupportedSuites(BMessage *data);

virtual status_t Perform(perform_code d, void *arg);

virtual void WindowActivated(bool state);

virtual void MouseUp(BPoint pt);

virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);

virtual void DetachedFromWindow();

virtual bool InitiateDrag(BPoint pt, int32 itemIndex, bool initialySelected);

virtual void ResizeToPreferred();

virtual void GetPreferredSize(float *width, float *height);

virtual void AllAttached();

virtual void AllDetached();

virtual bool DoMiscellaneous(MiscCode code, MiscData * data);

virtual void DrawItem(BListItem *item, BRect itemRect, bool complete = false);

BOutlineListView Class

BOutlineListView(BRect frame, const char* name, list_view_type type = B_SINGLE_SELECTION_LIST, uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);

BOutlineListView(BMessage* data);

virtual ~BOutlineListView();

static BArchivable* Instantiate(BMessage* data);

virtual status_t Archive(BMessage* data, bool deep = true) const;

virtual void MouseDown(BPoint where);

virtual void KeyDown(const char* bytes, int32 numBytes);

virtual void FrameMoved(BPoint new_position);

virtual void FrameResized(float new_width, float new_height);

virtual void MouseUp(BPoint where);

virtual bool AddUnder(BListItem* item, BListItem* underItem);

virtual bool AddItem(BListItem* item);

virtual bool AddItem(BListItem* item, int32 fullListIndex);

virtual bool AddList(BList* newItems);

virtual bool AddList(BList* newItems, int32 fullListIndex);

virtual bool RemoveItem(BListItem* item);

virtual BListItem* RemoveItem(int32 fullListIndex);

virtual bool RemoveItems(int32 fullListIndex, int32 count);

BListItem* FullListItemAt(int32 fullListIndex) const;

int32 FullListIndexOf(BPoint point) const;

int32 FullListIndexOf(BListItem* item) const;

BListItem* FullListFirstItem() const;

BListItem* FullListLastItem() const;

bool FullListHasItem(BListItem* item) const;

int32 FullListCountItems() const;

int32 FullListCurrentSelection(int32 index = 0) const;

virtual void MakeEmpty();

bool FullListIsEmpty() const;

void FullListDoForEach(bool (*func)(BListItem* ));

void FullListDoForEach(bool (*func)(BListItem* , void* ), void*);

BListItem* Superitem(const BListItem* item);

void Expand(BListItem* item);

void Collapse(BListItem* item);

bool IsExpanded(int32 fullListIndex);

virtual BHandler* ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, int32 form, const char* property);

virtual status_t GetSupportedSuites(BMessage* data);

virtual status_t Perform(perform_code d, void* arg);

virtual void ResizeToPreferred();

virtual void GetPreferredSize(float* width, float* height);

virtual void MakeFocus(bool state = true);

virtual void AllAttached();

virtual void AllDetached();

virtual void DetachedFromWindow();

void FullListSortItems(int (*compareFunc)(const BListItem* , const BListItem* ));

void SortItemsUnder(BListItem* underItem, bool oneLevelOnly, int (*compareFunc)(const BListItem* , const BListItem*));

int32 CountItemsUnder(BListItem* under, bool oneLevelOnly) const;

BListItem* EachItemUnder(BListItem* underItem, bool oneLevelOnly, BListItem* (*eachFunc)(BListItem* , void* ), void* );

BListItem* ItemUnderAt(BListItem* underItem, bool oneLevelOnly, int32 index) const;

virtual bool DoMiscellaneous(MiscCode code, MiscData* data);

virtual void MessageReceived(BMessage* );

virtual void ExpandOrCollapse(BListItem* underItem, bool expand);

Legend

| Functional Spec
| Use Cases
| Unit Tests
| Technical Spec
| Implementation
| Completed

The OpenBeOS project is hosted by:

Copyright © 2001-2002 OpenBeOS Project