A tab that goes in a BTabView. More...
Inherits BArchivable.
Public Member Functions | |
BTab (BView *contentsView=NULL) | |
Initializes a new BTab object as part of a tabView. More... | |
BTab (BMessage *archive) | |
Archive Constructor. More... | |
virtual | ~BTab () |
Destructor. | |
virtual status_t | Archive (BMessage *data, bool deep=true) const |
Archives the object into the data message. More... | |
virtual void | Deselect () |
Called by the BTabView when the tab is de-selected. More... | |
virtual void | DrawFocusMark (BView *owner, BRect frame) |
Draws the mark indicating that the BTab object is in focus. More... | |
virtual void | DrawLabel (BView *owner, BRect frame) |
Draws the tab's title. More... | |
virtual void | DrawTab (BView *owner, BRect frame, tab_position position, bool full=true) |
Draws the tab. More... | |
bool | IsEnabled () const |
Returns whether or not the tab is enabled. | |
bool | IsFocus () const |
Returns whether or not the tab is the window's focus view. | |
bool | IsSelected () const |
Returns whether or not the tab is selected. More... | |
const char * | Label () const |
Returns the tab's label (the target view's name). More... | |
void | MakeFocus (bool focus=true) |
Makes the tab the window's focus view or removes it. More... | |
virtual status_t | Perform (uint32 d, void *arg) |
Perform some action. (Internal Method) More... | |
virtual void | Select (BView *owner) |
Called by the BTabView when the tab is selected. More... | |
virtual void | SetEnabled (bool enable) |
Enables or disables the tab. More... | |
virtual void | SetLabel (const char *label) |
Sets the target view's name, and updates the BTab accordingly. More... | |
virtual void | SetView (BView *view) |
Sets the view to be displayed for this tab. | |
BView * | View () const |
Returns a pointer to the view to be displayed for this tab. | |
![]() | |
BArchivable (BMessage *from) | |
Constructor. Does important behind-the-scenes work in the unarchiving process. More... | |
BArchivable () | |
Constructor. Does nothing. More... | |
virtual | ~BArchivable () |
Destructor. Does nothing. More... | |
virtual status_t | AllArchived (BMessage *archive) const |
Method relating to the use of BArchiver . More... | |
virtual status_t | AllUnarchived (const BMessage *archive) |
Method relating to the use of BUnarchiver . More... | |
Static Public Member Functions | |
static BArchivable * | Instantiate (BMessage *archive) |
Instantiates a BTab object from the passed in archive. More... | |
![]() | |
static BArchivable * | Instantiate (BMessage *archive) |
Static member to restore objects from messages. More... | |
A tab that goes in a BTabView.
BTab::BTab | ( | BMessage * | archive | ) |
Archive Constructor.
Archives the object into the data message.
data | A pointer to the BMessage object to archive the object into. |
deep | Whether or not to archive child views as well. |
B_OK
if everything went well or an error code otherwise. B_OK | The object was archived. |
B_NO_MEMORY | Ran out of memory while archiving the object. |
Reimplemented from BArchivable.
|
virtual |
Called by the BTabView when the tab is de-selected.
Draws the mark indicating that the BTab object is in focus.
This consists of a blue line drawn across the bottom of the tab frame by default.
|
virtual |
Draws the tab.
This method draws the tab's title by calling DrawLabel(), then draws the tab itself. The position of the tab may affect how the tab is rendered – for example the frontmost tab may have a different appearance than the other tabs.
owner | The view that owns the tab. |
frame | The frame rectangle to draw in. |
position | May affect how the tab is rendered. Choices include:
|
full | Whether or not to completely draw the tab, no longer used. |
|
static |
Instantiates a BTab object from the passed in archive.
bool BTab::IsSelected | ( | ) | const |
Returns whether or not the tab is selected.
const char * BTab::Label | ( | ) | const |
Returns the tab's label (the target view's name).
void BTab::MakeFocus | ( | bool | focus = true | ) |
Makes the tab the window's focus view or removes it.
|
virtual |
|
virtual |
Called by the BTabView when the tab is selected.
owner | The view that the tab's view should be owned by. |
|
virtual |
Enables or disables the tab.
|
virtual |
Sets the target view's name, and updates the BTab accordingly.