Documentation | InterfaceKit | ToolTip
SYNOPSIS
Perl
Python
use HaikuR1::Private::ToolTip;
$view->SetToolTip($tooltip);
DESCRIPTION
Exposes the BToolTip
object.
This class is part of Haiku's private API. For the most part, you will not need this class; View already supports setting a ToolTip from a string. This class is provided for use in custom classes. It is useful for creating a custom View (if you need more control over the ToolTip functionality), or creating a custom ToolTip.
For more information on ToolTip, see the Haiku Book class description.
METHODS
Constructor
Creates a ToolTip.
Perl
Python
HaikuR1::ToolTip->new(); HaikuR1::ToolTip->new($archive);
archive
An optional Message, if provided, contains an archived version of the ToolTip.
Alignment
SetAlignment
Gets or sets the ToolTip's preferred alignment
Perl
Python
$tooltip->Alignment(); $tooltip->SetAlignment($alignment);
An Alignment, the preferred alignment.
Lock
Unlock
Locks or unlocks the ToolTip.
Perl
Python
$tooltip->Lock(); $tooltip->Unlock();
MouseRelativeLocation
SetMouseRelativeLocation
Gets or sets the mouse-relative location.
Perl
Python
$tooltip->MouseRelativeLocation(); $tooltip->SetMouseRelativeLocation($location);
Sets the mouse-relative location (the offset from the mouse position at which the ToolTip should appear).
location
A Point, the offset.
Stickiness
IsSticky
SetSticky
Gets or sets the ToolTip's stickiness.
Perl
Python
$tooltip->IsSticky(); $tooltip->SetSticky($enable);
enable
A boolean, if true, the ToolTip becomes sticky; otherwise, the ToolTip is not sticky.
View
Returns the View object that displays the ToolTip (not the View that the TooTip is attached to). Can also be called as a hook.
Perl
Python
$tooltip->View();
HOOKS
AttachedToWindow
Sent when the ToolTip is attached to a Window. (Note that this is not the Window of the View that the TooTip is attached to, but a separate Window created for the ToolTip.)
Perl
Python
$tooltip->AttachedToWindow();
DetachedFromWindow
Sent when the ToolTip is detached from its Window.
Perl
Python
$tooltip->DetachedFromWindow();
ARCHIVABLE INTERFACE
ToolTip
inherits the methods and hooks of Archivable.