The Interface Kit Table of Contents | The Interface Kit Index |
Derived from: public BListItem
Declared in: be/interface/ListItem.h
Library: libbe.so
A BStringItem is a container for text that you want to display as an item in a BListView. To use a BStringItem, you construct it, set its text (either in the constructor or through SetText()) and then add it to a BListView object.
|
Initializes the BStringItem by making a copy of the text string passed as an argument. This is the string the item will display. The level and expanded arguments are passed unchanged to the BListItem constructor; see that function for an explanation.
|
Frees the text the item displays.
|
Returns a new BStringItem object, allocated by new and created with the version of the constructor that takes a BMessage archive. However, if the archive message doesn't contain archived data for a BStringItem, Instantiate() returns NULL.
See also: BArchivable::Instantiate(), instantiate_object(), Archive()
|
Calls the inherited version of Archive() and stores the BStringItem in the BMessage archive.
See also: BArchivable::Archive(), Instantiate() static function
|
Draws the text string, dimming it if the item is disabled and highlighting it if the item is selected.
See also: BListItem::DrawItem()
|
These functions set and return the text that the BStringItem draws. SetText() copies the string it's passed. Text() returns a pointer to the string owned by the BStringItem.
|
Overrides the BListItem version of Update() to recalculate the width and height of the BStringItem and the placement of the text. The width of the item is based on the width of the owner BView. The height and text placement are based on the owner's font. The item must be tall enough to display the string in the current font.
See also: BListItem::Update()
The Archive() function adds the following field to its BMessage argument:
Field | Type code | Meaning |
---|---|---|
"_label" | B_STRING_TYPE | String text (present only if it is not NULL). |
The Interface Kit Table of Contents | The Interface Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..