Haiku API Bindings
ToolTip
Not logged in

Documentation | InterfaceKit | ToolTip

SYNOPSIS

Perl

use HaikuR1::Private::ToolTip;

$view->SetToolTip($tooltip);

Python

from HaikuR1.Private import 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

HaikuR1::ToolTip->new();
HaikuR1::ToolTip->new($archive);

Python

ToolTip()
ToolTip(archive)

Alignment

SetAlignment

Gets or sets the ToolTip's preferred alignment

Perl

$tooltip->Alignment();
$tooltip->SetAlignment($alignment);

Python

tooltip.Alignment()
tooltip.SetAlignment(alignment)

An Alignment, the preferred alignment.

Lock

Unlock

Locks or unlocks the ToolTip.

Perl

$tooltip->Lock();
$tooltip->Unlock();

Python

tooltip.Lock()
tooltip.Unlock()

MouseRelativeLocation

SetMouseRelativeLocation

Gets or sets the mouse-relative location.

Perl

$tooltip->MouseRelativeLocation();
$tooltip->SetMouseRelativeLocation($location);

Python

tooltip.MouseRelativeLocation()
tooltip.SetMouseRelativeLocation(location)

Sets the mouse-relative location (the offset from the mouse position at which the ToolTip should appear).

Stickiness

IsSticky

SetSticky

Gets or sets the ToolTip's stickiness.

Perl

$tooltip->IsSticky();
$tooltip->SetSticky($enable);

Python

tooltip.IsSticky()
tooltip.SetSticky(enable)

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

$tooltip->View();

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

$tooltip->AttachedToWindow();

Python

tooltip.AttachedToWindow()

DetachedFromWindow

Sent when the ToolTip is detached from its Window.

Perl

$tooltip->DetachedFromWindow();

Python

tooltip.DetachedFromWindow()

ARCHIVABLE INTERFACE

ToolTip inherits the methods and hooks of Archivable.