* Updated indentation.
* Better grouping. +alphabranch git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32699 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 _LIST_ITEM_H
|
#ifndef _LIST_ITEM_H
|
||||||
#define _LIST_ITEM_H
|
#define _LIST_ITEM_H
|
||||||
@@ -18,63 +18,67 @@ class BView;
|
|||||||
|
|
||||||
class BListItem : public BArchivable {
|
class BListItem : public BArchivable {
|
||||||
public:
|
public:
|
||||||
BListItem(uint32 outlineLevel = 0,
|
BListItem(uint32 outlineLevel = 0,
|
||||||
bool expanded = true);
|
bool expanded = true);
|
||||||
BListItem(BMessage* archive);
|
BListItem(BMessage* archive);
|
||||||
virtual ~BListItem();
|
virtual ~BListItem();
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* archive, bool deep = true) const;
|
virtual status_t Archive(BMessage* archive,
|
||||||
|
bool deep = true) const;
|
||||||
|
|
||||||
float Height() const;
|
float Height() const;
|
||||||
float Width() const;
|
float Width() const;
|
||||||
bool IsSelected() const;
|
bool IsSelected() const;
|
||||||
void Select();
|
void Select();
|
||||||
void Deselect();
|
void Deselect();
|
||||||
|
|
||||||
virtual void SetEnabled(bool enabled);
|
virtual void SetEnabled(bool enabled);
|
||||||
bool IsEnabled() const;
|
bool IsEnabled() const;
|
||||||
|
|
||||||
void SetHeight(float height);
|
void SetHeight(float height);
|
||||||
void SetWidth(float width);
|
void SetWidth(float width);
|
||||||
virtual void DrawItem(BView* owner, BRect frame,
|
virtual void DrawItem(BView* owner, BRect frame,
|
||||||
bool complete = false) = 0;
|
bool complete = false) = 0;
|
||||||
virtual void Update(BView* owner, const BFont* font);
|
virtual void Update(BView* owner, const BFont* font);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code code, void* arg);
|
bool IsExpanded() const;
|
||||||
|
void SetExpanded(bool expanded);
|
||||||
|
uint32 OutlineLevel() const;
|
||||||
|
|
||||||
bool IsExpanded() const;
|
virtual status_t Perform(perform_code code, void* arg);
|
||||||
void SetExpanded(bool expanded);
|
|
||||||
uint32 OutlineLevel() const;
|
private:
|
||||||
|
// FBC padding
|
||||||
|
virtual void _ReservedListItem1();
|
||||||
|
virtual void _ReservedListItem2();
|
||||||
|
|
||||||
|
// Forbidden
|
||||||
|
BListItem(const BListItem& item);
|
||||||
|
BListItem& operator=(const BListItem& item);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class BOutlineListView;
|
friend class BOutlineListView;
|
||||||
friend class BListView;
|
friend class BListView;
|
||||||
|
|
||||||
bool HasSubitems() const;
|
bool HasSubitems() const;
|
||||||
|
|
||||||
virtual void _ReservedListItem1();
|
bool IsItemVisible() const;
|
||||||
virtual void _ReservedListItem2();
|
void SetItemVisible(bool visible);
|
||||||
|
inline float Top() const;
|
||||||
BListItem(const BListItem& item);
|
inline float Bottom() const;
|
||||||
BListItem& operator=(const BListItem& item);
|
void SetTop(float top);
|
||||||
|
|
||||||
bool IsItemVisible() const;
|
|
||||||
void SetItemVisible(bool visible);
|
|
||||||
inline float Top() const;
|
|
||||||
inline float Bottom() const;
|
|
||||||
void SetTop(float top);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float fTop;
|
float fTop;
|
||||||
BList* fTemporaryList;
|
BList* fTemporaryList;
|
||||||
float fWidth;
|
float fWidth;
|
||||||
float fHeight;
|
float fHeight;
|
||||||
uint32 fLevel;
|
uint32 fLevel;
|
||||||
bool fSelected;
|
bool fSelected;
|
||||||
bool fEnabled;
|
bool fEnabled;
|
||||||
bool fExpanded;
|
bool fExpanded;
|
||||||
bool fHasSubitems : 1;
|
bool fHasSubitems : 1;
|
||||||
bool fVisible : 1;
|
bool fVisible : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -95,4 +99,4 @@ BListItem::Bottom(void) const
|
|||||||
#include <StringItem.h>
|
#include <StringItem.h>
|
||||||
// to maintain source compatibility
|
// to maintain source compatibility
|
||||||
|
|
||||||
#endif // _LIST_ITEM_H
|
#endif // _LIST_ITEM_H
|
||||||
|
|||||||
Reference in New Issue
Block a user