Displays help text on hover.
More...
Inherits BArchivable, and BReferenceable.
Inherited by BTextToolTip.
Displays help text on hover.
- Attention
- Use at your own risk! This class is private and may change before release.
This class is for advanced uses of tool tips with custom contents or behavior. The simple way to use tooltips is via BView::SetToolTip().
- Since
- Haiku R1
◆ BToolTip() [1/2]
Creates a new BToolTip object.
- Since
- Haiku R1
◆ BToolTip() [2/2]
BToolTip::BToolTip |
( |
BMessage * |
archive | ) |
|
Creates a BToolTip object from the passed in archive.
- Since
- Haiku R1
◆ ~BToolTip()
Frees the memory allocated and destroys the object.
- Since
- Haiku R1
◆ Alignment()
Returns the tool tip's alignment.
- Since
- Haiku R1
◆ Archive()
Archives the object into the data message.
Saves the tool tip's sticky flag.
- Parameters
-
archive | A pointer to the BMessage object to archive the object into. |
deep | Whether or not to archive child views as well. |
- Returns
- A status code,
B_OK
if everything went well or an error code otherwise.
- Return values
-
B_OK | The object was archived. |
B_NO_MEMORY | Ran out of memory while archiving the object. |
- Since
- Haiku R1
Reimplemented from BArchivable.
◆ IsSticky()
bool BToolTip::IsSticky |
( |
| ) |
const |
Returns whether or not the sticky flag is set.
- Since
- Haiku R1
◆ Lock()
Allows derived classes to lock the tool tip while modifying it.
- Since
- Haiku R1
◆ MouseRelativeLocation()
BPoint BToolTip::MouseRelativeLocation |
( |
| ) |
const |
Returns the tool tip's relative mouse location.
- Since
- Haiku R1
◆ SetAlignment()
void BToolTip::SetAlignment |
( |
BAlignment |
alignment | ) |
|
|
virtual |
Set the alignment of the tool tip which determines where the tool tip should appear i.e. left or right from the current mouse cursor position, etc.
- Since
- Haiku R1
◆ SetMouseRelativeLocation()
void BToolTip::SetMouseRelativeLocation |
( |
BPoint |
location | ) |
|
|
virtual |
Set the location of the tooltip relative to the current mouse position.
The position is relative to the mouse cursor location at the time the tool tip is shown. It should be as close as possible to the mouse cursor without hiding important parts of the UI near the cursor while the parent view remains visible and reachable.
- Since
- Haiku R1
◆ SetSticky()
void BToolTip::SetSticky |
( |
bool |
enable | ) |
|
|
virtual |
Turns sticky flag on or off which determines whether or not the tool tip stays visible when the mouse moves.
- Since
- Haiku R1
◆ Unlock()
void BToolTip::Unlock |
( |
| ) |
|
|
protected |
Allows derived classes to unlock the tool tip.
- Since
- Haiku R1