Extend ValueNode interface for ranged containers.
Add an IsContainerRangeFixed() hook which specifies whether or not the container in question can only display elements within a fixed lower/upper bound, i.e. B{Object}List.
This commit is contained in:
parent
a8e846d0f4
commit
570241e8b7
@ -70,6 +70,13 @@ ValueNode::IsRangedContainer() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
ValueNode::IsContainerRangeFixed() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ValueNode::ClearChildren()
|
ValueNode::ClearChildren()
|
||||||
{
|
{
|
||||||
|
@ -62,6 +62,10 @@ public:
|
|||||||
// node types to allow the upper layers to be aware of this, and to be
|
// node types to allow the upper layers to be aware of this, and to be
|
||||||
// able to request that only a subset of children be created.
|
// able to request that only a subset of children be created.
|
||||||
virtual bool IsRangedContainer() const;
|
virtual bool IsRangedContainer() const;
|
||||||
|
virtual bool IsContainerRangeFixed() const;
|
||||||
|
// indicates that the user can't
|
||||||
|
// arbitrarily go outside of the
|
||||||
|
// specified/supported range.
|
||||||
virtual void ClearChildren();
|
virtual void ClearChildren();
|
||||||
virtual status_t CreateChildrenInRange(int32 lowIndex,
|
virtual status_t CreateChildrenInRange(int32 lowIndex,
|
||||||
int32 highIndex);
|
int32 highIndex);
|
||||||
|
@ -330,6 +330,13 @@ BListValueNode::IsRangedContainer() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
BListValueNode::IsContainerRangeFixed() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BListValueNode::ClearChildren()
|
BListValueNode::ClearChildren()
|
||||||
{
|
{
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
virtual ValueNodeChild* ChildAt(int32 index) const;
|
virtual ValueNodeChild* ChildAt(int32 index) const;
|
||||||
|
|
||||||
virtual bool IsRangedContainer() const;
|
virtual bool IsRangedContainer() const;
|
||||||
|
virtual bool IsContainerRangeFixed() const;
|
||||||
virtual void ClearChildren();
|
virtual void ClearChildren();
|
||||||
virtual status_t CreateChildrenInRange(int32 lowIndex,
|
virtual status_t CreateChildrenInRange(int32 lowIndex,
|
||||||
int32 highIndex);
|
int32 highIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user