History log of /haiku/src/kits/interface/ToolTipManager.cpp
Revision Date Author Comments
# 054c8166 09-Jan-2016 looncraz <looncraz@looncraz.net>

MediaPlayer PositionToolTip Color

Previously the layout would crush the default colors of BStringView preventing
BStringView from calling AdoptParentColors() on its own, so we must call it
manually.

In addition, the default tooltip view should fully adopt tooltip colors so
that any colors will default to the desired foreground color (which is the
same as the tooltip text color).

Fixes #12573.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>


# 7a96554c 09-Dec-2015 looncraz <looncraz@looncraz.net>

kits/interface: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0003-0017 from looncraz, unmodified.


# 8ce846e2 26-Aug-2013 Adrien Destugues <pulkomandy@gmail.com>

Fix infinite loop with huge tooltips

* With a tooltip big enough trying to align below or above the mouse, the algorithm would loop endlessly trying to fit it on either side.
* After trying each side once, set alignment to middle to try to show as much as the tooltip as possible.

A way to trigger this is browsing WebKit github repository in WebPositive. Github will show the full commit message in a tooltip when you hover a file or directory, and some of
their messages are big enough to overflow my desktop.


# 7f7f5eac 02-May-2012 John Scipione <jscipione@gmail.com>

Refactor ToolTipManager a bit.

* Change ShowTip() point parameter name to where.
* Add a parameterless ResetWindowFrame() overload that get's the current
where and calls ResetWindowFrame(BPoint where) which does the actual
work. FrameResized() calls this parameterless ResetWindowFrame()
method instead of doing the work in that method. This is functionaly
the same but allows me to call the parameterless ResetWindowFrame()
elsewhere.


# 2f2f3fa0 28-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Moved stable tool tip concept into the BToolManager class.

* This removes the fVisibleToolTip member from BView, and fixes bug #5669;
BToolTipManager::ShowTip() now gets the owner of the tool tip as an extra
parameter.
* Removed the work-around to hide that bug.
* Improved ToolTipTest application to include more test cases like a view that
periodically update its tool tip via SetToolTip(const char*), and one that
sets a new tool tip every second.
* Furthermore, added a test that shows that inner views inherit the tool tip
of their parents.
* Fixed another bug in BToolTipManager::ShowTip() that would release an
extra reference to the tool tip currently shown.


# d2717a34 20-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Also hide tool tips if a key has been pressed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d6dc833 10-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Made sure the tool tip stays on screen without moving itself below the cursor;
I'm afraid there is nothing left of stippi's earlier solution. This fixes
bug #5097.
* The alignment as specified in the BToolTip is now respected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34616 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ac097c5 30-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Made the BToolTipManager lock non-static. Create the singleton via
pthread_once().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34366 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 92c015e6 18-Sep-2009 Stephan Aßmus <superstippi@gmx.de>

Make sure tool tips are not displayed outside of the screen bounds.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33166 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ffbab2a 10-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the BToolTip interface a bit more convenient to use when subclassing it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32249 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60286ab2 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Use kMenuWindowFeel for the tool tips, or else they won't work on
B_AVOID_FRONT windows (like the Deskbar).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcd50212 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the tool tip manager's lock available, and guarded adding/removing the
tool tip view with this lock, too.
* BTextToolTip::SetText() can now be called in all circumstances safely.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32242 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8318af01 03-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
might need to be improved over time (also, some things as archivability
aren't fully implemented yet). The ToolTip.h header should get public once
finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32078 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8ce846e2b1443408df635e73c3651d87c1d7363a 26-Aug-2013 Adrien Destugues <pulkomandy@gmail.com>

Fix infinite loop with huge tooltips

* With a tooltip big enough trying to align below or above the mouse, the algorithm would loop endlessly trying to fit it on either side.
* After trying each side once, set alignment to middle to try to show as much as the tooltip as possible.

A way to trigger this is browsing WebKit github repository in WebPositive. Github will show the full commit message in a tooltip when you hover a file or directory, and some of
their messages are big enough to overflow my desktop.


# 7f7f5eac6ea9054b982e22e261121921b640b60f 02-May-2012 John Scipione <jscipione@gmail.com>

Refactor ToolTipManager a bit.

* Change ShowTip() point parameter name to where.
* Add a parameterless ResetWindowFrame() overload that get's the current
where and calls ResetWindowFrame(BPoint where) which does the actual
work. FrameResized() calls this parameterless ResetWindowFrame()
method instead of doing the work in that method. This is functionaly
the same but allows me to call the parameterless ResetWindowFrame()
elsewhere.


# 2f2f3fa042bf2de464d8318de702db7106b686a2 28-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Moved stable tool tip concept into the BToolManager class.

* This removes the fVisibleToolTip member from BView, and fixes bug #5669;
BToolTipManager::ShowTip() now gets the owner of the tool tip as an extra
parameter.
* Removed the work-around to hide that bug.
* Improved ToolTipTest application to include more test cases like a view that
periodically update its tool tip via SetToolTip(const char*), and one that
sets a new tool tip every second.
* Furthermore, added a test that shows that inner views inherit the tool tip
of their parents.
* Fixed another bug in BToolTipManager::ShowTip() that would release an
extra reference to the tool tip currently shown.


# d2717a34c6174765e8f20a145bc8040a2d5d6877 20-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Also hide tool tips if a key has been pressed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d6dc833bdefa3e4d45b965fb642492f5d947be0 10-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Made sure the tool tip stays on screen without moving itself below the cursor;
I'm afraid there is nothing left of stippi's earlier solution. This fixes
bug #5097.
* The alignment as specified in the BToolTip is now respected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34616 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ac097c559d3d6ff019b1c22a8a3246558b99fd7 30-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Made the BToolTipManager lock non-static. Create the singleton via
pthread_once().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34366 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 92c015e696548862ff3dc8b4592589e38e97ac34 18-Sep-2009 Stephan Aßmus <superstippi@gmx.de>

Make sure tool tips are not displayed outside of the screen bounds.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33166 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ffbab2aff6bf52dc4bbfcd68020122d466f2083 10-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the BToolTip interface a bit more convenient to use when subclassing it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32249 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60286ab2f882df542700c81e70797b09841a81f2 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Use kMenuWindowFeel for the tool tips, or else they won't work on
B_AVOID_FRONT windows (like the Deskbar).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcd502127502d89c0c913dce87ec737ae3b4cb7d 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the tool tip manager's lock available, and guarded adding/removing the
tool tip view with this lock, too.
* BTextToolTip::SetText() can now be called in all circumstances safely.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32242 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8318af01b99f0c1c6622b7bf33db02794b7eaa20 03-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
might need to be improved over time (also, some things as archivability
aren't fully implemented yet). The ToolTip.h header should get public once
finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32078 a95241bf-73f2-0310-859d-f6bbb57e9c96