* Updated indentation style.
* Fixed copyright. +alphabranch git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32716 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
|
* Copyright 2006-2009, Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT license.
|
||||||
*/
|
*/
|
||||||
#ifndef _OUTLINE_LIST_VIEW_H
|
#ifndef _OUTLINE_LIST_VIEW_H
|
||||||
#define _OUTLINE_LIST_VIEW_H
|
#define _OUTLINE_LIST_VIEW_H
|
||||||
@@ -14,20 +14,23 @@ class BListItem;
|
|||||||
class BOutlineListView : public BListView {
|
class BOutlineListView : public BListView {
|
||||||
public:
|
public:
|
||||||
BOutlineListView(BRect frame, const char* name,
|
BOutlineListView(BRect frame, const char* name,
|
||||||
list_view_type type = B_SINGLE_SELECTION_LIST,
|
list_view_type type
|
||||||
|
= B_SINGLE_SELECTION_LIST,
|
||||||
uint32 resizeMode
|
uint32 resizeMode
|
||||||
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||||
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
|
uint32 flags = B_WILL_DRAW
|
||||||
| B_NAVIGABLE);
|
| B_FRAME_EVENTS | B_NAVIGABLE);
|
||||||
BOutlineListView(const char* name,
|
BOutlineListView(const char* name,
|
||||||
list_view_type type = B_SINGLE_SELECTION_LIST,
|
list_view_type type
|
||||||
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
|
= B_SINGLE_SELECTION_LIST,
|
||||||
| B_NAVIGABLE);
|
uint32 flags = B_WILL_DRAW
|
||||||
|
| B_FRAME_EVENTS | B_NAVIGABLE);
|
||||||
BOutlineListView(BMessage* archive);
|
BOutlineListView(BMessage* archive);
|
||||||
virtual ~BOutlineListView();
|
virtual ~BOutlineListView();
|
||||||
|
|
||||||
static BArchivable* Instantiate(BMessage* archive);
|
static BArchivable* Instantiate(BMessage* archive);
|
||||||
virtual status_t Archive(BMessage* archive, bool deep = true) const;
|
virtual status_t Archive(BMessage* archive,
|
||||||
|
bool deep = true) const;
|
||||||
|
|
||||||
virtual void MouseDown(BPoint where);
|
virtual void MouseDown(BPoint where);
|
||||||
virtual void KeyDown(const char* bytes, int32 numBytes);
|
virtual void KeyDown(const char* bytes, int32 numBytes);
|
||||||
@@ -35,7 +38,8 @@ public:
|
|||||||
virtual void FrameResized(float newWidth, float newHeight);
|
virtual void FrameResized(float newWidth, float newHeight);
|
||||||
virtual void MouseUp(BPoint where);
|
virtual void MouseUp(BPoint where);
|
||||||
|
|
||||||
virtual bool AddUnder(BListItem* item, BListItem* underItem);
|
virtual bool AddUnder(BListItem* item,
|
||||||
|
BListItem* underItem);
|
||||||
|
|
||||||
virtual bool AddItem(BListItem* item);
|
virtual bool AddItem(BListItem* item);
|
||||||
virtual bool AddItem(BListItem* item, int32 fullListIndex);
|
virtual bool AddItem(BListItem* item, int32 fullListIndex);
|
||||||
@@ -53,13 +57,16 @@ public:
|
|||||||
BListItem* FullListLastItem() const;
|
BListItem* FullListLastItem() const;
|
||||||
bool FullListHasItem(BListItem* item) const;
|
bool FullListHasItem(BListItem* item) const;
|
||||||
int32 FullListCountItems() const;
|
int32 FullListCountItems() const;
|
||||||
int32 FullListCurrentSelection(int32 index = 0) const;
|
int32 FullListCurrentSelection(
|
||||||
|
int32 index = 0) const;
|
||||||
|
|
||||||
virtual void MakeEmpty();
|
virtual void MakeEmpty();
|
||||||
bool FullListIsEmpty() const;
|
bool FullListIsEmpty() const;
|
||||||
void FullListDoForEach(bool (*func)(BListItem* item));
|
|
||||||
void FullListDoForEach(
|
void FullListDoForEach(
|
||||||
bool (*func)(BListItem* item, void*), void*);
|
bool (*func)(BListItem* item));
|
||||||
|
void FullListDoForEach(
|
||||||
|
bool (*func)(BListItem* item, void*),
|
||||||
|
void*);
|
||||||
|
|
||||||
BListItem* Superitem(const BListItem* item);
|
BListItem* Superitem(const BListItem* item);
|
||||||
|
|
||||||
@@ -68,14 +75,15 @@ public:
|
|||||||
|
|
||||||
bool IsExpanded(int32 fullListIndex);
|
bool IsExpanded(int32 fullListIndex);
|
||||||
|
|
||||||
virtual BHandler* ResolveSpecifier(BMessage* message, int32 index,
|
virtual BHandler* ResolveSpecifier(BMessage* message,
|
||||||
BMessage* specifier, int32 what,
|
int32 index, BMessage* specifier,
|
||||||
const char* property);
|
int32 what, const char* property);
|
||||||
virtual status_t GetSupportedSuites(BMessage* data);
|
virtual status_t GetSupportedSuites(BMessage* data);
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code code, void* data);
|
||||||
|
|
||||||
virtual void ResizeToPreferred();
|
virtual void ResizeToPreferred();
|
||||||
virtual void GetPreferredSize(float* _width, float* _height);
|
virtual void GetPreferredSize(float* _width,
|
||||||
|
float* _height);
|
||||||
virtual void MakeFocus(bool focus = true);
|
virtual void MakeFocus(bool focus = true);
|
||||||
virtual void AllAttached();
|
virtual void AllAttached();
|
||||||
virtual void AllDetached();
|
virtual void AllDetached();
|
||||||
@@ -92,9 +100,10 @@ public:
|
|||||||
bool oneLevelOnly) const;
|
bool oneLevelOnly) const;
|
||||||
BListItem* EachItemUnder(BListItem* underItem,
|
BListItem* EachItemUnder(BListItem* underItem,
|
||||||
bool oneLevelOnly, BListItem* (*eachFunc)(
|
bool oneLevelOnly, BListItem* (*eachFunc)(
|
||||||
BListItem* item, void* arg), void* arg);
|
BListItem* item, void* arg),
|
||||||
BListItem* ItemUnderAt(BListItem* underItem, bool oneLevelOnly,
|
void* arg);
|
||||||
int32 index) const;
|
BListItem* ItemUnderAt(BListItem* underItem,
|
||||||
|
bool oneLevelOnly, int32 index) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool DoMiscellaneous(MiscCode code, MiscData* data);
|
virtual bool DoMiscellaneous(MiscCode code, MiscData* data);
|
||||||
@@ -107,7 +116,8 @@ private:
|
|||||||
virtual void _ReservedOutlineListView4();
|
virtual void _ReservedOutlineListView4();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ExpandOrCollapse(BListItem* underItem, bool expand);
|
virtual void ExpandOrCollapse(BListItem* underItem,
|
||||||
|
bool expand);
|
||||||
virtual BRect LatchRect(BRect itemRect, int32 level) const;
|
virtual BRect LatchRect(BRect itemRect, int32 level) const;
|
||||||
virtual void DrawLatch(BRect itemRect, int32 level,
|
virtual void DrawLatch(BRect itemRect, int32 level,
|
||||||
bool collapsed, bool highlighted,
|
bool collapsed, bool highlighted,
|
||||||
@@ -128,14 +138,16 @@ private:
|
|||||||
|
|
||||||
void _CullInvisibleItems(BList &list);
|
void _CullInvisibleItems(BList &list);
|
||||||
bool _SwapItems(int32 first, int32 second);
|
bool _SwapItems(int32 first, int32 second);
|
||||||
BListItem* _RemoveItem(BListItem* item, int32 fullListIndex);
|
BListItem* _RemoveItem(BListItem* item,
|
||||||
|
int32 fullListIndex);
|
||||||
|
|
||||||
BListItem* _SuperitemForIndex(int32 fullListIndex, int32 level,
|
BListItem* _SuperitemForIndex(int32 fullListIndex,
|
||||||
int32* _superIndex = NULL);
|
int32 level, int32* _superIndex = NULL);
|
||||||
int32 _FindPreviousVisibleIndex(int32 fullListIndex);
|
int32 _FindPreviousVisibleIndex(int32 fullListIndex);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BList fFullList;
|
BList fFullList;
|
||||||
|
|
||||||
uint32 _reserved[2];
|
uint32 _reserved[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user