Implemented layout-friendly constructors. Also added MaxSize(), though it
only invokes the BView version. Didn't know what to do with MinSize() and PreferredSize(). ATM they return fixed, hard-coded values. It might make sense to compute something depending on the font size, for instance. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21380 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -26,6 +26,10 @@ class BListView : public BView, public BInvoker {
|
|||||||
list_view_type type = B_SINGLE_SELECTION_LIST,
|
list_view_type type = B_SINGLE_SELECTION_LIST,
|
||||||
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||||
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);
|
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);
|
||||||
|
BListView(const char* name,
|
||||||
|
list_view_type type = B_SINGLE_SELECTION_LIST,
|
||||||
|
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);
|
||||||
|
BListView(list_view_type type = B_SINGLE_SELECTION_LIST);
|
||||||
BListView(BMessage* data);
|
BListView(BMessage* data);
|
||||||
|
|
||||||
virtual ~BListView() ;
|
virtual ~BListView() ;
|
||||||
@@ -119,6 +123,7 @@ class BListView : public BView, public BInvoker {
|
|||||||
virtual void AllDetached();
|
virtual void AllDetached();
|
||||||
|
|
||||||
virtual BSize MinSize();
|
virtual BSize MinSize();
|
||||||
|
virtual BSize MaxSize();
|
||||||
virtual BSize PreferredSize();
|
virtual BSize PreferredSize();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -72,6 +72,20 @@ BListView::BListView(BRect frame, const char* name, list_view_type type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BListView::BListView(const char* name, list_view_type type, uint32 flags)
|
||||||
|
: BView(name, flags)
|
||||||
|
{
|
||||||
|
_InitObject(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BListView::BListView(list_view_type type)
|
||||||
|
: BView(NULL, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE)
|
||||||
|
{
|
||||||
|
_InitObject(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BListView::BListView(BMessage* archive)
|
BListView::BListView(BMessage* archive)
|
||||||
: BView(archive)
|
: BView(archive)
|
||||||
{
|
{
|
||||||
@@ -1102,6 +1116,13 @@ BListView::MinSize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BSize
|
||||||
|
BListView::MaxSize()
|
||||||
|
{
|
||||||
|
return BView::MaxSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BSize
|
BSize
|
||||||
BListView::PreferredSize()
|
BListView::PreferredSize()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user